| | |
| | | import type { VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { HrmEmployeeApi } from '#/api/hrm/employee'; |
| | | import type { HrmOvertimeApi } from '#/api/hrm/overtime'; |
| | | |
| | | import { getEmployeeSimpleList } from '#/api/hrm/employee'; |
| | | import { DICT_TYPE } from '#/packages/constants/src'; |
| | | import { getDictOptions } from '#/packages/effects/hooks/src'; |
| | | |
| | |
| | | }, |
| | | { |
| | | fieldName: 'employeeId', |
| | | component: 'Input', |
| | | dependencies: { triggerFields: [''], show: () => false }, |
| | | label: '申请人', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: async () => { |
| | | const list = await getEmployeeSimpleList(); |
| | | // 离职员工不可选作加班申请人 |
| | | return list.filter((item) => item.employeeStatus !== 3); |
| | | }, |
| | | labelField: 'name', |
| | | labelFn: (item: HrmEmployeeApi.EmployeeSimple) => |
| | | `${item.name}(${item.employeeNo})`, |
| | | valueField: 'id', |
| | | showSearch: true, |
| | | filterOption: (input: string, option: any) => |
| | | String(option.label ?? '') |
| | | .toLowerCase() |
| | | .includes(input.toLowerCase()), |
| | | placeholder: '请选择申请人', |
| | | style: { width: '100%' }, |
| | | }, |
| | | rules: 'selectRequired', |
| | | formItemClass: 'col-span-2', |
| | | }, |
| | | { |
| | | fieldName: 'baseInfoDivider', |
| | |
| | | }, |
| | | { |
| | | fieldName: 'employeeName', |
| | | label: '申请人', |
| | | label: '申请人姓名', |
| | | component: 'Input', |
| | | componentProps: { disabled: true, placeholder: '系统自动带出' }, |
| | | componentProps: { disabled: true, placeholder: '选择申请人后自动带出' }, |
| | | }, |
| | | { |
| | | fieldName: 'employeeNo', |