完善财务全量验收链路

This commit is contained in:
2026-08-12 13:24:17 +08:00
parent 505e834536
commit d2704f68a6
11 changed files with 295 additions and 44 deletions
@@ -39,15 +39,18 @@ async function provisionWarehouseResources(context, { inboundId, warehouseId, to
const palletId = asId(context.apiSuccess(MODULE, `创建测量占用托盘 ${index}/${palletCount}`,
palletResponse, `warehouseId=${warehouseId}`, OPTIONS))
const locationResponse = await context.request('POST', '/api/platform/v1/locations?tenantId=0', {
warehouseId, zoneCode: `E2E-${String(context.marker).slice(-8)}`, zoneName: '自动化验收区',
locationCode: `E2E-${resourceSuffix}`, locationName: `测量验收库位-${index}`,
locationType: 'PALLET', maxWeightKg: 1000, status: 'AVAILABLE',
remark: `${context.marker}-INBOUND-${inboundId}`,
})
const locationId = asId(context.apiSuccess(MODULE, `创建测量占用库位 ${index}/${palletCount}`,
locationResponse, `warehouseId=${warehouseId}`, OPTIONS))
if (!palletId || !locationId) return false
let locationId = null
if (context.context?.phase3LoadingRequireSharedOverflow !== true) {
const locationResponse = await context.request('POST', '/api/platform/v1/locations?tenantId=0', {
warehouseId, zoneCode: `E2E-${String(context.marker).slice(-8)}`, zoneName: '自动化验收区',
locationCode: `E2E-${resourceSuffix}`, locationName: `测量验收库位-${index}`,
locationType: 'PALLET', maxWeightKg: 1000, status: 'AVAILABLE',
remark: `${context.marker}-INBOUND-${inboundId}`,
})
locationId = asId(context.apiSuccess(MODULE, `创建测量占用库位 ${index}/${palletCount}`,
locationResponse, `warehouseId=${warehouseId}`, OPTIONS))
}
if (!palletId || (context.context?.phase3LoadingRequireSharedOverflow !== true && !locationId)) return false
resources.push({ palletId, locationId })
}