tianyi 2 days ago
parent
commit
43af661d4b
  1. 24
      components/tab-bar/delivery.vue

24
components/tab-bar/delivery.vue

@ -63,7 +63,8 @@
</view>
</view>
<view class="content">
<view class="box1" v-for="(item,index) in deliveryItem" :key="index">
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 620px;overflow: scroll;">
<view class="box1" v-for="(item,index) in pageData" :key="index">
<view class="maotou" v-if="item.deliveryType == 1">
#样式要改<text>{{item.numberCode}}</text>
</view>
@ -188,6 +189,7 @@
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,3)" />
</view>
</view>
</scroll-view>
<!-- 设置指派单规则弹窗 -->
<uni-popup ref="carPopup" background-color="#fff" style="height: 1600rpx !important;">
@ -323,7 +325,9 @@
},
waimaRuleList: [],
tab1Checked1:'',
pageData:[],
deliveryItem:[],
deliveryItem1:[],
selectRuleList: [],
totalPages:1,
paotuiRuleList: [],
@ -380,6 +384,12 @@
this.getDelivery()
this.$forceUpdate()
},
onReachPage(){
console.log("11111")
if (this.searchForm.pageNum >= this.totalPages) return;
this.searchForm.pageNum++;
this.getDelivery();
},
chooseType(type){
if(this.tab1Checked1 == type){
this.tab1Checked1 = ''
@ -403,12 +413,22 @@
this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
that.deliveryItem = res.result.records;
if(this.searchForm.status == 1){
if (that.searchForm.pageNum == 1) {
that.deliveryItem1 = res.result.records;
} else {
that.deliveryItem1 = [...that.deliveryItem, ...res.result.records]
}
that.pageData = that.deliveryItem1
}else{
if (that.searchForm.pageNum == 1) {
that.deliveryItem = res.result.records;
} else {
that.deliveryItem = [...that.deliveryItem, ...res.result.records]
}
that.pageData = that.deliveryItem
}
that.totalPages = res.result.pages; // pages =
that.$forceUpdate();
} else {

Loading…
Cancel
Save