优化
This commit is contained in:
@@ -55,9 +55,8 @@ export async function resolveOceanBookingMaster(context, module) {
|
||||
export function oceanBookingDraft(context, suffix, master, labels = {}) {
|
||||
const { channelName: _readOnlyChannelName, warehouseName: _readOnlyWarehouseName, ...writableMaster } = master
|
||||
const normalizedSuffix = text(suffix).replace(/[^A-Za-z0-9]/g, '').slice(-32) || 'BOOKING'
|
||||
const containers = labels.containers || [{
|
||||
containerNo: `TST-${normalizedSuffix}-01`.slice(0, 64),
|
||||
containerType: '40HC', containerKind: 'FCL', capacityCbm: 76, maxWeightKg: 28000,
|
||||
const containerRequirements = labels.containerRequirements || [{
|
||||
containerType: '40HC', containerKind: 'FCL', quantity: 1, capacityCbm: 76, maxWeightKg: 28000,
|
||||
}]
|
||||
return {
|
||||
...writableMaster,
|
||||
@@ -75,7 +74,7 @@ export function oceanBookingDraft(context, suffix, master, labels = {}) {
|
||||
parties: [{ partyType: 'SHIPPER', partyName: `发货方-${suffix}` },
|
||||
{ partyType: 'CONSIGNEE', partyName: `收货方-${suffix}` },
|
||||
{ partyType: 'NOTIFY_PARTY', partyName: `通知方-${suffix}` }],
|
||||
containers,
|
||||
containerRequirements,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user