From c887bb7836b82573c0bc7d11b8dd46b4d7e522e1 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期四, 14 九月 2023 18:11:55 +0800 Subject: [PATCH] 预测性维护工单 --- src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue | 105 +++++++++++++++++++++++----------------------------- 1 files changed, 47 insertions(+), 58 deletions(-) diff --git a/src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue b/src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue index 66d6dcb..c95da53 100644 --- a/src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue +++ b/src/views/eam/modules/predictiveWorkOrder/PredictiveWorkOrderDrawer.vue @@ -44,7 +44,7 @@ <span v-if="this.model != null" class="hightColor" - >{{ this.model.statusName }}</span> + >{{ this.model.status_dictText }}</span> <span v-else class="frozenRowClass" @@ -55,7 +55,7 @@ <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" - label="淇濆吇宸ュ崟鍙�" + label="宸ュ崟缁熶竴缂栫爜" class="hightColor" > <span @@ -72,13 +72,13 @@ <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" - label="淇濆吇绫诲瀷" + label="鐩戞帶绫诲瀷" class="hightColor" > <span v-if="this.model != null" class="hightColor" - >{{ this.model.maintenanceTypeName }}</span> + >{{ this.model.monitorType_dictText }}</span> <span v-else class="frozenRowClass" @@ -91,30 +91,13 @@ <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" - label="瀵硅薄閮ㄩ棬" + label="鏍囧噯缂栫爜" class="hightColor" > <span v-if="this.model != null" class="hightColor" - >{{ this.model.departName }}</span> - <span - v-else - class="frozenRowClass" - >-</span> - </a-form-item> - </a-col> - <a-col :span="8"> - <a-form-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="缁翠繚鏂瑰紡" - class="hightColor" - > - <span - v-if="this.model != null" - class="hight" - >{{ this.model.maintenanceMode }}</span> + >{{ this.model.planNum }}</span> <span v-else class="frozenRowClass" @@ -131,7 +114,7 @@ <span v-if="this.model != null" class="hightColor" - >{{ this.model.teamName }}</span> + >{{ this.model.teamId_dictText }}</span> <span v-else class="frozenRowClass" @@ -186,7 +169,7 @@ <span v-if="this.model != null" class="hightColor" - >{{ this.model.equipmentModel }}</span> + >{{ this.model.model }}</span> <span v-else class="frozenRowClass" @@ -200,7 +183,7 @@ defaultActiveKey="1" > <a-tab-pane - tab='瑙﹀彂鏉′欢' + tab='鐩戞帶璁板綍' key="1" class="hightColor" > @@ -208,11 +191,9 @@ class="table-operator" style="margin:-16px" > - <predictive-spare-parts :planId='workPlanId' v-show="model.monitorType == 'smkz'"/> - <!-- v-if="selectionRows[0].monitorType == 'smkz'"--> - <predictive-parameters :planId='workPlanId' v-show="model.monitorType == 'cskz'"/> + <predictive-parameters :orderId='model.id' v-show="model.monitorType == 'cskz'"/> <!-- v-if="selectionRows[0].monitorType == 'cskz'" --> - <predictive-warn :planId='workPlanId' v-show="model.monitorType == 'bjkz'"/> + <predictive-warn :orderId='model.id' v-show="model.monitorType == 'bjkz'"/> <!-- v-if="selectionRows[0].monitorType == 'bjkz'"--> </div> </a-tab-pane> @@ -267,9 +248,9 @@ > <actual-material-edit-table ref="actualMaterialTabel" - :specialyMaintenanceOrderId="this.model.id" - :specialyMaintenanceOrderStatus="this.model.status" - :equipmentId="this.model.equipmentId" + :orderId="orderId" + :orderStatus="orderStatus" + :equipmentId="equipmentId" ></actual-material-edit-table> </div> </a-tab-pane> @@ -282,10 +263,10 @@ style="margin:-16px" > <actual-work-hours-edit-table - :specialyMaintenanceOrderId="this.model.id" - :specialyMaintenanceOrderStatus="this.model.status" - :equipmentId="this.model.equipmentId" - :teamId="this.model.teamId" + :orderId="orderId" + :orderStatus="orderStatus" + :equipmentId="equipmentId" + :teamId = "teamId" ></actual-work-hours-edit-table> </div> </a-tab-pane> @@ -365,7 +346,13 @@ currentPage: 1, pageSize: 1, total: 10, + // workPlanId:'', + orderId:'', + orderStatus:'', + equipmentId:'', + teamId:'', + // title: "涓撲笟宸ュ崟鎵ц", visible: false, maskClosable: true, @@ -387,12 +374,14 @@ sm: { span: 18 }, }, url: { - getEquipmentTotalByOrderId: "/eam/specialtyMaintenanceOrderDetail/getEquipmentTotalByOrderId", + listMaterial: "/eam/maintenanceOrderActualMaterial/getMaintenanceOrderActualMaterialList", + listHours: "/eam/maintenanceOrderActualWorkingHour/getMaintenanceOrderActualWorkingHourList", + getEquipmentTotalByOrderId: "/eam/predictiveworkorder/getEquipmentTotalByOrderId", urlDownload: window._CONFIG['staticDomainURL'], download: '/sys/upload/downloadFile', - editStatus: "/eam/specialtyMaintenanceOrder/editStatus", - revocation: "/eam/specialtyMaintenanceOrder/revocation", - report: "/eam/specialtyMaintenanceOrder/report", + editStatus: "/eam/predictiveworkorder/editStatus", + revocation: "/eam/predictiveworkorder/revocation", + report: "/eam/predictiveworkorder/report", }, } }, @@ -414,7 +403,15 @@ handleShow(record) { this.model = Object.assign({}, record); this.workPlanId = record.workPlanId; + this.orderId = record.id; + this.orderStatus = record.status; + this.equipmentId = record.equipmentId; + this.teamId = record.teamId; this.visible = true; + if(record.status=='4'){ + this.$message.success("宸ュ崟姝e湪鎵ц褰撲腑锛岃鍦ㄦ杩囩▼涓綍鍏ュ疄闄呯敤鏂欏拰宸ユ椂") + } + }, getEquipmentTotal() { var params = this.queryParam;//鏌ヨ鏉′欢 @@ -512,16 +509,15 @@ const that = this; that.confirmLoading = true; this.$confirm({ - title: '淇濆吇宸ュ崟寮�宸�', + title: '宸ュ崟寮�宸�', content: '鎻愮ず锛氬紑宸ュ悗鏃犳硶鎾ゅ洖锛岃璋ㄦ厧鎿嶄綔锛�', okText: '纭', cancelText: '鍙栨秷', onOk() { - requestPut(that.url.editStatus, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { + requestPut(that.url.editStatus, { id: that.model.id, status: '4' }).then((res) => { if (res.success) { that.model.status = '4' that.$message.success("宸ュ崟寮�宸ユ垚鍔燂紒") - that.getEquipmentTotal() that.buttonDistable = false that.revocationDistable = true that.SWbuttonDistable = true @@ -537,26 +533,18 @@ }, //鎶ュ伐 handleReport() { - var actualMaterials = this.$refs.actualMaterialTabel.dataSource; - for (var i = 0; i < actualMaterials.length; i++) { - if (actualMaterials[i].isLock == 'no') { - this.$message.warn("瀹為檯鐢ㄦ枡绗�" + (i + 1) + "琛屽皻鏈攣鏂欙紝璇烽攣鏂欏悗鍐嶈繘琛屾姤宸�"); - return false; - } - } const that = this; that.confirmLoading = true; - this.$confirm({ - title: '淇濆吇宸ュ崟鎶ュ伐', - content: '鎻愮ず锛氭姤宸ュ悗鐐规瀹屽伐锛岃璋ㄦ厧鎿嶄綔锛�', + that.$confirm({ + title: '宸ュ崟鎶ュ伐', + content: '鎻愮ず锛氬鏈夋湭濉啓鐨勫繀濉」鎴栧鑷存姤宸ュけ璐ワ紝纭鎶ュ伐鍚楋紒', okText: '纭', cancelText: '鍙栨秷', onOk() { - requestPut(that.url.report, { id: that.specialtyMaintenanceOrderId, status: '5' }).then((res) => { + requestPut(that.url.report, { id: that.orderId, status: '5' }).then((res) => { if (res.success) { that.model.status = '5' that.$message.success(res.message) - that.getEquipmentTotal() that.buttonDistable = false that.revocationDistable = true that.SWbuttonDistable = true @@ -583,14 +571,15 @@ okText: '纭', cancelText: '鍙栨秷', onOk() { - requestPut(that.url.revocation, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { + requestPut(that.url.revocation, { id: that.orderId, status: '4' }).then((res) => { if (res.success) { that.model.status = '4' + that.orderStatus = '4' that.$message.success(res.message) - that.getEquipmentTotal() that.buttonDistable = false that.revocationDistable = true that.SWbuttonDistable = true + that.$emit('ok'); } else { that.$message.warning(res.message) } -- Gitblit v1.9.3