From bae9c914e9638d9b7c1f8005d94f5d5a615a7245 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 28 Nov 2024 17:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetailBatch.vue | 56 ++++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index cef3fe59..b12a32c9 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -538,46 +538,46 @@ let str1 = "" let str2 = "" this.detailSource.forEach(detail => { - var taskQty = 0; - var totalQty = 0; + detail.taskQty = 0; + detail.totalQty = 0; detail.subList.forEach(item => { - item.taskQty=0 - item.totalQty=0 - item.taskQty =calc.add(item.taskQty,item.qty) - item.totalQty =calc.add(item.totalQty,item.handleQty) - if (this.jobContent.allowSmallerQty == "FALSE") { - if(item.handleQtyitem.balance.qty){ - str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` - } + item.qty = item.qty || 0 + item.handleQty = item.handleQty || 0 + detail.taskQty =calc.add(detail.taskQty,item.qty) + detail.totalQty =calc.add(detail.totalQty,item.handleQty) + if(item.scaned){ + if(item.handleQty>item.balance.qty){ + str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` } + } }) + if(detail.handleQty < detail.taskQty){ + str += `物料号【${detail.itemCode}】数量【${detail.handleQty}】不允许小于任务数量【${detail.taskQty}】\n` + } + if(detail.handleQty > detail.taskQty){ + str1 += `物料号【${detail.itemCode}】数量【${detail.handleQty}】不允许大于任务数量【${detail.taskQty}】\n` + } }) - - if (str) { - str = '不允许提交\n' + str - this.showErrorMessage(str) + if (this.jobContent.allowSmallerQty == "FALSE") { + if (str) { + str = '不允许提交\n' + str + this.showErrorMessage(str) + } } - if (str1) { - str1 = '不允许提交\n' + str1 - this.showErrorMessage(str1) + if (this.allowBiggerQty == 'FALSE') { + if (str1) { + str1 = '不允许提交\n' + str1 + this.showErrorMessage(str1) + } } + if (str2) { str2 = '不允许提交\n' + str2 this.showErrorMessage(str2) } return str || str1 || str2 ? false : true - + }, submitJob() {