feat: 订单详情新增尝试再次退款入口
退款中的订单可重新发起原路退款,并保留人工核销兜底。
This commit is contained in:
@@ -53,6 +53,14 @@
|
||||
>
|
||||
查询退款结果
|
||||
</BButton>
|
||||
<BButton
|
||||
v-if="record.payment?.status === 'refunding'"
|
||||
variant="primary"
|
||||
:disabled="actionLoading"
|
||||
@click="retryRefundVisible = true"
|
||||
>
|
||||
尝试再次退款
|
||||
</BButton>
|
||||
<BButton
|
||||
v-if="record.payment?.status === 'refunding'"
|
||||
variant="danger"
|
||||
@@ -345,6 +353,17 @@
|
||||
<p class="text-muted mb-0 fs-12">核销后订单支付状态将变为「已退款」,且不可撤销。</p>
|
||||
</ConfirmModal>
|
||||
|
||||
<ConfirmModal
|
||||
v-model="retryRefundVisible"
|
||||
title="尝试再次退款"
|
||||
ok-title="确认退款"
|
||||
ok-variant="warning"
|
||||
@confirm="submitRetryRefund"
|
||||
>
|
||||
<p class="mb-1">将按原退款单号再次向微信发起原路退款。</p>
|
||||
<p class="text-muted mb-0 fs-12">若上次退款已受理,微信会返回原退款结果,不会重复退款。</p>
|
||||
</ConfirmModal>
|
||||
|
||||
<ConfirmModal
|
||||
v-model="deleteVisible"
|
||||
title="删除订单"
|
||||
@@ -405,6 +424,7 @@ const paymentVisible = ref(false)
|
||||
const paymentForm = reactive({ method: 'offline_cash', amount: 0 })
|
||||
|
||||
const manualRefundVisible = ref(false)
|
||||
const retryRefundVisible = ref(false)
|
||||
const deleteVisible = ref(false)
|
||||
|
||||
const sexRequirementLabel = computed(() => {
|
||||
@@ -528,6 +548,21 @@ const queryRefund = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const submitRetryRefund = async () => {
|
||||
if (!record.value) return
|
||||
actionLoading.value = true
|
||||
try {
|
||||
const result = await escortApi.refundRetry(record.value._id)
|
||||
notify.success(`已重新发起退款,支付状态:${PAYMENT_LABELS[result.paymentStatus] || result.paymentStatus}`)
|
||||
retryRefundVisible.value = false
|
||||
await load()
|
||||
} catch {
|
||||
// 错误提示由请求层统一弹出
|
||||
} finally {
|
||||
actionLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const submitManualRefund = async () => {
|
||||
if (!record.value) return
|
||||
actionLoading.value = true
|
||||
|
||||
Reference in New Issue
Block a user