fix(payment): 区分退款 pending 并收敛匿名查单

This commit is contained in:
wucm667
2026-06-30 10:00:48 +08:00
parent 55902d8548
commit 7316d83027
14 changed files with 302 additions and 40 deletions
@@ -210,6 +210,7 @@ const statusFilterOptions = computed(() => [
{ value: 'FAILED', label: t('payment.status.failed') },
{ value: 'REFUNDED', label: t('payment.status.refunded') },
{ value: 'REFUND_REQUESTED', label: t('payment.status.refund_requested') },
{ value: 'REFUND_PENDING', label: t('payment.status.refund_pending') },
{ value: 'REFUND_FAILED', label: t('payment.status.refund_failed') },
])
@@ -198,7 +198,7 @@ const form = reactive({
force: false,
})
// In REFUND_REQUESTED status, refund_amount is the REQUESTED amount, not actually refunded.
// In REFUND_REQUESTED / REFUND_PENDING status, refund_amount is requested/pending, not actually refunded.
// Only PARTIALLY_REFUNDED / REFUNDED have real refund amounts.
const actuallyRefunded = computed(() => {
if (!props.order) return 0
@@ -28,6 +28,7 @@ const statusMap: Record<OrderStatus, { key: string; class: string }> = {
FAILED: { key: 'payment.status.failed', class: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400' },
REFUND_REQUESTED: { key: 'payment.status.refund_requested', class: 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400' },
REFUNDING: { key: 'payment.status.refunding', class: 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400' },
REFUND_PENDING: { key: 'payment.status.refund_pending', class: 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400' },
REFUNDED: { key: 'payment.status.refunded', class: 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400' },
PARTIALLY_REFUNDED: { key: 'payment.status.partially_refunded', class: 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400' },
REFUND_FAILED: { key: 'payment.status.refund_failed', class: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400' },
@@ -13,6 +13,7 @@ const STATUS_BADGE_MAP: Record<string, string> = {
FAILED: 'badge-danger',
REFUND_REQUESTED: 'badge-warning',
REFUNDING: 'badge-warning',
REFUND_PENDING: 'badge-warning',
PARTIALLY_REFUNDED: 'badge-warning',
REFUNDED: 'badge-info',
REFUND_FAILED: 'badge-danger',
+1
View File
@@ -7012,6 +7012,7 @@ export default {
failed: 'Failed',
refund_requested: 'Refund Requested',
refunding: 'Refunding',
refund_pending: 'Refund Pending',
refunded: 'Refunded',
partially_refunded: 'Partially Refunded',
refund_failed: 'Refund Failed',
+1
View File
@@ -7192,6 +7192,7 @@ export default {
failed: '失败',
refund_requested: '退款申请中',
refunding: '退款中',
refund_pending: '退款处理中',
refunded: '已退款',
partially_refunded: '部分退款',
refund_failed: '退款失败',
+1
View File
@@ -14,6 +14,7 @@ export type OrderStatus =
| 'FAILED'
| 'REFUND_REQUESTED'
| 'REFUNDING'
| 'REFUND_PENDING'
| 'PARTIALLY_REFUNDED'
| 'REFUNDED'
| 'REFUND_FAILED'
@@ -190,6 +190,7 @@ const statusFilterOptions = computed(() => [
{ value: 'FAILED', label: t('payment.status.failed') },
{ value: 'REFUNDED', label: t('payment.status.refunded') },
{ value: 'REFUND_REQUESTED', label: t('payment.status.refund_requested') },
{ value: 'REFUND_PENDING', label: t('payment.status.refund_pending') },
{ value: 'REFUND_FAILED', label: t('payment.status.refund_failed') },
])