feat: 节假日配置、排班管理独立页面、考勤加班显示优化

- 新增 HolidayConfig 模型,支持法定节假日和调休工作日配置
- 加班费同步逻辑改用 HolidayConfig 判断日期类型
- 员工端考勤显示加班工时、费率和日期类型
- 周末/节假日出勤状态显示为"周末出勤"/"节假日出勤"
- 新增 Employee.defaultShiftId 字段,支持长期排班(工作日班次)
- 排班管理拆分为独立页面(班次管理+排班),考勤管理保留出勤相关功能
- 排班和每日出勤页面增加身份证号列
- 修复岗位和部门编辑失败问题(POST 改 PUT)
- 新增 backfill 脚本:合同薪资回填、默认班次回填

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-18 11:00:53 +08:00
parent eb91c2d8fb
commit 1feada76d1
20 changed files with 1482 additions and 484 deletions
+15
View File
@@ -316,6 +316,12 @@ export const attendanceApi = {
/** 删除排班 */
removeAssignment: (id: string) =>
del(`/attendance/shift-assignments/${id}`),
/** 设置员工默认班次(长期排班) */
setDefaultShift: (employeeId: string, shiftId: string | null) =>
post('/attendance/default-shift', { employeeId, shiftId }),
/** 批量设置员工默认班次 */
batchSetDefaultShift: (items: { employeeId: string; shiftId: string | null }[]) =>
post('/attendance/default-shift/batch', { items }),
/** 创建请假记录 */
createLeave: (data: Record<string, unknown>) =>
post('/attendance/leaves', data),
@@ -502,6 +508,15 @@ export const payrollApi = {
/** 保存加班费配置 */
saveOvertimeConfig: (data: Record<string, unknown>) =>
post('/payroll/overtime/config', data),
/** 获取节假日配置列表 */
holidays: (year?: string) =>
get('/payroll/holidays', { params: year ? { year } : {} }).then(unwrap<any[]>()),
/** 批量保存节假日配置 */
saveHolidays: (data: { year: string; items: { date: string; type: string; name?: string }[] }) =>
post('/payroll/holidays/batch', data).then(unwrap<any>()),
/** 预置法定节假日 */
presetHolidays: (year: string) =>
post('/payroll/holidays/preset', { year }).then(unwrap<any>()),
/** 工资条列表 */
payslips: (params: { month?: string; employeeId?: string }) =>
get('/payroll/payslip', { params }).then(unwrap<any[]>()),