优化
This commit is contained in:
@@ -9,9 +9,9 @@ export async function resolveOceanBookingMaster(context, module) {
|
||||
const tenantId = text(source?.tenantId || source?.customerId)
|
||||
const inboundId = text(source?.inboundId)
|
||||
let summary = source?.summary || null
|
||||
if (inboundId && typeof context.request === 'function') {
|
||||
if (tenantId && inboundId && typeof context.request === 'function') {
|
||||
const response = await context.request('GET', `/api/platform/inbounds/${encodeURIComponent(inboundId)}?tenantId=${encodeURIComponent(tenantId)}`)
|
||||
if (response?.body?.code === '200') summary = response.body.data?.summary || summary
|
||||
if (String(response?.body?.code) === '200') summary = response.body.data?.summary || summary
|
||||
}
|
||||
const master = {
|
||||
customerId: text(summary?.tenantId || tenantId),
|
||||
@@ -36,7 +36,7 @@ export function oceanBookingDraft(context, suffix, master, labels = {}) {
|
||||
...master,
|
||||
shippingCompanyId: null, shippingCompanyName: labels.shippingCompanyName || `验收船公司-${suffix}`,
|
||||
bookingAgentId: null, bookingAgentName: labels.bookingAgentName || `验收代理-${suffix}`,
|
||||
vesselName: labels.vesselName || `验收船-${suffix}`, voyageNo: labels.voyageNo || `V${suffix}`,
|
||||
vesselName: labels.vesselName, voyageNo: labels.voyageNo,
|
||||
departurePortCode: 'CNSZX', departurePortName: '深圳', destinationPortCode: 'USLAX',
|
||||
destinationPortName: '洛杉矶', placeOfDelivery: 'LAX', serviceTerm: 'CY/CY', freightTerm: 'PREPAID',
|
||||
estimatedSailingAt: labels.estimatedSailingAt, estimatedArrivalAt: labels.estimatedArrivalAt,
|
||||
|
||||
Reference in New Issue
Block a user