feat: 优化差旅报销预审流程与个人工作台 UI 体系
- 完善 user_agent_application 申请差旅报销预审槽位与消息组装 - 增强预算助理报告与风险建议卡片交互 - 重构登录页视觉样式与移动端响应式适配 - 优化个人工作台、文档中心、政策中心、员工管理等页面布局 - 拆分 travelRequestDetailPreReviewModel 为 advice/submit 模型 - 补充报销草稿、风险复核、Item Sync 与模板执行器测试覆盖
This commit is contained in:
@@ -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