From efa494646a47b3f565fe4053170b1c4b11acc2a7 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Tue, 13 Aug 2024 21:55:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/customerReturn/job/returnDetail.vue | 49 ++++++++++------- .../inventoryMove/job/inventoryMoveDetail.vue | 51 ++++++++++-------- .../job/productDismantleDetail.vue | 10 ++-- .../job/productPutawayDetail.vue | 10 ++-- .../job/completeReceiveJobDetail.vue | 10 ++-- .../job/productReceiptDetail.vue | 4 +- .../productReceipt/job/scrapReceiptDetail.vue | 43 ++++++++------- .../job/semiProductReceiptDetail.vue | 10 ++-- .../job/productRecycleJobDetail.vue | 52 +++++++++++-------- .../job/productionReceiptDetail.vue | 10 ++-- .../productionReturn/job/returnDetail.vue | 10 ++-- .../purchaseReceipt/job/receiptDetail.vue | 8 ++- src/pages/purchaseReturn/job/returnDetail.vue | 52 +++++++++++-------- src/pages/putaway/job/putawayDetail.vue | 10 ++-- src/pages/scrap/job/scrapJobDetail.vue | 51 ++++++++++-------- src/pages/transfer/job/issueDetail.vue | 10 ++-- src/pages/transfer/job/receiptDetail.vue | 11 ++-- src/pages/transfer/job/transferDetail.vue | 10 ++-- src/pages/unPlanned/job/issueJobDetail.vue | 50 ++++++++++-------- src/pages/unPlanned/job/receiptJobDetail.vue | 10 ++-- 20 files changed, 272 insertions(+), 199 deletions(-) diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue index 21afb6d1..637d4376 100644 --- a/src/pages/customerReturn/job/returnDetail.vue +++ b/src/pages/customerReturn/job/returnDetail.vue @@ -339,17 +339,44 @@ if (!this.checkLocation()) { return } + + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -358,24 +385,6 @@ } else { this.submitJob() } - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this.subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index ce81a5da..bf64c75a 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -354,17 +354,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + //允许部分提交 + //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -373,26 +400,6 @@ } else { this.submitJob() } - // //允许部分提交 - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/productDismantle/job/productDismantleDetail.vue b/src/pages/productDismantle/job/productDismantleDetail.vue index e25735c9..27c9a7a6 100644 --- a/src/pages/productDismantle/job/productDismantleDetail.vue +++ b/src/pages/productDismantle/job/productDismantleDetail.vue @@ -342,12 +342,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 1a970b6b..8cef3a48 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -404,12 +404,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/productReceipt/job/completeReceiveJobDetail.vue b/src/pages/productReceipt/job/completeReceiveJobDetail.vue index 2fb7b9aa..e591c1ed 100644 --- a/src/pages/productReceipt/job/completeReceiveJobDetail.vue +++ b/src/pages/productReceipt/job/completeReceiveJobDetail.vue @@ -302,12 +302,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList - .length + - "]"); + this.showMessage("任务明细未全部完成,不允许部分提交!"); } } diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue index 24c63209..7a898713 100644 --- a/src/pages/productReceipt/job/productReceiptDetail.vue +++ b/src/pages/productReceipt/job/productReceiptDetail.vue @@ -378,8 +378,8 @@ var subItem = item.subList[i] if (calc.sub(subItem.handleQty, subItem.qty) < 0) { isCheck = false; - hint = "包装【" + subItem.packingNumber + "】实际收货数量:" + subItem.handleQty + "与包装数量" + subItem.qty + - "不相等,是否继续收货?" + hint = "包装【" + subItem.packingNumber + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty + + "]不相等,是否继续收货?" break } } diff --git a/src/pages/productReceipt/job/scrapReceiptDetail.vue b/src/pages/productReceipt/job/scrapReceiptDetail.vue index 16cbdf0a..8970a98b 100644 --- a/src/pages/productReceipt/job/scrapReceiptDetail.vue +++ b/src/pages/productReceipt/job/scrapReceiptDetail.vue @@ -294,18 +294,41 @@ if (!this.checkLocation()) { return } + + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.showMessage("任务明细未全部完成,是否提交"); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -314,22 +337,6 @@ } else { this.submitJob() } - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList - // .length + - // "]"); - // } - // } - }, submitJob() { diff --git a/src/pages/productReceipt/job/semiProductReceiptDetail.vue b/src/pages/productReceipt/job/semiProductReceiptDetail.vue index 496a018c..d2fac2c1 100644 --- a/src/pages/productReceipt/job/semiProductReceiptDetail.vue +++ b/src/pages/productReceipt/job/semiProductReceiptDetail.vue @@ -302,12 +302,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList - .length + - "]"); + this.showMessage("任务明细未全部完成,不允许部分提交!"); } } diff --git a/src/pages/productRecycle/job/productRecycleJobDetail.vue b/src/pages/productRecycle/job/productRecycleJobDetail.vue index 8908d9fa..f9c8bf00 100644 --- a/src/pages/productRecycle/job/productRecycleJobDetail.vue +++ b/src/pages/productRecycle/job/productRecycleJobDetail.vue @@ -318,17 +318,45 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + // //允许部分提交 + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -337,26 +365,6 @@ } else { this.submitJob() } - // //允许部分提交 - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue index 967a3083..6270e88e 100644 --- a/src/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue @@ -409,12 +409,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/productionReturn/job/returnDetail.vue b/src/pages/productionReturn/job/returnDetail.vue index 8bf54c4a..731d2a7d 100644 --- a/src/pages/productionReturn/job/returnDetail.vue +++ b/src/pages/productionReturn/job/returnDetail.vue @@ -349,12 +349,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index fa506e5a..7e7e6899 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -454,16 +454,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.$refs.comMessage.showQuestionMessage('还有未扫描的物料,是否继续提交?', res => { + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { if (res) { - this.submitJob(); + this.submitJob() } }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/purchaseReturn/job/returnDetail.vue b/src/pages/purchaseReturn/job/returnDetail.vue index 11708552..3c6f0907 100644 --- a/src/pages/purchaseReturn/job/returnDetail.vue +++ b/src/pages/purchaseReturn/job/returnDetail.vue @@ -350,17 +350,45 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + //允许部分提交 + //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -369,26 +397,6 @@ } else { this.submitJob() } - //允许部分提交 - //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index a9d9fbe2..80540675 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -452,12 +452,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/scrap/job/scrapJobDetail.vue b/src/pages/scrap/job/scrapJobDetail.vue index 13d08f94..f8a274ee 100644 --- a/src/pages/scrap/job/scrapJobDetail.vue +++ b/src/pages/scrap/job/scrapJobDetail.vue @@ -288,18 +288,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' - + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -308,25 +334,6 @@ } else { this.submitJob() } - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, submitJob() { diff --git a/src/pages/transfer/job/issueDetail.vue b/src/pages/transfer/job/issueDetail.vue index ac03934e..b0f8477b 100644 --- a/src/pages/transfer/job/issueDetail.vue +++ b/src/pages/transfer/job/issueDetail.vue @@ -333,12 +333,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/transfer/job/receiptDetail.vue b/src/pages/transfer/job/receiptDetail.vue index 82369338..0fce89d3 100644 --- a/src/pages/transfer/job/receiptDetail.vue +++ b/src/pages/transfer/job/receiptDetail.vue @@ -358,13 +358,14 @@ } else if (this.scanCount < this.subList.length) { //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { - //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/transfer/job/transferDetail.vue b/src/pages/transfer/job/transferDetail.vue index d362914a..2fd37fe0 100644 --- a/src/pages/transfer/job/transferDetail.vue +++ b/src/pages/transfer/job/transferDetail.vue @@ -368,13 +368,15 @@ async commit() { //允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { this.scanCount = this.getScanCount(); if (this.scanCount < this.subList.length) { - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); } diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue index 60aa60b6..0f8731ba 100644 --- a/src/pages/unPlanned/job/issueJobDetail.vue +++ b/src/pages/unPlanned/job/issueJobDetail.vue @@ -280,17 +280,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + + // //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { + this.checkCount(); + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.checkCount(); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(); + } + }); + } + } + }, + + checkCount(){ // 提交的数量和任务数量不一致提示 let str = '' this.detailSource.forEach((item) => { item.subList.forEach(cur => { if (cur.qty != cur.handleQty) { - str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + var tempHandleQty =0 + if(cur.handleQty){ + tempHandleQty=cur.handleQty + }else { + tempHandleQty =0 + } + str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致` } }) }) if (str) { - str += ',是否确认提交?' + str = '任务明细未全部完成,是否提交?\n'+str this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { if (res) { this.submitJob() @@ -299,25 +326,6 @@ } else { this.submitJob() } - // //扫描数量和任务数量相等,直接提交 - // if (this.scanCount == this.subList.length) { - // this.submitJob(); - // } else if (this.scanCount < this.subList.length) { - // //扫描数量小于任务数量,判断是否允许部分提交 - // if (this.jobContent.allowPartialComplete == "TRUE") { - // //提交 - // this.submitJob(); - // } else { - // //不允许部分提交,提示 - // this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - // "]箱总共[" + this - // .subList.length + "]箱", res => { - // if (res) { - // this.openScanPopup(); - // } - // }); - // } - // } }, diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index d9049d28..949ba2a7 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -261,12 +261,14 @@ //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.submitJob(); + this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { + if (res) { + this.submitJob() + } + }); } else { //不允许部分提交,提示 - this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { this.openScanPopup(); }