This commit is contained in:
2026-08-07 18:15:59 +08:00
parent 8575df0793
commit dd7aa0e4cf
7 changed files with 92 additions and 8 deletions
@@ -27,7 +27,7 @@ import type { MerchantTenantStatus } from '@/modules/tenant-management/public'
import type { PlatformReceivingWarehouse, PlatformReceivingWarehouseSnapshot } from '@chongchong/shared'
import type { FirstLegPartySnapshot } from '@/modules/first-leg/data/firstLegParties'
import type { FirstLegOrder, FirstLegOrderDraft, FirstLegOrderTimelineItem } from '@/modules/first-leg/types/firstLegOrder'
import { canClientEditFirstLegOrder, getFirstLegStatusLabel } from '@/modules/first-leg/utils/firstLegOrder'
import { canClientEditFirstLegOrder, getFirstLegStatusLabel, inferCargoBoxSizeType } from '@/modules/first-leg/utils/firstLegOrder'
import { loadAllWarehouseRecords } from '@/modules/first-leg/utils/warehousePagination'
export type ClientWarehouseType = 'DOMESTIC' | 'FBA' | 'OVERSEAS'
@@ -111,6 +111,9 @@ function savePayload(draft: FirstLegOrderDraft, warehouse: ClientWarehouse, cust
packageCount: item.packageCount,
grossWeightKg: item.grossWeightKg,
volumeCbm: item.volumeCbm,
lengthCm: item.lengthCm || undefined,
widthCm: item.widthCm || undefined,
heightCm: item.heightCm || undefined,
declaredValue: item.declaredValue || undefined,
currency: item.currency || undefined,
dangerousGoods: item.dangerousGoods,
@@ -273,7 +276,10 @@ function mapOrder(order: MerchantFirstLegOrder, warehouses: PlatformReceivingWar
items: (detail?.cargoes ?? []).map((item) => ({
id: String(item.id), sku: item.skuNo ?? '', upc: item.upcNo ?? '', cargoNameCn: item.cargoName, cargoNameEn: item.cargoNameEn ?? '',
pieces: item.totalQuantity ?? item.packageCount, packageCount: item.packageCount, grossWeightKg: item.grossWeightKg,
volumeCbm: item.volumeCbm, containerType: '', containerCount: 0, remark: item.cargoRemark ?? '',
volumeCbm: item.volumeCbm,
boxSizeType: inferCargoBoxSizeType(item.lengthCm, item.widthCm, item.heightCm),
lengthCm: item.lengthCm ?? 0, widthCm: item.widthCm ?? 0, heightCm: item.heightCm ?? 0,
containerType: '', containerCount: 0, remark: item.cargoRemark ?? '',
packageType: item.packageType, hsCode: item.hsCode ?? '', declaredValue: item.declaredValue ?? 0,
currency: item.currency ?? 'USD', dangerousGoods: item.dangerousGoods ?? false,
})),