From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 27 六月 2025 16:11:50 +0800 Subject: [PATCH] 添加工作流 --- src/views/eam/RepairOrderList.vue | 171 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 142 insertions(+), 29 deletions(-) diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index fdf05fe..6bf4fe2 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="缁翠慨" + title="" :bordered="false" > <div class="table-page-search-wrapper"> @@ -122,11 +122,12 @@ <a-form-item label="宸ュ尯"> <j-dict-select-tag allow-clear - placeholder="璇烽�夋嫨璧勫伐鍖�" + placeholder="璇烽�夋嫨宸ュ尯" :triggerChange="true" - dictCode="mom_base_area,name,id,del_flag!='1'" + dictCode="mom_base_area,name,id,del_flag!='1' and type='2'" v-model="queryParam.factoryModelId" /> + <!-- dictCode="mom_base_area,name,id,del_flag!='1'" --> </a-form-item> </a-col> <a-col @@ -162,25 +163,70 @@ </a-form-item> </a-col> </a-row> - <!-- <a-row :gutter="24"> - <a-col + <a-row :gutter="24"> + <a-col :xl="6" :lg="7" - :md="8" - :sm="24"> - <a-form-item - label="宸ュ尯" - > + :md="8" + :sm="24" + > + <a-form-item label="ABC鏍囪瘑"> <j-dict-select-tag allow-clear - placeholder="璇烽�夋嫨宸ュ尯" + placeholder="璇烽�夋嫨ABC鏍囪瘑" :triggerChange="true" - dictCode="mom_base_area,name,id,del_flag!='1'" - v-model="queryParam.factoryModelId" + dictCode="ABC-standard-result" + v-model="queryParam.equipmentImportanceId" /> </a-form-item> </a-col> - </a-row> --> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="鏁呴殰鍘熷洜"> + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨鏁呴殰鍘熷洜" + :triggerChange="true" + dictCode="repair_order_fault_cause" + v-model="queryParam.faultCause" + /> + </a-form-item> + </a-col> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="鎶ヤ慨鏃堕棿"> + <a-range-picker + style="width: 100%;" + format="YYYY-MM-DD HH:mm:ss" + v-model="faultTime" + @change="timeChange" + /> + </a-form-item> + </a-col> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="鍒涘缓鏃堕棿"> + <a-range-picker + style="width: 100%;" + format="YYYY-MM-DD HH:mm:ss" + v-model="createTimes" + @change="timeChangeCreate" + /> + </a-form-item> + </a-col> + </a-row> </a-form> </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> @@ -216,13 +262,18 @@ @click="searchReset" icon="reload" >閲嶇疆</a-button> - <a-button + <!-- <a-button + type="primary" + icon="download" + @click="handleExportXls('缁翠慨灞ュ巻')" + >瀵煎嚭</a-button> --> + <!-- <a-button hidden type="primary" icon="plus" @click="handleDispatch()" :disabled="selectionRows.length==0" - >娲惧伐</a-button> + >娲惧伐</a-button> --> <a-button type="primary" icon="plus" @@ -383,6 +434,44 @@ </a-dropdown> </span> + <template + slot="equipmentNum" + slot-scope="text, record" + > + <a-popover title="鏁呴殰鍘熷洜缁熻"> + <template slot="content"> + <p + v-for="(faultCauseMap, index) in record.equipmentFaultCause" + :key="index" + > + <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span> + </p> + </template> + <span> + {{ record.equipmentNum }} + </span> + </a-popover> + </template> + + <template + slot="faultCauseCount" + slot-scope="text, record" + > + <a-popover title="鏁呴殰鍘熷洜缁熻"> + <template slot="content"> + <p + v-for="(faultCauseMap, index) in record.allFaultCause" + :key="index" + > + <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span> + </p> + </template> + <span> + {{ record.faultCauseCount }} + </span> + </a-popover> + </template> + </a-table> </div> @@ -508,6 +597,7 @@ import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue' import store from '@/store' import dayjs from 'dayjs' +import moment from 'moment' export default { name: "RepairOrderList", mixins: [JeecgListMixin], @@ -536,6 +626,8 @@ return { description: '缁翠慨宸ュ崟绠$悊椤甸潰', // 琛ㄥご + faultTime: [], + createTimes: [], columns: [ { title: '#', @@ -553,6 +645,11 @@ dataIndex: 'specificEquipment', width: 90, scopedSlots: { customRender: 'specificEquipment' } + }, + { + title: 'ABC鏍囪瘑', + align: "center", + dataIndex: 'equipmentImportanceId', }, { title: '鐘舵��', @@ -581,7 +678,8 @@ { title: '缁熶竴缂栫爜', align: "center", - dataIndex: 'equipmentNum' + dataIndex: 'equipmentNum', + scopedSlots: { customRender: 'equipmentNum' } }, { title: '璁惧鍚嶇О', @@ -641,11 +739,11 @@ align: "center", dataIndex: 'faultTime' }, - { - title: '鎶ヤ慨浜�', - align: "center", - dataIndex: 'errUda2' - }, + // { + // title: '鎶ヤ慨浜�', + // align: "center", + // dataIndex: 'errUda2', + // }, { title: '鏁呴殰鎻忚堪', align: "center", @@ -654,11 +752,12 @@ customRender: 'jell' } }, - // { - // title: '鏁呴殰鍘熷洜', - // align: "center", - // dataIndex: 'faultReason' - // }, + { + title: '鏁呴殰鍘熷洜', + align: "center", + dataIndex: 'faultCauseCount', + scopedSlots: { customRender: 'faultCauseCount' } + }, // { // title: '鏁呴殰鐜拌薄', // align: "center", @@ -800,8 +899,14 @@ }, methods: { - - + timeChange() { + this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss") + this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss") + }, + timeChangeCreate() { + this.queryParam.createStartTime = moment(this.createTimes[0]).format("YYYY-MM-DD HH:mm:ss") + this.queryParam.createEndTime = moment(this.createTimes[1]).format("YYYY-MM-DD HH:mm:ss") + }, clickThenSelect(record) { return { on: { @@ -952,6 +1057,12 @@ this.$refs.repairOrderExcuteDrawer.visible = true this.$refs.repairOrderExcuteDrawer.title = '缁翠慨宸ュ崟鎵ц' }, + handleDetail(record) { + this.excuteRepairOrder = record; + this.excuteRepairOrder.status = '4'; + this.$refs.repairOrderExcuteDrawer.visible = true + this.$refs.repairOrderExcuteDrawer.title = '缁翠慨璇︽儏' + }, searchQuery() { this.loadData(1) @@ -966,6 +1077,8 @@ this.loadData(1) this.onClearSelected() this.$refs.FaultDescriptionList.faultId = '-1' + this.faultTime = [] + this.createTimes = [] }, getReports() { this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�'; -- Gitblit v1.9.3