Commit 14f6116a by LJM

30

parent 7836ed72
...@@ -487,7 +487,7 @@ ...@@ -487,7 +487,7 @@
duration: 500, duration: 500,
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 50, limit: 30,
index: 0, index: 0,
array: ['全量搜索', '入仓号', 'FedEx'], array: ['全量搜索', '入仓号', 'FedEx'],
list: [], list: [],
...@@ -877,7 +877,7 @@ ...@@ -877,7 +877,7 @@
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'none'
}); });
} }
}); });
...@@ -1144,6 +1144,7 @@ ...@@ -1144,6 +1144,7 @@
* 重置 * 重置
*/ */
resetChange() { resetChange() {
this.filter_id = [];
this.list = []; this.list = [];
this.page = 1; this.page = 1;
}, },
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
input_flag: false, input_flag: false,
all_flag: false, //全选标记 all_flag: false, //全选标记
page: 1, page: 1,
limit: 50, limit: 30,
index: 0, index: 0,
array: ['全量搜索', '入仓号'], array: ['全量搜索', '入仓号'],
list: [], list: [],
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<view class="btn row rowCenter verCenter" @click="take(item.stock_out_id, item.stock_out_sn, item.warehouse_id)">领取</view> <view class="btn row rowCenter verCenter" @click="take(item.stock_out_id, item.stock_out_sn, item.warehouse_id)">领取</view>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
input_flag: false, input_flag: false,
index: 0, index: 0,
page: 1, page: 1,
limit: 1000, limit: 30,
array: ['出库单号'], array: ['出库单号'],
list: [], list: [],
searchParams: { searchParams: {
...@@ -82,7 +83,11 @@ ...@@ -82,7 +83,11 @@
} }
}; };
}, },
onShow() { onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData(); this.getData();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
...@@ -92,6 +97,9 @@ ...@@ -92,6 +97,9 @@
}); });
} }
}, },
onShow() {
this.getData();
},
methods: { methods: {
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
...@@ -103,7 +111,12 @@ ...@@ -103,7 +111,12 @@
getData() { getData() {
this.request(API.getNoTakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getNoTakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.total > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +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: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view> <view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
is_submit: true, is_submit: true,
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 50, limit: 16,
index: 0, index: 0,
array: ['入库批次号', '全量搜索'], array: ['入库批次号', '全量搜索'],
list: [], list: [],
...@@ -220,11 +220,21 @@ ...@@ -220,11 +220,21 @@
this.indexPosition = e.detail.value; this.indexPosition = e.detail.value;
this.formParams.position_id = this.position[e.detail.value].value; this.formParams.position_id = this.position[e.detail.value].value;
} else { } else {
//搜索部分
this.index = e.detail.value; this.index = e.detail.value;
this.searchParams.search_type = Number(e.detail.value) + 1; this.searchParams.search_type = Number(e.detail.value) + 1;
this.search_keyword = ''; this.search_keyword = '';
this.searchParams.search_keyword = ''; this.searchParams.search_keyword = '';
//为了改善体验
if (this.index == 0) {
//搜索入库批次号的时候
this.limit = 16;
} else if (this.index == 1) {
//全量搜索时候
this.limit = 30;
}
this.clearInputAndFocus(); this.clearInputAndFocus();
//批量扫描关闭 //批量扫描关闭
if (this.index == 1) { if (this.index == 1) {
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,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: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -60,15 +61,23 @@ ...@@ -60,15 +61,23 @@
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 1000, limit: 30,
index: 0, index: 0,
array: ['容器'], array: ['容器'],
list: [], list: [],
hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
container_sn: '' container_sn: ''
} }
}; };
}, },
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
console.log(e); console.log(e);
if (e.index == 0) { if (e.index == 0) {
...@@ -121,7 +130,12 @@ ...@@ -121,7 +130,12 @@
getData(callback) { getData(callback) {
this.request(API.onShelfByContainerCountList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.onShelfByContainerCountList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.total > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
typeof callback == 'function' && callback(res.data.list, res.data.msg); typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else { } else {
uni.showToast({ uni.showToast({
......
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 50, limit: 30,
index: 0, index: 0,
array: ['全量搜索'], array: ['全量搜索'],
list: [], list: [],
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<navigator :url="'/pages/stockRecheck/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn + '&warehouse_id=' + item.warehouse_id" class="btn1 row rowCenter verCenter" hover-class="none">选择</navigator> <navigator :url="'/pages/stockRecheck/sort?stock_out_id=' + item.stock_out_id + '&stock_out_sn=' + item.stock_out_sn + '&warehouse_id=' + item.warehouse_id" class="btn1 row rowCenter verCenter" hover-class="none">选择</navigator>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -89,19 +90,24 @@ ...@@ -89,19 +90,24 @@
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 1000, limit: 30,
index: 0, index: 0,
array: ['出库单号'], array: ['出库单号'],
list: [], list: [],
filter_list: [], //筛选已选中的列表 filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id filter_id: [], //过滤处理的id
hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
stock_out_status: '5,6,7', //出库单状态 stock_out_status: '5,6,7', //出库单状态
stock_out_sn: '' //出库单号 stock_out_sn: '' //出库单号
} }
}; };
}, },
onShow() { onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData(); this.getData();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
...@@ -111,6 +117,9 @@ ...@@ -111,6 +117,9 @@
}); });
} }
}, },
onShow() {
this.getData();
},
methods: { methods: {
checkboxChange(e) { checkboxChange(e) {
console.log('checkbox发送选择改变,携带值为', e.detail.value); console.log('checkbox发送选择改变,携带值为', e.detail.value);
...@@ -181,8 +190,13 @@ ...@@ -181,8 +190,13 @@
getData(callback) { getData(callback) {
this.request(API.getToCheckList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getToCheckList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.list.length > 0) {
this.filter_list = createArray(this.list.length, false); this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.filter_list = createArray(this.list.length, false);
} else {
this.hasMoreData = false;
}
typeof callback == 'function' && callback(res.data.list, res.data.msg); typeof callback == 'function' && callback(res.data.list, res.data.msg);
} else { } else {
uni.showToast({ uni.showToast({
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<navigator class="btn row rowCenter verCenter" :url="'/pages/stocktake/operate?stocktake_id=' + item.stocktake_id + '&stocktake_sn=' + item.stocktake_sn">选择</navigator> <navigator class="btn row rowCenter verCenter" :url="'/pages/stocktake/operate?stocktake_id=' + item.stocktake_id + '&stocktake_sn=' + item.stocktake_sn">选择</navigator>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -61,7 +62,8 @@ ...@@ -61,7 +62,8 @@
input_flag: false, input_flag: false,
index: 0, index: 0,
page: 1, page: 1,
limit: 1000, limit: 30,
hasMoreData: true, //是否分页加载
array: ['盘点单号'], array: ['盘点单号'],
list: [], list: [],
searchParams: { searchParams: {
...@@ -72,6 +74,13 @@ ...@@ -72,6 +74,13 @@
onShow() { onShow() {
this.getData(); this.getData();
}, },
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index == 0) { if (e.index == 0) {
uni.navigateTo({ uni.navigateTo({
...@@ -90,7 +99,13 @@ ...@@ -90,7 +99,13 @@
getData() { getData() {
this.request(API.getStocktakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getStocktakeList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<view class="btn3 row rowCenter verCenter" @click="showDrawer(item, 1)">选择</view> <view class="btn3 row rowCenter verCenter" @click="showDrawer(item, 1)">选择</view>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -341,7 +342,7 @@ ...@@ -341,7 +342,7 @@
remark: '', //盘点备注 remark: '', //盘点备注
list: [], list: [],
page: 1, page: 1,
limit: 50, limit: 30,
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
stocktake_sn: '', stocktake_sn: '',
detail: {}, detail: {},
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,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: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view> <view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text> <text class="iconfont icon-a-juxing21"></text>
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
company_id: uni.getStorageSync('company_id') || 1, //公司组织 company_id: uni.getStorageSync('company_id') || 1, //公司组织
all_flag: false, //全选标记 all_flag: false, //全选标记
page: 1, page: 1,
limit: 50, //分页限制数量 limit: 30, //分页限制数量
index: 0, index: 0,
indexContainer: -1, indexContainer: -1,
array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'], array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'],
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<view class="detail-btn row rowCenter verCenter" @click="showDrawer(item)">详情</view> <view class="detail-btn row rowCenter verCenter" @click="showDrawer(item)">详情</view>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 22rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view> <view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text> <text class="iconfont icon-a-juxing21"></text>
...@@ -409,7 +409,7 @@ ...@@ -409,7 +409,7 @@
return { return {
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
page: 1, page: 1,
limit: 50, //分页限制数量 limit: 30, //分页限制数量
input_flag: false, input_flag: false,
index: 0, index: 0,
curr: 0, curr: 0,
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,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: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -64,7 +65,8 @@ ...@@ -64,7 +65,8 @@
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 1000, limit: 30,
hasMoreData: true, //是否分页加载
index: 0, index: 0,
array: ['移位单号'], array: ['移位单号'],
list: [], list: [],
...@@ -73,6 +75,13 @@ ...@@ -73,6 +75,13 @@
} }
}; };
}, },
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() { onShow() {
this.getData(); this.getData();
}, },
...@@ -87,7 +96,12 @@ ...@@ -87,7 +96,12 @@
getData() { getData() {
this.request(API.getTransferList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getTransferList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
......
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
<text class="text">{{ item.exec_time }}</text> <text class="text">{{ item.exec_time }}</text>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -140,7 +141,7 @@ ...@@ -140,7 +141,7 @@
array: ['全量搜索', '旧标签'], array: ['全量搜索', '旧标签'],
input_flag: false, input_flag: false,
page: 1, page: 1,
limit: 50, limit: 30,
list: [], list: [],
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
......
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