From dd8471def6f6c8ca8d348df7fe9d43fef52e632f Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Wed, 13 Mar 2024 17:01:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchBox.vue | 24 ++++++------------------ src/pages/proj/Check.vue | 8 +++++++- src/pages/proj/GroupDisk.vue | 9 ++++++++- src/pages/proj/OpenDisk.vue | 5 +++++ src/pages/proj/PickGoods.vue | 8 +++++++- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/components/SearchBox.vue b/src/components/SearchBox.vue index d4baa69..fbf16ff 100644 --- a/src/components/SearchBox.vue +++ b/src/components/SearchBox.vue @@ -7,7 +7,6 @@ class="filter-input filter-scan-input search_input" ref="scaninput" :placeholder="keyCode === '' ? placeholder : keyCode" - :disabled="disabled" :value="value" @focus="handleFocus($event)" @blur="handleBlur($event)" @@ -37,10 +36,6 @@ export default { props: { value: String, label: String, - focused: { - type: Boolean, - default: false - }, seaShow: { type: Boolean, default: true @@ -48,10 +43,6 @@ export default { keyCode: { type: String, default: '' - }, - disabled: { - type: Boolean, - default: false } }, data () { @@ -61,13 +52,10 @@ export default { cur: '' } }, - mounted () { - if (!this.focused) this.handleScan() - }, methods: { handleScan () { this.$refs.scaninput.focus() - this.placeholder = '请扫码键输入' + this.placeholder = '请按扫码键输入' this.type = true this.$emit('input', '') }, @@ -78,11 +66,11 @@ export default { // this.$emit('input', this.cur) }, handleFocus ($event) { - this.cur = $event.target.value - this.placeholder = '请扫码键输入' - this.type = false - // $event.target.value = '' - // this.$emit('input', $event.target.value) + // this.cur = $event.target.value + this.placeholder = '请按扫码键输入' + this.type = true + $event.target.value = '' + this.$emit('input', $event.target.value) }, handleBlur ($event) { this.type = '' diff --git a/src/pages/proj/Check.vue b/src/pages/proj/Check.vue index 25b3742..32b62a8 100644 --- a/src/pages/proj/Check.vue +++ b/src/pages/proj/Check.vue @@ -4,13 +4,14 @@
@@ -71,12 +72,16 @@ export default { disabled: false } }, + mounted () { + this.$refs.myInput1.handleScan() + }, methods: { /** 读取托盘码 */ async _RFReadTrayStateInventory (val) { try { let res = await RFReadTrayStateInventory(val) if (res.ErrNO === '1') { + this.$refs.myInput2.handleScan() this._RFReadTrayStorageInventory() } else { this.toast(res.ErrMsg) @@ -145,6 +150,7 @@ export default { this.val2 = '' this.dataList = [] this.disabled = false + this.$refs.myInput1.handleScan() } } } diff --git a/src/pages/proj/GroupDisk.vue b/src/pages/proj/GroupDisk.vue index 0641d6c..d818195 100644 --- a/src/pages/proj/GroupDisk.vue +++ b/src/pages/proj/GroupDisk.vue @@ -4,11 +4,13 @@
@@ -71,12 +72,16 @@ export default { disabled: false } }, + mounted () { + this.$refs.myInput1.handleScan() + }, methods: { /** 读取托盘码 */ async _RFReadTrayStatePick (val) { try { let res = await RFReadTrayStatePick(val) if (res.ErrNO === '1') { + this.$refs.myInput2.handleScan() this._RFReadTrayStoragePick() } else { this.toast(res.ErrMsg) @@ -145,6 +150,7 @@ export default { this.val2 = '' this.dataList = [] this.disabled = false + this.$refs.myInput1.handleScan() } } }