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 }, /** 删除按钮操作 */