Commit 645fabe9 authored by 刘斌's avatar 刘斌

fix: 251203版本修改

parent 818eb0e7
...@@ -107,6 +107,14 @@ export function apiPage(params: PageQuery) { ...@@ -107,6 +107,14 @@ export function apiPage(params: PageQuery) {
export function apiDetail(id: number) { export function apiDetail(id: number) {
return requestClient.get(`/employee/flow/${id}`); return requestClient.get(`/employee/flow/${id}`);
} }
/**
* 用员工信息初始化审批对象
* @param type
* @param id
*/
export function initByEmployeeId(type: string, id: number) {
return requestClient.get(`/employee/flow/init/${type}/${id}`);
}
/** /**
* 新增人事审批对象 * 新增人事审批对象
* @param data * @param data
......
...@@ -84,25 +84,31 @@ export namespace EmployeeInfoApi { ...@@ -84,25 +84,31 @@ export namespace EmployeeInfoApi {
ageGroup?: string; ageGroup?: string;
ageGroupName?: string; ageGroupName?: string;
/** /**
* 兼板块 * 兼板块
*/ */
partTimePlate?: string; concurrentPlate?: string;
/** /**
* 兼一级部门 * 兼一级部门
*/ */
partTimeFirstDept?: string; concurrentFirstDept?: string;
/** /**
* 兼二级部门 * 兼二级部门
*/ */
partTimeSecondDept?: string; concurrentSecondDept?: string;
/** /**
* 兼三级部门 * 兼三级部门
*/ */
partTimeThirdDept?: string; concurrentThirdDept?: string;
/** /**
* 兼岗位 * 兼岗位
*/ */
partTimePosition?: string; concurrentPosition?: string;
/**
* 兼岗岗位类型
*/
concurrentPositionType?: string;
concurrentPositionTypeName?: string;
/** /**
* 籍贯 * 籍贯
*/ */
...@@ -265,19 +271,25 @@ export namespace EmployeeInfoApi { ...@@ -265,19 +271,25 @@ export namespace EmployeeInfoApi {
/** /**
* 是否缴纳社保 * 是否缴纳社保
*/ */
hasSocialSecurityPaid?: number; hasSocialSecurityPaid?: string;
hasSocialSecurityPaidName?: number; hasSocialSecurityPaidName?: string;
/** /**
* 公积金主体 * 公积金主体
*/ */
providentFundEntity?: number; providentFundEntity?: string;
/** /**
* 是否缴纳公积金 * 是否缴纳公积金
*/ */
hasProvidentFundPaid?: number; hasProvidentFundPaid?: string;
hasProvidentFundPaidName?: number; hasProvidentFundPaidName?: string;
/**
* 是否缴纳雇主险
*/
hasEmployerInsurancePaid?: string;
hasEmployerInsurancePaidName?: string;
/** /**
* 试用期(月数) * 试用期(月数)
...@@ -329,20 +341,69 @@ export namespace EmployeeInfoApi { ...@@ -329,20 +341,69 @@ export namespace EmployeeInfoApi {
* 介绍人 * 介绍人
*/ */
introducer?: string; introducer?: string;
/**
* 介绍人关系
*/
introducerRelation?: string;
/** /**
* 工资发放地 * 工资发放地
*/ */
salaryLocation?: string; salaryLocation?: string;
/**
* 编制所在地
*/
staffingLocation?: string;
/**
* 成本费用所属(写部门)
*/
costOfDept?: string;
/**
* 成本费用细分
*/
costType?: string;
costTypeName?: string;
/** /**
* 绩效比例 * 绩效比例
*/ */
performanceRatio?: string; performanceRatio?: string;
/**
* 工装(某年某月发放价值多少钱的工装)
*/
workwearDetail?: string;
/**
* 内部购房优惠(是,否)
*/
internalPurchaseDiscounts?: string;
internalPurchaseDiscountsName?: string;
/**
* 安泰业主(是,否)
*/
antaiHomeowners?: string;
antaiHomeownersName?: string;
/**
* 安泰小区信息
*/
antaiCommunityInfo?: string;
/** /**
* 离职类型 * 离职类型
*/ */
resignationType?: string; resignationType?: string;
resignationTypeName?: string; resignationTypeName?: string;
/**
* 离职类别
*/
resignationCategory?: string;
resignationCategoryName?: string;
/** /**
* 离职时间 * 离职时间
*/ */
...@@ -444,11 +505,32 @@ export namespace EmployeeInfoApi { ...@@ -444,11 +505,32 @@ export namespace EmployeeInfoApi {
* 部门ID * 部门ID
*/ */
deptId?: number; deptId?: number;
/** /**
* 原先部门 * 原先部门
*/ */
oldDeptName?: string; oldDeptName?: string;
/**
* 编制所在地
*/
staffingLocation?: string;
/**
* 成本费用所属(写部门)
*/
costOfDept?: string;
/**
* 成本费用细分
*/
costType?: string;
/**
* 绩效比例
*/
performanceRatio?: string;
/**
* 内部个人履历
*/
internalResume?: string;
} }
export interface EmployeeResignApplyBo extends EmployeeApplyBaseBo { export interface EmployeeResignApplyBo extends EmployeeApplyBaseBo {
...@@ -459,11 +541,15 @@ export namespace EmployeeInfoApi { ...@@ -459,11 +541,15 @@ export namespace EmployeeInfoApi {
/** /**
* 离职时间 * 离职时间
*/ */
resignDate?: Date; resignationDate?: Date;
/**
* 离职类别
*/
resignationCategory?: string;
/** /**
* 离职原因 * 离职原因
*/ */
resignReason?: string; resignationReason?: string;
/** /**
* 最后结薪日 * 最后结薪日
*/ */
...@@ -502,6 +588,10 @@ export namespace EmployeeInfoApi { ...@@ -502,6 +588,10 @@ export namespace EmployeeInfoApi {
* 是否缴纳公积金 * 是否缴纳公积金
*/ */
hasProvidentFundPaid?: string; hasProvidentFundPaid?: string;
/**
* 是否缴纳雇主险
*/
hasEmployerInsurancePaid?: string;
/** /**
* 转正时间 * 转正时间
*/ */
......
...@@ -12,7 +12,7 @@ import { getVxePopupContainer } from '@vben/utils'; ...@@ -12,7 +12,7 @@ import { getVxePopupContainer } from '@vben/utils';
import { Button } from 'ant-design-vue'; import { Button } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form'; import { useVbenForm } from '#/adapter/form';
import { apiDetail } from '#/api/hr/employeeFlow'; import { apiDetail, initByEmployeeId } from '#/api/hr/employeeFlow';
import { applyRenewalContract } from '#/api/hr/employeeInfo'; import { applyRenewalContract } from '#/api/hr/employeeInfo';
import { getDictOptions } from '#/utils/dict'; import { getDictOptions } from '#/utils/dict';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
...@@ -77,6 +77,38 @@ const formSchema: VbenFormSchema[] = [ ...@@ -77,6 +77,38 @@ const formSchema: VbenFormSchema[] = [
label: '合同形式', label: '合同形式',
rules: 'required', rules: 'required',
}, },
{
component: 'Checkbox',
fieldName: 'indefiniteTerm',
label: '',
renderComponentContent: () => {
return {
default: () => ['无固定期限'],
};
},
},
{
component: 'Input',
fieldName: 'contractTerm',
dependencies: {
disabled(values) {
return !!values.indefiniteTerm;
},
rules(values) {
if (!values.indefiniteTerm) {
return 'required';
}
return null;
},
trigger(values, form) {
if (values.indefiniteTerm) {
form.setFieldValue('contractTerm', null, false);
}
},
triggerFields: ['indefiniteTerm'],
},
label: '劳动合同期限',
},
{ {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
...@@ -95,38 +127,50 @@ const formSchema: VbenFormSchema[] = [ ...@@ -95,38 +127,50 @@ const formSchema: VbenFormSchema[] = [
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
getVxePopupContainer, getVxePopupContainer,
}, },
dependencies: {
disabled(values) {
return !!values.indefiniteTerm;
},
rules(values) {
if (!values.indefiniteTerm) {
return 'required';
}
return null;
},
trigger(values, form) {
if (values.indefiniteTerm) {
form.setFieldValue('contractEndDate', null, false);
}
},
triggerFields: ['indefiniteTerm'],
},
fieldName: 'contractEndDate', fieldName: 'contractEndDate',
label: '合同截止时间', label: '合同截止时间',
},
{
component: 'Input',
fieldName: 'contractEntity',
label: '合同主体',
rules: 'required', rules: 'required',
}, },
// {
// component: 'Input',
// fieldName: 'contractEntity',
// label: '合同主体',
// rules: 'required',
// },
{ {
component: 'Textarea', component: 'Textarea',
// componentProps: {
// buttonStyle: 'solid',
// optionType: 'button',
// },
fieldName: 'contractSigningStatus', fieldName: 'contractSigningStatus',
label: '合同签订情况', label: '合同签订情况',
rules: 'required', rules: 'required',
}, },
// { {
// component: 'Input', component: 'Input',
// fieldName: 'dictType', fieldName: 'socialSecurityEntity',
// label: '字典类型', label: '社保主体',
// rules: 'required', // rules: 'required',
// }, },
// { {
// component: 'Input', component: 'Input',
// fieldName: 'description', fieldName: 'providentFundEntity',
// label: '描述', label: '公积金主体',
// rules: 'required', // rules: 'required',
// }, },
{ {
component: 'Textarea', component: 'Textarea',
fieldName: 'remark', fieldName: 'remark',
...@@ -161,6 +205,7 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -161,6 +205,7 @@ const [BasicModal, modalApi] = useVbenModal({
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
onConfirm: onSubmit, onConfirm: onSubmit,
confirmText: '提交申请',
onOpenChange: async (isOpen) => { onOpenChange: async (isOpen) => {
if (!isOpen) { if (!isOpen) {
return null; return null;
...@@ -176,6 +221,8 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -176,6 +221,8 @@ const [BasicModal, modalApi] = useVbenModal({
updateForm(isUpdate.value); updateForm(isUpdate.value);
data = await apiDetail(data.id); data = await apiDetail(data.id);
updateDataInfo(data); updateDataInfo(data);
} else {
data = await initByEmployeeId('3', data.employeeId!);
} }
await formApi.setValues(data); await formApi.setValues(data);
await markInitialized(); await markInitialized();
......
...@@ -15,6 +15,8 @@ export const HrDictEnum = { ...@@ -15,6 +15,8 @@ export const HrDictEnum = {
HR_RESIGNATION_TYPE: 'hr_resignation_type', // 员工离职类型 HR_RESIGNATION_TYPE: 'hr_resignation_type', // 员工离职类型
HR_RESIGN_YEARS_OF_SERVICE_TYPE: 'hr_resign_years_of_service_type', // 员工离职类型 HR_RESIGN_YEARS_OF_SERVICE_TYPE: 'hr_resign_years_of_service_type', // 员工离职类型
HR_CHANGE_LOG_TYPE: 'hr_change_log_type', // 员工离职类型 HR_CHANGE_LOG_TYPE: 'hr_change_log_type', // 员工离职类型
HR_RESIGNATION_CATEGORY: 'hr_resignation_category', // 员工离职类别
HR_COST_TYPE: 'hr_cost_type', // 员工成本费用细分
// SYS_JOB_TYPE: 'sys_job_type', // 定时任务类型 // SYS_JOB_TYPE: 'sys_job_type', // 定时任务类型
// SYS_JOB_STATUS: 'sys_job_status', // 定时任务状态 // SYS_JOB_STATUS: 'sys_job_status', // 定时任务状态
// SYS_OSS_ACCESS_POLICY: 'oss_access_policy', // oss权限桶类型 // SYS_OSS_ACCESS_POLICY: 'oss_access_policy', // oss权限桶类型
......
...@@ -67,11 +67,10 @@ const formSchema: VbenFormSchema[] = [ ...@@ -67,11 +67,10 @@ const formSchema: VbenFormSchema[] = [
disabled: true, disabled: true,
}, },
{ {
component: 'RadioGroup', component: 'Select',
componentProps: { componentProps: {
buttonStyle: 'solid',
optionType: 'button',
options: getDictOptions(HrDictEnum.HR_RESIGNATION_TYPE), options: getDictOptions(HrDictEnum.HR_RESIGNATION_TYPE),
getVxePopupContainer,
}, },
fieldName: 'resignationType', fieldName: 'resignationType',
defaultValue: '1', defaultValue: '1',
...@@ -85,13 +84,23 @@ const formSchema: VbenFormSchema[] = [ ...@@ -85,13 +84,23 @@ const formSchema: VbenFormSchema[] = [
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
getVxePopupContainer, getVxePopupContainer,
}, },
fieldName: 'resignDate', fieldName: 'resignationDate',
label: '离职日期', label: '离职日期',
rules: 'required', rules: 'required',
}, },
{
component: 'Select',
componentProps: {
options: getDictOptions(HrDictEnum.HR_RESIGNATION_CATEGORY),
getVxePopupContainer,
},
fieldName: 'resignationCategory',
label: '离职类别',
rules: 'required',
},
{ {
component: 'Input', component: 'Input',
fieldName: 'resignReason', fieldName: 'resignationReason',
label: '离职原因', label: '离职原因',
// rules: 'required', // rules: 'required',
}, },
...@@ -146,6 +155,7 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -146,6 +155,7 @@ const [BasicModal, modalApi] = useVbenModal({
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
onConfirm: onSubmit, onConfirm: onSubmit,
confirmText: '提交申请',
onOpenChange: async (isOpen) => { onOpenChange: async (isOpen) => {
if (!isOpen) { if (!isOpen) {
return null; return null;
...@@ -160,7 +170,7 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -160,7 +170,7 @@ const [BasicModal, modalApi] = useVbenModal({
if (isUpdate.value && data.id) { if (isUpdate.value && data.id) {
updateForm(isUpdate.value); updateForm(isUpdate.value);
data = await apiDetail(data.id); data = await apiDetail(data.id);
updateDataInfo(data, mapDict); updateDataInfo(data);
} }
await formApi.setValues(data); await formApi.setValues(data);
await markInitialized(); await markInitialized();
...@@ -178,12 +188,6 @@ const { handleTempSave, onSubmitFunc, updateDataInfo, updateForm } = ...@@ -178,12 +188,6 @@ const { handleTempSave, onSubmitFunc, updateDataInfo, updateForm } =
function onSubmit() { function onSubmit() {
onSubmitFunc(applyModalApi.value); onSubmitFunc(applyModalApi.value);
} }
const mapDict: Record<string, string> = {
resignationType: 'resignationType',
resignationDate: 'resignDate',
resignationReason: 'resignReason',
finalPayDate: 'finalPayDate',
};
// function updateDataInfo(data: EmployeeInfoApi.EmployeeApplyBaseBo) { // function updateDataInfo(data: EmployeeInfoApi.EmployeeApplyBaseBo) {
// if (data.auditLogList && data.auditLogList.length > 0) { // if (data.auditLogList && data.auditLogList.length > 0) {
// data.auditLogList.map((t) => { // data.auditLogList.map((t) => {
......
...@@ -13,10 +13,12 @@ import { Button } from 'ant-design-vue'; ...@@ -13,10 +13,12 @@ import { Button } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form'; import { useVbenForm } from '#/adapter/form';
import { treeList } from '#/api/auth/dept'; import { treeList } from '#/api/auth/dept';
import { apiDetail } from '#/api/hr/employeeFlow'; import { apiDetail, initByEmployeeId } from '#/api/hr/employeeFlow';
import { applyTransfer } from '#/api/hr/employeeInfo'; import { applyTransfer } from '#/api/hr/employeeInfo';
import { getDictOptions } from '#/utils/dict';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
import { HrDictEnum } from '../dict-enum';
import { useHrFlowHook } from '../useHrFlowHook'; import { useHrFlowHook } from '../useHrFlowHook';
const emit = defineEmits<{ const emit = defineEmits<{
...@@ -116,6 +118,39 @@ const formSchema: VbenFormSchema[] = [ ...@@ -116,6 +118,39 @@ const formSchema: VbenFormSchema[] = [
label: '调配时间', label: '调配时间',
rules: 'required', rules: 'required',
}, },
{
component: 'Input',
fieldName: 'performanceRatio',
label: '绩效比例',
// rules: 'required',
},
{
component: 'Input',
fieldName: 'staffingLocation',
label: '编制所在地',
// rules: 'required',
},
{
component: 'Input',
fieldName: 'costOfDept',
label: '成本费用所属',
// rules: 'required',
},
{
component: 'Select',
componentProps: {
options: getDictOptions(HrDictEnum.HR_COST_TYPE),
},
fieldName: 'costType',
label: '成本费用细分',
// rules: 'required',
},
{
component: 'Textarea',
fieldName: 'internalResume',
label: '内部个人履历',
// rules: 'required',
},
// { // {
// component: 'Select', // component: 'Select',
// componentProps: { // componentProps: {
...@@ -166,6 +201,7 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -166,6 +201,7 @@ const [BasicModal, modalApi] = useVbenModal({
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
onConfirm: onSubmit, onConfirm: onSubmit,
confirmText: '提交申请',
onOpenChange: async (isOpen) => { onOpenChange: async (isOpen) => {
if (!isOpen) { if (!isOpen) {
return null; return null;
...@@ -182,6 +218,8 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -182,6 +218,8 @@ const [BasicModal, modalApi] = useVbenModal({
data = await apiDetail(data.id); data = await apiDetail(data.id);
data.oldDeptName = data.deptName; data.oldDeptName = data.deptName;
updateDataInfo(data); updateDataInfo(data);
} else {
data = await initByEmployeeId('5', data.employeeId!);
} }
await formApi.setValues(data); await formApi.setValues(data);
await markInitialized(); await markInitialized();
......
...@@ -102,20 +102,23 @@ async function handleOpenChange(open: boolean) { ...@@ -102,20 +102,23 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="序列"> <DescriptionsItem label="序列">
{{ currentEmployee.sequenceName }} {{ currentEmployee.sequenceName }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="兼板块"> <DescriptionsItem label="兼板块">
{{ currentEmployee.partTimePlate }} {{ currentEmployee.concurrentPlate }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="兼一级部门"> <DescriptionsItem label="兼一级部门">
{{ currentEmployee.partTimeFirstDept }} {{ currentEmployee.concurrentFirstDept }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="兼二级部门"> <DescriptionsItem label="兼二级部门">
{{ currentEmployee.partTimeSecondDept }} {{ currentEmployee.concurrentSecondDept }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="兼三级部门"> <DescriptionsItem label="兼三级部门">
{{ currentEmployee.partTimeThirdDept }} {{ currentEmployee.concurrentThirdDept }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="兼职岗位"> <DescriptionsItem label="兼岗岗位">
{{ currentEmployee.partTimePosition }} {{ currentEmployee.concurrentPosition }}
</DescriptionsItem>
<DescriptionsItem label="兼岗岗位类型">
{{ currentEmployee.concurrentPositionTypeName }}
</DescriptionsItem> </DescriptionsItem>
</Descriptions> </Descriptions>
<Descriptions <Descriptions
...@@ -342,6 +345,9 @@ async function handleOpenChange(open: boolean) { ...@@ -342,6 +345,9 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="是否缴纳公积金"> <DescriptionsItem label="是否缴纳公积金">
{{ currentEmployee.hasProvidentFundPaidName }} {{ currentEmployee.hasProvidentFundPaidName }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="是否缴纳雇主险">
{{ currentEmployee.hasEmployerInsurancePaid }}
</DescriptionsItem>
<DescriptionsItem label="试用期"> <DescriptionsItem label="试用期">
{{ currentEmployee.probationPeriod }} {{ currentEmployee.probationPeriod }}
</DescriptionsItem> </DescriptionsItem>
...@@ -383,9 +389,33 @@ async function handleOpenChange(open: boolean) { ...@@ -383,9 +389,33 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem label="介绍人"> <DescriptionsItem label="介绍人">
{{ currentEmployee.introducer }} {{ currentEmployee.introducer }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="介绍人关系">
{{ currentEmployee.introducerRelation }}
</DescriptionsItem>
<DescriptionsItem label="工资发放地"> <DescriptionsItem label="工资发放地">
{{ currentEmployee.salaryLocation }} {{ currentEmployee.salaryLocation }}
</DescriptionsItem> </DescriptionsItem>
<DescriptionsItem label="编制所在地">
{{ currentEmployee.staffingLocation }}
</DescriptionsItem>
<DescriptionsItem label="成本费用所属">
{{ currentEmployee.costOfDept }}
</DescriptionsItem>
<DescriptionsItem label="成本费用细分">
{{ currentEmployee.costTypeName }}
</DescriptionsItem>
<DescriptionsItem label="工装">
{{ currentEmployee.workwearDetail }}
</DescriptionsItem>
<DescriptionsItem label="内部购房优惠">
{{ currentEmployee.internalPurchaseDiscountsName }}
</DescriptionsItem>
<DescriptionsItem label="安泰业主">
{{ currentEmployee.antaiHomeownersName }}
</DescriptionsItem>
<DescriptionsItem label="小区具体信息">
{{ currentEmployee.antaiCommunityInfo }}
</DescriptionsItem>
<DescriptionsItem label="绩效比例" :span="2"> <DescriptionsItem label="绩效比例" :span="2">
{{ currentEmployee.performanceRatio }} {{ currentEmployee.performanceRatio }}
</DescriptionsItem> </DescriptionsItem>
......
...@@ -115,15 +115,25 @@ const formSchema: VbenFormSchema[] = [ ...@@ -115,15 +115,25 @@ const formSchema: VbenFormSchema[] = [
component: 'TreeSelect', component: 'TreeSelect',
// 在onOpenChange里更新 这里不需要默认的componentProps // 在onOpenChange里更新 这里不需要默认的componentProps
defaultValue: undefined, defaultValue: undefined,
fieldName: 'partDeptId', fieldName: 'concurrentDeptId',
label: '兼部门', label: '兼部门',
}, },
{ {
component: 'Input', component: 'Input',
fieldName: 'partTimePosition', fieldName: 'concurrentPosition',
label: '兼岗位', label: '兼岗位',
// rules: 'required', // rules: 'required',
}, },
{
component: 'Select',
componentProps: {
getVxePopupContainer,
options: getDictOptions(HrDictEnum.HR_POSITION_TYPE),
},
fieldName: 'concurrentPositionType',
label: '兼岗岗位类型',
// rules: 'selectRequired',
},
{ {
component: 'Divider', component: 'Divider',
componentProps: { componentProps: {
...@@ -572,6 +582,17 @@ const formSchema: VbenFormSchema[] = [ ...@@ -572,6 +582,17 @@ const formSchema: VbenFormSchema[] = [
label: '是否缴纳公积金', label: '是否缴纳公积金',
// rules: 'required', // rules: 'required',
}, },
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
options: getDictOptions(DictEnum.SYS_YES_NO),
},
fieldName: 'hasEmployerInsurancePaid',
label: '是否缴纳雇主险',
// rules: 'required',
},
{ {
component: 'InputNumber', component: 'InputNumber',
fieldName: 'probationPeriod', fieldName: 'probationPeriod',
...@@ -666,6 +687,12 @@ const formSchema: VbenFormSchema[] = [ ...@@ -666,6 +687,12 @@ const formSchema: VbenFormSchema[] = [
label: '介绍人', label: '介绍人',
// rules: 'required', // rules: 'required',
}, },
{
component: 'Input',
fieldName: 'introducerRelation',
label: '介绍人关系',
// rules: 'required',
},
{ {
component: 'Input', component: 'Input',
fieldName: 'salaryLocation', fieldName: 'salaryLocation',
...@@ -678,6 +705,61 @@ const formSchema: VbenFormSchema[] = [ ...@@ -678,6 +705,61 @@ const formSchema: VbenFormSchema[] = [
label: '绩效比例', label: '绩效比例',
// rules: 'required', // rules: 'required',
}, },
{
component: 'Input',
fieldName: 'staffingLocation',
label: '编制所在地',
// rules: 'required',
},
{
component: 'Input',
fieldName: 'costOfDept',
label: '成本费用所属',
// rules: 'required',
},
{
component: 'Select',
componentProps: {
options: getDictOptions(HrDictEnum.HR_COST_TYPE),
},
fieldName: 'costType',
label: '成本费用细分',
// rules: 'required',
},
{
component: 'Input',
fieldName: 'workwearDetail',
label: '工装',
// rules: 'required',
},
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
options: getDictOptions(DictEnum.SYS_YES_NO),
},
fieldName: 'internalPurchaseDiscounts',
label: '内部购房优惠',
// rules: 'required',
},
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
options: getDictOptions(DictEnum.SYS_YES_NO),
},
fieldName: 'antaiHomeowners',
label: '安泰业主',
// rules: 'required',
},
{
component: 'Input',
fieldName: 'antaiCommunityInfo',
label: '小区具体信息',
// rules: 'required',
},
// { // {
// component: 'DatePicker', // component: 'DatePicker',
// fieldName: 'resignationDate', // fieldName: 'resignationDate',
...@@ -753,10 +835,10 @@ async function setupDeptSelect() { ...@@ -753,10 +835,10 @@ async function setupDeptSelect() {
.map((item: string) => item.trim()) .map((item: string) => item.trim())
.filter(Boolean); .filter(Boolean);
/** 变化后需要重新设置部门信息 */ /** 变化后需要重新设置部门信息 */
formModel.partTimePlate = result[0]; formModel.concurrentPlate = result[0];
formModel.partTimeFirstDept = result[1]; formModel.concurrentFirstDept = result[1];
formModel.partTimeSecondDept = result[2]; formModel.concurrentSecondDept = result[2];
formModel.partTimeThirdDept = result[3]; formModel.concurrentThirdDept = result[3];
}, },
class: 'w-full', class: 'w-full',
treeLine: { showLeafIcon: false }, treeLine: { showLeafIcon: false },
...@@ -773,7 +855,7 @@ async function setupDeptSelect() { ...@@ -773,7 +855,7 @@ async function setupDeptSelect() {
valueField: 'id', valueField: 'id',
childrenField: 'children', childrenField: 'children',
}), }),
fieldName: 'partDeptId', fieldName: 'concurrentDeptId',
}, },
]); ]);
} }
......
...@@ -13,7 +13,7 @@ import { getVxePopupContainer } from '@vben/utils'; ...@@ -13,7 +13,7 @@ import { getVxePopupContainer } from '@vben/utils';
import { Button } from 'ant-design-vue'; import { Button } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form'; import { useVbenForm } from '#/adapter/form';
import { apiDetail } from '#/api/hr/employeeFlow'; import { apiDetail, initByEmployeeId } from '#/api/hr/employeeFlow';
import { applyRegular } from '#/api/hr/employeeInfo'; import { applyRegular } from '#/api/hr/employeeInfo';
import { getDictOptions } from '#/utils/dict'; import { getDictOptions } from '#/utils/dict';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
...@@ -66,44 +66,44 @@ const formSchema: VbenFormSchema[] = [ ...@@ -66,44 +66,44 @@ const formSchema: VbenFormSchema[] = [
label: '部门', label: '部门',
disabled: true, disabled: true,
}, },
{ // {
component: 'DatePicker', // component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
getVxePopupContainer,
},
fieldName: 'contractStartDate',
label: '合同开始时间',
rules: 'required',
},
{
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
getVxePopupContainer,
},
fieldName: 'contractEndDate',
label: '合同截止时间',
rules: 'required',
},
{
component: 'Input',
fieldName: 'contractEntity',
label: '合同主体',
rules: 'required',
},
{
component: 'Input',
// componentProps: { // componentProps: {
// buttonStyle: 'solid', // format: 'YYYY-MM-DD',
// optionType: 'button', // valueFormat: 'YYYY-MM-DD',
// getVxePopupContainer,
// },
// fieldName: 'contractStartDate',
// label: '合同开始时间',
// rules: 'required',
// },
// {
// component: 'DatePicker',
// componentProps: {
// format: 'YYYY-MM-DD',
// valueFormat: 'YYYY-MM-DD',
// getVxePopupContainer,
// },
// fieldName: 'contractEndDate',
// label: '合同截止时间',
// rules: 'required',
// },
// {
// component: 'Input',
// fieldName: 'contractEntity',
// label: '合同主体',
// rules: 'required',
// },
// {
// component: 'Input',
// // componentProps: {
// // buttonStyle: 'solid',
// // optionType: 'button',
// // },
// fieldName: 'contractSigningStatus',
// label: '合同签订情况',
// rules: 'required',
// }, // },
fieldName: 'contractSigningStatus',
label: '合同签订情况',
rules: 'required',
},
{ {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
...@@ -149,6 +149,17 @@ const formSchema: VbenFormSchema[] = [ ...@@ -149,6 +149,17 @@ const formSchema: VbenFormSchema[] = [
label: '是否缴纳公积金', label: '是否缴纳公积金',
// rules: 'required', // rules: 'required',
}, },
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
options: getDictOptions(DictEnum.SYS_YES_NO),
},
fieldName: 'hasEmployerInsurancePaid',
label: '是否缴纳雇主险',
// rules: 'required',
},
// { // {
// component: 'Input', // component: 'Input',
// fieldName: 'dictType', // fieldName: 'dictType',
...@@ -195,6 +206,7 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -195,6 +206,7 @@ const [BasicModal, modalApi] = useVbenModal({
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
onConfirm: onSubmit, onConfirm: onSubmit,
confirmText: '提交申请',
onOpenChange: async (isOpen) => { onOpenChange: async (isOpen) => {
if (!isOpen) { if (!isOpen) {
return null; return null;
...@@ -210,6 +222,8 @@ const [BasicModal, modalApi] = useVbenModal({ ...@@ -210,6 +222,8 @@ const [BasicModal, modalApi] = useVbenModal({
updateForm(isUpdate.value); updateForm(isUpdate.value);
data = await apiDetail(data.id); data = await apiDetail(data.id);
updateDataInfo(data); updateDataInfo(data);
} else {
data = await initByEmployeeId('4', data.employeeId!);
} }
await formApi.setValues(data); await formApi.setValues(data);
await markInitialized(); await markInitialized();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment