Commit c52e66d5 by LJM

bug

parent 65cc8837
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
left: 0; left: 0;
z-index: 999; z-index: 999;
.btn1 { .btn1 {
width: 128rpx; width: 150rpx;
height: 75rpx; height: 75rpx;
background: #ffffff; background: #ffffff;
.check-box-icon { .check-box-icon {
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
} }
} }
.btn2 { .btn2 {
width: calc(100% - 128rpx); width: calc(100% - 150rpx);
height: 75rpx; height: 75rpx;
background: #1969f9; background: #1969f9;
font-size: 23rpx; font-size: 23rpx;
......
...@@ -399,7 +399,8 @@ ...@@ -399,7 +399,8 @@
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "wms", "navigationBarTitleText": "wms",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF" "backgroundColor": "#FFFFFF",
"onReachBottomDistance": 100
}, },
"uniIdRouter": {}, "uniIdRouter": {},
"condition": { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
<view class="btn row rowCenter verCenter">上架</view> <view class="btn row rowCenter verCenter">上架</view>
</navigator> </navigator>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #919399;font-size: 16px;padding: 10px 0;flex: 0 0 100%;">--已经到底了--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
<view class="fix-btn row verCenter"> <view class="fix-btn row verCenter">
<view class="btn1 row rowCenter verCenter" @click="allChnage()"> <view class="btn1 row rowCenter verCenter" @click="allChnage()">
<text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text> <text class="check-box-icon" :class="{ curr: filter_list.length > 0 && filter_list.length == filter_id.length }"></text>
<text class="text">{{ filter_id.length == 0 ? '全选' : filter_id.length }}</text> <text class="text row rowCenter verCenter">{{ filter_id.length == 0 ? totalText : filter_id.length }}</text>
</view> </view>
<view class="btn2 row rowCenter verCenter" @click="showDrawer()">一键上架</view> <view class="btn2 row rowCenter verCenter" @click="showDrawer()">一键上架</view>
</view> </view>
...@@ -163,6 +164,7 @@ ...@@ -163,6 +164,7 @@
warehouse_id: '', warehouse_id: '',
stock_in_type: '', stock_in_type: '',
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
totalText: '全选', //当前显示的数量
formParams: { formParams: {
position_code: '' position_code: ''
}, },
...@@ -296,19 +298,29 @@ ...@@ -296,19 +298,29 @@
this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index])); this.$set(this.filter_list, index, (this.filter_list[index] = !this.filter_list[index]));
let filter_arr = this.findIndex(this.filter_list, true); let filter_arr = this.findIndex(this.filter_list, true);
this.filter_id = filter_arr.map(i => this.list[i].tally_id); this.filter_id = filter_arr.map(i => this.list[i].tally_id);
//开启了批量搜索,如果取消勾选则删除 //开启了批量搜索,如果取消勾选则删除
if (this.is_batch) { if (this.is_batch) {
if (!this.filter_list[index]) { if (!this.filter_list[index]) {
this.history_id.splice(index, 1); //history_id对应的索引跟搜索的list的索引相反,要根据入库批次号来删除
this.searchParams.search_keyword = this.history_id.join(','); var searchItem = this.list[index].stock_in_batch_sn; //先找出对应的入库批次号对应的index
var sortIndex = this.history_id.indexOf(searchItem); //再找出对入库批次号在history_id对应的index
this.history_id.splice(sortIndex, 1); //找到真实对应的index,然后在删除
this.searchParams.search_keyword = this.history_id.join(','); //最后赋值搜索值
//搜索之后添加选择状态 //搜索之后添加选择状态
this.getData(data => { this.getData(data => {
if (data.length > 0) { if (data.length > 0) {
const list = data; this.resetChange(); //先置空
list.forEach((item, index) => { this.list = data; //恢复搜索的结果
this.filterChange(index); //如果搜索值的参数为空,就不执行选中操作
}); if (this.searchParams.search_keyword) {
this.list.forEach((item, index) => {
this.filterChange(index);
});
} else {
//要注意这里要实时更新统计数量
this.totalText = '全选 ' + '(' + this.list.length + ')'
}
this.search_keyword = ''; this.search_keyword = '';
} }
}); });
...@@ -450,9 +462,11 @@ ...@@ -450,9 +462,11 @@
this.request(API.getPendingShelfByBatchSn, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => { this.request(API.getPendingShelfByBatchSn, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data.total > 0) { if (res.data.total > 0) {
this.total = res.data.total; //分页总数
this.hasMoreData = true; this.hasMoreData = true;
this.list = this.list.concat(res.data.list); this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false); this.filter_list = createArray(this.list.length, false);
this.totalText = '全选 ' + '(' + this.list.length + ')'
typeof callback == 'function' && callback(res.data.list, res.data.msg); typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else { } else {
this.hasMoreData = false; this.hasMoreData = false;
......
...@@ -337,13 +337,14 @@ ...@@ -337,13 +337,14 @@
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
this.list = []; this.list = [];
this.is_focus = false; this.is_focus = false;
this.formParams.position_code = ''; //清除目标库位
setTimeout(() => { setTimeout(() => {
this.formParams.position_code = ''; //清除目标库位 this.formParams.position_code = ''; //清除目标库位
this.formParams.stock_id = ''; //清除表单的信息 this.formParams.stock_id = ''; //清除表单的信息
this.formParams.transfer_qty = ''; //清除表单的信息 this.formParams.transfer_qty = ''; //清除表单的信息
this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签 this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签
this.is_focus = true; this.is_focus = true;
}, 500); }, 2000);
}, 2000) }, 2000)
} else { } else {
this.is_submit = false; this.is_submit = false;
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统 const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统 const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统 const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统 const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统 // const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统 // const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = { const API = {
......
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