fix:拼单明细状态补齐中文映射
This commit is contained in:
@@ -252,17 +252,6 @@ export function formatSharingShareStatus(status: string) {
|
||||
return labels[status] || status
|
||||
}
|
||||
|
||||
/** 撤单原因:份额级独立撤单后,后台需要一眼看出是谁撤的。 */
|
||||
export function formatSharingShareCancelledReason(reason: string) {
|
||||
const labels: Record<string, string> = {
|
||||
timeout: '超时失效',
|
||||
admin: '后台撤单',
|
||||
worker_request: '打手退单',
|
||||
problem: '问题单处置',
|
||||
}
|
||||
return labels[reason] || reason
|
||||
}
|
||||
|
||||
export function formatAcceptanceMode(mode: string) {
|
||||
if (mode === 'friend_gift') return '好友赠送'
|
||||
return '标准验收'
|
||||
@@ -271,6 +260,9 @@ export function formatAcceptanceMode(mode: string) {
|
||||
// 阶段文案与配色在 utils 里实现,便于单测覆盖「内部现货单显示待加好友」这条口径。
|
||||
export { formatGiftPhase, resolveGiftPhaseColor } from '@/utils/gift-phase'
|
||||
|
||||
// 取消来源文案同样抽到 utils,避免新增枚举值时漏映射(admin_partial 就踩过)。
|
||||
export { formatSharingShareCancelledReason } from '@/utils/worker-share-cancel-reason'
|
||||
|
||||
export function resolveSharingShareStatusColor(status: string) {
|
||||
if (status === 'accepted') return 'green'
|
||||
if (status === 'submitted') return 'gold'
|
||||
|
||||
Reference in New Issue
Block a user