This commit is contained in:
2026-09-02 14:45:34 +08:00
parent 9ea4ccb9b1
commit 19a6af1c6d
6 changed files with 32 additions and 17 deletions
@@ -195,12 +195,16 @@ export async function run(context, matrix = context.createdResources.manualState
await verify(context, OCEAN_BASE, status, resourceId)
}
const releasedOcean = matrix.pages.oceanBookings.fixtures.RELEASED
if (!releasedOcean.id || !releasedOcean.warehouseId) {
throw new Error('RELEASED 订舱缺少拖车所需的仓库归属')
}
matrix.pages.truckAppointments = { requiredStatuses: TRUCK_STATUSES, fixtures: {} }
for (const [index, status] of TRUCK_STATUSES.entries()) {
const released = await buildOcean(context, template, 'RELEASED', index + 100)
const releasedOcean = {
id: id(released?.oceanBooking?.id),
warehouseId: id(released?.oceanBooking?.warehouseId),
}
if (!releasedOcean.id || !releasedOcean.warehouseId) {
throw new Error(`拖车状态样本 ${index} 缺少独立 RELEASED 订舱`)
}
const value = await buildTruck(context, releasedOcean, status, index)
const resourceId = id(value?.id)
matrix.pages.truckAppointments.fixtures[status] = { id: resourceId, status: value?.status, detailPath: `/truck-appointments/${resourceId}` }