优化
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
export const customsCaseStatusOptions = [
|
||||
{ value: 'DOCUMENTS_PENDING', label: '待补资料' },
|
||||
{ value: 'REVIEWING', label: '审核中' },
|
||||
{ value: 'SUPPLEMENT_REQUIRED', label: '需补件' },
|
||||
{ value: 'READY_TO_SUBMIT', label: '待提交代理' },
|
||||
{ value: 'RECEIPT_PENDING', label: '待回执' },
|
||||
{ value: 'RECEIPT_AVAILABLE', label: '已有回执' },
|
||||
{ value: 'CLEARANCE_COMPLETED', label: '已放行' },
|
||||
{ value: 'CANCELLED', label: '已取消' },
|
||||
] as const
|
||||
|
||||
const statusLabels = Object.fromEntries(customsCaseStatusOptions.map((option) => [option.value, option.label])) as Record<string, string>
|
||||
|
||||
const historyActionLabels: Record<string, string> = {
|
||||
CREATE: '创建报关协同',
|
||||
CREATE_CASE: '创建报关协同',
|
||||
UPLOAD_DOCUMENT: '上传报关资料',
|
||||
REPLACE_DOCUMENT: '替换报关资料',
|
||||
REVIEW_DOCUMENT_APPROVE: '资料审核通过',
|
||||
REVIEW_DOCUMENT_RETURN: '退回补件',
|
||||
SUBMIT_AGENT_BATCH: '提交报关代理',
|
||||
UPLOAD_RECEIPT: '上传报关回执',
|
||||
CANCEL: '取消报关协同',
|
||||
CANCEL_CASE: '取消报关协同',
|
||||
}
|
||||
|
||||
export function customsStatusLabel(status: string | null | undefined) {
|
||||
if (!status) return '—'
|
||||
return statusLabels[status] || '未知状态'
|
||||
}
|
||||
|
||||
export function customsHistoryActionLabel(action: string | null | undefined) {
|
||||
if (!action) return '状态更新'
|
||||
return historyActionLabels[action] || '状态更新'
|
||||
}
|
||||
Reference in New Issue
Block a user