优化
This commit is contained in:
@@ -37,6 +37,7 @@ export function buildSupplierBody(marker, category) {
|
||||
return {
|
||||
name: `财务验收供应商-${suffix}`,
|
||||
category,
|
||||
...(category === 'BOOKING' ? { carrierCodes: ['MATSON'] } : {}),
|
||||
region: '宁波', legalRepresentative: '财务验收法人', contactName: '财务验收联系人',
|
||||
phone: '13800000000', email: `finance-supplier-${suffix || 'fixture'}@example.com`,
|
||||
address: '财务验收地址', businessLicenseNo: `FIN${suffix}`.slice(0, 64),
|
||||
@@ -98,7 +99,7 @@ async function measureOrder(context, resource) {
|
||||
if (context.financeFixtureHooks?.measureOrder) return context.financeFixtureHooks.measureOrder(context, resource)
|
||||
const originalMarker = context.marker
|
||||
const createdKeys = ['orders', 'inboundMeasurement', 'ocrInbound', 'testInbound']
|
||||
const contextKeys = ['inboundWeightOcr', 'ocrInbound', 'testInbound', 'createdInbound']
|
||||
const contextKeys = ['inboundWeightOcr', 'ocrInbound', 'testInbound', 'createdInbound', 'allowAnyExistingPallet']
|
||||
const createdSnapshot = new Map(createdKeys.map((key) => [key, { present: Object.hasOwn(context.createdResources, key), value: context.createdResources[key] }]))
|
||||
const contextSnapshot = new Map(contextKeys.map((key) => [key, { present: Object.hasOwn(context.context, key), value: context.context[key] }]))
|
||||
context.marker = resource.marker
|
||||
@@ -109,6 +110,10 @@ async function measureOrder(context, resource) {
|
||||
context.context.ocrInbound = resource
|
||||
context.context.testInbound = resource
|
||||
context.context.createdInbound = resource
|
||||
// Finance pricing profiles can point at any configured domestic warehouse.
|
||||
// Reuse that warehouse's real pallet master instead of requiring the bulk-data
|
||||
// generator's two fixed Yiwu pallet codes.
|
||||
context.context.allowAnyExistingPallet = true
|
||||
try {
|
||||
const measurement = await import(new URL('./inbound-measurement.mjs', import.meta.url))
|
||||
await measurement.run(context)
|
||||
|
||||
Reference in New Issue
Block a user