diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue index 24b8f1d0..433b0635 100644 --- a/src/pages/package/job/overPackageJobDetail.vue +++ b/src/pages/package/job/overPackageJobDetail.vue @@ -329,6 +329,10 @@ var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty var tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty + if (tempHandleQty == 0) { + this.showErrorMessage("实际数量为0,请先扫描数据") + return + } if (tempHandleQty > tempQty) { //大于需求数量 this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty, @@ -550,11 +554,18 @@ scanPopupGetFocus() { if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.getfocus(); + this.$refs.scanPopup.packGetFocus(); + } + }, + + scanPopupLoseFocus() { + if (this.$refs.scanPopup != undefined) { + this.$refs.scanPopup.packLoseFocus(); } }, showMessage(message) { + this.scanPopupLoseFocus() this.$refs.comMessage.showMessage(message, res => { if (res) { this.afterCloseMessage() @@ -562,6 +573,7 @@ }); }, showErrorMessage(message) { + this.scanPopupLoseFocus() this.$refs.comMessage.showErrorMessage(message, res => { if (res) { this.afterCloseMessage() @@ -576,9 +588,6 @@ }); }, - showScanMessage(message) { - this.$refs.comMessage.showScanMessage(message); - }, showCommitSuccess() { this.$refs.comMessage.showCommitSuccess();