feat: 优化差旅报销预审流程与个人工作台 UI 体系
- 完善 user_agent_application 申请差旅报销预审槽位与消息组装 - 增强预算助理报告与风险建议卡片交互 - 重构登录页视觉样式与移动端响应式适配 - 优化个人工作台、文档中心、政策中心、员工管理等页面布局 - 拆分 travelRequestDetailPreReviewModel 为 advice/submit 模型 - 补充报销草稿、风险复核、Item Sync 与模板执行器测试覆盖
This commit is contained in:
@@ -33,7 +33,8 @@ export function useAppShell() {
|
||||
files: [],
|
||||
conversation: null,
|
||||
scope: null,
|
||||
sessionType: ''
|
||||
sessionType: '',
|
||||
budgetContext: null
|
||||
})
|
||||
const smartEntrySessionId = ref(0)
|
||||
const smartEntryRevealToken = ref(0)
|
||||
@@ -183,7 +184,8 @@ export function useAppShell() {
|
||||
files: [],
|
||||
conversation: null,
|
||||
scope: null,
|
||||
sessionType: ''
|
||||
sessionType: '',
|
||||
budgetContext: null
|
||||
}
|
||||
smartEntrySessionId.value += 1
|
||||
}
|
||||
@@ -337,7 +339,10 @@ export function useAppShell() {
|
||||
files: Array.isArray(payload.files) ? payload.files : [],
|
||||
conversation,
|
||||
scope,
|
||||
sessionType
|
||||
sessionType,
|
||||
budgetContext: payload.budgetContext && typeof payload.budgetContext === 'object'
|
||||
? payload.budgetContext
|
||||
: null
|
||||
}
|
||||
smartEntrySessionId.value += 1
|
||||
}
|
||||
@@ -358,7 +363,7 @@ export function useAppShell() {
|
||||
return
|
||||
}
|
||||
smartEntryOpen.value = false
|
||||
toast(`${claimNo || '该'}单据已完成 AI预审${approvalStage ? `,当前节点:${approvalStage}` : ',并已提交审批'}。`)
|
||||
toast(`${claimNo || '该'}单据已提交审批${approvalStage ? `,当前节点:${approvalStage}` : '。'}`)
|
||||
router.push({ name: 'app-documents' })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,26 +5,29 @@ export function useLoginView() {
|
||||
const password = ref('')
|
||||
const tenant = ref('远光软件股份有限公司')
|
||||
const remember = ref(true)
|
||||
const showPassword = ref(false)
|
||||
|
||||
const tenantOptions = [
|
||||
{
|
||||
label: '远光软件股份有限公司',
|
||||
value: '远光软件股份有限公司'
|
||||
}
|
||||
]
|
||||
|
||||
const features = [
|
||||
{
|
||||
title: '智能审单',
|
||||
desc: 'AI 自动识别票据与规则,提升准确率与处理效率',
|
||||
icon: 'mdi mdi-file-document-outline',
|
||||
tone: 'green'
|
||||
iconKey: 'recognition',
|
||||
title: '智能识别 自动归集',
|
||||
desc: '票据智能识别,自动归集费用,减少人工录入'
|
||||
},
|
||||
{
|
||||
title: '异常预警',
|
||||
desc: '多维风险识别与预警,主动防控报销风险',
|
||||
icon: 'mdi mdi-bell-outline',
|
||||
tone: 'red'
|
||||
iconKey: 'workflow',
|
||||
title: '流程透明 合规可控',
|
||||
desc: '内置审批规则引擎,流程透明,风险可控'
|
||||
},
|
||||
{
|
||||
title: 'SLA 监控',
|
||||
desc: '实时监控服务水位,保障审批和处理时效',
|
||||
icon: 'mdi mdi-sync',
|
||||
tone: 'blue'
|
||||
iconKey: 'insight',
|
||||
title: '数据洞察 决策支持',
|
||||
desc: '多维度费用分析,洞察业务,驱动决策'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -49,8 +52,8 @@ export function useLoginView() {
|
||||
LogoMark,
|
||||
password,
|
||||
remember,
|
||||
showPassword,
|
||||
tenant,
|
||||
tenantOptions,
|
||||
username
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ const ARCHIVED_STEP_LABEL = '已归档'
|
||||
const REIMBURSEMENT_PROGRESS_LABELS = [
|
||||
RELATED_APPLICATION_STEP_LABEL,
|
||||
'待提交',
|
||||
'AI预审',
|
||||
'直属领导审批',
|
||||
'财务审批',
|
||||
'待付款',
|
||||
@@ -301,11 +300,11 @@ function resolveWorkflowNode(claim, approvalMeta, isApplicationDocument = false)
|
||||
const rawNode = String(claim?.approval_stage || '').trim()
|
||||
|
||||
if (rawNode) {
|
||||
if (rawNode === '审批流转') {
|
||||
return 'AI预审'
|
||||
if (rawNode === '审批流转' || rawNode.includes('AI预审') || rawNode.includes('AI验审')) {
|
||||
return approvalMeta.key === 'draft' || approvalMeta.key === 'supplement' ? '待提交' : '直属领导审批'
|
||||
}
|
||||
if (rawNode === '待补充') {
|
||||
return approvalMeta.key === 'draft' ? '待提交' : 'AI预审'
|
||||
return '待提交'
|
||||
}
|
||||
return rawNode
|
||||
}
|
||||
@@ -323,7 +322,7 @@ function resolveWorkflowNode(claim, approvalMeta, isApplicationDocument = false)
|
||||
return isApplicationDocument ? '审批完成' : normalizedStatus === 'paid' ? '已付款' : '归档入账'
|
||||
}
|
||||
|
||||
return isApplicationDocument ? '直属领导审批' : 'AI预审'
|
||||
return '直属领导审批'
|
||||
}
|
||||
|
||||
function stringifyRiskFlag(value) {
|
||||
@@ -375,24 +374,24 @@ function resolveProgressCurrentIndex(approvalMeta, workflowNode) {
|
||||
const normalizedNode = String(workflowNode || '').trim()
|
||||
|
||||
if (approvalMeta.key === 'completed') {
|
||||
return 7
|
||||
return 6
|
||||
}
|
||||
|
||||
if (approvalMeta.key === 'pending_payment') {
|
||||
return 5
|
||||
return 4
|
||||
}
|
||||
|
||||
if (normalizedNode.includes('已付款')) {
|
||||
return 6
|
||||
}
|
||||
if (normalizedNode.includes('待付款')) {
|
||||
return 5
|
||||
}
|
||||
if (normalizedNode.includes('待付款')) {
|
||||
return 4
|
||||
}
|
||||
if (normalizedNode.includes('归档') || normalizedNode.includes('入账')) {
|
||||
return 7
|
||||
return 6
|
||||
}
|
||||
if (normalizedNode.includes('财务')) {
|
||||
return 4
|
||||
return 3
|
||||
}
|
||||
if (
|
||||
normalizedNode.includes('直属领导')
|
||||
@@ -400,10 +399,10 @@ function resolveProgressCurrentIndex(approvalMeta, workflowNode) {
|
||||
|| normalizedNode.includes('部门负责人')
|
||||
|| normalizedNode.includes('负责人审批')
|
||||
) {
|
||||
return 3
|
||||
return 2
|
||||
}
|
||||
if (normalizedNode.includes('AI预审') || normalizedNode.includes('AI验审') || normalizedNode.includes('审批流转')) {
|
||||
return 2
|
||||
return approvalMeta.key === 'draft' || approvalMeta.key === 'supplement' ? 1 : 2
|
||||
}
|
||||
if (normalizedNode.includes('待提交')) {
|
||||
return 1
|
||||
@@ -839,11 +838,6 @@ function buildCompletedStepMeta(claim, label) {
|
||||
return buildProgressStepMeta(`${employeeName}提交`, submittedAt)
|
||||
}
|
||||
|
||||
if (stepLabel === 'AI预审') {
|
||||
const reviewedAt = formatDateTime(claim?.submitted_at || claim?.updated_at)
|
||||
return buildProgressStepMeta('AI预审通过', reviewedAt)
|
||||
}
|
||||
|
||||
if (stepLabel === '直属领导审批' || stepLabel === '预算管理者审批' || stepLabel === '财务审批') {
|
||||
const approvalEvent = findApprovalEventForStep(claim, stepLabel)
|
||||
if (approvalEvent) {
|
||||
@@ -925,9 +919,6 @@ function resolveCurrentStepStartedAt(claim, label) {
|
||||
const returnEvent = findLatestReturnEvent(claim)
|
||||
return returnEvent?.created_at || returnEvent?.createdAt || claim?.updated_at || claim?.created_at
|
||||
}
|
||||
if (stepLabel === 'AI预审') {
|
||||
return claim?.updated_at || claim?.submitted_at || claim?.created_at
|
||||
}
|
||||
if (stepLabel === '直属领导审批') {
|
||||
return claim?.submitted_at || claim?.updated_at || claim?.created_at
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user