fix: 支持多SKU共箱整托装柜
This commit is contained in:
@@ -176,6 +176,18 @@ test('dropship matrix has a real customer prerequisite without generic dispatch
|
||||
assert.ok(!modules.includes('phase5-overseas-fulfillment'))
|
||||
})
|
||||
|
||||
test('physical-carton chain covers mixed SKU cartons without multiplying carton totals', () => {
|
||||
const modules = normalizeModuleOrder(['dropship-physical-carton-chain'])
|
||||
assert.deepEqual(modules, ['merchant-qualification-fixture', 'dropship-physical-carton-chain'])
|
||||
assert.match(source, /prepare\('PHYSICAL-20X2', 2[\s\S]*totalPackageCount: 20, skuCount: 2/)
|
||||
assert.match(source, /prepare\('PHYSICAL-5X3', 1[\s\S]*totalPackageCount: 5, skuCount: 3/)
|
||||
assert.match(source, /prepare\('PHYSICAL-7X2-MERGED', 2, \{ mergeToFirstPallet: true \}/)
|
||||
assert.match(source, /carton\.skuLines\.length === \(record\.expectedSkuCount \|\| 1\)/)
|
||||
assert.match(source, /packagesByPhysicalUnit/)
|
||||
assert.match(source, /new Set\(actual\.map\(\(item\) => item\.skuCode\)/)
|
||||
assert.match(source, /PHYSICAL_CARTON_OUTBOUND_COMPLETED/)
|
||||
})
|
||||
|
||||
test('all four physical pallet shapes are explicitly produced', () => {
|
||||
assert.match(source, /prepare\('SINGLE-MULTI', 2\)/)
|
||||
assert.match(source, /prepare\('SINGLE-SINGLE', 1\)/)
|
||||
@@ -190,7 +202,7 @@ test('allocation checks both physical summaries and uncollapsed per-inbound quan
|
||||
assert.match(source, /first-leg\/loading-plans\/\$\{plan.id\}/)
|
||||
assert.match(source, /const actual = detail.items.filter/)
|
||||
assert.match(source, /plan.items\?\.length === pallets.length/)
|
||||
assert.match(source, /actual.reduce\([\s\S]*?record.expectedCartonMarks.length/)
|
||||
assert.match(source, /packagesByPhysicalUnit\.values\(\)[\s\S]*?record.expectedCartonMarks.length/)
|
||||
assert.match(source, /await conserve\('手工加入后'\)/)
|
||||
assert.match(source, /await conserve\('智能推荐后'\)/)
|
||||
assert.match(source, /fullFlowVerified: false/)
|
||||
|
||||
Reference in New Issue
Block a user