tianyi 2 days ago
parent
commit
71b708ef03
  1. 2
      components/tab-bar/delivery.vue
  2. 39
      components/tab-bar/tab-bar.vue

2
components/tab-bar/delivery.vue

@ -187,7 +187,7 @@
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,1)"/>
<!-- <view style="width: 20%;" @tap="changeOthers(item,1)">转单</view> -->
<img v-if="item.status == 1 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
alt="" style="width: 80%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,2)"/>
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,2)"/>
<img v-if="item.status == 2 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a8cdd6d86e9140df86d3c3c60356bd53.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,3)" />
</view>

39
components/tab-bar/tab-bar.vue

@ -122,29 +122,28 @@
let that = this
let shopId = uni.getStorageSync('shopId')
let worker = uni.getStorageSync('worker')
if(!shopId && !worker){
return
}
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
for(let i = 0;i<res.result.length;i++){
if(res.result[i].status == 0){
this.indexZhipaiCount = Number(res.result[i].orderCount)
}else if(res.result[i].status == 1 || res.result[i].status == 2){
this.indexWorkerCount += Number(res.result[i].orderCount)
}else{
this.indexMyCount = Number(res.result[i].orderCount)
if(shopId || worker){
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
for(let i = 0;i<res.result.length;i++){
if(res.result[i].status == 0){
this.indexZhipaiCount = Number(res.result[i].orderCount)
}else if(res.result[i].status == 1 || res.result[i].status == 2){
this.indexWorkerCount += Number(res.result[i].orderCount)
}else{
this.indexMyCount = Number(res.result[i].orderCount)
}
}
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
uni.hideLoading();
}).catch((res) => {});
}
}
}
}

Loading…
Cancel
Save