From ba8ce4451b48b5902a307df075442bf016b5e4ae Mon Sep 17 00:00:00 2001
From: queenwuli <942534046@qq.com>
Date: Mon, 11 Jan 2021 17:06:21 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/jyyforjava/hive-app into master
---
hive-app/pages/workbench/storeRecord.vue | 48 ++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/hive-app/pages/workbench/storeRecord.vue b/hive-app/pages/workbench/storeRecord.vue
index 0877076..5463a97 100644
--- a/hive-app/pages/workbench/storeRecord.vue
+++ b/hive-app/pages/workbench/storeRecord.vue
@@ -27,43 +27,79 @@
<text class="gray">订单编号: {{item.orderNo}}</text>
</view>
</view>
+ <view v-if="list.length">
+ <uni-load-more :status="loadStatus" color="#a5abaf"></uni-load-more>
+ </view>
</view>
</view>
</template>
<script>
+ import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
export default{
+ components:{
+ uniLoadMore
+ },
data(){
return {
goodsCode: '',
startDate: '',
endDate: '',
- list: []
+ list: [],
+ loadStatus: 'more',
+ pageNum: 1
}
},
onLoad(options) {
this.goodsCode = options.goodsCode;
this.loadList()
},
+ onPullDownRefresh(){
+ this.reloadData();
+ let timer = setTimeout(function () {
+ uni.startPullDownRefresh();
+ clearTimeout(timer);
+ timer = null;
+ }, 800);
+ },
+ onReachBottom(){
+ this.loadList()
+ },
methods:{
+ reloadData(){
+ this.list = [];
+ this.pageNum = 1;
+ this.loadStatus = 'more';
+ this.loadList();
+ },
startDateChange(e){
this.startDate = e.detail.value;
- this.loadList()
+ this.reloadData()
},
endDateChange(e){
this.endDate = e.detail.value;
- this.loadList()
+ this.reloadData()
},
loadList(){
+ if(this.loadStatus!=='more'){
+ return;
+ }
this.$httpUtils.request('/api/store/findGoodsInOutInfo', {
code: this.goodsCode,
- pageNum: 1,
- pageSize: 100,
+ pageNum: this.pageNum,
+ pageSize: 10,
startTime: this.startDate,
endTime: this.endDate
}, 'POST').then((res) => {
if(res.status == 200){
- this.list = res.rows;
+ let result = res.rows;
+ if(result.length < 10){
+ this.loadStatus = 'noMore';
+ } else {
+ this.pageNum ++ ;
+ this.loadStatus = 'more';
+ }
+ this.list = this.list.concat(result);
}
})
}
--
Gitblit v1.9.1