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

Loading…
Cancel
Save