feat: 报销审批流重构与管家计划全链路贯通
- 重构报销状态注册表、审批流路由与平台风险标记 - 完善管家意图规划器与模型计划构建器全链路 - 新增 OCR Worker 脚本、数据库会话管理与通知状态 - 优化文档中心、日志视图、预算中心与员工管理交互 - 增强工作台摘要、图标资源与全局主题样式 - 补充审批路由、状态注册、OCR 服务与管家规划器测试覆盖
This commit is contained in:
@@ -87,3 +87,52 @@ test('workbench summary builds real user notifications and progress from request
|
||||
assert.ok(summary.expenseStatsDetail.operationRows.some((item) => item.source === '待办'))
|
||||
assert.ok(summary.expenseStatsDetail.operationRows.some((item) => item.source === '进度'))
|
||||
})
|
||||
|
||||
test('workbench progress keeps application document type for AP claims', () => {
|
||||
const summary = buildWorkbenchSummary(
|
||||
[
|
||||
{
|
||||
id: 'AP-202606050001-ABCDEFGH',
|
||||
claimId: 'application-1',
|
||||
claimNo: 'AP-202606050001-ABCDEFGH',
|
||||
person: currentUser.name,
|
||||
title: '差旅费用',
|
||||
approvalKey: 'in_progress',
|
||||
approvalStatus: '直属领导审批',
|
||||
amount: 1880,
|
||||
createdAt: '2026-06-05T09:00:00+08:00',
|
||||
updatedAt: '2026-06-05T09:10:00+08:00',
|
||||
progressSteps: [
|
||||
buildStep('创建申请', 0, 1),
|
||||
buildStep('直属领导审批', 1, 1),
|
||||
buildStep('归档', 2, 1)
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'REQ-APPLICATION-001',
|
||||
claimId: 'application-2',
|
||||
claimNo: 'REQ-APPLICATION-001',
|
||||
documentTypeCode: 'application',
|
||||
documentTypeLabel: '报销单',
|
||||
person: currentUser.name,
|
||||
title: '办公用品采购',
|
||||
approvalKey: 'in_progress',
|
||||
approvalStatus: '直属领导审批',
|
||||
amount: 2600,
|
||||
createdAt: '2026-06-05T09:05:00+08:00',
|
||||
updatedAt: '2026-06-05T09:15:00+08:00',
|
||||
progressSteps: [
|
||||
buildStep('创建申请', 0, 1),
|
||||
buildStep('直属领导审批', 1, 1),
|
||||
buildStep('归档', 2, 1)
|
||||
]
|
||||
}
|
||||
],
|
||||
currentUser
|
||||
)
|
||||
|
||||
assert.deepEqual(
|
||||
summary.progressItems.map((item) => item.documentTypeLabel),
|
||||
['申请单', '申请单']
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user