Commit c6f98518 by LJM

到货登记、理货,理货记录,上架,上架记录搜索,支持全量模糊搜索(等待前端对接)

parent b3bdfce8
......@@ -13,16 +13,10 @@
<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(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_register_all_search" @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(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(3, $event)" maxlength="7" />
</template>
<template v-else-if="index == 3">
<input class="uni-input" placeholder="请输入型号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_goods_sn" @input="handleInput(4, $event)" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="7" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -195,7 +189,7 @@ export default {
page: 1,
limit: 50,
index: 0,
array: ['物流单号', '入库单号', '入仓号', '型号'],
array: ['全量搜索', '入仓号'],
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id
......@@ -204,10 +198,8 @@ export default {
warehouse_id_data: [],
hasMoreData: true, //是否分页加载
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
stock_in_with_stock_in_items_inhouse: '', //入仓单号
stock_in_with_stock_in_items_goods_sn: '' //型号
mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '' //入仓单号
},
formParams: {
warehouse_id: '',
......@@ -300,13 +292,12 @@ export default {
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.resetChange();
if (this.index == 0) {
this.searchParams.tracking_no = '';
this.searchParams.mobile_register_all_search = '';
} else if (this.index == 1) {
this.searchParams.stock_in_sn = '';
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.getData();
......@@ -318,19 +309,13 @@ export default {
handleInput: debounce(function(type, event) {
this.resetChange();
var val = event.target.value;
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.mobile_register_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.stock_in_with_stock_in_items_goods_sn = '';
if (val) {
if (type == 1) {
this.searchParams.tracking_no = val;
this.searchParams.mobile_register_all_search = 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;
} else if (type == 4) {
this.searchParams.stock_in_with_stock_in_items_goods_sn = val;
}
this.input_flag = true;
} else {
......@@ -342,7 +327,7 @@ export default {
* 获取列表数据
*/
getData() {
this.request(API.stockInMobileRegisterList, 'POST', { page: this.page, limit: this.limit, is_register: 0, ...this.searchParams }, false).then(res => {
this.request(API.stockInMobileRegisterList, 'POST', { page: this.page, limit: this.limit, is_register: 0, ...this.searchParams }, true).then(res => {
if (res.code === 0) {
if (res.data.total > 0) {
this.hasMoreData = true;
......
......@@ -13,13 +13,10 @@
<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(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_register_all_search" @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(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(3, $event)" maxlength="7" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="7" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -157,15 +154,14 @@ export default {
page: 1,
limit: 50,
index: 0,
array: ['物流单号', '入库单号', '入仓号'],
array: ['全量搜索', '入仓号'],
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤id
detail: {}, //详情的数据
hasMoreData: true, //是否分页加载
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '' //入仓单号
}
};
......@@ -229,13 +225,12 @@ export default {
* 清空数据
*/
clearInput() {
this.resetChange();
this.input_flag = false;
this.resetChange();
if (this.index == 0) {
this.searchParams.tracking_no = '';
this.searchParams.mobile_register_all_search = '';
} else if (this.index == 1) {
this.searchParams.stock_in_sn = '';
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.getData();
......@@ -247,16 +242,13 @@ export default {
handleInput: debounce(function(type, event) {
this.resetChange();
var val = event.target.value;
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.mobile_register_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
if (val) {
if (type == 1) {
this.searchParams.tracking_no = val;
this.searchParams.mobile_register_all_search = 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;
......
......@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_batch_sn" @input="handleInput" maxlength="15" />
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描入库标签" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(1, $event)" maxlength="15" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.search_keyword" @input="handleInput(2, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -124,7 +129,7 @@ export default {
page: 1,
limit: 1000,
index: 0,
array: ['入库批次号'],
array: ['入库批次号', '全量搜索'],
list: [],
position: [], //库位
filter_list: [], //筛选已选中的列表
......@@ -135,7 +140,8 @@ export default {
position_code: ''
},
searchParams: {
stock_in_batch_sn: '' //入库批次号
search_type: 1, //入库批次号 全量
search_keyword: ''
}
};
},
......@@ -158,6 +164,7 @@ export default {
this.formParams.position_id = this.position[e.detail.value].value;
} else {
this.index = e.detail.value;
this.searchParams.search_type = Number(e.detail.value) + 1;
}
},
showDrawer() {
......@@ -231,25 +238,30 @@ export default {
*/
clearInput() {
this.input_flag = false;
this.searchParams.stock_in_batch_sn = '';
this.searchParams.search_keyword = '';
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
handleInput: debounce(function(type, event) {
var val = event.target.value;
if (val) {
this.input_flag = true;
this.getData();
setTimeout(() => {
if (this.list.length == 1) {
uni.navigateTo({
url: '/pages/putaway/single?stock_in_batch_sn=' + this.list[0].stock_in_batch_sn + '&tally_id=' + this.list[0].tally_id
});
}
}, 1000);
if (type == 1) {
this.input_flag = true;
this.getData();
setTimeout(() => {
if (this.list.length == 1) {
uni.navigateTo({
url: '/pages/putaway/single?stock_in_batch_sn=' + this.list[0].stock_in_batch_sn + '&tally_id=' + this.list[0].tally_id
});
}
}, 1000);
} else if (type == 2) {
this.input_flag = true;
this.getData();
}
} else {
this.getData();
this.input_flag = false;
......
......@@ -13,19 +13,7 @@
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或输入入库单号" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请扫描或输入入库批次 " placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请扫描或输入销售员名" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
</template>
<template v-else-if="index == 3">
<input class="uni-input" placeholder="请扫描或输入入仓号" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
</template>
<template v-else-if="index == 4">
<input class="uni-input" placeholder="请扫描或输入理货容器编码" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
<input class="uni-input" placeholder="请扫描或者输入" placeholder-style="color:#919399" v-model="searchParams.search_keyword" @input="handleInput" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -258,7 +246,7 @@ export default {
page: 1,
limit: 50,
index: 0,
array: ['入库单号', '入库批次号', '销售员', '入仓号', '理货容器'],
array: ['全量搜索'],
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id
......
......@@ -13,13 +13,10 @@
<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(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_wait_tally_all_search" @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(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(3, $event)" maxlength="7" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="7" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
......@@ -31,7 +28,7 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(4, $event)" />
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(3, $event)" />
</view>
<view>
<text class="iconfont icon-juxing3" @click="createTallyContainer()"></text>
......@@ -128,7 +125,7 @@
<view class="search-bar row bothSide verCenter" style="width: calc(100% - 100rpx);">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(4, $event)" />
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(3, $event)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_contaion"></text>
</view>
......@@ -186,7 +183,7 @@ export default {
limit: 50,
index: 0,
indexContainer: -1,
array: ['物流单号', '入库单号', '入仓号'],
array: ['全量搜索', '入仓号'],
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //入库单列表的入库登记
......@@ -195,8 +192,7 @@ export default {
maxNum: 10, //最大上传图片数量
hasMoreData: true, //是否分页加载
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
mobile_wait_tally_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号
container_name: '', //容器编码
container_id: '' //容器id
......@@ -293,10 +289,8 @@ export default {
if (type == 1) {
this.input_flag = false;
if (this.index == 0) {
this.searchParams.tracking_no = '';
this.searchParams.mobile_wait_tally_all_search = '';
} else if (this.index == 1) {
this.searchParams.stock_in_sn = '';
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
} else {
......@@ -333,42 +327,31 @@ export default {
if (val) {
if (type == 1) {
this.resetChange();
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.mobile_wait_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.tracking_no = val;
this.searchParams.mobile_wait_tally_all_search = val;
this.input_flag = true;
this.getData();
} else if (type == 2) {
this.resetChange();
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.stock_in_sn = val;
this.input_flag = true;
this.getData();
} else if (type == 3) {
this.resetChange();
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.mobile_wait_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = val;
this.input_flag = true;
this.getData();
} else if (type == 4) {
} else if (type == 3) {
this.searchParams.container_name = val;
this.input_contaion = true;
this.getTallyContainer();
}
} else {
if (type == 1 || type == 2 || type == 3) {
if (type == 1 || type == 2) {
this.resetChange();
this.input_flag = false;
this.getData();
} else if (type == 4) {
} else if (type == 3) {
this.input_contaion = false;
}
}
......
......@@ -13,13 +13,10 @@
<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(1, $event)" />
<input class="uni-input" placeholder="请扫描或输入号码" placeholder-style="color:#919399" focus v-model="searchParams.mobile_have_tally_all_search" @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(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(3, $event)" />
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -255,7 +252,7 @@ export default {
limit: 50,
input_flag: false,
index: 0,
array: ['物流单号', '入库单号', '入仓号'],
array: ['全量搜索', '入仓号'],
list: [],
filter_list: [], //筛选已选中的列表
filter_id: [], //入库单列表的入库登记
......@@ -263,12 +260,11 @@ export default {
image_list: [], //图片列表
hasMoreData: true, //是否分页加载
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
mobile_have_tally_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号
container_id: '', //容器,
tally_status: 0, //默认显示已理货
stock_tally_with_stock_in_stock_in_type_in: ''
stock_tally_with_stock_in_stock_in_type_in: '' //入库类型
}
};
},
......@@ -347,10 +343,8 @@ export default {
this.resetChange();
this.input_flag = false;
if (this.index == 0) {
this.searchParams.tracking_no = '';
this.searchParams.mobile_have_tally_all_search = '';
} else if (this.index == 1) {
this.searchParams.stock_in_sn = '';
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.getData();
......@@ -362,15 +356,12 @@ export default {
handleInput: debounce(function(type, event) {
this.resetChange();
var val = event.target.value;
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.mobile_have_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
if (val) {
if (type == 1) {
this.searchParams.tracking_no = val;
this.searchParams.mobile_have_tally_all_search = 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;
......
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