liu
9 天以前 a7dc7b230fcc6abc6ee5a7bfadb90789b03d2ca8
src/views/hrm/leave/data.ts
@@ -2,8 +2,12 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { HrmLeaveApi } from '#/api/hrm/leave';
import { markRaw } from 'vue';
import { DICT_TYPE } from '#/packages/constants/src';
import { getDictOptions } from '#/packages/effects/hooks/src';
import { UserSelect } from '#/views/system/user/components';
/** 表单类型 */
export type FormType = 'create' | 'detail' | 'update';
@@ -18,6 +22,15 @@
        triggerFields: [''],
        show: () => false,
      },
    },
    {
      fieldName: 'userId',
      label: '申请人',
      component: markRaw(UserSelect),
      componentProps: {
        placeholder: '请选择申请人',
      },
      rules: 'selectRequired',
    },
    {
      fieldName: 'leaveType',
@@ -134,7 +147,7 @@
export function useGridColumns(): VxeTableGridOptions<HrmLeaveApi.Leave>['columns'] {
  return [
    { field: 'id', title: '申请编号', width: 80 },
    { field: 'employeeName', title: '申请人', minWidth: 100 },
    { field: 'userName', title: '申请人', minWidth: 100 },
    { field: 'deptName', title: '部门', minWidth: 120 },
    {
      field: 'leaveType',