From 5e3a333c906049ce706e0980b5e5355fed309109 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 5 Sep 2024 17:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=AB=E6=8F=8F=E6=A1=86?= =?UTF-8?q?=202024/7/8=2019:59:20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winComScan.vue | 3 ++- src/mycomponents/scan/winComScanBalance.vue | 7 +++++++ src/mycomponents/scan/winScanLocation.vue | 2 +- src/mycomponents/scan/winScanPackJob.vue | 1 + src/pages/purchaseReceipt/job/receiptJob.vue | 3 +++ 5 files changed, 14 insertions(+), 2 deletions(-) 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() + } } }) }