diff --git a/src/mycomponents/common/comMessage.vue b/src/mycomponents/common/comMessage.vue index bc82cdc0..603977b7 100644 --- a/src/mycomponents/common/comMessage.vue +++ b/src/mycomponents/common/comMessage.vue @@ -13,7 +13,7 @@ - + @@ -62,7 +62,9 @@ isDisabled: true, //为 true 时,表示用户可以点击,反之则不可以 seconds: 0, success: () => {} ,// 回调方法 - version:"" + version:"", + textColor:'#000', + count:0 } }, @@ -151,8 +153,9 @@ }, // 打开疑问弹框(取消+确定) - showQuestionMessage(mContent, callback) { - this.showSelectModal("疑问", mContent, callback); + showQuestionMessage(mContent,textColor, callback) { + // this.textColor = textColor?textColor:'#000' + this.showSelectModal("疑问", mContent, callback,textColor); }, // 打开警告弹框(确定+倒计时) @@ -246,10 +249,11 @@ }, // 初始化弹框并打开(取消+确定) - showSelectModal(mIconType, mContent, callback) { + showSelectModal(mIconType, mContent, callback,textColor) { this.showModal({ iconType: mIconType, content: mContent, + textColor:textColor, success: function(res) { if (callback != undefined) { if (res.confirm == true) { @@ -396,6 +400,11 @@ this.cancelColor = '#666F83' } + if (data.textColor) { + this.textColor = data.textColor + } else { + this.textColor = '#000' + } if (data.showConfirmButton === false || data.showConfirmButton === true) { this.showConfirmButton = data.showConfirmButton } else { diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue index 824cde5c..a550b728 100644 --- a/src/pages/customerReturn/job/returnDetail.vue +++ b/src/pages/customerReturn/job/returnDetail.vue @@ -339,25 +339,43 @@ if (!this.checkLocation()) { return } - - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this.subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + 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 7419a85e..1ca2b273 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -354,27 +354,45 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } - - //允许部分提交 - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + // "]箱总共[" + this + // .subList.length + "]箱", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } }, submitJob() { diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue index 433b0635..c243f0e1 100644 --- a/src/pages/package/job/overPackageJobDetail.vue +++ b/src/pages/package/job/overPackageJobDetail.vue @@ -35,16 +35,16 @@
- + + - + -->
' + "已经扫描[" + this.scanCount + "]总共[" + this.subList - .length + - "]"); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + "]总共[" + this.subList + // .length + + // "]"); + // } + // } }, diff --git a/src/pages/productRecycle/job/productRecycleJobDetail.vue b/src/pages/productRecycle/job/productRecycleJobDetail.vue index ca4ad98d..3b2aa333 100644 --- a/src/pages/productRecycle/job/productRecycleJobDetail.vue +++ b/src/pages/productRecycle/job/productRecycleJobDetail.vue @@ -318,26 +318,45 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } - //允许部分提交 - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + // "]箱总共[" + this + // .subList.length + "]箱", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } }, submitJob() { diff --git a/src/pages/purchaseReturn/job/returnDetail.vue b/src/pages/purchaseReturn/job/returnDetail.vue index 5ba0eb8a..88306c9e 100644 --- a/src/pages/purchaseReturn/job/returnDetail.vue +++ b/src/pages/purchaseReturn/job/returnDetail.vue @@ -350,26 +350,45 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } - } + // 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + // "]箱总共[" + this + // .subList.length + "]箱", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } }, submitJob() { diff --git a/src/pages/scrap/job/scrapJobDetail.vue b/src/pages/scrap/job/scrapJobDetail.vue index 2a5c5e99..1a52fece 100644 --- a/src/pages/scrap/job/scrapJobDetail.vue +++ b/src/pages/scrap/job/scrapJobDetail.vue @@ -286,25 +286,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + // "]箱总共[" + this + // .subList.length + "]箱", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } }, submitJob() { diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue index 0eb1fd1d..99f8a422 100644 --- a/src/pages/unPlanned/job/issueJobDetail.vue +++ b/src/pages/unPlanned/job/issueJobDetail.vue @@ -280,25 +280,44 @@ this.showErrorMessage("扫描数为0,请先扫描") return; } - //扫描数量和任务数量相等,直接提交 - 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this - .subList.length + "]箱", res => { - if (res) { - this.openScanPopup(); - } - }); - } + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` + } + }) + }) + if (str) { + str += ',是否确认提交?' + this.$refs.comMessage.showQuestionMessage(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } 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('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + + // "]箱总共[" + this + // .subList.length + "]箱", res => { + // if (res) { + // this.openScanPopup(); + // } + // }); + // } + // } },