version/0412
fanfan 9 months ago
parent 518099de44
commit 11b1a6f85c
  1. 4
      api/newFun.js
  2. 36
      pages/news/recycling/recoveryList.vue

@ -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)

@ -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)

Loading…
Cancel
Save