feat: 财务看板口径重构与半年模拟数据及报销状态注册表
- 重构 finance_dashboard 口径计算,新增模拟公司画像数据生成与筛选 - 引入 expense_claim_status_registry 统一报销状态流转 - 完善报销草稿流程、Item Sync 与本体解析器 - 优化总览页趋势图、分页组件与请求进度步骤 - 增强报销申请快速预览、本体工具与详情展示 - 新增半年报销模拟数据种子脚本与状态审计工具 - 补充财务看板、报销状态注册与模拟数据测试覆盖
This commit is contained in:
@@ -232,7 +232,19 @@ test('guided reimbursement requires application selection for travel and enterta
|
||||
amount: 1800,
|
||||
occurred_at: '2026-05-20T08:00:00Z',
|
||||
status: 'approved',
|
||||
created_at: '2026-05-20T08:00:00Z'
|
||||
created_at: '2026-06-02T00:58:00Z',
|
||||
risk_flags_json: [{
|
||||
source: 'application_detail',
|
||||
application_detail: {
|
||||
application_business_time: '2026-05-20 至 2026-05-23',
|
||||
days: '4 天',
|
||||
transport_mode: '火车',
|
||||
lodging_daily_cap: '600元/天',
|
||||
subsidy_daily_cap: '120元/天',
|
||||
transport_policy: '按真实票据复核',
|
||||
policy_estimate: '住宿 2,400元 + 补贴 480元'
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
id: 'app-meal',
|
||||
@@ -285,6 +297,11 @@ test('guided reimbursement requires application selection for travel and enterta
|
||||
assert.equal(state.stepKey, 'summary')
|
||||
assert.equal(isGuidedReimbursementReadyForReview(state), true)
|
||||
assert.equal(state.values.application_claim_no, 'AP-202605-001')
|
||||
assert.equal(state.values.application_business_time, '2026-05-20 至 2026-05-23')
|
||||
assert.equal(state.values.application_days, '4 天')
|
||||
assert.equal(state.values.application_transport_mode, '火车')
|
||||
assert.equal(state.values.application_lodging_daily_cap, '600元/天')
|
||||
assert.equal(state.values.application_subsidy_daily_cap, '120元/天')
|
||||
const summaryText = buildGuidedReimbursementSummaryText(state)
|
||||
assert.match(summaryText, /关联申请单:AP-202605-001/)
|
||||
assert.match(summaryText, /草稿详情中上传对应票据/)
|
||||
@@ -297,7 +314,12 @@ test('guided reimbursement requires application selection for travel and enterta
|
||||
assert.equal(submitOptions.extraContext.review_form_values.business_location, '上海')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.amount, '')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_amount, '1800')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_business_time, '2026-05-20')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_business_time, '2026-05-20 至 2026-05-23')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_days, '4 天')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.transport_mode, '火车')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_transport_mode, '火车')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_lodging_daily_cap, '600元/天')
|
||||
assert.equal(submitOptions.extraContext.review_form_values.application_subsidy_daily_cap, '120元/天')
|
||||
assert.equal(submitOptions.extraContext.expense_scene_selection.application_claim_no, 'AP-202605-001')
|
||||
assert.match(submitOptions.rawText, /关联申请单:AP-202605-001/)
|
||||
assert.doesNotMatch(submitOptions.rawText, /事由:待补充/)
|
||||
@@ -377,6 +399,8 @@ test('guided flow is local until final confirmation or collected query handoff',
|
||||
assert.match(guidedFlowScript, /GUIDED_ACTION_SELECT_REQUIRED_APPLICATION/)
|
||||
assert.match(guidedFlowScript, /isGuidedReimbursementReadyForReview\(guidedFlowState\.value\)[\s\S]*pushReimbursementSummary\(\)/)
|
||||
assert.match(guidedFlowScript, /isGuidedReimbursementReadyForReview\(currentState\) && fileNames\.length[\s\S]*buildGuidedReviewSubmitOptions\(currentState, mergedFiles\)[\s\S]*skipDraftAssociationPrompt:\s*true[\s\S]*skipUserMessage:\s*true[\s\S]*submitExistingComposer\(submitOptions\)/)
|
||||
assert.doesNotMatch(guidedFlowScript, /amount:\s*applicationAmount/)
|
||||
assert.match(guidedFlowScript, /amount:\s*''/)
|
||||
assert.match(guidedFlowScript, /if \(!applications\.length\) \{[\s\S]*guidedFlowState\.value = createEmptyGuidedFlowState\(\)[\s\S]*meta: \['缺少可关联申请单'\][\s\S]*\}\)/)
|
||||
assert.doesNotMatch(guidedFlowScript, /meta: \['缺少可关联申请单'\],[\s\S]{0,120}suggestedActions: buildGuidedExpenseTypeActions\(\)/)
|
||||
assert.match(guidedFlowScript, /handleSceneSelectionApplicationGate/)
|
||||
|
||||
Reference in New Issue
Block a user