This commit is contained in:
2026-08-28 13:54:38 +08:00
parent a617386f9d
commit 4810b44452
6 changed files with 81 additions and 17 deletions
+10 -1
View File
@@ -15,14 +15,23 @@ export function normalizeReceivingInbound(value = {}) {
export function normalizeReceivingCandidate(value = {}) {
return {
...value,
sourceContainerBookingId: typeof value.sourceContainerBookingId === 'string' ? value.sourceContainerBookingId.trim() : '',
containerNo: String(value.containerNo || '').trim(),
plannedArrivalAt: typeof value.plannedArrivalAt === 'string' && value.plannedArrivalAt.trim() ? value.plannedArrivalAt.trim() : null,
totalOrderCount: number(value.totalOrderCount),
planCount: number(value.planCount),
inboundCodeCount: number(value.inboundCodeCount),
missingInboundCodeCount: number(value.missingInboundCodeCount),
plannedInboundCodeCount: number(value.plannedInboundCodeCount),
pendingPlanCount: number(value.pendingPlanCount),
destinationCodes: Array.isArray(value.destinationCodes) ? value.destinationCodes.filter(Boolean) : [],
plannedPalletCount: number(value.plannedPalletCount),
totalPackages: number(value.totalPackages),
receivedPackages: number(value.receivedPackages),
currentAccount: value.currentAccount === true
currentAccount: value.currentAccount === true,
allPlansReady: value.allPlansReady === true,
operable: value.operable === true,
blockReason: typeof value.blockReason === 'string' ? value.blockReason.trim() : ''
}
}