diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index e6f0a1f2..9e186513 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -4,7 +4,7 @@ - + @@ -180,6 +180,7 @@ const getfocus = () => { const losefocus = () => { nextTick((r) => { boxfocus.value = false + uni.hideKeyboard() }) } const clear = () => { diff --git a/src/mycomponents/scan/winComScanBalance.vue b/src/mycomponents/scan/winComScanBalance.vue index bae8e23d..06f333d7 100644 --- a/src/mycomponents/scan/winComScanBalance.vue +++ b/src/mycomponents/scan/winComScanBalance.vue @@ -95,6 +95,10 @@ export default { getScanResult(result) { this.resultData = result + if (!result.package) { + this.showErrorMessage(`${result.label.code}包装信息为空`) + return + } this.getItemCodeType(result.package.itemCode, (callBack) => { this.queryBalance(this.resultData) }) @@ -167,6 +171,9 @@ export default { showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, (res) => { if (res) { + if (this.$refs.comscan) { + this.$refs.comscan.getfocus() + } } }) }, diff --git a/src/mycomponents/scan/winScanLocation.vue b/src/mycomponents/scan/winScanLocation.vue index f4c6655d..25624e8c 100644 --- a/src/mycomponents/scan/winScanLocation.vue +++ b/src/mycomponents/scan/winScanLocation.vue @@ -9,7 +9,7 @@ - + diff --git a/src/mycomponents/scan/winScanPackJob.vue b/src/mycomponents/scan/winScanPackJob.vue index e8569592..beba0fe4 100644 --- a/src/mycomponents/scan/winScanPackJob.vue +++ b/src/mycomponents/scan/winScanPackJob.vue @@ -50,6 +50,7 @@ const openScanPopup = () => { // 关闭 const closeScanPopup = (content) => { show.value = false + comscan.value.losefocus() emit('close', '') } // 扫描结果 diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index 2674208d..8e085fd8 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -265,6 +265,9 @@ const switchChangeWait = (state, jobStatus) => { const showMessage = (message) => { comMessageRef.value.showErrorMessage(message, (res) => { if (res) { + if (scanPopup.value) { + scanPopup.value.packGetFocus() + } } }) }