From a1aef0a3e44983e3e5b7025f5e8b9afa2dbfd4fc Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Wed, 20 Sep 2023 10:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E6=95=B0=E9=80=BB=E8=BE=91V2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/whiteOrder/index.vue | 3 --- src/views/plan/workorder/index.vue | 27 ++++++++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/plan/whiteOrder/index.vue b/src/views/plan/whiteOrder/index.vue index d5fb2a5..26facf2 100644 --- a/src/views/plan/whiteOrder/index.vue +++ b/src/views/plan/whiteOrder/index.vue @@ -655,7 +655,6 @@ export default { splitNumChange(e) { // 为了获取车数换算值-先选择工艺 if (this.splitForm.routeCode == null) { - console.log("请先选择工艺") this.$message({ message: "请先选择工艺!", type: "warning" @@ -663,7 +662,6 @@ export default { this.splitForm.splitNum = null return } - console.log("变换了拆分数量") //不能为负数 if (e <= 0) { this.$message({ @@ -699,7 +697,6 @@ export default { } this.product = this.productData[0]; // 车数处理逻辑 - console.log("车数逻辑------>") if (this.converCarNum != null) { this.splitForm.carNum = Math.ceil(this.splitForm.splitNum / this.converCarNum); }else { diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 09f4749..3a1c1ff 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -388,7 +388,7 @@ - + @@ -698,10 +698,6 @@ export default { }) // 获取工艺信息 getProRoutes(this.selectWork.productCode).then(response => { - console.log("这里是选中工单信息") - console.log(this.selectWork) - console.log("这里是开始获取工艺信息") - console.log(response.data) this.routes = response.data getProEquipment(this.selectWork.routeCode).then(response => { this.proline = response.data @@ -712,8 +708,6 @@ export default { this.converCarNum = this.routes[i].carNumUnit; } } - console.log("车数设置成功") - console.log(this.converCarNum) }) // 获取工艺设备信息 getProEquipment(this.selectWork.routeCode).then(response2 => { @@ -811,8 +805,6 @@ export default { }, // 变更-变更工艺 routeChange(routeCode) { - console.log("工艺变更") - console.log(routeCode) getProEquipment(routeCode).then(response => { this.eRouteOptions = response.data }) @@ -825,8 +817,11 @@ export default { } } - console.log("设置好车数换算值") - console.log(this.converCarNum) + // 重新设置车数 + // 设置页面显示值 + this.splitForm.carNum = Math.ceil(this.splitForm.splitNum / this.converCarNum); + // 设置后端传输值 + this.workForm.carNum = Math.ceil(this.splitForm.splitNum / this.converCarNum); }, // 变更-变更班次 shiftChange(e) { @@ -916,6 +911,16 @@ export default { }) this.workForm.splitNum = this.splitForm.splitNum + // 车数处理逻辑 + if (this.converCarNum != null) { + this.splitForm.carNum = Math.ceil(this.splitForm.splitNum / this.converCarNum); + this.workForm.carNum = Math.ceil(this.splitForm.splitNum / this.converCarNum); + }else { + this.$message({ + message: '获取车数换算值异常!', + type: 'error' + }) + } } this.product = this.productData[0] },