feat(web): 差旅申请详情进度 viewer 与审批/加载态组件增强

- 新增 requestProgressViewer,申请单在直属领导审批视角下将当前步骤展示为'等待批复',travel-request-detail/app-shell/useRequests 接入
- TravelRequestApprovalDialog 增强审批交互,TableLoadingState 补充表格加载占位,ConfirmDialog 扩展确认对话框能力
- useAppShell/useRequests/AppShellRouteView 配套适配申请详情跳转与会话状态
- 同步更新 requestProgressSteps、travel-request-detail-leader-approval、assistant-session-draft-delete、documents-center-status-filter、app-shell-financial-assistant-entry、request-progress-viewer 等测试
This commit is contained in:
caoxiaozhu
2026-06-21 22:49:58 +08:00
parent 8b3495455b
commit 24b5b71b0f
14 changed files with 295 additions and 49 deletions

View File

@@ -0,0 +1,22 @@
export function resolveProgressStepsForViewer(steps = [], options = {}) {
const safeSteps = Array.isArray(steps) ? steps : []
if (!options.isApplicationDocument || !options.isCurrentDirectManagerApprover) {
return safeSteps
}
return safeSteps.map((step) => {
if (!step?.current || step?.rawLabel !== '直属领导审批') {
return step
}
const nextLabel = '等待批复'
const currentLabel = String(step.label || '').trim()
const title = String(step.title || '').trim()
return {
...step,
label: nextLabel,
title: currentLabel && title.includes(currentLabel)
? title.replace(currentLabel, nextLabel)
: title
}
})
}