Browse Source

翻包任务没有扫描,数量为0时校验

lijuncheng0816
lijuncheng 4 months ago
parent
commit
6d36ca4061
  1. 17
      src/pages/package/job/overPackageJobDetail.vue

17
src/pages/package/job/overPackageJobDetail.vue

@ -329,6 +329,10 @@
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty 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 tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty
var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty
if (tempHandleQty == 0) {
this.showErrorMessage("实际数量为0,请先扫描数据")
return
}
if (tempHandleQty > tempQty) { if (tempHandleQty > tempQty) {
// //
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty, this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
@ -550,11 +554,18 @@
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { 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) { showMessage(message) {
this.scanPopupLoseFocus()
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -562,6 +573,7 @@
}); });
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus()
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -576,9 +588,6 @@
}); });
}, },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccess() { showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess(); this.$refs.comMessage.showCommitSuccess();

Loading…
Cancel
Save