From 2b18a3878c1121fa4b40969cf65000d43bcbc69b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 19 Nov 2024 14:24:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 30 ++++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index e8a7b5d3..03d014a1 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -227,7 +227,9 @@ that.fromLocationCode = that.subList[0].fromLocationCode that.detailSource.forEach(r => { - r.isRecommTaskItem = true//为推荐任务 + r.subList.forEach(s => { + s.isRecommTaskItem = true//为推荐任务 + }) }) //任务中已经扫描,模拟扫描赋值 if (this.scanMessage) { @@ -359,6 +361,7 @@ packQty:result.package.packQty, packUnit:result.package.packUnit, uom:result.balance.uom, + isRecommTaskItem:false,//不是推荐任务中的任务 // packList:[{ // scaned : true, // handleQty : Number(result.label.qty), @@ -436,6 +439,7 @@ itemDetail.packUnit=result.package.packUnit itemDetail.fromlocationCode=this.fromLocationCode itemDetail.toLocationCode=this.toLocationCode + itemDetail.isRecommTaskItem = true//是推荐任务中的数量 // itemDetail.toInventoryStatus = "OK" // itemDetail.packList.forEach(pac => { // pac.scaned = true @@ -637,24 +641,24 @@ str1 += `物料号【${detail.itemCode}】提交数量【${detail.handleQty}】不允许大于任务数量【${detail.qty}】` } } - if(detail.isRecommTaskItem){//扫描推荐任务中的任务时候才有这个提示 - detail.handleQty = detail.handleQty || 0 - if(detail.handleQty == 0 && isTrue){ - isTrue = false - str3 = '推荐的箱码没扫,' - } - if(parseFloat(detail.handleQty)!=parseFloat(detail.qty)){ - str3 += `物料号【${detail.itemCode}】扫描数量【${parseFloat(detail.handleQty)}】和任务数量【${detail.qty}】不一致` - } - - } + detail.subList.forEach(item => { if(item.scaned){ if(parseFloat(item.handleQty)>parseFloat(item.balance.qty)){ str2 += `物料号【${detail.itemCode}】批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` } } - + if(item.isRecommTaskItem){//扫描推荐任务中的任务时候才有这个提示 + item.handleQty = item.handleQty || 0 + if(item.handleQty == 0 && isTrue){ + isTrue = false + str3 = '推荐的箱码没扫,' + } + if(parseFloat(item.handleQty)!=parseFloat(item.qty)){ + str3 += `物料号【${detail.itemCode}】批次【${item.batch}】扫描数量【${parseFloat(item.handleQty)}】和任务数量【${item.qty}】不一致` + } + + } }) }) if (this.jobContent.allowSmallerQty == "FALSE") {