From 9219b0c4d7aecd6347a120ae0923ee5a6a25da05 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 23 四月 2025 10:34:18 +0800 Subject: [PATCH] 1、我的待办页面 设备维修 分类审批弹窗功能逻辑开发并复用至我的已办和维修工单页面 2、根据会议内容调整系统功能 3、调整设备铭牌打印高度 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 23 - src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue | 274 +++++++----- src/views/eam/equipment/modules/NameplateModal.vue | 7 src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue | 2 src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue | 71 +- src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue | 737 +++++++++++++++++---------------- src/views/eam/repair/EamRepairOrderList.vue | 69 ++- src/views/eam/repair/EamReportRepairList.vue | 44 - src/views/flowable/workflow/FlowCompleted.vue | 28 + src/views/flowable/workflow/FlowTodo.vue | 11 src/views/eam/equipment/EamEquipmentList.vue | 12 11 files changed, 682 insertions(+), 596 deletions(-) diff --git a/src/views/eam/equipment/EamEquipmentList.vue b/src/views/eam/equipment/EamEquipmentList.vue index 39d314e..e136054 100644 --- a/src/views/eam/equipment/EamEquipmentList.vue +++ b/src/views/eam/equipment/EamEquipmentList.vue @@ -107,7 +107,6 @@ style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onSelectChange([])">娓呯┖</a> </div> - <a-table ref="table" size="middle" @@ -305,7 +304,6 @@ { title: '璁惧鍒嗙被', align: 'center', - width: 100, dataIndex: 'equipmentCategory_dictText' }, { @@ -338,23 +336,20 @@ width: 100, dataIndex: 'installationPosition' }, - { title: '绔嬮」鍗″彿', align: 'center', - width: 100, dataIndex: 'cardNumber' }, { title: '鍑哄巶缂栧彿', align: 'center', - width: 100, dataIndex: 'factoryNumber' }, { title: '鏈哄簥鍘傚', align: 'center', - width: 100, + width: 300, dataIndex: 'manufacturingEnterprise' }, { @@ -423,23 +418,23 @@ { title: '璁惧绔彛', align: 'center', - width: 100, dataIndex: 'equipmentPort' }, { title: '鍧愭爣鏁伴噺', align: 'center', - width: 100, dataIndex: 'coordinateNum' }, { title: '鍒涘缓浜�', align: 'center', + width: 100, dataIndex: 'createBy_dictText' }, { title: '鍒涘缓鏃堕棿', align: 'center', + width: 200, dataIndex: 'createTime' }, { @@ -455,7 +450,6 @@ { title: '澶囨敞', align: 'center', - width: 100, dataIndex: 'remark' }, { diff --git a/src/views/eam/equipment/modules/NameplateModal.vue b/src/views/eam/equipment/modules/NameplateModal.vue index 2d61ad7..5b974ae 100644 --- a/src/views/eam/equipment/modules/NameplateModal.vue +++ b/src/views/eam/equipment/modules/NameplateModal.vue @@ -133,14 +133,15 @@ } th { - font-size: 28px; + font-size: 24px; letter-spacing: 3px; - padding: 20px; + padding: 12px; } td { - font-size: 18px; + font-size: 14px; width: 33%; + padding: 6px; } } </style> \ No newline at end of file diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index 8eb2f4c..bc708f8 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -77,27 +77,6 @@ class="j-table-force-nowrap" @change="handleTableChange"> - <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="handleEdit(record)" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" >缂栬緫</a> @@ -268,7 +247,7 @@ dataIndex: 'action', align: 'center', fixed: 'right', - width: 147, + width: 200, scopedSlots: { customRender: 'action' } } this.columns = [...this.columns, operationColumn] diff --git a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue index e0713ab..2b5c30b 100644 --- a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue @@ -12,17 +12,20 @@ </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"></lx-search-equipment-select> + <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="queryParam.equipmentId"></lx-search-equipment-select> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="璁″垝淇濆吇鏃ユ湡"> - <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> + <a-range-picker v-model="queryParam.maintenanceDateRange" @change="onMaintenanceDateChange" + format="YYYY-MM-DD" value-format="YYYY-MM-DD"/> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> <a-form-item label="淇濆吇鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="week_maintenance_status" v-model="queryParam.maintenanceStatus" /> + <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="week_maintenance_status" + v-model="queryParam.maintenanceStatus"/> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> @@ -42,16 +45,16 @@ <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="handlerBatchAbolish" v-if="isShowAuth('eam:weekMaintenance:abolish')"> - <a-icon type="delete" /> + <a-icon type="delete"/> 浣滃簾 </a-menu-item> <a-menu-item key="2" @click="handlerBatchCollect" v-if="isShowAuth('eam:weekMaintenance:collect')"> - <a-icon type="form" /> + <a-icon type="form"/> 棰嗗彇 </a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down" /> + <a-icon type="down"/> </a-button> </a-dropdown> </div> @@ -79,396 +82,406 @@ @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:edit')" @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:edit')" /> - <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)" v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:collect')"> + <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:edit')"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)"> <a>棰嗗彇</a> </a-popconfirm> - <a-divider type="vertical" v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:collect')" /> + + <a-divider type="vertical"/> + <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> <a-menu slot="overlay"> - <a-menu-item v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:weekMaintenance:abolish')"> + <a-menu-item> <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handlerAbolish(record.id)"> <a>浣滃簾</a> </a-popconfirm> </a-menu-item> - <a-menu-item > + <a-menu-item> <a @click="handleDetail(record)">璇︽儏</a> </a-menu-item> </a-menu> </a-dropdown> - </span> + </template> + <template v-else> + <a @click="handleDetail(record)">璇︽儏</a> + </template> + </span> </a-table> </div> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal> - <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal> + <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" + :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import EamWeekMaintenanceOrderModal from './modules/EamWeekMaintenanceOrderModal' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' -import { deleteAction, getAction } from '@api/manage' -import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' + import '@/assets/less/TableExpand.less' + import EamWeekMaintenanceOrderModal from './modules/EamWeekMaintenanceOrderModal' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import { deleteAction, getAction } from '@api/manage' + import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' -export default { - name: 'EamWeekMaintenanceOrderList', - mixins: [JeecgListMixin], - components: { - LxSearchEquipmentSelect, - EamWeekMaintenanceOrderModal, - WeekMaintenanceApprovalModal - }, - props: { - isDisplayOperation: { - type: Boolean, - default: true - } - }, - data() { - return { - description: '鍛ㄤ繚宸ュ崟绠$悊椤甸潰', - disableMixinCreated: true, - selectWeekMaintenanceData:{}, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 60, - align: 'center', - fixed: 'left', - customRender: function(t, r, index) { - return parseInt(index) + 1 - } - }, - { - title: '宸ュ崟鍙�', - align: 'center', - dataIndex: 'orderNum', - fixed: 'left', - width: 60, - }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentCode', - fixed: 'left', - width: 60, - }, - { - title: '璁惧鍚嶇О', - align: 'center', - dataIndex: 'equipmentName', - fixed: 'left', - width: 60, - }, - { - title: '鏍囧噯鍚嶇О', - align: 'center', - dataIndex: 'standardId_dictText', - width: 100, - }, - { - title: '璁″垝淇濆吇鏃ユ湡', - align: 'center', - dataIndex: 'maintenanceDate', - width: 60, - }, - { - title: '瀹為檯寮�濮嬫椂闂�', - align: 'center', - dataIndex: 'actualStartTime', - width: 60, - }, - { - title: '瀹為檯缁撴潫鏃堕棿', - align: 'center', - dataIndex: 'actualEndTime', - width: 60, - }, - { - title: '淇濆吇浜�', - align: 'center', - dataIndex: 'operator_dictText', - width: 60, - }, - { - title: '淇濆吇鐘舵��', - align: 'center', - dataIndex: 'maintenanceStatus_dictText', - width: 60, - }, - { - title: '鍒涘缓鏂瑰紡', - align: 'center', - dataIndex: 'creationMethod_dictText', - width: 60, - }, - { - title: '纭浜�', - align: 'center', - dataIndex: 'confirmUser_dictText', - width: 60, - }, - { - title: '纭鏃堕棿', - align: 'center', - dataIndex: 'confirmTime', - width: 60, - }, - { - title: '纭鎰忚', - align: 'center', - dataIndex: 'confirmComment', - width: 60, - }, - { - title: '鍒濋獙鏀朵汉', - align: 'center', - dataIndex: 'initialAcceptanceUser_dictText', - width: 60, - }, - { - title: '鍒濋獙鏀舵椂闂�', - align: 'center', - dataIndex: 'initialAcceptanceTime', - width: 60, - }, - { - title: '鍒濋獙鏀舵剰瑙�', - align: 'center', - dataIndex: 'initialAcceptanceComment', - width: 60, - }, - { - title: '缁堥獙鏀朵汉', - align: 'center', - dataIndex: 'finalAcceptanceUser_dictText', - width: 60, - }, - { - title: '缁堥獙鏀舵椂闂�', - align: 'center', - dataIndex: 'finalAcceptanceTime', - width: 60, - }, - { - title: '缁堥獙鏀舵剰瑙�', - align: 'center', - dataIndex: 'finalAcceptanceComment', - width: 60, - }, - { - title: '澶囨敞', - align: 'center', - dataIndex: 'remark', - width: 60, - }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align: 'center', - // fixed: 'right', - // width: 100, - // scopedSlots: { customRender: 'action' } - // } - ], - url: { - list: '/eam/weekMaintenanceOrder/list', - abolish: '/eam/weekMaintenanceOrder/abolish', - abolishBatch: '/eam/weekMaintenanceOrder/abolishBatch', - collect: '/eam/weekMaintenanceOrder/collect', - collectBatch: '/eam/weekMaintenanceOrder/collectBatch', - } - } - }, - created() { - if (!this.isDisplayOperation) { - return - } - const operationColumn = { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - fixed: 'right', - width: 147, - scopedSlots: { customRender: 'action' } - } - this.columns = [...this.columns, operationColumn] - this.loadData(1) - }, - computed: {}, - methods: { - onMaintenanceDateChange: function(value, dateString) { - this.queryParam.maintenanceDateBegin = dateString[0] - this.queryParam.maintenanceDateEnd = dateString[1] + export default { + name: 'EamWeekMaintenanceOrderList', + mixins: [JeecgListMixin], + components: { + LxSearchEquipmentSelect, + EamWeekMaintenanceOrderModal, + WeekMaintenanceApprovalModal }, - handlerAbolish(id) { - if(!this.url.abolish){ - this.$message.error("璇疯缃畊rl.abolish灞炴��!") + props: { + isDisplayOperation: { + type: Boolean, + default: true + } + }, + data() { + return { + description: '鍛ㄤ繚宸ュ崟绠$悊椤甸潰', + disableMixinCreated: true, + selectWeekMaintenanceData: {}, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + fixed: 'left', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '宸ュ崟鍙�', + align: 'center', + dataIndex: 'orderNum', + fixed: 'left', + width: 60 + }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentCode', + fixed: 'left', + width: 60 + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + fixed: 'left', + width: 60 + }, + { + title: '鏍囧噯鍚嶇О', + align: 'center', + dataIndex: 'standardId_dictText', + width: 100 + }, + { + title: '璁″垝淇濆吇鏃ユ湡', + align: 'center', + dataIndex: 'maintenanceDate', + width: 60 + }, + { + title: '瀹為檯寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'actualStartTime', + width: 60 + }, + { + title: '瀹為檯缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'actualEndTime', + width: 60 + }, + { + title: '淇濆吇浜�', + align: 'center', + dataIndex: 'operator_dictText', + width: 60 + }, + { + title: '淇濆吇鐘舵��', + align: 'center', + dataIndex: 'maintenanceStatus_dictText', + width: 60 + }, + { + title: '鍒涘缓鏂瑰紡', + align: 'center', + dataIndex: 'creationMethod_dictText', + width: 60 + }, + { + title: '纭浜�', + align: 'center', + dataIndex: 'confirmUser_dictText', + width: 60 + }, + { + title: '纭鏃堕棿', + align: 'center', + dataIndex: 'confirmTime', + width: 60 + }, + { + title: '纭鎰忚', + align: 'center', + dataIndex: 'confirmComment', + width: 60 + }, + { + title: '鍒濋獙鏀朵汉', + align: 'center', + dataIndex: 'initialAcceptanceUser_dictText', + width: 60 + }, + { + title: '鍒濋獙鏀舵椂闂�', + align: 'center', + dataIndex: 'initialAcceptanceTime', + width: 60 + }, + { + title: '鍒濋獙鏀舵剰瑙�', + align: 'center', + dataIndex: 'initialAcceptanceComment', + width: 60 + }, + { + title: '缁堥獙鏀朵汉', + align: 'center', + dataIndex: 'finalAcceptanceUser_dictText', + width: 60 + }, + { + title: '缁堥獙鏀舵椂闂�', + align: 'center', + dataIndex: 'finalAcceptanceTime', + width: 60 + }, + { + title: '缁堥獙鏀舵剰瑙�', + align: 'center', + dataIndex: 'finalAcceptanceComment', + width: 60 + }, + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', + width: 60 + } + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align: 'center', + // fixed: 'right', + // width: 100, + // scopedSlots: { customRender: 'action' } + // } + ], + url: { + list: '/eam/weekMaintenanceOrder/list', + abolish: '/eam/weekMaintenanceOrder/abolish', + abolishBatch: '/eam/weekMaintenanceOrder/abolishBatch', + collect: '/eam/weekMaintenanceOrder/collect', + collectBatch: '/eam/weekMaintenanceOrder/collectBatch' + } + } + }, + created() { + if (!this.isDisplayOperation) { return } - var that = this; - deleteAction(that.url.abolish, {id: id}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(1) - // that.$message.success(res.message); - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + fixed: 'right', + width: 200, + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] + this.loadData(1) + }, + computed: {}, + methods: { + onMaintenanceDateChange: function(value, dateString) { + this.queryParam.maintenanceDateBegin = dateString[0] + this.queryParam.maintenanceDateEnd = dateString[1] + }, + handlerAbolish(id) { + if (!this.url.abolish) { + this.$message.error('璇疯缃畊rl.abolish灞炴��!') + return + } + var that = this + deleteAction(that.url.abolish, { id: id }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + handlerBatchAbolish() { + if (!this.url.abolishBatch) { + this.$message.error('璇疯缃畊rl.abolishBatch灞炴��!') + return + } + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + return } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }); - }, - handlerBatchAbolish() { - if(!this.url.abolishBatch){ - this.$message.error("璇疯缃畊rl.abolishBatch灞炴��!") - return - } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - return; - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; - } - var that = this; - this.$confirm({ - title: "纭浣滃簾", - content: "鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?", - onOk: function () { - that.loading = true; - deleteAction(that.url.abolishBatch, {ids: ids}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - }); - } - }, - //鍗曚釜棰嗗彇 - handlerCollect(id) { - if(!this.url.collect){ - this.$message.error("璇疯缃畊rl.collect灞炴��!") - return - } - let that = this; - getAction(that.url.collect, {id: id}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(1) - // that.$message.success(res.message); - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); + var that = this + this.$confirm({ + title: '纭浣滃簾', + content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', + onOk: function() { + that.loading = true + deleteAction(that.url.abolishBatch, { ids: ids }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(that.selectedRowKeys.length) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, + //鍗曚釜棰嗗彇 + handlerCollect(id) { + if (!this.url.collect) { + this.$message.error('璇疯缃畊rl.collect灞炴��!') + return + } + let that = this + getAction(that.url.collect, { id: id }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + //鎵归噺棰嗗彇 + handlerBatchCollect() { + if (!this.url.collectBatch) { + this.$message.error('璇疯缃畊rl.abolishBatch灞炴��!') + return + } + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: '璇烽�夋嫨涓�鏉¤褰�' + }) + return } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }); - }, - //鎵归噺棰嗗彇 - handlerBatchCollect(){ - if(!this.url.collectBatch){ - this.$message.error("璇疯缃畊rl.abolishBatch灞炴��!") - return - } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message:'娑堟伅', - description:"璇烽�夋嫨涓�鏉¤褰�" - }); - return; - } else { - var ids = ""; - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ","; - } - var that = this; - this.$confirm({ - title: "纭棰嗗彇", - content: "鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?", - onOk: function () { - that.loading = true; - deleteAction(that.url.collectBatch, {ids: ids}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - that.onClearSelected(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); - } - }).finally(() => { - that.loading = false; - }); + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - }); + var that = this + this.$confirm({ + title: '纭棰嗗彇', + content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', + onOk: function() { + that.loading = true + deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(that.selectedRowKeys.length) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) + } + }) + } + }, + handleDetail(record) { + this.selectWeekMaintenanceData = Object.assign({}, record) + this.$refs.weekMaintenanceApprovalModal.recordDetail(record) + this.$refs.weekMaintenanceApprovalModal.title = '璇︽儏' + this.$refs.weekMaintenanceApprovalModal.disableSubmit = true } - }, - handleDetail(record) { - this.selectWeekMaintenanceData = Object.assign({}, record) - this.$refs.weekMaintenanceApprovalModal.recordDetail(record) - this.$refs.weekMaintenanceApprovalModal.title = '璇︽儏'; - this.$refs.weekMaintenanceApprovalModal.disableSubmit = true } } -} </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 4da6b7c..5d01fd4 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -45,7 +45,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">棰嗗彇</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button> + <!--<a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -80,11 +80,17 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" :scroll="{x:'max-content'}" - /> + > + <span slot="action" slot-scope="text, record"> + <a @click="handleDetail(record)">璇︽儏</a> + </span> + </a-table> </div> <!-- table鍖哄煙-end --> <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/> + + <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> </a-card> </template> @@ -94,18 +100,20 @@ import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal' import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' + import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal' export default { name: 'EamRepairOrderList', mixins: [JeecgListMixin], components: { + RepairOrderApprovalModal, LxSearchEquipmentSelect, ReceiveFaultModal }, - props:{ - isDisplayOperation:{ - type:Boolean, - default:true + props: { + isDisplayOperation: { + type: Boolean, + default: true } }, data() { @@ -163,22 +171,20 @@ { title: '鏁呴殰鍘熷洜', align: 'center', - dataIndex: 'faultReason', - width: 150 + dataIndex: 'faultReason' }, { title: '缁翠慨缁撴灉鎻忚堪', align: 'center', - dataIndex: 'repairDescription', + dataIndex: 'repairDescription' // width: 300 - }, - { - title: '缁翠慨鍥剧墖', - align: 'center', - dataIndex: 'imageFiles', - width: 100 - }, - + } + // { + // title: '缁翠慨鍥剧墖', + // align: 'center', + // dataIndex: 'imageFiles', + // width: 100 + // }, // { // title: '鏄惁濮斿', // align: 'center', @@ -211,6 +217,7 @@ // }, ], report_repair_status_list: [], + selectRepairOrderData: {}, url: { list: '/eam/eamRepairOrder/list', delete: '/eam/eamRepairOrder/delete', @@ -229,13 +236,14 @@ return } this.initDictData('report_repair_status') - // const operationColumn = { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align: 'center', - // scopedSlots: { customRender: 'action' } - // } - // this.columns = [...this.columns, operationColumn] + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + width: 100, + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] this.loadData(1) }, methods: { @@ -262,6 +270,19 @@ handleOpenReceiveFaultModal() { this.$refs.receiveFaultModalRef.visible = true }, + + /** + * 鐐瑰嚮璇︽儏瑙﹀彂 + * @param record 琛ㄦ牸琛屼俊鎭� + */ + handleDetail(record) { + this.selectRepairOrderData = Object.assign({}, record) + this.$refs.repairOrderApprovalModal.visible = true + this.$refs.repairOrderApprovalModal.title = '璇︽儏' + this.$refs.repairOrderApprovalModal.disableSubmit = true + this.$refs.repairOrderApprovalModal.getAllApproveData(record) + this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id }) + } } } </script> diff --git a/src/views/eam/repair/EamReportRepairList.vue b/src/views/eam/repair/EamReportRepairList.vue index fb7d04e..8e41d23 100644 --- a/src/views/eam/repair/EamReportRepairList.vue +++ b/src/views/eam/repair/EamReportRepairList.vue @@ -12,28 +12,18 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="isDisplayOperation"> - <a-form-item label="鍗曟嵁鐘舵��"> - <a-select placeholder="璇烽�夋嫨鍗曟嵁鐘舵��" v-model="queryParam.reportStatus" allow-clear> + <a-form-item label="鎶ヤ慨鐘舵��"> + <a-select placeholder="璇烽�夋嫨鎶ヤ慨鐘舵��" v-model="queryParam.reportStatus" allow-clear> <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }} </a-select-option> </a-select> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鏁呴殰绠�绉�"> - <!-- <a-select placeholder="璇烽�夋嫨鏁呴殰绠�绉�" v-model="queryParam.faultName" allow-clear>--> - <!-- <a-select-option v-for="item in faultReasonList" :key="item.faultName">--> - <!-- {{ item.faultName }}--> - <!-- </a-select-option>--> - <!-- </a-select>--> - <a-input placeholder="璇疯緭鍏ユ晠闅滅畝绉�" v-model="queryParam.faultName" allow-clear/> + <a-form-item label="鏁呴殰鎻忚堪"> + <a-input placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="queryParam.faultDescription" allow-clear/> </a-form-item> </a-col> - <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> - <!-- <a-form-item label="鏁呴殰鍒嗙被">--> - <!-- <a-input placeholder="璇疯緭鍏ユ晠闅滃垎绫�" v-model="queryParam.faultType"></a-input>--> - <!-- </a-form-item>--> - <!-- </a-col>--> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="鏁呴殰鏃堕棿"> <a-range-picker showTime v-model="faultTimeRange" value-format="YYYY-MM-DD HH:mm:ss" @@ -69,11 +59,11 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> <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="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-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -105,7 +95,7 @@ :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio'}" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:isDisplayOperation?'checkbox':'radio',getCheckboxProps:getCheckboxProps}" @change="handleTableChange"> <template slot="imageFiles" slot-scope="text, record" v-if="text"> @@ -184,7 +174,7 @@ width: 200 }, { - title: '鐘舵��', + title: '鎶ヤ慨鐘舵��', align: 'center', dataIndex: 'reportStatus_dictText', width: 100 @@ -255,8 +245,7 @@ created() { this.initDictData('breakdown_flag') this.initDictData('report_repair_status') - this.getFaultReasonListByApi() - if (!this.isDisplayOperation) this.queryParam = Object.assign({} ,this.propsQueryParam) + if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) else { const operationColumn = { title: '鎿嶄綔', @@ -266,6 +255,7 @@ width: 150 } this.columns = [...this.columns, operationColumn] + this.getFaultReasonListByApi() } this.loadData(1) }, @@ -317,6 +307,14 @@ this.$refs.imagesPreviewModalRef.visible = true }, + getCheckboxProps(record) { + return { + props: { + disabled: record.reportStatus !== 'WAIT_REPAIR' + } + } + }, + searchReset() { if (this.isDisplayOperation) this.queryParam = {} else this.queryParam = Object.assign({}, this.propsQueryParam) diff --git a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue index 657fe80..8423359 100644 --- a/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue +++ b/src/views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue @@ -35,10 +35,13 @@ <a-input placeholder="璇疯緭鍏ユ晠闅滃垎绫�" v-model="model.faultType_dictText" readOnly/> </a-form-model-item> </a-col> + </a-row> - <a-col :span="12"> - <a-form-model-item label="鏁呴殰鎻忚堪"> - <a-input placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="model.faultDescription" readOnly/> + <a-row> + <a-col :span="24"> + <a-form-model-item label="鏁呴殰鎻忚堪" prop="faultDescription" :labelCol="labelColLong" + :wrapperCol="wrapperColLong"> + <a-textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="model.faultDescription"/> </a-form-model-item> </a-col> </a-row> @@ -47,7 +50,8 @@ <a-col :span="12"> <a-form-model-item prop="faultStartTime" label="鏁呴殰寮�濮嬫椂闂�"> <a-date-picker showTime placeholder="璇烽�夋嫨鏁呴殰寮�濮嬫椂闂�" v-model="model.faultStartTime" - :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss"/> + :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss" :disabledDate="disabledDate" + :disabledTime="disabledTime"/> </a-form-model-item> </a-col> @@ -63,7 +67,8 @@ <a-row> <a-col :span="24"> <a-form-model-item prop="imageFiles" label="鎶ヤ慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" v-model="model.imageFilesResult"/> + <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" + v-model="model.imageFilesResult"/> </a-form-model-item> </a-col> </a-row> @@ -75,132 +80,171 @@ </a-form-model-item> </a-col> </a-row> - <!-- <a-form-model-item prop="reportStatus" label="鎶ヤ慨鐘舵��">--> - <!-- <a-input placeholder="璇疯緭鍏ユ姤淇姸鎬�" v-model="model.reportStatus" />--> - <!-- </a-form-model-item>--> - </a-form-model> </a-spin> </j-modal> </template> <script> -import { httpAction } from '@/api/manage' -import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import { httpAction } from '@/api/manage' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import moment from 'moment' -export default { - name: 'EamReportRepairModal', - components: { LxSearchEquipmentSelect }, - props: { - breakdownFlagList: { - type: Array + export default { + name: 'EamReportRepairModal', + components: { LxSearchEquipmentSelect }, + props: { + breakdownFlagList: { + type: Array + }, + faultReasonList: { + type: Array + } }, - faultReasonList: { - type: Array - } - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - model: {}, - labelCol: { - xs: { span: 24 }, - sm: { span: 8 } + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 12 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 4 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 18 } + }, + confirmLoading: false, + validatorRules: { + faultStartTime: [ + { required: true, message: '璇烽�夋嫨鏁呴殰寮�濮嬫椂闂�' } + ], + breakdownFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁鍋滄満' } + ], + equipmentId: [ + { required: true, message: '璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储' } + ], + faultName: [ + { required: true, message: '璇烽�夋嫨鏁呴殰绠�绉�' } + ], + faultDescription: [ + { required: true, message: '璇疯緭鍏ユ晠闅滄弿杩�' } + ] + }, + url: { + add: '/eam/eamReportRepair/add', + edit: '/eam/eamReportRepair/edit' + } + } + }, + methods: { + add() { + //鍒濆鍖栭粯璁ゅ�� + this.edit({ + faultDescription: '', + breakdownFlag: this.breakdownFlagList.find(item => item.label === '鍚�').value + }) }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 12 } + + edit(record) { + this.model = Object.assign({}, record, { imageFilesResult: record.imageFiles && this.isJSON(record.imageFiles) ? JSON.parse(record.imageFiles) : null }) + this.visible = true }, - labelColLong: { - xs: { span: 24 }, - sm: { span: 4 } + + handleFaultNameChange(value) { + const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) + this.model.faultType = faultReasonItem.faultCategory + this.model.faultType_dictText = faultReasonItem.faultCategory_dictText + this.model.faultDescription = faultReasonItem.faultDescription }, - wrapperColLong: { - xs: { span: 24 }, - sm: { span: 18 } + + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + console.log('model---------------', that.model) + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let httpUrl = '' + let method = '' + if (!this.model.id) { + httpUrl += this.url.add + method = 'post' + } else { + httpUrl += this.url.edit + method = 'put' + } + httpAction(httpUrl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = false + that.close() + }) + } else { + return false + } + }) }, - confirmLoading: false, - validatorRules: { - faultStartTime: [ - { required: true, message: '璇烽�夋嫨鏁呴殰寮�濮嬫椂闂�' } - ], - breakdownFlag: [ - { required: true, message: '璇烽�夋嫨鏄惁鍋滄満' } - ], - equipmentId: [ - { required: true, message: '璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储' } - ], - faultName: [ - { required: true, message: '璇烽�夋嫨鏁呴殰绠�绉�' } - ] + + // 鍒ゆ柇鏄笉鏄疛SON瀛楃涓� + isJSON(str) { + try { + JSON.parse(str) + return true // 濡傛灉杩欓噷娌℃湁鎶涘嚭寮傚父锛岃鏄庢槸JSON鏍煎紡鐨勫瓧绗︿覆 + } catch (e) { + return false // 濡傛灉鎶涘嚭寮傚父锛岃鏄庝笉鏄疛SON鏍煎紡鐨勫瓧绗︿覆 + } }, - url: { - add: '/eam/eamReportRepair/add', - edit: '/eam/eamReportRepair/edit' + + /** + * 绂佺敤鏃ユ湡 + * @params current 琚鐢ㄧ殑鏃堕棿 + */ + disabledDate(current) { + // Can not select days after today + return current > moment().endOf('day') + }, + + /** + * 绂佺敤鏃ユ湡涓殑鏃堕棿 + * @returns {{disabledHours: (function(): Array), disabledMinutes: (function(): Array)}} + */ + disabledTime() { + function range(start, end) { + const result = [] + for (let i = start; i < end; i++) { + result.push(i) + } + return result + } + + return { + disabledHours: () => range(moment().hour() + 1, 24), + disabledMinutes: () => range(moment().minute(), 60) + } + }, + + close() { + this.$emit('close') + this.visible = false + if (this.$refs.form) this.$refs.form.clearValidate() } } - }, - created() { - }, - methods: { - add() { - //鍒濆鍖栭粯璁ゅ�� - this.edit({ - breakdownFlag: this.breakdownFlagList.find(item => item.label === '鏄�').value - }) - }, - edit(record) { - this.model = Object.assign({}, record) - this.visible = true - }, - handleFaultNameChange(value) { - const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) - this.model.faultType = faultReasonItem.faultCategory - this.model.faultType_dictText = faultReasonItem.faultCategory_dictText - this.model.faultDescription = faultReasonItem.faultDescription - }, - - handleOk() { - const that = this - // 瑙﹀彂琛ㄥ崟楠岃瘉 - console.log('model---------------', that.model) - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true - let httpUrl = '' - let method = '' - if (!this.model.id) { - httpUrl += this.url.add - method = 'post' - } else { - httpUrl += this.url.edit - method = 'put' - } - httpAction(httpUrl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message) - that.$emit('ok') - } else { - that.$message.warning(res.message) - } - }).finally(() => { - that.confirmLoading = false - that.close() - }) - } else { - return false - } - }) - }, - - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - } } -} </script> <style lang="less" scoped> diff --git a/src/views/flowable/workflow/FlowCompleted.vue b/src/views/flowable/workflow/FlowCompleted.vue index 21cf990..deccb7b 100644 --- a/src/views/flowable/workflow/FlowCompleted.vue +++ b/src/views/flowable/workflow/FlowCompleted.vue @@ -82,6 +82,8 @@ <inspection-order-handle ref="modalFormInspectionOrderXq" :selectShenpiData="selectInspectionOrderXqData"/> <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"/> + + <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> </a-card> </template> @@ -93,11 +95,13 @@ import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' import WeekMaintenanceApprovalModal from './weekMaintenance/WeekMaintenanceApprovalModal' + import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' export default { name: 'NcDeviceCharactersList', mixins: [JeecgListMixin, mixinDevice], components: { + RepairOrderApprovalModal, WeekMaintenanceApprovalModal, InspectionOrderHandle, JDictSelectTag @@ -167,7 +171,8 @@ }, dictOptions: {}, selectWeekMaintenanceData: {}, - selectInspectionOrderXqData: {} + selectInspectionOrderXqData: {}, + selectRepairOrderData: {} } }, created() { @@ -190,6 +195,9 @@ break case 'WEEK_MAINTENANCE': this.handleWeekMaintenance(item) + break + case 'eam_repair': + this.handleRepairOrder(item) break default: alert('娌℃壘鍒拌娴佺▼') @@ -226,6 +234,24 @@ processInstanceId: procInsId }) this.$refs.modalFormInspectionOrderXq.getBasicInformation(record) + }, + + /** + * 鐐瑰嚮璁惧缁翠慨鍒嗙被娴佺▼璇︽儏鏃惰Е鍙� + * @param record + */ + handleRepairOrder(record) { + this.selectRepairOrderData = Object.assign({}, record) + const { procInsId, taskName } = this.selectRepairOrderData + this.$refs.repairOrderApprovalModal.visible = true + this.$refs.repairOrderApprovalModal.disableSubmit = true + this.$refs.repairOrderApprovalModal.title = taskName + this.$refs.modalFormInspectionOrderXq.getAllApproveData({ + ...record, + procInstId: procInsId, + processInstanceId: procInsId + }) + this.$refs.repairOrderApprovalModal.getBasicInformation(record) } } } diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 9e46f33..02e8600 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -9,23 +9,23 @@ <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-col :xl="4" :lg="6" :md="8" :sm="24"> <a-form-item label="娴佺▼鍒嗙被"> <j-dict-select-tag placeholder="璇烽�夋嫨娴佺▼鍒嗙被" v-model="queryParam.category" dictCode="flow_type"></j-dict-select-tag> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="24"> <a-form-item label="娴佺▼鍚嶇О"> <a-input placeholder="璇疯緭鍏ユ祦绋嬪悕绉�" v-model="queryParam.flowName"></a-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="24"> <a-form-item label="绠�瑕佹弿杩�"> <a-input placeholder="璇疯緭鍏ョ畝瑕佹弿杩�" v-model="queryParam.title"></a-input> </a-form-item> </a-col> - <a-col :xl="10" :lg="11" :md="12" :sm="24"> + <a-col :xl="8" :lg="8" :md="12" :sm="24"> <a-form-item label="褰撳墠鎿嶄綔鏃堕棿"> <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="璇烽�夋嫨寮�濮嬫椂闂�" class="query-group-cust" v-model="queryParam.startTime"></j-date> @@ -34,7 +34,7 @@ v-model="queryParam.endTime"></j-date> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :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 @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> @@ -137,7 +137,6 @@ title: '娴佺▼鍒嗙被', align: 'center', dataIndex: 'category_dictText', - width: 300 }, { title: '娴佺▼鍚嶇О', diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue index 9fb7779..e33db1f 100644 --- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue +++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue @@ -119,7 +119,7 @@ <template v-slot:reportFlag="props"> <j-dict-select-tag v-model="props.row.reportFlag" - :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁淇濅慨':''" + :placeholder="props.row.inspectionResult==='2'?'璇烽�夋嫨寮傚父鏄惁鎶ヤ慨':''" :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'" dictCode="yn" style="width: 100%"/> diff --git a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue index 07f5254..4384150 100644 --- a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue +++ b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue @@ -1,11 +1,13 @@ <template> - <a-modal + <j-modal :width="1200" :visible="visible" :title="title" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @cancel="handCancel" @ok="submitForm" :mask-closable="false" + :confirmLoading="confirmLoading" centered > <a-spin :spinning="spinning"> @@ -62,7 +64,8 @@ <a-row> <a-col :span="twoColSpan*2"> <a-form-model-item label="鏄惁闇�瑕侀鐢ㄥ浠�" prop="isUseSpare"> - <a-radio-group v-model="tableRowRecord.isUseSpare"> + <a-radio-group v-model="tableRowRecord.isUseSpare" + :disabled="isDisableUseSpare"> <a-radio :value="1">鏄�</a-radio> <a-radio :value="0">鍚�</a-radio> </a-radio-group> @@ -95,42 +98,44 @@ </a-row> </a-tab-pane> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card :bordered="false"> - <a-timeline> - <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> - <div> - <h3 style="font-weight: bold">{{item.taskName}}</h3> - <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> - <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> - <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> - <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> + <template v-if="selectShenpiData.procInstId"> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> + <a-card :bordered="false"> + <a-timeline> + <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> + <div> + <h3 style="font-weight: bold;">{{item.taskName}}</h3> + <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> + <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> + <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> + <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> - <a-tab-pane key='3' tab='娴佺▼鍥�'> - <img :src="imageSrc" alt="Fetched Image"/> - </a-tab-pane> + <a-tab-pane key='3' tab='娴佺▼鍥�'> + <img :src="imageSrc" alt="Fetched Image"/>--> + </a-tab-pane> + </template> </a-tabs> - <template v-if="isDisplayConfirmSpare"> + <template v-if="tableRowRecord.isUseSpare===1&&isDisableUseSpare"> <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">绠$悊鍛橀鐢ㄥ浠� </a-divider> <a-row> <a-col :span="twoColSpan*2"> <a-form-model-item prop="sparePartDescription" label="澶囦欢鎻忚堪"> - <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'" - v-model="tableRowRecord.sparePartDescription"/> + <a-textarea placeholder="璇疯緭鍏ュ浠舵弿杩�" :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'" + v-model="tableRowRecord.sparePartDescription"></a-textarea> </a-form-model-item> </a-col> </a-row> </template> - <template v-if="tableRowRecord.sparePartDescription"> + <template v-if="Boolean(tableRowRecord.sparePartDescription)&&isDisplayRepairResult"> <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">缁翠慨缁撴灉涓婃姤</a-divider> <a-row> <a-col :span="twoColSpan*2"> @@ -163,7 +168,7 @@ </template> </a-form-model> </a-spin> - </a-modal> + </j-modal> </template> <script> @@ -187,6 +192,7 @@ twoColSpan: 12, inputReadOnly: true, disableSubmit: false, + confirmLoading: false, spinning: false, tableRowRecord: {}, hitaskDataSource: [], @@ -234,8 +240,11 @@ } }, computed: { - isDisplayConfirmSpare() { - return ['WAIT_SPARES', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + isDisableUseSpare() { + return this.disableSubmit || this.tableRowRecord.repairStatus !== 'UNDER_REPAIR' || Boolean(this.tableRowRecord.sparePartDescription) + }, + isDisplayRepairResult() { + return ['UNDER_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) }, isDisableSubmitRepairResult() { return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) @@ -247,6 +256,7 @@ * @param record 寰呭姙璁板綍淇℃伅 */ getAllApproveData(record) { + if (!record.procInstId) return console.log('record----->', record) const { procInstId, processDefinitionId, processInstanceId, processDefinitionKey } = record const param = { procInstId } @@ -302,7 +312,7 @@ // 瑙﹀彂琛ㄥ崟楠岃瘉 this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true + that.confirmLoading = that.spinning = true const { isUseSpare, faultReason, repairDescription, sparePartDescription, imageFiles, equipmentId } = that.tableRowRecord const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData @@ -324,12 +334,13 @@ .then((res) => { if (res.success) { that.$message.success(res.message) - that.$emit('ok') + that.handCancel() + that.$emit('searchReset') } else { that.$message.warning(res.message) } }).finally(() => { - that.confirmLoading = false + that.confirmLoading = that.spinning = false }) } else { return false -- Gitblit v1.9.3