feat(order): complete 7.1 order full lifecycle state transitions, 15m/30m/48h auto-timeouts, expert reject/apply-complete, and partial refund arbitration
这个提交包含在:
@@ -62,7 +62,7 @@
|
||||
</a-tag>
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="仲裁决议" :width="230" fixed="right">
|
||||
<a-table-column title="仲裁决议" :width="280" fixed="right">
|
||||
<template #cell="{ record }">
|
||||
<a-space v-if="record.status === '待平台仲裁'">
|
||||
<a-button
|
||||
@@ -73,6 +73,14 @@
|
||||
>
|
||||
全额退款
|
||||
</a-button>
|
||||
<a-button
|
||||
type="outline"
|
||||
status="danger"
|
||||
size="small"
|
||||
@click="openPartialModal(record)"
|
||||
>
|
||||
部分退款
|
||||
</a-button>
|
||||
<a-button
|
||||
type="outline"
|
||||
status="warning"
|
||||
@@ -95,6 +103,28 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
|
||||
<a-modal
|
||||
v-model:visible="partialModalVisible"
|
||||
title="客服判定部分退款"
|
||||
@ok="submitPartialRefund"
|
||||
@cancel="partialModalVisible = false"
|
||||
>
|
||||
<a-form :model="partialForm" layout="vertical">
|
||||
<a-form-item label="关联订单号">
|
||||
<a-input :model-value="currentArbRecord?.orderNo || ''" disabled />
|
||||
</a-form-item>
|
||||
<a-form-item label="部分退款金额 (元) — 剩余款项将自动解冻划入大神账户">
|
||||
<a-input-number
|
||||
v-model="partialForm.refundAmount"
|
||||
:min="1"
|
||||
:max="Number(currentArbRecord?.orderAmount || 9999)"
|
||||
:precision="2"
|
||||
placeholder="请输入退还给买家的部分金额"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -105,6 +135,11 @@
|
||||
|
||||
const loading = ref(false);
|
||||
const rawList = ref<any[]>([]);
|
||||
const partialModalVisible = ref(false);
|
||||
const currentArbRecord = ref<any>(null);
|
||||
const partialForm = ref({
|
||||
refundAmount: 20,
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loading.value = true;
|
||||
@@ -120,13 +155,32 @@
|
||||
}
|
||||
};
|
||||
|
||||
const openPartialModal = (record: any) => {
|
||||
currentArbRecord.value = record;
|
||||
const total = Number(record.orderAmount || 60);
|
||||
partialForm.value.refundAmount = Number((total * 0.5).toFixed(2)) || 20;
|
||||
partialModalVisible.value = true;
|
||||
};
|
||||
|
||||
const submitPartialRefund = async () => {
|
||||
if (!currentArbRecord.value) return;
|
||||
await handleArbitrate(
|
||||
currentArbRecord.value.id,
|
||||
'refund_partial',
|
||||
Number(partialForm.value.refundAmount || 20)
|
||||
);
|
||||
partialModalVisible.value = false;
|
||||
};
|
||||
|
||||
const handleArbitrate = async (
|
||||
id: string,
|
||||
decision: 'refund_full' | 'reject' | 'deduct_credit'
|
||||
decision: 'refund_full' | 'refund_partial' | 'reject' | 'deduct_credit',
|
||||
refundAmount?: number
|
||||
) => {
|
||||
try {
|
||||
const res: any = await axios.post(`/api/arbitrations/${id}/handle`, {
|
||||
decision,
|
||||
refundAmount,
|
||||
});
|
||||
Message.success(res.data?.message || '仲裁执行成功');
|
||||
fetchData();
|
||||
|
||||
@@ -39,11 +39,16 @@
|
||||
<a-select v-model="statusFilter" placeholder="订单流转状态" allow-clear>
|
||||
<a-option value="ALL">全部状态</a-option>
|
||||
<a-option value="待支付">待支付</a-option>
|
||||
<a-option value="待接单">待接单</a-option>
|
||||
<a-option value="已接单">已接单</a-option>
|
||||
<a-option value="已到场核销">已到场核销</a-option>
|
||||
<a-option value="履约中">履约中</a-option>
|
||||
<a-option value="待确认">待确认</a-option>
|
||||
<a-option value="已完成">已完成</a-option>
|
||||
<a-option value="争议仲裁中">争议仲裁中</a-option>
|
||||
<a-option value="已全额退款">已全额退款</a-option>
|
||||
<a-option value="已部分退款">已部分退款</a-option>
|
||||
<a-option value="已取消">已取消</a-option>
|
||||
</a-select>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
在新工单中引用
屏蔽一个用户