From 24942596cac3fa017de1dbf643205f5620fd1bc3 Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 21 Jun 2024 19:01:33 +0800 Subject: [PATCH] =?UTF-8?q?2.4.5=20MES:Web=E7=94=9F=E4=BA=A7=E6=B4=BE?= =?UTF-8?q?=E5=B7=A5=EF=BC=8C=E8=AE=A1=E5=88=92=E7=94=9F=E4=BA=A7=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=8F=AF=E4=BB=A5=E4=B8=8D=E7=AD=89=E4=BA=8E?= =?UTF-8?q?=E6=B4=BE=E5=B7=A5=E7=9A=84=E6=95=B0=E9=87=8F=EF=BC=88=E7=9B=AE?= =?UTF-8?q?=E5=89=8D=E5=8F=AA=E9=92=88=E5=AF=B94=E6=A5=BC=E6=8A=98?= =?UTF-8?q?=E5=BC=AF=E5=B7=A5=E5=BA=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/mes/productplan/editProductPlan.vue | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/hw-ui/src/views/mes/productplan/editProductPlan.vue b/hw-ui/src/views/mes/productplan/editProductPlan.vue index df33779c..290c3986 100644 --- a/hw-ui/src/views/mes/productplan/editProductPlan.vue +++ b/hw-ui/src/views/mes/productplan/editProductPlan.vue @@ -2,7 +2,8 @@
- 工单信息 + 工单信息 + {{ form.orderCode }} @@ -19,7 +20,8 @@ - 派工信息 + 派工信息 + @@ -56,9 +58,14 @@ - + + + + @@ -359,6 +366,9 @@ export default { headers: { Authorization: "Bearer " + getToken(), }, + PROCESS_ID: { + BENDING_PROCESS_ID: 42 + } }; }, created() { @@ -392,8 +402,8 @@ export default { } // 校验派工数量(已派工数量 + 派工数量 <= 计划数量) // 按照processId分组,所有分组的planAmount之和是否相等,相等后输出planAmount之和的值 - const sumList = dataList.reduce((result, {processId, planAmount}) => { - const numericAmount = parseInt(planAmount, 10); + const sumList = dataList.reduce((result, {processId, dispatchAmount}) => { + const numericAmount = parseInt(dispatchAmount, 10); if (!this.isPositiveInteger(numericAmount)) { this.$modal.msgError("派工数量须为大于等于0的正整数!"); return; @@ -454,7 +464,7 @@ export default { return item.planId; }); dispatchSum = this.form.dispatchAmount - dispatchSum; - delProductplan(planIds).then(res =>{ + delProductplan(planIds).then(res => { // 更新生产工单 updateProductOrder({ productOrderId: this.form.productOrderId, @@ -554,9 +564,9 @@ export default { obj.planStatus = '1'; // multiStationFlag:一个工序对应工位个数 if (e.multiStationFlag > 1) { - obj.planAmount = 0; + obj.dispatchAmount = 0;//代表productplan的派工数量,obj.planAmount代表实际工位上要工作的数量(默认planamount=dispatchamount,像折弯工序可能两个不相同)this.form.planAmount是order计划生产的数量,this.form.dispatchAmount是order中已派工的数量 } else { - obj.planAmount = this.form.planAmount - this.form.dispatchAmount; + obj.dispatchAmount = this.form.planAmount - this.form.dispatchAmount; } obj.materialId = this.form.materialId; obj.materialBomId = this.form.materialBomId; @@ -566,7 +576,7 @@ export default { // 上一工序ID if (lastProcessId == null) { obj.lastProcessId = 0; - } else if(lastProcessId === obj.processId){ + } else if (lastProcessId === obj.processId) { obj.lastProcessId = this.mesProductPlanList[index - 1].lastProcessId; } else { obj.lastProcessId = lastProcessId;