feat(web): 工作台 AI 模式与差旅/风险建议交互优化
- 新增 PersonalWorkbenchAiMode 组件、AI 侧边栏与 orb 机器人视觉资源 - 新增 aiApplicationDraftModel / aiExpenseDraftModel / aiWorkbenchConversationStore 及业务准入 aiSidebarBusinessAccess,支撑 AI 模式下的申请与报销草稿 - 顶栏、侧边栏、工作台样式重构,适配 AI 模式切换与响应式布局 - 同步 steward plan/off_topic、差旅报销引导流、风险建议卡片等测试
This commit is contained in:
@@ -89,6 +89,52 @@ test('workbench summary builds real user notifications and progress from request
|
||||
assert.equal(summary.expenseStatsDetail.processingRows[0].stepCount, 5)
|
||||
assert.ok(summary.expenseStatsDetail.operationRows.some((item) => item.source === '待办'))
|
||||
assert.ok(summary.expenseStatsDetail.operationRows.some((item) => item.source === '进度'))
|
||||
assert.ok(Array.isArray(summary.reimbursementTrendRows))
|
||||
assert.equal(summary.reimbursementTrendRows.length, 6)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-1).key, '2026-06')
|
||||
assert.equal(summary.reimbursementTrendRows.at(-1).amount, 1280)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-1).previousKey, '2025-06')
|
||||
})
|
||||
|
||||
test('workbench reimbursement trend compares monthly totals with last year same period', () => {
|
||||
const summary = buildWorkbenchSummary(
|
||||
[
|
||||
{
|
||||
id: 'BX-202606',
|
||||
claimNo: 'BX-202606',
|
||||
person: currentUser.name,
|
||||
title: '六月报销',
|
||||
amount: 1280,
|
||||
createdAt: '2026-06-15T10:00:00+08:00'
|
||||
},
|
||||
{
|
||||
id: 'BX-202605',
|
||||
claimNo: 'BX-202605',
|
||||
person: currentUser.name,
|
||||
title: '五月报销',
|
||||
amount: 860,
|
||||
createdAt: '2026-05-10T10:00:00+08:00'
|
||||
},
|
||||
{
|
||||
id: 'BX-202506',
|
||||
claimNo: 'BX-202506',
|
||||
person: currentUser.name,
|
||||
title: '去年六月报销',
|
||||
amount: 920,
|
||||
createdAt: '2025-06-12T10:00:00+08:00'
|
||||
}
|
||||
],
|
||||
currentUser
|
||||
)
|
||||
|
||||
assert.deepEqual(
|
||||
summary.reimbursementTrendRows.slice(-2).map((item) => item.label),
|
||||
['5月', '6月']
|
||||
)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-2).amount, 860)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-2).previousAmount, 0)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-1).amount, 1280)
|
||||
assert.equal(summary.reimbursementTrendRows.at(-1).previousAmount, 920)
|
||||
})
|
||||
|
||||
test('workbench progress keeps application document type for AP claims', () => {
|
||||
|
||||
Reference in New Issue
Block a user