From b4edf6ce42debe4edcc85414d9f6c0d41f480587 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期五, 20 六月 2025 11:36:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/purchase/EamEquipmentPurchasePlanList.vue | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 378 insertions(+), 0 deletions(-) diff --git a/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue b/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue new file mode 100644 index 0000000..0e6d69d --- /dev/null +++ b/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue @@ -0,0 +1,378 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="閲囪喘璁″垝缂栫爜"> + <j-input placeholder="璇疯緭鍏ラ噰璐鍒掔紪鐮�" v-model="queryParam.planCode"></j-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="閲囪喘璁″垝鍚嶇О"> + <j-input placeholder="璇疯緭鍏ラ噰璐鍒掑悕绉�" v-model="queryParam.planName"></j-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="绠$悊鍒嗙被"> + <j-dict-select-tag dict-code="equipment_abc_flag" placeholder="璇烽�夋嫨绠$悊鍒嗙被" + v-model="queryParam.equipmentImportance"></j-dict-select-tag> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="toggleSearchStatus"> + <a-form-item label="璁″垝鐘舵��"> + <j-dict-select-tag dict-code="equipment_purchase_plan_status" placeholder="璇烽�夋嫨璁″垝鐘舵��" + v-model="queryParam.planStatus"></j-dict-select-tag> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('璁惧閲囪喘璁″垝')">瀵煎嚭</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> + <a-button type="primary" icon="download" @click="handleTemplateXlsDownload">瀵煎叆妯℃澘涓嬭浇</a-button> + <!-- 楂樼骇鏌ヨ鍖哄煙 --> +<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{ x: 'max-content' }" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange" + :customRow="customTableRow" + > + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 涓嬭浇 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <a @click="handleDetail(record)">璇︽儏</a> + <span v-if="record.planStatus === 'NEWLY'"> + <a-divider type="vertical" /> + <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> + <a>鎻愪氦</a> + </a-popconfirm> + </span> + <span v-else-if="record.planStatus === 'PENDING_AUDIT'"> + <a-divider type="vertical" /> + <a @click="handleAudit(record)">瀹℃牳</a> + </span> + <span v-if="record.planStatus === 'NEWLY'"> + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleEdit(record)">缂栬緫</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + </span> + </a-table> + </div> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane tab="璁惧閲囪喘璁″垝闄勪欢" key="1" > + <eam-purchase-plan-attachment-list ref="eamPurchasePlanAttachmentList"></eam-purchase-plan-attachment-list> + </a-tab-pane> + </a-tabs> + + <eam-equipment-purchase-plan-modal ref="modalForm" @ok="modalFormOk"></eam-equipment-purchase-plan-modal> + <eam-equipment-purchase-plan-audit-modal ref="modalAuditForm" @ok="modalFormOk"></eam-equipment-purchase-plan-audit-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamEquipmentPurchasePlanModal from './modules/EamEquipmentPurchasePlanModal' + import EamEquipmentPurchasePlanAuditModal from './modules/EamEquipmentPurchasePlanAuditModal.vue' + import EamPurchasePlanAttachmentList from './EamPurchasePlanAttachmentList.vue' + import OutboundDetailList from '../../tms/OutboundDetailList.vue' + import { getAction, templateXlsDownload } from '../../../api/manage' + + export default { + name: 'EamEquipmentPurchasePlanList', + mixins:[JeecgListMixin, mixinDevice], + components: { + OutboundDetailList, + EamEquipmentPurchasePlanModal, + EamEquipmentPurchasePlanAuditModal, + EamPurchasePlanAttachmentList + }, + data () { + return { + description: 'eam_equipment_purchase_plan绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + }, + fixed: 'left' + }, + { + title:'閲囪喘璁″垝缂栫爜', + align:"center", + dataIndex: 'planCode', + fixed: 'left' + }, + { + title:'閲囪喘璁″垝鍚嶇О', + align:"center", + dataIndex: 'planName', + fixed: 'left' + }, + { + title:'璁″垝鐘舵��', + align:"center", + dataIndex: 'planStatus_dictText' + }, + { + title:'鍨嬪彿', + align:"center", + dataIndex: 'equipmentModel' + }, + { + title:'閲囪喘鏁伴噺', + align:"center", + dataIndex: 'purchaseNumber' + }, + { + title:'棰勮鍗曚环', + align:"center", + dataIndex: 'estimatedUnitPrice' + }, + { + title:'鎬讳环', + align:"center", + dataIndex: 'totalPrice' + }, + { + title:'鍚堝悓鎬婚噾棰�', + align:"center", + dataIndex: 'overallContractAmount' + }, + { + title:'绠$悊鍒嗙被', + align:"center", + dataIndex: 'equipmentImportance' + }, + // { + // title:'璁″垝绫诲埆', + // align:"center", + // dataIndex: 'planCategory' + // }, + { + title:'鐢宠浜�', + align:"center", + dataIndex: 'applicant' + }, + { + title:'鐢宠杞﹂棿', + align:"center", + dataIndex: 'applicantProduction_dictText' + }, + { + title:'璁″垝寮�濮嬫棩鏈�', + align:"center", + dataIndex: 'planStartDate' + }, + { + title:'璁″垝瀹屾垚鏃ユ湡', + align:"center", + dataIndex: 'planEndDate' + }, + { + title:'璁″垝鎻忚堪', + align:"center", + dataIndex: 'planDescription' + }, + { + title:'瀹炴柦鍙婂崗鍔╅儴闂�', + align:"center", + dataIndex: 'relatedDeparts' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/eamEquipmentPurchasePlan/list", + submit: "/eam/eamEquipmentPurchasePlan/submit", + audit: "/eam/eamEquipmentPurchasePlan/audit", + delete: "/eam/eamEquipmentPurchasePlan/delete", + deleteBatch: "/eam/eamEquipmentPurchasePlan/deleteBatch", + exportXlsUrl: "/eam/eamEquipmentPurchasePlan/exportXls", + importExcelUrl: "eam/eamEquipmentPurchasePlan/importExcel", + templateXlsDownloadUrl: '瀵煎叆妯℃澘/璁惧閲囪喘璁″垝瀵煎叆妯℃澘_v1.1.xlsx' + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + handleTemplateXlsDownload() { + templateXlsDownload(this.url.templateXlsDownloadUrl) + }, + handleSubmit(id) { + getAction(this.url.submit,{ id: id }).then((res)=>{ + if(res.success){ + this.$message.success(res.message); + this.loadData(this.queryParam); + }else{ + this.$message.warning(res.message); + } + }) + }, + handleAudit(record) { + this.$refs.modalAuditForm.edit(record); + this.$refs.modalAuditForm.title="瀹℃牳"; + this.$refs.modalAuditForm.disableSubmit = true; + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.$refs.eamPurchasePlanAttachmentList.dataSource = [] + this.$refs.eamPurchasePlanAttachmentList.onClearSelected() + }, + customTableRow(record) { + return { + style: { + cursor: 'pointer' + }, + on: { + click: () => { + this.onSelectChange([record.id]) + } + } + } + }, + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows + this.$refs.eamPurchasePlanAttachmentList.queryParam.planId = selectedRowKeys[0] + this.$refs.eamPurchasePlanAttachmentList.dataSource = [] + this.$refs.eamPurchasePlanAttachmentList.onClearSelected() + if (selectedRowKeys.length === 1) { + this.$refs.eamPurchasePlanAttachmentList.loadData() + } + }, + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'planName',text:'閲囪喘璁″垝鍚嶇О',dictCode:''}) + fieldList.push({type:'string',value:'planCode',text:'閲囪喘璁″垝缂栫爜',dictCode:''}) + fieldList.push({type:'string',value:'planStatus',text:'璁″垝鐘舵��',dictCode:''}) + fieldList.push({type:'string',value:'equipmentModel',text:'鍨嬪彿',dictCode:''}) + fieldList.push({type:'int',value:'purchaseNumber',text:'閲囪喘鏁伴噺',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'estimatedUnitPrice',text:'棰勮鍗曚环',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'totalPrice',text:'鎬讳环',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'overallContractAmount',text:'鍚堝悓鎬婚噾棰�',dictCode:''}) + fieldList.push({type:'string',value:'equipmentImportance',text:'ABC鏍囪瘑(绠$悊鍒嗙被)',dictCode:''}) + fieldList.push({type:'string',value:'planCategory',text:'璁″垝绫诲埆',dictCode:''}) + fieldList.push({type:'string',value:'applicant',text:'鐢宠浜�',dictCode:''}) + fieldList.push({type:'string',value:'applicantProduction',text:'鐢宠杞﹂棿',dictCode:''}) + fieldList.push({type:'date',value:'planStartDate',text:'璁″垝寮�濮嬫棩鏈�'}) + fieldList.push({type:'date',value:'planEndDate',text:'璁″垝瀹屾垚鏃ユ湡'}) + fieldList.push({type:'string',value:'planDescription',text:'璁″垝鎻忚堪',dictCode:''}) + fieldList.push({type:'string',value:'relatedDeparts',text:'瀹炴柦鍙婂崗鍔╅儴闂�',dictCode:''}) + fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file -- Gitblit v1.9.3