refactor(firstleg): remove customer scope from trucking

This commit is contained in:
2026-09-01 09:51:59 +08:00
parent 936412f351
commit 249b182e7f
17 changed files with 357 additions and 463 deletions
@@ -88,8 +88,7 @@ function truckPayload(context, oceanBooking, carrier, index) {
const value = suffix(context, index)
return { outboundOrderId: null, oceanBookingId: oceanBooking.id,
containerBookingId: null, loadingPlanId: null,
warehouseId: oceanBooking.warehouseId, customerId: oceanBooking.customerId,
customerName: null,
warehouseId: oceanBooking.warehouseId,
carrierId: id(carrier.id), carrierName: carrier.name, fleetContact: '人工验收联系人', fleetPhone: '13800000004',
driverName: `人工司机-${value}`, driverPhone: '13800000005', vehicleNo: `粤B${value.slice(-6)}`,
storeName: '人工验收仓', storeContact: '仓库联系人', storePhone: '13800000006',
@@ -177,8 +176,8 @@ export async function run(context, matrix = context.createdResources.manualState
}
const releasedOcean = matrix.pages.oceanBookings.fixtures.RELEASED
if (!releasedOcean.id || !releasedOcean.customerId || !releasedOcean.warehouseId) {
throw new Error('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()) {