优化
This commit is contained in:
@@ -15,7 +15,11 @@ const inbounds = Array.from({ length: 15 }, (_, index) => ({
|
||||
plannedPalletCount: 1,
|
||||
totalPackages: 4,
|
||||
receivedPackages: index === 0 ? 4 : 0,
|
||||
pendingPackages: index === 0 ? 0 : 4
|
||||
pendingPackages: index === 0 ? 0 : 4,
|
||||
assigned: index % 3 === 0,
|
||||
mergeAllowed: index % 4 === 0,
|
||||
urgent: index === 0,
|
||||
mergeHint: index % 4 === 0 ? '可选择合托,不强制' : ''
|
||||
}))
|
||||
|
||||
test('one container candidate aggregates fifteen independent one-inbound plans', () => {
|
||||
@@ -85,6 +89,9 @@ test('current recovery retains all independent-plan inbound facts while progress
|
||||
assert.deepEqual(receivingProgress(), { total: 60, received: 4, pending: 56, percent: 7 })
|
||||
assert.equal(receiving.current.inbounds.length, 15)
|
||||
assert.equal(receiving.current.inbounds[0].inboundCode, 'NYEXX2608270001')
|
||||
assert.equal(receiving.current.inbounds[0].assigned, true)
|
||||
assert.equal(receiving.current.inbounds[0].mergeAllowed, true)
|
||||
assert.equal(receiving.current.inbounds[0].urgent, true)
|
||||
assert.equal(receiving.current.inbounds[14].inboundCode, 'NYEXX2608270015')
|
||||
resetReceivingSession()
|
||||
})
|
||||
@@ -98,8 +105,10 @@ test('container UI locks and signs once across independent plans, then renders o
|
||||
|
||||
assert.match(operation, /item\.totalOrderCount[\s\S]*item\.inboundCodeCount[\s\S]*item\.planCount[\s\S]*item\.pendingPlanCount/)
|
||||
assert.match(summary, /inboundCodeCount[\s\S]*plannedPalletCount[\s\S]*totalPackages/)
|
||||
for (const fact of ['已分配', '未分配', '可合托·非强制', '不合托', '加急', '普通']) assert.match(summary, new RegExp(fact))
|
||||
assert.doesNotMatch(operation, /v-for="[^"]*inbound[^"]*"/)
|
||||
assert.match(operation, /v-if="activeInbound"[\s\S]*activeInbound\.inboundCode[\s\S]*activeInbound\.pendingPackages/)
|
||||
assert.match(operation, /activeInbound\.mergeAllowed[\s\S]*现场自选[\s\S]*activeInbound\.urgent/)
|
||||
assert.match(operation, /resolveCurrentCarton\(cartonMark\)/)
|
||||
assert.doesNotMatch(operation, /cartonMark\.split|\.split\([^\n]*['"]#['"]/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user