From ad07409ae35d319086c1e7b94753b9e5e8f8a47c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 19 Nov 2024 13:05:12 +0800 Subject: [PATCH] =?UTF-8?q?YT-999pda=E5=8F=91=E6=96=99=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=87=86=E7=A1=AE=EF=BC=8C=E6=9C=89=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=89=B9=E6=AC=A1=EF=BC=8C=E6=8F=90=E7=A4=BA=E5=BA=94?= =?UTF-8?q?=E5=8A=A0=E6=89=B9=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 51 ++++++++++++++---------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 33b73820..e8a7b5d3 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -225,6 +225,10 @@ that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode that.toLocationCode= res.data.subList[0].toLocationCode that.fromLocationCode = that.subList[0].fromLocationCode + + that.detailSource.forEach(r => { + r.isRecommTaskItem = true//为推荐任务 + }) //任务中已经扫描,模拟扫描赋值 if (this.scanMessage) { this.openScanPopupSimulate(this.scanMessage); @@ -622,30 +626,35 @@ let str1="" let str2="" let str3="" - var totalQty =0; - var taskQty =0; - console.log(877,this.detailSource) + let isTrue = true this.detailSource.forEach(detail => { + const isScaned = detail.subList.some(cur=>cur.scaned) + if(isScaned){ + if(parseFloat(detail.handleQty)parseFloat(detail.qty)){ + 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){ - taskQty =calc.add(taskQty,item.qty) - totalQty =calc.add(totalQty,item.handleQty) - if(parseFloat(item.handleQty) parseFloat(item.qty)){ - str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` - } - - if(parseFloat(item.handleQty)>parseFloat( item.balance.qty)){ - str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` + if(parseFloat(item.handleQty)>parseFloat(item.balance.qty)){ + str2 += `物料号【${detail.itemCode}】批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` } - } - + }) }) if (this.jobContent.allowSmallerQty == "FALSE") { @@ -675,7 +684,7 @@ if (res) { return //防止重复点击 - this.$throttle(this.submit, 2000, this)() + // this.$throttle(this.submit, 2000, this)() } else { this.scanPopupGetFocus() } @@ -683,7 +692,7 @@ }else { return //防止重复点击 - this.$throttle(this.submit, 2000, this)() + // this.$throttle(this.submit, 2000, this)() } },