Commit 9c782664 by LJM

bug

parent 0450119d
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,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 == 0"> <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>
<template v-else-if="index == 1"> <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>
<template v-else-if="index == 2"> <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> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
...@@ -234,9 +234,19 @@ export default { ...@@ -234,9 +234,19 @@ export default {
* 单号搜索 * 单号搜索
* @param {Object} event * @param {Object} event
*/ */
handleInput: debounce(function(event) { handleInput: debounce(function(type, event) {
var val = event.target.value; 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 (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; this.input_flag = true;
} else { } else {
this.input_flag = false; this.input_flag = false;
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,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 == 0"> <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>
<template v-else-if="index == 1"> <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>
<template v-else-if="index == 2"> <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> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<picker @change="bindPickerContainChange" :value="indexContainer" :range="tallyContainer" range-key="name" style="width: 100%;height: 100%;"> <picker @change="bindPickerContainChange" :value="indexContainer" :range="tallyContainer" range-key="name" style="width: 100%;height: 100%;">
<view class="row verCenter bothSide wrap"> <view class="row verCenter bothSide wrap">
<view class="uni-input row verCenter">{{ tallyContainer[indexContainer].name }}</view> <view class="uni-input row verCenter">{{ tallyContainer[indexContainer].name || '请选择' }}</view>
<view class="uni-arrow"></view> <view class="uni-arrow"></view>
</view> </view>
</picker> </picker>
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
page: 1, page: 1,
limit: 1000, limit: 1000,
index: 0, index: 0,
indexContainer: 0, indexContainer: -1,
array: ['物流单号', '入库单号', '入仓号'], array: ['物流单号', '入库单号', '入仓号'],
tallyContainer: [], //容器列表 tallyContainer: [], //容器列表
list: [], list: [],
...@@ -271,9 +271,19 @@ export default { ...@@ -271,9 +271,19 @@ export default {
* 单号搜索 * 单号搜索
* @param {Object} event * @param {Object} event
*/ */
handleInput: debounce(function(event) { handleInput: debounce(function(type, event) {
var val = event.target.value; 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 (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; this.input_flag = true;
} else { } else {
this.input_flag = false; this.input_flag = false;
...@@ -287,6 +297,8 @@ export default { ...@@ -287,6 +297,8 @@ export default {
bindPickerContainChange(e) { bindPickerContainChange(e) {
this.indexContainer = e.detail.value; this.indexContainer = e.detail.value;
this.formParams.container_id = this.tallyContainer[e.detail.value].id; this.formParams.container_id = this.tallyContainer[e.detail.value].id;
this.searchParams.container_id = this.tallyContainer[e.detail.value].id;
this.getData();
}, },
/** /**
* 获取列表数据 * 获取列表数据
......
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