tuqin
2 天以前 b56e609f59a8de73a54212f00febee228b0fb66a
feat(hrm): 考勤规则表单/列表支持生效日期区间

- 表单新增「生效开始日期」「生效结束日期」(不选表示不限)
- 列表新增「生效区间」列
- API 类型补充 effectiveStartDate / effectiveEndDate
已修改2个文件
31 ■■■■■ 文件已修改
src/api/hrm/attendance/rule/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/attendance/rule/data.ts 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/hrm/attendance/rule/index.ts
@@ -14,6 +14,8 @@
    lateAllowMinutes?: number;
    earlyAllowMinutes?: number;
    overtimeThreshold?: number;
    effectiveStartDate?: string;
    effectiveEndDate?: string;
    status?: number;
    remark?: string;
    createTime?: string;
src/views/hrm/attendance/rule/data.ts
@@ -106,6 +106,28 @@
      },
    },
    {
      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',
@@ -186,6 +208,13 @@
    { 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,