From 8b7c4acc0f96a90705d198f86c82dec4ef68477f Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Sat, 17 Aug 2024 09:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetail.vue | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 374ef22a..76a209e7 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -32,7 +32,7 @@ - + @@ -449,9 +449,15 @@ afterScan() { this.resizeCollapse(); - let str = "" + this.autoCommit() + }, + + autoCommit(){ + var totalQty =0; + var taskQty =0; this.detailSource.forEach(detail => { detail.Items.forEach(item => { + taskQty =calc.add(taskQty,item.qty) item.Locations.forEach(lco => { lco.Batchs.forEach(batch => { batch.Records.forEach(record => { @@ -466,16 +472,23 @@ str += `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` } - } + if(record){ + var hanleQty =record.qty?record.qty:0 + totalQty = calc.add(totalQty,hanleQty) + } + }) }) }) }) }) - - if (str) { + + if(str){ str = '任务明细未全部完成,是否提交?\n' + str + } + if(totalQty!=taskQty){ + str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { //防止重复点击 @@ -484,10 +497,9 @@ this.scanPopupGetFocus() } }); - } else { + }else { //防止重复点击 this.$throttle(this.submit, 2000, this)() - } },