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

fix: 251203版本修改

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