fix(pl): 新规则归档超额按客户选证,并修正用证提示与启用口径。
安排/归档失败改为可执行原因;证件保存后自动启用、只读不再假启用; customer_category 归档超额改为客户+品类证件池,避免误查合同绑证。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ba62ec7b36
commit
5a8a9048d4
10 files changed
+917
-90
No files matched your search
@@ -65,6 +65,38 @@ test('web customer quota panel uses toQueryParams from useServerColumnFilters',
|
||||
assert.match(panel, /watchVisibleColumns/)
|
||||
})
|
||||
|
||||
test('web customer quota panel computes visibleDefs locally (not from composable)', () => {
|
||||
const panel = readFileSync(
|
||||
new URL('../src/views/pl/contract-quota/CustomerQuotaPanel.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
panel,
|
||||
/const \{[^}]*\bvisibleDefs\b[^}]*\} = usePersistedListColumns/
|
||||
)
|
||||
assert.match(
|
||||
panel,
|
||||
/const \{ visibleColumns, checkAll, isIndeterminate, resetToDefault \} = usePersistedListColumns/
|
||||
)
|
||||
assert.match(
|
||||
panel,
|
||||
/const visibleDefs = computed\(\(\) =>\s*columns\.filter\(\(column\) => visibleColumns\.value\.includes\(column\.prop\)\)/
|
||||
)
|
||||
assert.match(panel, /v-for="column in visibleDefs"/)
|
||||
})
|
||||
|
||||
test('h5 customer tab renders customer fields without persisted column defs', () => {
|
||||
const tab = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/CustomerTab.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
assert.doesNotMatch(tab, /usePersistedListColumns/)
|
||||
assert.doesNotMatch(tab, /visibleDefs/)
|
||||
assert.match(tab, /row\.customerName/)
|
||||
assert.match(tab, /row\.customerNo/)
|
||||
assert.match(tab, /row\.certCount/)
|
||||
})
|
||||
|
||||
test('h5 customer quota tab does not call buildQuery', () => {
|
||||
const tab = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/CustomerTab.vue', import.meta.url),
|
||||
@@ -73,3 +105,22 @@ test('h5 customer quota tab does not call buildQuery', () => {
|
||||
assert.doesNotMatch(tab, /\bbuildQuery\b/)
|
||||
assert.match(tab, /quotaStatisticsApi\.customers/)
|
||||
})
|
||||
|
||||
test('web customer quota panel wires viewport height like StatisticsPanel', () => {
|
||||
const panel = readFileSync(
|
||||
new URL('../src/views/pl/contract-quota/CustomerQuotaPanel.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
assert.match(panel, /useElementSize\(tableWrapRef\)/)
|
||||
assert.match(
|
||||
panel,
|
||||
/const expansionStyle = computed\(\(\) => \(\{[\s\S]*width: tableViewportWidth/
|
||||
)
|
||||
assert.match(panel, /tableEl: tableWrapRef/)
|
||||
assert.match(panel, /pagerEl: pagerRef/)
|
||||
assert.doesNotMatch(panel, /\bwrapRef\s*:/)
|
||||
assert.doesNotMatch(
|
||||
panel,
|
||||
/const \{[^}]*\bexpansionStyle\b[^}]*\} = useListTableViewportHeight/
|
||||
)
|
||||
})
|
||||
Reference in new issue
Block a user