feat(pl): 合同用证改为客户用证并修复列表筛选。

证件额度按客户展示;Web 客户列表改用 toQueryParams,修复 buildQuery is not a function。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-15 14:46:46 +08:00
1 parent d5f3a79ea5
commit ea46761f40
29 files changed
+1777 -295

No files matched your search

+17 -4
View File
@@ -203,13 +203,14 @@ test('real template keeps plans quota proof order and separate lazy contract sco
canViewQuotaCert: true,
canViewProof: true,
detailActiveTab: 'proof',
detailContract: { id: 42 }
detailContract: { id: 42, customerId: 'cust-42' }
}
const rows = panes(ctx)
assert.deepEqual(
rows.map((v: any) => v.props.name),
['plans', 'quota', 'proof']
)
assert.equal(rows[1].props.label, '客户证件与额度')
assert.equal(rows[2].props.label, '运输计划合法使用证明')
assert.equal(rows[2].props.lazy, '')
assert.equal(panel(rows[1]), undefined)
@@ -219,14 +220,19 @@ test('real template keeps plans quota proof order and separate lazy contract sco
assert.equal(proof.props.active, true)
assert.equal(proof.props.embedded, '')
ctx.detailContract.id = 43
ctx.detailContract.customerId = 'cust-43'
ctx.currentDetailId = 43
assert.equal(panel(panes(ctx)[2]).key, 43)
ctx.detailActiveTab = 'quota'
const quota = panel(panes(ctx)[1])
assert.equal(quota.type?.name || quota.type, 'CustomerCertQuotaPanel')
assert.equal(quota.props['customer-id'] ?? quota.props.customerId, 'cust-43')
assert.equal(quota.props.active, true)
ctx.canViewQuotaCert = false
assert.deepEqual(
panes(ctx).map((v: any) => v.props.name),
['plans', 'proof']
)
ctx.detailActiveTab = 'quota'
assert.equal(panel(panes(ctx)[1]), undefined)
})
@@ -265,7 +271,14 @@ test('mounted template unmounts old contract and never mounts quota for proof-on
}
}),
StopDocuments: Child('proof'),
ContractQuotaPanel: Child('quota'),
CustomerCertQuotaPanel: vue.defineComponent({
props: ['customerId', 'active'],
setup(props) {
lifecycle.push(`mount:quota:${props.customerId}`)
vue.onBeforeUnmount(() => lifecycle.push(`unmount:quota:${props.customerId}`))
return () => vue.h('span')
}
}),
PlContractLinkedPlansPanel: vue.defineComponent({
setup() {
return () => vue.h('span')
@@ -282,7 +295,7 @@ test('mounted template unmounts old contract and never mounts quota for proof-on
canViewQuotaCert: false,
canViewProof: true,
detailActiveTab: 'proof',
detailContract: { id: 'A' }
detailContract: { id: 'A', customerId: 'cust-A' }
})
const renderer = vue.createRenderer<any, any>({
createElement: () => ({ children: [] }),