feat: 本体字段治理与风险规则模板执行器重构
- 新增本体字段注册表与字段治理审计脚本 - 重构风险规则模板执行器、DSL 验证与清单分类器 - 完善票据夹服务与差旅请求详情页交互 - 优化趋势图表与总览页数据展示 - 增强报销平台风险分级与模拟公司筛选 - 补充本体字段、风险规则生成与票据夹服务测试覆盖
This commit is contained in:
@@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import {
|
||||
buildReviewFormContextFromPayload,
|
||||
buildLocallySyncedReviewPayload,
|
||||
buildReviewNextStepRichCopy,
|
||||
buildReviewPlainFollowupCopy,
|
||||
@@ -410,6 +411,40 @@ test('continuing receipt upload preserves prior review form context', () => {
|
||||
)
|
||||
})
|
||||
|
||||
test('review form context emits ontology fields instead of local aliases', () => {
|
||||
const context = buildReviewFormContextFromPayload(
|
||||
{
|
||||
edit_fields: [
|
||||
{ key: 'expense_type', value: '' },
|
||||
{ key: 'occurred_date', value: '' },
|
||||
{ key: 'transport_type', value: '' },
|
||||
{ key: 'reason', value: '' },
|
||||
{ key: 'amount', value: '' },
|
||||
{ key: 'business_location', value: '' },
|
||||
{ key: 'attachment_names', value: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
expense_type: '差旅费',
|
||||
occurred_date: '2026-06-01 至 2026-06-03',
|
||||
transport_type: '火车',
|
||||
reason_value: '支撑国网仿生产环境部署',
|
||||
location: '上海',
|
||||
amount: '3000',
|
||||
attachment_names: 'ticket.pdf'
|
||||
}
|
||||
)
|
||||
|
||||
assert.equal(context.review_form_values.expense_type, '差旅费')
|
||||
assert.equal(context.review_form_values.time_range, '2026-06-01 至 2026-06-03')
|
||||
assert.equal(context.review_form_values.transport_mode, '火车')
|
||||
assert.equal(context.review_form_values.reason, '支撑国网仿生产环境部署')
|
||||
assert.equal(context.review_form_values.attachments, 'ticket.pdf')
|
||||
assert.equal(context.review_form_values.occurred_date, undefined)
|
||||
assert.equal(context.review_form_values.transport_type, undefined)
|
||||
assert.equal(context.review_form_values.reason_value, undefined)
|
||||
})
|
||||
|
||||
test('review drawer save action is disabled while receipt recognition is submitting', () => {
|
||||
assert.match(createViewScript, /const submitting = ref\(false\)/)
|
||||
assert.match(
|
||||
|
||||
Reference in New Issue
Block a user