From 20fe89d13f417cba2423ababc0d22105bd5ba734 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Nov 2024 17:52:50 +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 | 56 ++++++++++++------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 090066d4..0ad14d29 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -621,6 +621,7 @@ let str="" let str1="" let str2="" + let str3="" var totalQty =0; var taskQty =0; console.log(877,this.detailSource) @@ -628,56 +629,57 @@ detail.subList.forEach(item => { if(item.scaned){ taskQty =calc.add(taskQty,item.qty) - totalQty =calc.add(totalQty,item.handleQty) - if (this.jobContent.allowSmallerQty == "FALSE") { - if(parseFloat(item.handleQty) parseFloat(item.qty)){ - str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${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}】` } + } }) }) - console.log(877,str) - if (str) { - str1 = '不允许提交\n' + str - this.showErrorMessage(str) - return + if (this.jobContent.allowSmallerQty == "FALSE") { + if (str) { + str = '不允许提交\n' + str + this.showErrorMessage(str) + return + } } - if (str1) { - str1 = '不允许提交\n' + str1 - this.showErrorMessage(str1) - return + if (this.jobContent.allowBiggerQty == 'FALSE') { + if (str1) { + str1 = '不允许提交\n' + str1 + this.showErrorMessage(str1) + return + } } + if (str2) { str2 = '不允许提交\n' + str2 this.showErrorMessage(str2) return } - if(str){ - str = '任务明细未全部完成,是否提交?\n' + str - } - if(totalQty!=taskQty){ - str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" - this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { + console.log(str3) + if(str3){ + str3 = str3+",是否提交" + this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => { if (res) { //防止重复点击 - this.$throttle(this.submit, 2000, this)() + // this.$throttle(this.submit, 2000, this)() } else { this.scanPopupGetFocus() } }); }else { //防止重复点击 - this.$throttle(this.submit, 2000, this)() + // this.$throttle(this.submit, 2000, this)() } },