feat: 完善审批功能

- 新增通用审批列表页面(我发起的/待我审批/我已审批)
- 新增通用审批详情页面(支持审批通过/拒绝操作)
- 修复审批列表过滤逻辑("我已审批"只显示已完成订单)
- 修复登录页面未设置 Zustand store 的问题
- 修复 User 类型定义(id 改为 number 类型)
- 修复草稿恢复时的日期转换问题
- 创建测试数据脚本(test_data.php)
- 安装 webman 官方依赖包(database, redis, pagination 等)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-25 23:54:38 +08:00
parent 27ad5728c9
commit 04953b22dc
17 changed files with 2733 additions and 28 deletions
+17 -1
View File
@@ -94,9 +94,25 @@ export default function BusinessTripApply() {
console.log('📍 Page init:', { fromSelection, locationState: location.state, initRef: initRef.current })
// 1. 从选择页面返回:恢复所有人员数据
// 1. 从选择页面返回:恢复所有数据(草稿 + 人员)
if (fromSelection) {
console.log('🔄 Returning from selection page')
// 恢复草稿数据
const draftData = sessionStorage.getItem('businessTripDraft')
if (draftData) {
const draft = JSON.parse(draftData)
setReason(draft.reason || '')
// 将日期字符串转换回 Date 对象
const restoredItineraries = (draft.itineraries || [{ startTime: null, endTime: null, departure: '', destination: '', transport: '', tripType: '' as 'oneway' | 'roundtrip' | '', remark: '' }]).map((item: any) => ({
...item,
startTime: item.startTime ? new Date(item.startTime) : null,
endTime: item.endTime ? new Date(item.endTime) : null,
}))
setItineraries(restoredItineraries)
console.log('✅ Restored draft')
}
// 恢复人员数据
const approversData = sessionStorage.getItem('selectedApprovers')
if (approversData) {
setApprovers(JSON.parse(approversData))