feat: 新增预算助手报告组件并优化报销交互细节
新增预算助手报告视图模型和组件,优化报销洞察面板和消息项 样式细节,完善预算中心页面布局和文档中心视图,增强报销创 建会话管理和提交编排器,调整 Vite 构建配置,补充单元测试。
This commit is contained in:
@@ -16,6 +16,10 @@ import {
|
||||
import { fetchOntologyParse } from '../../services/ontology.js'
|
||||
import { buildExpenseApplicationOntologyContext } from '../../utils/expenseApplicationOntology.js'
|
||||
import { calculateTravelReimbursement } from '../../services/reimbursements.js'
|
||||
import {
|
||||
handleBudgetCompileReportSubmit,
|
||||
shouldUseBudgetCompileReport
|
||||
} from './budgetAssistantReportModel.js'
|
||||
|
||||
export function useTravelReimbursementSubmitComposer(ctx) {
|
||||
const {
|
||||
@@ -444,6 +448,32 @@ export function useTravelReimbursementSubmitComposer(ctx) {
|
||||
? `新上传 ${fileNames.length} 份票据,请单独建立报销单。`
|
||||
: `我上传了 ${fileNames.length} 份票据,请帮我识别并整理报销建议。`)
|
||||
|
||||
if (shouldUseBudgetCompileReport(rawText, { sessionType: activeSessionType.value }) && !reviewAction) {
|
||||
return handleBudgetCompileReportSubmit({
|
||||
adjustComposerTextareaHeight,
|
||||
clearAttachedFiles,
|
||||
completeFlowStep,
|
||||
composerBusinessTimeDraftTouched,
|
||||
composerBusinessTimeTags,
|
||||
composerDraft,
|
||||
createMessage,
|
||||
currentUser,
|
||||
fileInputRef,
|
||||
fileNames,
|
||||
messages,
|
||||
nextTick,
|
||||
options,
|
||||
persistSessionState,
|
||||
rawText,
|
||||
replaceMessage,
|
||||
resetFlowRun,
|
||||
scrollToBottom,
|
||||
startFlowStep,
|
||||
submitting,
|
||||
userText
|
||||
})
|
||||
}
|
||||
|
||||
const scopeGuard = resolveAssistantScopeGuard(rawText, activeSessionType.value, {
|
||||
attachmentCount: files.length,
|
||||
hasActiveReviewPayload: Boolean(activeReviewPayload.value),
|
||||
@@ -535,9 +565,6 @@ export function useTravelReimbursementSubmitComposer(ctx) {
|
||||
applicationPreview
|
||||
}
|
||||
))
|
||||
if (insightPanelCollapsed) {
|
||||
insightPanelCollapsed.value = true
|
||||
}
|
||||
persistSessionState()
|
||||
nextTick(scrollToBottom)
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user