Commit 96828b88 by LJM

按货品上架分页优化

parent a189f224
Showing with 25 additions and 12 deletions
......@@ -153,7 +153,7 @@
is_submit: true,
input_flag: false,
page: 1,
limit: 1000,
limit: 50,
index: 0,
array: ['入库批次号', '全量搜索'],
list: [],
......@@ -162,6 +162,7 @@
filter_id: [], //过滤处理的id
warehouse_id: '',
stock_in_type: '',
hasMoreData: true, //是否分页加载
formParams: {
position_code: ''
},
......@@ -172,6 +173,13 @@
}
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) {
console.log(e);
if (e.index == 0) {
......@@ -430,9 +438,14 @@
getData(callback) {
this.request(API.getPendingShelfByBatchSn, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
this.filter_list = createArray(this.list.length, false);
typeof callback == 'function' && callback(res.data.list, res.data.msg);
if (res.data.total > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false);
typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
......
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
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