|
@@ -133,7 +133,22 @@
|
|
|
<ext-d-label type="Refund.status" v-model="row[field.prop]"/>
|
|
<ext-d-label type="Refund.status" v-model="row[field.prop]"/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="'action'===field.prop">
|
|
<template v-else-if="'action'===field.prop">
|
|
|
- <el-button v-if="row.status==='NEW'" size="small" plain type="warning" @click="onRefundClick(row)">退款</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="row.status==='NEW' && !row.isOverdue"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ plain
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ @click="onRefundClick(row)">
|
|
|
|
|
+ 退款
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="row.status==='NEW' && row.isOverdue"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ plain
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ @click="onManualRefundClick(row)">
|
|
|
|
|
+ 线下退款
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<div>{{ row[field.prop] }}</div>
|
|
<div>{{ row[field.prop] }}</div>
|
|
@@ -190,6 +205,7 @@ const state = reactive({
|
|
|
{label: '退款状态', prop: 'status', resizable: true, width: 120},
|
|
{label: '退款状态', prop: 'status', resizable: true, width: 120},
|
|
|
{label: '申请时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 160},
|
|
{label: '申请时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 160},
|
|
|
{label: '退款成功时间', prop: 'successTime', sortable: 'custom', resizable: true, width: 160},
|
|
{label: '退款成功时间', prop: 'successTime', sortable: 'custom', resizable: true, width: 160},
|
|
|
|
|
+ {label: '充值时间', prop: 'rechargeTime', sortable: 'custom', resizable: true, width: 160},
|
|
|
{label: '原充值订单金额', prop: 'total', resizable: true, width: 140},
|
|
{label: '原充值订单金额', prop: 'total', resizable: true, width: 140},
|
|
|
{label: '退款申请金额', prop: 'refund', resizable: true, width: 120},
|
|
{label: '退款申请金额', prop: 'refund', resizable: true, width: 120},
|
|
|
{label: '优惠金额', prop: 'discountAmount', resizable: true, width: 90},
|
|
{label: '优惠金额', prop: 'discountAmount', resizable: true, width: 90},
|
|
@@ -279,6 +295,32 @@ const onRefundClick = ( row: any) => {
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// 手动确认退款(线下退款)
|
|
|
|
|
+const onManualRefundClick = (row: any) => {
|
|
|
|
|
+ Msg.confirm(
|
|
|
|
|
+ `请确认是否执行线下退款操作?\n` +
|
|
|
|
|
+ `用户手机:${row.mobilePhone}\n` +
|
|
|
|
|
+ `退款金额:${u.fmt.fmtMoney(row.refund)}\n` +
|
|
|
|
|
+ `该订单已超过365天退款时限,请确保已通过线下方式完成实际退款后再确认!`,
|
|
|
|
|
+ '重要提醒',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: '确认线下退款',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(() => {
|
|
|
|
|
+ $get(`/finance/manualConfirmRefund/${row.refundLogId}`).then((res: any) => {
|
|
|
|
|
+ Msg.message(`线下退款确认成功`)
|
|
|
|
|
+ loadData(true)
|
|
|
|
|
+ }).catch(e => {
|
|
|
|
|
+ console.error(e)
|
|
|
|
|
+ Msg.message(`操作失败:${e.message}`, 'error')
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ // 用户取消操作
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const handleTableSelectionChange = (selection: any) => {
|
|
const handleTableSelectionChange = (selection: any) => {
|
|
|
console.log("handleTableSelectionChange>>", selection)
|
|
console.log("handleTableSelectionChange>>", selection)
|