This commit is contained in:
zlwu committed 2026-08-23 18:42:27 +08:00
1 parent b74d483682
commit dd1acdc787
50 files changed
+636156 -7218

No files matched your search

@@ -28,6 +28,10 @@ export interface PlanFormProductRow {
unit: string
quantity: number
actualQty?: number
inboundQty?: number
inboundPrice?: number
outboundQty?: number
outboundPrice?: number
packageSpec?: string
deliveryMethod?: string
taxRate?: number
@@ -56,9 +56,34 @@ export function mapPlanProductToFormRow(item: PlanProduct, index: number): PlanF
categoryName: item.categoryName,
unit: item.unit || '吨',
quantity: Number(item.quantity || item.inboundEstimateQty || item.outboundEstimateQty || 0),
actualQty: Number(
item.actualQty ?? item.quantity ?? item.inboundEstimateQty ?? item.outboundEstimateQty ?? 0
),
actualQty:
item.actualQty != null
? Number(item.actualQty)
: item.quantity != null ||
item.inboundEstimateQty != null ||
item.outboundEstimateQty != null
? Number(
item.actualQty ??
item.quantity ??
item.inboundEstimateQty ??
item.outboundEstimateQty ??
0
)
: undefined,
inboundQty: item.inboundQty != null ? Number(item.inboundQty) : undefined,
inboundPrice:
item.inboundPrice != null
? Number(item.inboundPrice)
: item.taxPrice != null
? Number(item.taxPrice)
: undefined,
outboundQty: item.outboundQty != null ? Number(item.outboundQty) : undefined,
outboundPrice:
item.outboundPrice != null
? Number(item.outboundPrice)
: item.taxPrice != null
? Number(item.taxPrice)
: undefined,
packageSpec: item.packageSpec,
deliveryMethod: item.deliveryMethod,
taxRate: item.taxRate != null ? Number(item.taxRate) : undefined,