fix(consignment): 手动匹配订单按钮点了不弹窗(弹窗挂错了位置)
用户反馈:在库待匹配列表点「手动匹配订单」没有反应。 根因:上一批把手动匹配弹窗挂到了「编辑寄售物品」弹窗**内部**,外层弹窗未打开时 该组件根本没被挂载,点击只改状态、界面无变化。 - 弹窗移到面板顶层(与其它弹窗同级),点击即弹 - 新增静态守卫测试:断言手动匹配弹窗前面不能有未闭合的 Modal(即不能嵌在别的弹窗里)、 按钮必须真的 setState、open 由该状态驱动;已验证该守卫能拦下错误写法 - 顺带补入口缺口:订单侧原先只在"检测到系统候选"的提醒弹窗里给入口,订单没有任何候选时 反而进不去手动匹配 —— 工单行内新增常驻「手动匹配现货」(仅待指派/待补资料, 与后端前置校验同口径) - 已暂停匹配的现货点按钮会直接 409,改为按钮禁用并提示先打开「允许匹配」开关 - destroyOnClose → antd 6 的 destroyOnHidden(前者已废弃) 验证:前端 typecheck/lint/format/48 例测试/build 全过。
This commit is contained in:
@@ -59,3 +59,13 @@ test('关键词过滤:现货能按寄卖单号/物品名搜到,大小写与
|
||||
assert.equal(filterManualMatchOptions(list, '苍龙', pick).length, 1)
|
||||
assert.equal(filterManualMatchOptions(list, '不存在', pick).length, 0)
|
||||
})
|
||||
|
||||
test('只有待指派/待补资料的订单能手动指定现货(与后端前置校验同口径)', async () => {
|
||||
const { isManuallyMatchableOrderStatus } =
|
||||
await import('../src/utils/consignment-manual-match.ts')
|
||||
assert.equal(isManuallyMatchableOrderStatus('unassigned'), true)
|
||||
assert.equal(isManuallyMatchableOrderStatus('pending_material'), true)
|
||||
for (const status of ['in_progress', 'pending_acceptance', 'accepted', 'cancelled', 'disputed']) {
|
||||
assert.equal(isManuallyMatchableOrderStatus(status), false, `${status} 不该给手动匹配入口`)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user