Commit e17d0e90 by LJM

a

parent 881963a8
Showing with 14 additions and 2 deletions
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="index == 0"> <template v-if="index == 0">
<template v-if="is_batch"> <template v-if="is_batch">
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(1, $event)" maxlength="15" /> <input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(1, $event)" maxlength="15" ref="myInput" id="myInput" />
</template> </template>
</template> </template>
<template v-else-if="index == 1"> <template v-else-if="index == 1">
...@@ -192,10 +192,15 @@ export default { ...@@ -192,10 +192,15 @@ export default {
} }
} }
}, },
/**
* 批量扫描监听
* @param {Object} e
*/
switchChange(e) { switchChange(e) {
console.log('switch 发生 change 事件,携带值为', e.detail.value); console.log('switch 发生 change 事件,携带值为', e.detail.value);
this.is_batch = e.detail.value; this.is_batch = e.detail.value;
this.searchParams.is_full_sweep = this.is_batch ? 1 : 0; this.searchParams.is_full_sweep = this.is_batch ? 1 : 0;
//重置相关数据 //重置相关数据
this.history_id = []; this.history_id = [];
this.list = []; this.list = [];
...@@ -207,6 +212,13 @@ export default { ...@@ -207,6 +212,13 @@ export default {
this.searchParams.search_keyword = ''; this.searchParams.search_keyword = '';
} }
try {
this.$refs.myInput.focus(); // 获取焦点
} catch (e) {
//TODO handle the exception
console.log(e);
}
this.getData(); this.getData();
}, },
showDrawer() { showDrawer() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment