From cc26f66dd26add604476468812c988956413a658 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Wed, 30 Aug 2023 20:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=A8=A1=E5=9D=97(=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E4=BF=AE=E6=94=B9BUG=E8=A7=A3=E5=86=B3=E5=88=9D?= =?UTF-8?q?=E7=89=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/order/index.vue | 3 +++ src/views/plan/workorder/index.vue | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue index a64b030..ba83aa4 100644 --- a/src/views/plan/order/index.vue +++ b/src/views/plan/order/index.vue @@ -1161,6 +1161,9 @@ export default { type: 'warning' }) this.formFields[this.formFields.length - 1].batchQuantity = Number(this.productData[0].atrr1) - Number(Number(sum) - Number(e)) + if (this.formFields[this.formFields.length - 1].batchQuantity <= 0) { + this.formFields[this.formFields.length - 1].batchQuantity = 1 + } } //如果拆分数量为空 if (this.productData[0].atrr1 == '' || this.productData[0].atrr1 == null) { diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 860c0f0..741e5c7 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -456,6 +456,9 @@ export default { dicts: ['product_type','workorder_type','shift_type'], data() { return { + // 暂存线体code + proLineCode:null, + // 打印 formRef: 'form', validateRules: [], printData: { @@ -677,6 +680,9 @@ export default { type: 'warning' }) this.formFields[this.formFields.length - 1].batchQuantity = Number(this.productData[0].atrr1) - Number(Number(sum) - Number(e)) + if (this.formFields[this.formFields.length - 1].batchQuantity <= 0) { + this.formFields[this.formFields.length - 1].batchQuantity = 1 + } } //如果拆分数量为空 if (this.productData[0].atrr1 == '' || this.productData[0].atrr1 == null) { @@ -1007,6 +1013,10 @@ export default { return } + if (this.workForm.prodLineCode === undefined) { + this.workForm.prodLineCode = this.selectWork.prodLineName + } + //下面是请求处理 const data = { formFields: this.formFields, @@ -1024,6 +1034,7 @@ export default { this.$modal.msgError(response.msg) return } + this.getList() this.$modal.msgSuccess('提交成功') }) @@ -1041,9 +1052,6 @@ export default { batchCode: '', batchQuantity: '' }] - - this.getList() - // 等待1秒后执行的代码 this.open = false }, /** 删除按钮操作 */