diff --git a/api/newFun.js b/api/newFun.js index 03bb870..e90699d 100644 --- a/api/newFun.js +++ b/api/newFun.js @@ -58,6 +58,10 @@ export const expressAll = (param) => { export const stopTimes = (param) => { return request.post('shop/stopTimes', param) } +// 上门回收预约时间 +export const updateOrderStatus = (param) => { + return request.post('recovery/updateOrderStatus', param) +} // 上门回收编辑 export const updateOrder = (param) => { return request.post('recovery/updateOrder', param) diff --git a/pages/news/recycling/recoveryList.vue b/pages/news/recycling/recoveryList.vue index 0a02a25..852a6bf 100644 --- a/pages/news/recycling/recoveryList.vue +++ b/pages/news/recycling/recoveryList.vue @@ -85,7 +85,7 @@ total: 1, order_no: "", pageNum: 1, - userInfo: '' + userInfo: '', } }, onLoad(o) { @@ -157,7 +157,7 @@ confirmColor: "#F21A1C", complete(res) { if (res.confirm) { - that.toCheck(index, a.order_id); + that.toCheck(index, a.order_id,20,a.recovery_id); } } }) @@ -170,45 +170,25 @@ confirmColor: "#F21A1C", complete(res) { if (res.confirm) { - that.toCollection(index, a.order_id); + that.toCheck(index, a.order_id,40,a.recovery_id); } } }) } }, - //完成验收 - async toCheck(index, order_id) { + async toCheck(index, order_id,stat,recovery_id) { const { status, message, data - } = await newFunApi.completeOrder({ - order_id + } = await newFunApi.updateOrderStatus({ + order_id:order_id,status:stat,recovery_id:recovery_id }); if (status == 200) { uni.showToast({ - title: "验收成功" + title: "操作成功" }) - this.classifyShow = 2 - this.pageNum = 1; - this.goodsList = [] - this.getOrderList(1) - } - }, - //确认收款 - async toCollection(index, order_id) { - const { - status, - message, - data - } = await newFunApi.completeOrder({ - order_id - }); - if (status == 200) { - uni.showToast({ - title: "收款成功" - }) - this.classifyShow = 2 + this.classifyShow = 1 this.pageNum = 1; this.goodsList = [] this.getOrderList(1)