| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { z } from '#/adapter/form'; |
| | | import { getSalaryStructureList } from '#/api/hrm/salary/structure'; |
| | | import { getDeptList } from '#/api/system/dept'; |
| | | import { getSimplePostList } from '#/api/system/post'; |
| | | import { getSimpleRoleList } from '#/api/system/role'; |
| | |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'postId', |
| | | fieldName: 'postIds', |
| | | label: '岗位', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getSimplePostList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | placeholder: '请选择岗位', |
| | | mode: 'multiple', |
| | | placeholder: '请选择岗位(可多选)', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | |
| | | rules: z.number().default(1), |
| | | }, |
| | | { |
| | | fieldName: 'employeeCategory', |
| | | label: '员工类别', |
| | | component: 'RadioGroup', |
| | | componentProps: { |
| | | buttonStyle: 'solid', |
| | | optionType: 'button', |
| | | options: getDictOptions(DICT_TYPE.HRM_EMPLOYEE_CATEGORY, 'number'), |
| | | }, |
| | | rules: z.number().default(1), |
| | | help: '普通员工按岗位加班时薪;技工加班按 1:1;管理不计加班工资', |
| | | }, |
| | | { |
| | | fieldName: 'birthday', |
| | | label: '出生日期', |
| | | component: 'DatePicker', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'nation', |
| | | label: '民族', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入民族', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'marriageStatus', |
| | | label: '婚姻状态', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入婚姻状态', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'age', |
| | | label: '年龄', |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | placeholder: '请输入年龄', |
| | | min: 0, |
| | | max: 150, |
| | | style: { width: '100%' }, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'education', |
| | | label: '学历', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入学历', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'politicalStatus', |
| | | label: '政治面貌', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入政治面貌', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'annualLeaveBalance', |
| | | label: '年假余额', |
| | | component: 'InputNumber', |
| | |
| | | precision: 1, |
| | | style: { width: '100%' }, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'salaryStructureId', |
| | | label: '薪酬结构', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: () => getSalaryStructureList({ status: 0 }), |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | allowClear: true, |
| | | placeholder: '请选择薪酬结构', |
| | | }, |
| | | help: '决定工作日加班倍率;未选择时使用系统默认 1.5 倍', |
| | | }, |
| | | { |
| | | fieldName: 'baseSalary', |
| | |
| | | componentProps: { |
| | | placeholder: '请输入居住地址', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'blobIds', |
| | | label: '附件', |
| | | component: 'FileUpload', |
| | | componentProps: { |
| | | valueKey: 'id', |
| | | maxNumber: 10, |
| | | multiple: true, |
| | | help: '可上传身份证、学历证书、体检报告等资料作为留档', |
| | | }, |
| | | formItemClass: 'col-span-2', |
| | | }, |
| | | ]; |
| | | } |
| | |
| | | placeholder: '请选择员工状态', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'employeeCategory', |
| | | label: '员工类别', |
| | | component: 'Select', |
| | | componentProps: { |
| | | allowClear: true, |
| | | options: getDictOptions(DICT_TYPE.HRM_EMPLOYEE_CATEGORY, 'number'), |
| | | placeholder: '请选择员工类别', |
| | | }, |
| | | }, |
| | | ]; |
| | | } |
| | | |
| | |
| | | }, |
| | | { field: 'phone', title: '手机号码', minWidth: 120 }, |
| | | { field: 'deptName', title: '部门', minWidth: 120 }, |
| | | { field: 'postName', title: '岗位', minWidth: 120 }, |
| | | { field: 'postNames', title: '岗位', minWidth: 120 }, |
| | | { field: 'nation', title: '民族', width: 90 }, |
| | | { field: 'age', title: '年龄', width: 70 }, |
| | | { field: 'education', title: '学历', width: 90 }, |
| | | { |
| | | field: 'employeeStatus', |
| | | title: '员工状态', |
| | | width: 100, |
| | | slots: { |
| | | default: 'employeeStatus', |
| | | }, |
| | | }, |
| | | { |
| | | field: 'employeeCategory', |
| | | title: '员工类别', |
| | | width: 100, |
| | | slots: { |
| | | default: 'employeeCategory', |
| | | }, |
| | | }, |
| | | { field: 'hireDate', title: '入职日期', width: 110 }, |
| | |
| | | { field: 'employeeNo', title: '员工编号', minWidth: 120 }, |
| | | { field: 'name', title: '员工姓名', minWidth: 100 }, |
| | | { field: 'deptName', title: '部门', minWidth: 120 }, |
| | | { field: 'postName', title: '岗位', minWidth: 120 }, |
| | | { field: 'postNames', title: '岗位', minWidth: 120 }, |
| | | { field: 'phone', title: '手机号码', minWidth: 120 }, |
| | | ]; |
| | | } |