优化订单状态颜色展示

This commit is contained in:
yml2213
2026-08-15 16:04:36 +08:00
parent 1756cfb262
commit 521cbe9d38
2 changed files with 26 additions and 14 deletions
@@ -226,11 +226,17 @@ export function formatStatus(status: string) {
}
export function resolveStatusColor(status: string) {
if (status === 'accepted') return 'green'
if (status === 'problem') return 'red'
if (status === 'pending_acceptance') return 'gold'
if (status === 'open') return 'blue'
return 'default'
const colors: Record<string, string> = {
pending_material: 'orange',
unassigned: 'cyan',
open: 'blue',
in_progress: 'geekblue',
pending_acceptance: 'purple',
problem: 'red',
accepted: 'green',
cancelled: 'default',
}
return colors[status] || 'default'
}
export function formatWorkerStatus(status: string) {
@@ -259,4 +265,3 @@ export function resolveSharingShareStatusColor(status: string) {
if (status === 'cancelled') return 'default'
return 'purple'
}