fix(pl): 独立组合统计编号筛选与关键词搜索以避免条件被忽略。

This commit is contained in:
wuzilong committed 2026-11-01 22:11:51 +08:00
1 parent da56a1e319
commit 726575aaf2
7 files changed
+62 -12

No files matched your search

+16 -1
View File
@@ -126,7 +126,7 @@ function harness(fixed?: string) {
const state = scope.run(() =>
new Function(
...Object.keys(env),
`${code}; return { rows, fixedDetail, details, load, loadDetail, allowed, canEdit }`
`${code}; return { rows, fixedDetail, details, load, loadDetail, allowed, canEdit, keyword, setFilterState }`
)(...Object.values(env))
)
return {
@@ -360,3 +360,18 @@ test('usage trace renders business columns and resolves contract/product by thei
const stopExpression = table.match(/<el-tag size="small">\s*\{\{([\s\S]*?)\}\}/)![1]
assert.equal(new Function('row', `return (${stopExpression})`)(rows[0]), '送货')
})
test('quick search and number header filter are sent as independent conditions', async () => {
const h = harness()
h.permissions[0].resolve({ all: true })
await flush()
h.calls[0].resolve({ list: [], total: 0 })
await flush()
h.state.keyword.value = '目标合同'
h.state.setFilterState('contractNo', { text: 'HT-2026' })
assert.equal(h.calls[1].args[0].keyword, '目标合同')
assert.equal(h.calls[1].args[0].contractNo, 'HT-2026')
h.calls[1].resolve({ list: [], total: 0 })
await flush()
h.stop()
})