feat(hrm): 考勤规则表单/列表支持生效日期区间
- 表单新增「生效开始日期」「生效结束日期」(不选表示不限)
- 列表新增「生效区间」列
- API 类型补充 effectiveStartDate / effectiveEndDate
| | |
| | | lateAllowMinutes?: number; |
| | | earlyAllowMinutes?: number; |
| | | overtimeThreshold?: number; |
| | | effectiveStartDate?: string; |
| | | effectiveEndDate?: string; |
| | | status?: number; |
| | | remark?: string; |
| | | createTime?: string; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'effectiveStartDate', |
| | | label: '生效开始日期', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | placeholder: '不选表示不限', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | format: 'YYYY-MM-DD', |
| | | style: { width: '100%' }, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'effectiveEndDate', |
| | | label: '生效结束日期', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | placeholder: '不选表示长期有效', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | format: 'YYYY-MM-DD', |
| | | style: { width: '100%' }, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'status', |
| | | label: '状态', |
| | | component: 'RadioGroup', |
| | |
| | | { field: 'earlyAllowMinutes', title: '早退允许(分钟)', width: 120 }, |
| | | { field: 'overtimeThreshold', title: '加班起算(小时)', width: 120 }, |
| | | { |
| | | field: 'effectiveStartDate', |
| | | title: '生效区间', |
| | | minWidth: 200, |
| | | formatter: ({ row }) => |
| | | `${row.effectiveStartDate || '不限'} ~ ${row.effectiveEndDate || '不限'}`, |
| | | }, |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | | width: 80, |