|
|
|
@ -309,6 +309,9 @@ |
|
|
|
<view class="qiangdan-btn" @tap="getOrder(item,index)"> |
|
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1b8b815302a34902ac79a76a469e4ee6.png" alt=""> |
|
|
|
</view> |
|
|
|
<view class="yongjin" v-if="checked == 'zhipai'"> |
|
|
|
<text @tap="rejectOrder(item,index)">拒绝接单</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -689,6 +692,31 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch((res) => {}); |
|
|
|
}, |
|
|
|
rejectOrder(item,index){ |
|
|
|
let that = this |
|
|
|
this.tui.request("/mall/delivery/reject", "POST",{deliveryId:item.id}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.deliveryItem.splice(index,1) |
|
|
|
that.tui.toast(res.message); |
|
|
|
if(item.workerId != null && item.workerId != undefined && item.workerId != ''){ |
|
|
|
that.zhipaiCount -= 1 |
|
|
|
}else{ |
|
|
|
if(item.deliveryType == 1){ |
|
|
|
that.waimaiCount -= 1 |
|
|
|
}else if(item.deliveryType == 2){ |
|
|
|
that.kuaidiCount -= 1 |
|
|
|
}else if(item.deliveryType == 3){ |
|
|
|
that.paotuiCount -= 1 |
|
|
|
} |
|
|
|
} |
|
|
|
that.$forceUpdate(); |
|
|
|
} else { |
|
|
|
that.tui.toast(res.message); |
|
|
|
return; |
|
|
|
} |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch((res) => {}); |
|
|
|
}, |
|
|
|
getDelivery(){ |
|
|
|
let that = this |
|
|
|
this.tui.request("/mall/delivery/page", "POST", this.searchForm, false, false).then((res) => { |
|
|
|
|