Commit 2c2d04aa by LJM

js

parent 8d4ea0ab
Showing with 15 additions and 4 deletions
......@@ -13,13 +13,13 @@
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<input class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#919399" focus v-model="searchParams.tracking_no" @input="handleInput" />
<input class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#919399" focus v-model="searchParams.tracking_no" @input="handleInput(1, $event)" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入入库单号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_sn" @input="handleInput" />
<input class="uni-input" placeholder="请输入入库单号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_sn" @input="handleInput(2, $event)" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(3, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -227,9 +227,20 @@ export default {
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
handleInput: debounce(function(type, event) {
var val = event.target.value;
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
if (val) {
if (type == 1) {
this.searchParams.tracking_no = val;
} else if (type == 2) {
this.searchParams.stock_in_sn = val;
} else if (type == 3) {
this.searchParams.stock_in_with_stock_in_items_inhouse = val;
}
this.input_flag = true;
} else {
this.input_flag = false;
......
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