diff --git a/common/js/request.js b/common/js/request.js
index 3350756..977cf8c 100644
--- a/common/js/request.js
+++ b/common/js/request.js
@@ -15,7 +15,7 @@ export default {
// request 触发前拼接 url
args.url = 'https://www.opsoul.com:8881' + args.url;
// args.url = 'http://127.0.0.1:80' + args.url;
- // args.url = 'http://192.168.10.103:80' + args.url;
+ // args.url = 'http://192.168.10.105:80' + args.url;
if (!args.data) {
args.data = {}
@@ -674,6 +674,17 @@ export default {
})
return res[1].data;
},
+ async rejectMasterOrderWhenAccepted(params = {}) {
+ let res = await uni.request({
+ url: '/order/master/console/cancel',
+ method: 'POST',
+ data: params,
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ }
+ })
+ return res[1].data;
+ },
async changeOrderPrice(params = {}) {
let res = await uni.request({
url: '/order/detail/app/change/price',
diff --git a/pages/order-manage/order-manage.vue b/pages/order-manage/order-manage.vue
index 8e38ef8..c978114 100644
--- a/pages/order-manage/order-manage.vue
+++ b/pages/order-manage/order-manage.vue
@@ -217,6 +217,7 @@
+
@@ -1250,14 +1251,14 @@
if (res && res.code === 0) {
this.reloadMasterOrderPage();
uni.showToast({
- icon: 'none',
- title: '拒绝接单成功',
+ icon: 'success',
+ title: '拒单成功',
duration: 1000
})
} else {
uni.showToast({
icon: 'none',
- title: '拒绝接单失败'
+ title: '拒单失败'
})
}
},
@@ -1268,14 +1269,33 @@
if (res && res.code === 0) {
this.reloadMasterOrderPage();
uni.showToast({
- icon: 'none',
- title: '拒绝接单成功',
+ icon: 'success',
+ title: '退单成功',
duration: 1000
})
} else {
uni.showToast({
icon: 'none',
- title: '拒绝接单失败'
+ title: '退单失败'
+ })
+ }
+ },
+ async rejectMasterOrderWhenAccepted(order) {
+ let res = await this.$request.rejectMasterOrderWhenAccepted({
+ id: order.orderMasterId
+ });
+ if (res && res.code === 0) {
+ this.reloadMasterOrderPage();
+ uni.showToast({
+ icon: 'none',
+ title: '退单成功',
+ duration: 1000
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: res.msg,
+ duration: 2000
})
}
},