Feat:取消退款
This commit is contained in:
@@ -102,6 +102,17 @@ export function postOrderRefund(data) {
|
||||
return request.post("/order/refund/verify", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消退款申请
|
||||
* @param uni
|
||||
* @returns {*}
|
||||
*/
|
||||
export function cancelOrderRefund(uni) {
|
||||
return request.post("/order/refund/cancel", {
|
||||
uni
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认收货
|
||||
* @returns {*}
|
||||
|
||||
@@ -554,8 +554,9 @@
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="status.type == -1">
|
||||
<view style="width: 100%">
|
||||
<view class="v12-justify-between" style="width: 100%">
|
||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||
<view class="bnt v12-primary-text v12-primary-border cancel" @click="cancelRefund">取消退款</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="status.type == -2">
|
||||
@@ -654,7 +655,7 @@
|
||||
<script>
|
||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||
import OrderGoods from "@/components/OrderGoods";
|
||||
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail} from "@/api/order";
|
||||
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail, cancelOrderRefund} from "@/api/order";
|
||||
import Payment from "@/components/Payment";
|
||||
import DataFormat from "@/components/DataFormat";
|
||||
import {copyClipboard} from "@/utils";
|
||||
@@ -1166,6 +1167,39 @@ export default {
|
||||
this.getDetail();
|
||||
});
|
||||
},
|
||||
cancelRefund() {
|
||||
uni.showModal({
|
||||
title: '取消退款申请',
|
||||
content: '确认取消退款申请吗?',
|
||||
showCancel: true,
|
||||
cancelText: '再想想',
|
||||
confirmText: '确认取消',
|
||||
confirmColor: '#C52733 ',
|
||||
success: (res) => {
|
||||
if (!res.confirm) return;
|
||||
uni.showLoading({
|
||||
title: '取消中'
|
||||
});
|
||||
cancelOrderRefund(this.orderInfo.orderId).then((res) => {
|
||||
uni.showToast({
|
||||
title: res.msg || '已取消退款申请',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.getDetail();
|
||||
}).catch((err) => {
|
||||
const message = err.msg || (err.response && err.response.data && (err.response.data.msg || err.response.data.message)) || '取消退款失败';
|
||||
uni.showToast({
|
||||
title: message,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
}).finally(() => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
takeOrder() {
|
||||
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
||||
this.getDetail();
|
||||
|
||||
Reference in New Issue
Block a user