fix(pl): 证用品类差量复用软删关联,并修正归档用证结转与证面品类展示。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6f20c0ff8a
commit
f865d8ed99
19 files changed
+445
-65
No files matched your search
@@ -31,17 +31,24 @@ test('pending keywords still force alert mode without plan flags', () => {
|
||||
)
|
||||
})
|
||||
|
||||
test('unmarked legacy quota block still offers certificate ready', () => {
|
||||
test('unmarked quota block only alerts, never offers certificate ready', () => {
|
||||
assert.equal(
|
||||
resolveArchiveQuotaBlockMode(
|
||||
'实际数量已保存,证件没有扣减。请把实际数量改小,或先补充购买证和运输证,再重新归档。',
|
||||
'用证没有完成',
|
||||
{ quotaCertPendingFulfill: 0, quotaCertWaived: 0 }
|
||||
),
|
||||
'confirm-ready'
|
||||
'alert-plain'
|
||||
)
|
||||
})
|
||||
|
||||
test('non quota-title blocks stay plain alert', () => {
|
||||
assert.equal(resolveArchiveQuotaBlockMode('不能归档:缺证', '不能归档', {}), 'alert-plain')
|
||||
})
|
||||
|
||||
test('missing actual-quantity settle error does not offer certificate ready', () => {
|
||||
assert.equal(
|
||||
resolveArchiveQuotaBlockMode('必须明确提交每个来源的实际量', '用证没有完成', {}),
|
||||
'alert-plain'
|
||||
)
|
||||
})
|
||||
@@ -39,6 +39,34 @@ test('H5 客户用证按客户列表展示证件', () => {
|
||||
assert.match(contractTab, /\/m\/pl\/plan-cert\/customer\//)
|
||||
assert.match(contractTab, /暂无客户用证数据/)
|
||||
assert.match(planCertIndex, /title: '客户用证'/)
|
||||
assert.match(planCertIndex, /客户名称 \/ 编号/)
|
||||
assert.doesNotMatch(planCertIndex, /合同编号 \/ 名称 \/ 销售或购买单位/)
|
||||
})
|
||||
|
||||
test('H5 客户用证详情显式导入 WebView 壳,避免空白页', () => {
|
||||
const customerDetail = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/customer-detail.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
assert.match(customerDetail, /import MpWebviewShell from '@\/layouts\/MpWebviewShell\.vue'/)
|
||||
assert.match(customerDetail, /import MpBusinessHeader from '@\/components\/mp\/MpBusinessHeader\.vue'/)
|
||||
assert.match(customerDetail, /@ready="onShellReady"/)
|
||||
})
|
||||
|
||||
test('H5 证件详情与建档列表展示系统客户和证用品类', () => {
|
||||
const faceModel = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/face-model.ts', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const archiveTab = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/ArchiveTab.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
assert.match(faceModel, /label: '证用品类'/)
|
||||
assert.match(faceModel, /certCategoryLabel/)
|
||||
assert.match(archiveTab, /系统客户/)
|
||||
assert.match(archiveTab, /证用品类/)
|
||||
assert.match(archiveTab, /certCategoryLabel/)
|
||||
})
|
||||
|
||||
test('H5 建档页使用关联购买证且无证面引用残留', () => {
|
||||
|
||||
Reference in new issue
Block a user