This commit is contained in:
2026-10-30 17:59:48 +08:00
parent d6ef770e48
commit ad72ab8406
10 changed files with 209 additions and 42 deletions
@@ -1,7 +1,7 @@
import type { Amount, ProcurementCreate, ProcurementFee } from './api/procurement'
export const procurementStatuses: Record<string, string> = {
PENDING_REVIEW: '待审核', RECEIVING: '收货中', WAIT_CUSTOMER_CONFIRM: '待客户确认', CONFIRMED: '已确认',
FUNDING_PENDING: '订单受理中', FUNDING_FAILED: '订单处理失败', PENDING_REVIEW: '待审核', RECEIVING: '收货中', WAIT_CUSTOMER_CONFIRM: '待客户确认', CONFIRMED: '已确认',
IN_TRANSIT: '运输中', DELIVERING: '派送中', COMPLETED: '签收完成',
REJECTED: '已拒绝', CANCELLED: '已取消',
}
@@ -12,7 +12,7 @@ export const feePurposes: Record<string, string> = {
export function statusLabel(status: string | null | undefined, direction?: string | null) { return regionText(status ? procurementStatuses[status] || '待核对进度' : '—', direction) }
export function statusTone(status: string | null | undefined): 'success' | 'warning' | 'danger' | 'info' | 'primary' {
if (status === 'COMPLETED' || status === 'CONFIRMED') return 'success'
if (status === 'REJECTED') return 'danger'
if ((status === 'REJECTED' || status === 'FUNDING_FAILED')) return 'danger'
if (status === 'CANCELLED') return 'info'
if (status === 'IN_TRANSIT' || status === 'DELIVERING') return 'primary'
return 'warning'