优化
This commit is contained in:
@@ -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}` }
|
||||
|
||||
Reference in New Issue
Block a user