diff --git a/src/mycomponents/scan/winScanPackAndLocationNoShow.vue b/src/mycomponents/scan/winScanPackAndLocationNoShow.vue index d57e5f30..ee12eaaa 100644 --- a/src/mycomponents/scan/winScanPackAndLocationNoShow.vue +++ b/src/mycomponents/scan/winScanPackAndLocationNoShow.vue @@ -507,9 +507,12 @@ }, packGetFocus() { - if (this.$refs.comscan) { - this.$refs.comscan.getfocus(); - } + setTimeout(()=>{ + if (this.$refs.comscan) { + this.$refs.comscan.getfocus(); + } + },300) + }, packLoseFocus() { diff --git a/src/pages/issueSupplies/job/issueDetailBatch.vue b/src/pages/issueSupplies/job/issueDetailBatch.vue index 66ae3f54..8a91d6a4 100644 --- a/src/pages/issueSupplies/job/issueDetailBatch.vue +++ b/src/pages/issueSupplies/job/issueDetailBatch.vue @@ -244,10 +244,10 @@ this.showErrorMessage("物料【" + itemCode + "】已经扫描") return } - // if(detail.qty>result.balance.qty){ - // this.showErrorMessage("物料【" + itemCode + "】库存不足") - // return - // } + if(detail.qty>result.balance.qty){ + this.showErrorMessage("物料【" + itemCode + "】库存不足") + return + } detail.scaned = true } this.continueScan() @@ -477,6 +477,7 @@ }, openScanPopup() { this.$refs.scanPopup.openScanPopupForJob(this.jobContent); + this.scanPopupGetFocus(); }, closeScanPopup() {