This commit is contained in:
2026-08-12 09:25:55 +08:00
parent ffb2116741
commit fb542e0b6f
24 changed files with 983 additions and 75 deletions
@@ -63,12 +63,21 @@ export interface UnifiedOrderTransportSummary {
portArrivalAt: string | null
}
export interface UnifiedOrderRelationSummary {
role: 'PARENT' | 'CHILD'
rootOrderId: number | string | null
parentOrderId: number | string | null
splitSequence: number | null
childCount: number
}
export interface UnifiedOrderResource {
orderId: number | string
tenantId: number | string
orderNo: string | null
mainStatus: UnifiedOrderMainStatus
nextAction: string | null
relation: UnifiedOrderRelationSummary | null
internalOrderStatus: string | null
customerId: number | string | null
customerName: string | null
@@ -319,6 +328,13 @@ function normalizeRow(raw: UnifiedOrderResource): UnifiedOrderResource {
destinationWarehouseId: id(raw.destinationWarehouseId),
inboundId: id(raw.inboundId),
inboundVersion: nullableInteger(raw.inboundVersion),
relation: raw.relation ? {
...raw.relation,
rootOrderId: id(raw.relation.rootOrderId),
parentOrderId: id(raw.relation.parentOrderId),
splitSequence: nullableInteger(raw.relation.splitSequence),
childCount: integer(raw.relation.childCount, 0),
} : null,
totalPackageCount: nullableInteger(raw.totalPackageCount),
totalPalletCount: nullableInteger(raw.totalPalletCount),
recommendedPalletType: raw.recommendedPalletType ?? null,