feat(consignment): 苏尔南手枪按枪型/钻石/璀璨分层匹配并过滤跨枪型

排序:完美匹配 > 同钻高璀 > 高钻同璀 > 高钻高璀 > 低配;跨枪型不展示不参与;高配仍需填人工原因。
This commit is contained in:
2026-11-15 16:58:42 +08:00
parent 68fa2a575f
commit e2c27bc7a9
12 changed files with 877 additions and 127 deletions
@@ -73,17 +73,17 @@ test('后端:手动候选、手动复检、待匹配看板都使用手动口
assert.ok(pending.includes("matchScope: 'manual'"), '一键查询待匹配订单必须按手动口径')
})
test('内部库存匹配弹窗:默认展示全部候选,按打分降序,并显示寄卖单号', () => {
test('内部库存匹配弹窗:默认展示全部候选,按枪型/钻石/璀璨排序,并显示寄卖单号', () => {
const source = readSource('../src/components/admin/ConsignmentWorkOrderMatchModal.tsx')
assert.ok(source.includes('默认按匹配打分从高到低展示全部候选'), '默认展示口径必须在界面上说明')
assert.ok(source.includes('默认按 枪型 → 钻石 → 璀璨 排序'), '默认展示口径必须在界面上说明')
assert.ok(
!source.includes("if (!searchable) return (item.matchType || 'exact') === 'exact'"),
'不能再默认只过滤精确匹配',
)
assert.ok(
source.includes('computeConsignmentMatchScore(right) - computeConsignmentMatchScore(left)'),
'列表必须按匹配打分降序排列',
!source.includes('computeConsignmentMatchScore(right) - computeConsignmentMatchScore(left)'),
'列表必须保持后端排序,不能再按打分重排',
)
assert.ok(
source.includes('buildCandidateHaystack(item).includes(normalizedKeyword)'),