|
|
@@ -534,7 +534,7 @@
|
|
|
<view class="reason-text">{{ item.order_cancel_desc }}</view>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
- <textarea v-if="selectedCancelReasonCode === 0" v-model="otherCancelReason" placeholder="请输入其他原因" class="reason-textarea"></textarea>
|
|
|
+ <textarea v-if="selectedCancelReasonCode === 0 || selectedCancelReasonCode === 313" v-model="otherCancelReason" placeholder="请输入其他原因" class="reason-textarea"></textarea>
|
|
|
</scroll-view>
|
|
|
<view class="popup-actions">
|
|
|
<button @click="closeCancelReasonPopup" class="action-btn cancel">取消</button>
|
|
|
@@ -699,7 +699,7 @@ export default {
|
|
|
if(deliveryId == 'fengniao'){
|
|
|
getCancelReason({ghsOrderId: orderId, platform: deliveryId}).then(res => {
|
|
|
if (res.code == 1 && res.data && res.data.code == 0) {
|
|
|
- this.cancelReasonList = res.data.data.cancel_reason_list;
|
|
|
+ this.cancelReasonList = res.data.data.reasonList;
|
|
|
this.currentExpressInfo = { orderId, deliveryId };
|
|
|
this.selectedCancelReasonCode = null;
|
|
|
this.otherCancelReason = '';
|
|
|
@@ -707,7 +707,7 @@ export default {
|
|
|
} else {
|
|
|
// 如果获取原因失败,走原来的流程
|
|
|
this.$util.confirmModal({content: '确认取消?(获取取消原因失败)'}, async () => {
|
|
|
- const res = await cancelDeliveryOrder({ghsOrderId: orderId, platform: deliveryId})
|
|
|
+ const res = await cancelDeliveryOrder({ghsOrderId: orderId, platform: deliveryId, order_cancel_reason: "客户取消订单"})
|
|
|
if (res.code === 1) {
|
|
|
this.$msg('取消成功')
|
|
|
this.init()
|
|
|
@@ -715,9 +715,39 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ } else if(deliveryId == 'shunfeng'){
|
|
|
+ this.cancelReasonList = [
|
|
|
+ { order_cancel_code: 300, order_cancel_desc: '计划有变,暂时不需要寄件了' },
|
|
|
+ { order_cancel_code: 302, order_cancel_desc: '填错订单信息,取消后重新提交' },
|
|
|
+ { order_cancel_code: 303, order_cancel_desc: '骑士要求取消' },
|
|
|
+ { order_cancel_code: 304, order_cancel_desc: '暂时无法提供待配送物品' },
|
|
|
+ { order_cancel_code: 306, order_cancel_desc: '重复下单,取消此单' },
|
|
|
+ { order_cancel_code: 309, order_cancel_desc: '骑士上门时间太长' },
|
|
|
+ { order_cancel_code: 310, order_cancel_desc: '超出配送范围' },
|
|
|
+ { order_cancel_code: 311, order_cancel_desc: '用户(收方)要求取消' },
|
|
|
+ { order_cancel_code: 312, order_cancel_desc: '无人接单,换用其他平台寄件' },
|
|
|
+ { order_cancel_code: 313, order_cancel_desc: '其他,请注明原因' }
|
|
|
+ ];
|
|
|
+ this.currentExpressInfo = { orderId, deliveryId };
|
|
|
+ this.selectedCancelReasonCode = null;
|
|
|
+ this.otherCancelReason = '';
|
|
|
+ this.$refs.cancelReasonPopup.open();
|
|
|
+ } else if(deliveryId == 'huolala'){
|
|
|
+ getCancelReason({ghsOrderId: orderId, platform: deliveryId}).then(res => {
|
|
|
+ if (res.code == 1 && res.data) {
|
|
|
+ this.cancelReasonList = res.data.reasonList;
|
|
|
+ this.currentExpressInfo = { orderId, deliveryId };
|
|
|
+ this.selectedCancelReasonCode = null;
|
|
|
+ this.otherCancelReason = '';
|
|
|
+ this.$refs.cancelReasonPopup.open();
|
|
|
+ } else {
|
|
|
+ this.$msg(res.msg)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$util.confirmModal({content: '确认取消?'}, async () => { //(若配送员接单1分钟后取消,扣2元违约金)
|
|
|
- const res = await cancelDeliveryOrder({ghsOrderId: orderId})
|
|
|
+ const res = await cancelDeliveryOrder({ghsOrderId: orderId, platform: deliveryId, order_cancel_reason: "客户取消订单"}) // order_cancel_reason 不能为空,所以随意填一个
|
|
|
if (res.code === 1) {
|
|
|
this.$msg('取消成功')
|
|
|
this.init()
|
|
|
@@ -740,7 +770,7 @@ export default {
|
|
|
let reason = this.cancelReasonList.find(item => item.order_cancel_code === this.selectedCancelReasonCode);
|
|
|
let reason_desc = reason.order_cancel_desc;
|
|
|
|
|
|
- if (this.selectedCancelReasonCode === 0) {
|
|
|
+ if (this.selectedCancelReasonCode === 0 || this.selectedCancelReasonCode === 313) {
|
|
|
if (this.$util.isEmpty(this.otherCancelReason)) {
|
|
|
this.$msg('请输入其他原因');
|
|
|
return;
|