fix(first-leg): identify and localize picking status in cabinet summary

This commit is contained in:
2026-10-03 11:53:50 +08:00
parent 5c53eba31b
commit 8e5fa0bebc
4 changed files with 26 additions and 2 deletions
@@ -19,6 +19,16 @@ export function getFirstLegStatusLabel(status: string) {
return statusLabels.get(canonicalStatus as FirstLegOrderStatus) ?? '未知状态'
}
export function getFirstLegPickingStatusLabel(status: string | null | undefined) {
if (!status) return '待更新'
const labels: Readonly<Record<string, string>> = {
PENDING: '待拣货',
IN_PROGRESS: '拣货中',
COMPLETED: '拣货完成',
}
return labels[status] ?? '未知状态'
}
export function getFirstLegTransportModeLabel(mode: FirstLegTransportMode | null) {
if (!mode) return '运输方式待更新'
return transportModeLabels.get(mode) ?? mode