Commit 6939c8e6 by LJM

移动端--盘点--操作优化

parent a5c60f0d
Showing with 13 additions and 4 deletions
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="search-bar row bothSide verCenter"> <view class="search-bar row bothSide verCenter">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_code" @input="handleInput($event, 1)" /> <input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_code" @input="handleInput($event, 1)" focus />
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
</view> </view>
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<template v-if="index_batch_sn == 0"> <template v-if="index_batch_sn == 0">
<input class="uni-input" placeholder="请输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" /> <input class="uni-input" placeholder="请输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" :focus="is_focus" />
</template> </template>
<template v-else-if="index_batch_sn == 1"> <template v-else-if="index_batch_sn == 1">
<input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" v-model="searchParams.goods_name" @input="handleInput($event, 2)" /> <input class="uni-input" placeholder="请输入货品名称" placeholder-style="color:#919399" v-model="searchParams.goods_name" @input="handleInput($event, 2)" :focus="is_focus" />
</template> </template>
<template v-else-if="index_batch_sn == 2"> <template v-else-if="index_batch_sn == 2">
<input class="uni-input" placeholder="请输入旧标签" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" maxlength="8" /> <input class="uni-input" placeholder="请输入旧标签" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput($event, 2)" maxlength="8" :focus="is_focus" />
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_stock_in_batch_sn"></text> <text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_stock_in_batch_sn"></text>
...@@ -320,6 +320,7 @@ ...@@ -320,6 +320,7 @@
export default { export default {
data() { data() {
return { return {
is_focus: false, //获取焦点动态化
input_flag: false, //库位 input_flag: false, //库位
input_stock_in_batch_sn: false, //入库批次号 input_stock_in_batch_sn: false, //入库批次号
index: 0, index: 0,
...@@ -632,6 +633,14 @@ ...@@ -632,6 +633,14 @@
this.resetChange(); this.resetChange();
this.getData(); this.getData();
this.closeDrawer(); this.closeDrawer();
this.is_focus = false;
setTimeout(() => {
this.searchParams.stock_in_batch_sn = '';
this.searchParams.goods_name = '';
this.is_focus = true;
}, 500);
}, 2000); }, 2000);
} else { } else {
uni.showModal({ uni.showModal({
......
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