diff --git a/pages/index/index.vue b/pages/index/index.vue index 6b422c4..d33cb05 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -309,6 +309,9 @@ + + 拒绝接单 + @@ -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) => {