新增退款待审核角标提醒

This commit is contained in:
yml2213
2026-08-28 23:10:07 +08:00
parent 41a5b49450
commit a9a9127076
8 changed files with 176 additions and 1 deletions
@@ -14,6 +14,7 @@ import { formatCentWithSymbol } from '@/shared/utils/money'
import { orderStatusLabel, handoffStatusLabel } from '@/shared/utils/statusLabels'
import { readError } from '@/shared/utils/error'
import { adminPath } from '@/shared/utils/adminPath'
import { pendingRefundCountChangedEvent } from '@/features/admin/composables/usePendingRefundCount'
const router = useRouter()
const loading = ref(false)
@@ -46,6 +47,7 @@ async function handleApprove(row: Order) {
submitting.value = true
try {
await adminApproveRefund(row.id)
window.dispatchEvent(new Event(pendingRefundCountChangedEvent))
ElMessage.success(`退款审核通过,${row.order_no} 已发起退款`)
await loadOrders()
} catch (error) {
@@ -75,6 +77,7 @@ async function handleRejectRestore() {
submitting.value = true
try {
await adminRejectRefund(row.id, 'restore')
window.dispatchEvent(new Event(pendingRefundCountChangedEvent))
ElMessage.success(`退款已驳回,${row.order_no} 已恢复至待交接状态`)
rejectVisible.value = false
await loadOrders()
@@ -100,6 +103,7 @@ async function handleRejectClose() {
submitting.value = true
try {
await adminRejectRefund(row.id, 'close')
window.dispatchEvent(new Event(pendingRefundCountChangedEvent))
ElMessage.success(`退款已驳回,${row.order_no} 已关闭`)
rejectVisible.value = false
await loadOrders()