入职离职初步完成
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.web.controller.oa;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/heartBeat")
|
||||
public class HeartBeatController {
|
||||
|
||||
@GetMapping
|
||||
public String heartBeat() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ ruoyi:
|
||||
# 缓存懒加载
|
||||
cacheLazy: false
|
||||
# 文件路径
|
||||
profile: /home/wy/oa/uploadPath
|
||||
profile: /home/wangyu/oa/uploadPath
|
||||
|
||||
captcha:
|
||||
# 页面 <参数设置> 可开启关闭 验证码校验
|
||||
|
||||
@@ -43,7 +43,7 @@ public class RuoYiConfig {
|
||||
|
||||
/** 上传路径 */
|
||||
@Getter
|
||||
private static String profile = "/home/wy/oa/uploadPath";
|
||||
private static String profile = "/home/wangyu/oa/uploadPath";
|
||||
|
||||
/**
|
||||
* 获取地址开关
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.framework.config;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.framework.interceptor.PlusWebInvokeTimeInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -26,6 +28,9 @@ public class ResourcesConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
/** 本地文件上传路径 */
|
||||
registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**")
|
||||
.addResourceLocations("file:" + RuoYiConfig.getProfile() + "/");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOffboardingVo;
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOffboardingBo;
|
||||
import com.ruoyi.oa.service.IEmployeeOffboardingService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 离职管理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/offboarding")
|
||||
public class EmployeeOffboardingController extends BaseController {
|
||||
|
||||
private final IEmployeeOffboardingService iEmployeeOffboardingService;
|
||||
|
||||
/**
|
||||
* 查询离职管理列表
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EmployeeOffboardingVo> list(EmployeeOffboardingBo bo, PageQuery pageQuery) {
|
||||
return iEmployeeOffboardingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出离职管理列表
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:export")
|
||||
@Log(title = "离职管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EmployeeOffboardingBo bo, HttpServletResponse response) {
|
||||
List<EmployeeOffboardingVo> list = iEmployeeOffboardingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "离职管理", EmployeeOffboardingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取离职管理详细信息
|
||||
*
|
||||
* @param offboardingId 主键
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:query")
|
||||
@GetMapping("/{offboardingId}")
|
||||
public R<EmployeeOffboardingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long offboardingId) {
|
||||
return R.ok(iEmployeeOffboardingService.queryById(offboardingId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增离职管理
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:add")
|
||||
@Log(title = "离职管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EmployeeOffboardingBo bo) {
|
||||
return toAjax(iEmployeeOffboardingService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改离职管理
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:edit")
|
||||
@Log(title = "离职管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EmployeeOffboardingBo bo) {
|
||||
return toAjax(iEmployeeOffboardingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除离职管理
|
||||
*
|
||||
* @param offboardingIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:offboarding:remove")
|
||||
@Log(title = "离职管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{offboardingIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] offboardingIds) {
|
||||
return toAjax(iEmployeeOffboardingService.deleteWithValidByIds(Arrays.asList(offboardingIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.oa.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOnboardingBo;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo;
|
||||
import com.ruoyi.oa.service.IEmployeeOnboardingService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入职管理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/system/onboarding")
|
||||
public class EmployeeOnboardingController extends BaseController {
|
||||
|
||||
private final IEmployeeOnboardingService iEmployeeOnboardingService;
|
||||
|
||||
/**
|
||||
* 查询入职管理列表
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EmployeeOnboardingVo> list(EmployeeOnboardingBo bo, PageQuery pageQuery) {
|
||||
return iEmployeeOnboardingService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入职管理列表
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:export")
|
||||
@Log(title = "入职管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EmployeeOnboardingBo bo, HttpServletResponse response) {
|
||||
List<EmployeeOnboardingVo> list = iEmployeeOnboardingService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "入职管理", EmployeeOnboardingVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入职管理详细信息
|
||||
*
|
||||
* @param onboardingId 主键
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:query")
|
||||
@GetMapping("/{onboardingId}")
|
||||
public R<EmployeeOnboardingVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long onboardingId) {
|
||||
return R.ok(iEmployeeOnboardingService.queryById(onboardingId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入职管理
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:add")
|
||||
@Log(title = "入职管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EmployeeOnboardingBo bo) {
|
||||
return toAjax(iEmployeeOnboardingService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入职管理
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:edit")
|
||||
@Log(title = "入职管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EmployeeOnboardingBo bo) {
|
||||
return toAjax(iEmployeeOnboardingService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入职管理
|
||||
*
|
||||
* @param onboardingIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:onboarding:remove")
|
||||
@Log(title = "入职管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{onboardingIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] onboardingIds) {
|
||||
return toAjax(iEmployeeOnboardingService.deleteWithValidByIds(Arrays.asList(onboardingIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 离职管理对象 employee_offboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("employee_offboarding")
|
||||
public class EmployeeOffboarding extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 离职记录ID
|
||||
*/
|
||||
@TableId(value = "offboarding_id")
|
||||
private Long offboardingId;
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 离职日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date resignationDate;
|
||||
/**
|
||||
* 离职面谈
|
||||
*/
|
||||
private Integer exitInterview;
|
||||
/**
|
||||
* 工作交接
|
||||
*/
|
||||
private Integer handoverCompleted;
|
||||
/**
|
||||
* 离职原因
|
||||
*/
|
||||
private String exitReason;
|
||||
/**
|
||||
* 最终结算工资
|
||||
*/
|
||||
private BigDecimal finalSalary;
|
||||
/**
|
||||
* 离职申请
|
||||
*/
|
||||
private Integer resignationApplicationSubmitted;
|
||||
/**
|
||||
* 数据备份
|
||||
*/
|
||||
private Integer dataBackupCompleted;
|
||||
/**
|
||||
* 是否已安排工作交接
|
||||
*/
|
||||
private Integer handoverArranged;
|
||||
/**
|
||||
* 薪资结算是否完成
|
||||
*/
|
||||
private Integer salarySettled;
|
||||
/**
|
||||
* 福利结算是否完成
|
||||
*/
|
||||
private Integer benefitsSettled;
|
||||
/**
|
||||
* 离职证明
|
||||
*/
|
||||
private Integer exitCertificateIssued;
|
||||
/**
|
||||
* 确认离职
|
||||
*/
|
||||
private Integer offboardingConfirmed;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.ruoyi.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入职管理对象 employee_onboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("employee_onboarding")
|
||||
public class EmployeeOnboarding extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 入职记录ID
|
||||
*/
|
||||
@TableId(value = "onboarding_id")
|
||||
private Long onboardingId;
|
||||
/**
|
||||
* 证件照
|
||||
*/
|
||||
private String idPhoto;
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
private Date joiningDate;
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 直属经理ID
|
||||
*/
|
||||
private Long managerId;
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
private Integer documentsSubmitted;
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer orientationCompleted;
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
private Long joiningStatus;
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
private Integer recruitmentCompleted;
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
private Integer offerIssued;
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
private Integer contractSigned;
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
private Integer materialsPrepared;
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer trainingCompleted;
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
private Integer workConditionsPrepared;
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
private String highestDegree;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标识
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private Date birthDate;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String ethnicity;
|
||||
/**
|
||||
* 转正日期
|
||||
*/
|
||||
private Date confirmDate;
|
||||
/**
|
||||
* 婚姻状态
|
||||
*/
|
||||
private String maritalStatus;
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private String politicalStatus;
|
||||
/**
|
||||
* 身高
|
||||
*/
|
||||
private Long height;
|
||||
/**
|
||||
* 体重
|
||||
*/
|
||||
private Long weight;
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
private String staffType;
|
||||
/**
|
||||
* 紧急联系人1
|
||||
*/
|
||||
private String emergencyContact1;
|
||||
/**
|
||||
* 紧急联系人2
|
||||
*/
|
||||
private String emergencyContact2;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 离职管理业务对象 employee_offboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EmployeeOffboardingBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 离职记录ID
|
||||
*/
|
||||
private Long offboardingId;
|
||||
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 离职日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date resignationDate;
|
||||
|
||||
/**
|
||||
* 离职面谈
|
||||
*/
|
||||
private Integer exitInterview;
|
||||
|
||||
/**
|
||||
* 工作交接
|
||||
*/
|
||||
private Integer handoverCompleted;
|
||||
|
||||
/**
|
||||
* 离职原因
|
||||
*/
|
||||
private String exitReason;
|
||||
|
||||
/**
|
||||
* 最终结算工资
|
||||
*/
|
||||
private BigDecimal finalSalary;
|
||||
|
||||
/**
|
||||
* 离职申请
|
||||
*/
|
||||
private Integer resignationApplicationSubmitted;
|
||||
|
||||
/**
|
||||
* 数据备份
|
||||
*/
|
||||
private Integer dataBackupCompleted;
|
||||
|
||||
/**
|
||||
* 是否已安排工作交接
|
||||
*/
|
||||
private Integer handoverArranged;
|
||||
|
||||
/**
|
||||
* 薪资结算是否完成
|
||||
*/
|
||||
private Integer salarySettled;
|
||||
|
||||
/**
|
||||
* 福利结算是否完成
|
||||
*/
|
||||
private Integer benefitsSettled;
|
||||
|
||||
/**
|
||||
* 离职证明
|
||||
*/
|
||||
private Integer exitCertificateIssued;
|
||||
|
||||
/**
|
||||
* 确认离职
|
||||
*/
|
||||
private Integer offboardingConfirmed;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package com.ruoyi.oa.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 入职管理业务对象 employee_onboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EmployeeOnboardingBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 入职记录ID
|
||||
*/
|
||||
private Long onboardingId;
|
||||
|
||||
/**
|
||||
* 证件照
|
||||
*/
|
||||
private String idPhoto;
|
||||
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date joiningDate;
|
||||
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
/**
|
||||
* 直属经理ID
|
||||
*/
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
private Integer documentsSubmitted;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer orientationCompleted;
|
||||
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Long joiningStatus;
|
||||
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
private Integer recruitmentCompleted;
|
||||
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
private Integer offerIssued;
|
||||
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
private Integer contractSigned;
|
||||
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
private Integer materialsPrepared;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
private Integer trainingCompleted;
|
||||
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
private Integer workConditionsPrepared;
|
||||
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
private String highestDegree;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String ethnicity;
|
||||
|
||||
/**
|
||||
* 转正日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date confirmDate;
|
||||
|
||||
/**
|
||||
* 婚姻状态
|
||||
*/
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 身高
|
||||
*/
|
||||
private Long height;
|
||||
|
||||
/**
|
||||
* 体重
|
||||
*/
|
||||
private Long weight;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
private String staffType;
|
||||
|
||||
/**
|
||||
* 紧急联系人1
|
||||
*/
|
||||
private String emergencyContact1;
|
||||
|
||||
/**
|
||||
* 紧急联系人2
|
||||
*/
|
||||
private String emergencyContact2;
|
||||
|
||||
private String address;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 离职管理视图对象 employee_offboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EmployeeOffboardingVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 离职记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "离职记录ID")
|
||||
private Long offboardingId;
|
||||
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID (外键)")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 离职日期
|
||||
*/
|
||||
@ExcelProperty(value = "离职日期")
|
||||
private Date resignationDate;
|
||||
|
||||
/**
|
||||
* 离职面谈
|
||||
*/
|
||||
@ExcelProperty(value = "离职面谈")
|
||||
private Integer exitInterview;
|
||||
|
||||
/**
|
||||
* 工作交接
|
||||
*/
|
||||
@ExcelProperty(value = "工作交接")
|
||||
private Integer handoverCompleted;
|
||||
|
||||
/**
|
||||
* 离职原因
|
||||
*/
|
||||
@ExcelProperty(value = "离职原因")
|
||||
private String exitReason;
|
||||
|
||||
/**
|
||||
* 最终结算工资
|
||||
*/
|
||||
@ExcelProperty(value = "最终结算工资")
|
||||
private BigDecimal finalSalary;
|
||||
|
||||
/**
|
||||
* 离职申请
|
||||
*/
|
||||
@ExcelProperty(value = "离职申请")
|
||||
private Integer resignationApplicationSubmitted;
|
||||
|
||||
/**
|
||||
* 数据备份
|
||||
*/
|
||||
@ExcelProperty(value = "数据备份")
|
||||
private Integer dataBackupCompleted;
|
||||
|
||||
/**
|
||||
* 是否已安排工作交接
|
||||
*/
|
||||
@ExcelProperty(value = "是否已安排工作交接")
|
||||
private Integer handoverArranged;
|
||||
|
||||
/**
|
||||
* 薪资结算是否完成
|
||||
*/
|
||||
@ExcelProperty(value = "薪资结算是否完成")
|
||||
private Integer salarySettled;
|
||||
|
||||
/**
|
||||
* 福利结算是否完成
|
||||
*/
|
||||
@ExcelProperty(value = "福利结算是否完成")
|
||||
private Integer benefitsSettled;
|
||||
|
||||
/**
|
||||
* 离职证明
|
||||
*/
|
||||
@ExcelProperty(value = "离职证明")
|
||||
private Integer exitCertificateIssued;
|
||||
|
||||
/**
|
||||
* 确认离职
|
||||
*/
|
||||
@ExcelProperty(value = "确认离职")
|
||||
private Integer offboardingConfirmed;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
package com.ruoyi.oa.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import com.ruoyi.oa.domain.EmployeeOnboarding;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 入职管理视图对象 employee_onboarding
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EmployeeOnboardingVo extends EmployeeOnboarding {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 入职记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "入职记录ID")
|
||||
private Long onboardingId;
|
||||
|
||||
/**
|
||||
* 证件照
|
||||
*/
|
||||
@ExcelProperty(value = "证件照")
|
||||
private String idPhoto;
|
||||
|
||||
/**
|
||||
* 用户ID (外键)
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID (外键)")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
@ExcelProperty(value = "入职日期")
|
||||
private Date joiningDate;
|
||||
|
||||
/**
|
||||
* 试用期结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "试用期结束日期")
|
||||
private Date probationPeriodEnd;
|
||||
|
||||
/**
|
||||
* 直属经理ID
|
||||
*/
|
||||
@ExcelProperty(value = "直属经理ID")
|
||||
private Long managerId;
|
||||
|
||||
/**
|
||||
* 是否提交入职资料
|
||||
*/
|
||||
@ExcelProperty(value = "是否提交入职资料")
|
||||
private Integer documentsSubmitted;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成入职培训")
|
||||
private Integer orientationCompleted;
|
||||
|
||||
/**
|
||||
* 入职状态(pending,completed,onboarding)
|
||||
*/
|
||||
@ExcelProperty(value = "入职状态(pending,completed,onboarding)", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "joining_status")
|
||||
private Long joiningStatus;
|
||||
|
||||
/**
|
||||
* 是否完成招聘与面试
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成招聘与面试")
|
||||
private Integer recruitmentCompleted;
|
||||
|
||||
/**
|
||||
* 是否已发放Offer
|
||||
*/
|
||||
@ExcelProperty(value = "是否已发放Offer")
|
||||
private Integer offerIssued;
|
||||
|
||||
/**
|
||||
* 是否已签署合同
|
||||
*/
|
||||
@ExcelProperty(value = "是否已签署合同")
|
||||
private Integer contractSigned;
|
||||
|
||||
/**
|
||||
* 入职材料/工作准备是否完成
|
||||
*/
|
||||
@ExcelProperty(value = "入职材料/工作准备是否完成")
|
||||
private Integer materialsPrepared;
|
||||
|
||||
/**
|
||||
* 是否完成入职培训
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成入职培训")
|
||||
private Integer trainingCompleted;
|
||||
|
||||
/**
|
||||
* 是否完成工作条件准备(权限分配、工位等)
|
||||
*/
|
||||
@ExcelProperty(value = "是否完成工作条件准备", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "权=限分配、工位等")
|
||||
private Integer workConditionsPrepared;
|
||||
|
||||
/**
|
||||
* 最高学历
|
||||
*/
|
||||
@ExcelProperty(value = "最高学历")
|
||||
private String highestDegree;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@ExcelProperty(value = "出生日期")
|
||||
private Date birthDate;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ExcelProperty(value = "民族")
|
||||
private String ethnicity;
|
||||
|
||||
/**
|
||||
* 转正日期
|
||||
*/
|
||||
@ExcelProperty(value = "转正日期")
|
||||
private Date confirmDate;
|
||||
|
||||
/**
|
||||
* 婚姻状态
|
||||
*/
|
||||
@ExcelProperty(value = "婚姻状态")
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@ExcelProperty(value = "政治面貌")
|
||||
private String politicalStatus;
|
||||
|
||||
/**
|
||||
* 身高
|
||||
*/
|
||||
@ExcelProperty(value = "身高")
|
||||
private Long height;
|
||||
|
||||
/**
|
||||
* 体重
|
||||
*/
|
||||
@ExcelProperty(value = "体重")
|
||||
private Long weight;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
@ExcelProperty(value = "编制类型")
|
||||
private String staffType;
|
||||
|
||||
/**
|
||||
* 紧急联系人1
|
||||
*/
|
||||
@ExcelProperty(value = "紧急联系人1")
|
||||
private String emergencyContact1;
|
||||
|
||||
/**
|
||||
* 紧急联系人2
|
||||
*/
|
||||
@ExcelProperty(value = "紧急联系人2")
|
||||
private String emergencyContact2;
|
||||
|
||||
/** 用户名 */
|
||||
private String userName;
|
||||
|
||||
/** 名字 */
|
||||
private String nickName;
|
||||
|
||||
/** 手机号 */
|
||||
private String phonenumber;
|
||||
|
||||
/** 邮箱 */
|
||||
private String email;
|
||||
|
||||
/** 住址 */
|
||||
private String address;
|
||||
|
||||
/** 性别 */
|
||||
private Long sex;
|
||||
|
||||
/** 部门id */
|
||||
private Long deptId;
|
||||
|
||||
/** 身份证号 */
|
||||
private String idCard;
|
||||
|
||||
/** 银行卡号 */
|
||||
private String bankCard;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
import com.ruoyi.oa.domain.EmployeeOffboarding;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOffboardingVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 离职管理Mapper接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
public interface EmployeeOffboardingMapper extends BaseMapperPlus<EmployeeOffboardingMapper, EmployeeOffboarding, EmployeeOffboardingVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.oa.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.oa.domain.EmployeeOnboarding;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo;
|
||||
|
||||
/**
|
||||
* 入职管理Mapper接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
public interface EmployeeOnboardingMapper extends BaseMapperPlus<EmployeeOnboardingMapper, EmployeeOnboarding, EmployeeOnboardingVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
import com.ruoyi.oa.domain.EmployeeOffboarding;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOffboardingVo;
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOffboardingBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 离职管理Service接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
public interface IEmployeeOffboardingService {
|
||||
|
||||
/**
|
||||
* 查询离职管理
|
||||
*/
|
||||
EmployeeOffboardingVo queryById(Long offboardingId);
|
||||
|
||||
/**
|
||||
* 查询离职管理列表
|
||||
*/
|
||||
TableDataInfo<EmployeeOffboardingVo> queryPageList(EmployeeOffboardingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询离职管理列表
|
||||
*/
|
||||
List<EmployeeOffboardingVo> queryList(EmployeeOffboardingBo bo);
|
||||
|
||||
/**
|
||||
* 新增离职管理
|
||||
*/
|
||||
Boolean insertByBo(EmployeeOffboardingBo bo);
|
||||
|
||||
/**
|
||||
* 修改离职管理
|
||||
*/
|
||||
Boolean updateByBo(EmployeeOffboardingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除离职管理信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOnboardingBo;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入职管理Service接口
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
public interface IEmployeeOnboardingService {
|
||||
|
||||
/**
|
||||
* 查询入职管理
|
||||
*/
|
||||
EmployeeOnboardingVo queryById(Long onboardingId);
|
||||
|
||||
/**
|
||||
* 查询入职管理列表
|
||||
*/
|
||||
TableDataInfo<EmployeeOnboardingVo> queryPageList(EmployeeOnboardingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询入职管理列表
|
||||
*/
|
||||
List<EmployeeOnboardingVo> queryList(EmployeeOnboardingBo bo);
|
||||
|
||||
/**
|
||||
* 新增入职管理
|
||||
*/
|
||||
Boolean insertByBo(EmployeeOnboardingBo bo);
|
||||
|
||||
/**
|
||||
* 修改入职管理
|
||||
*/
|
||||
Boolean updateByBo(EmployeeOnboardingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除入职管理信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import liquibase.pro.packaged.A;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOffboardingBo;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOffboardingVo;
|
||||
import com.ruoyi.oa.domain.EmployeeOffboarding;
|
||||
import com.ruoyi.oa.mapper.EmployeeOffboardingMapper;
|
||||
import com.ruoyi.oa.service.IEmployeeOffboardingService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 离职管理Service业务层处理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-16
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EmployeeOffboardingServiceImpl implements IEmployeeOffboardingService {
|
||||
|
||||
private final EmployeeOffboardingMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询离职管理
|
||||
*/
|
||||
@Override
|
||||
public EmployeeOffboardingVo queryById(Long offboardingId){
|
||||
EmployeeOffboardingVo employeeOffboardingVo = baseMapper.selectVoById(offboardingId);
|
||||
SysUser sysUser = userService.selectUserByIdAndNotDelFlag(employeeOffboardingVo.getUserId());
|
||||
employeeOffboardingVo.setNickName(sysUser.getUserName());
|
||||
return employeeOffboardingVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询离职管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EmployeeOffboardingVo> queryPageList(EmployeeOffboardingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EmployeeOffboarding> lqw = buildQueryWrapper(bo);
|
||||
Page<EmployeeOffboardingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(item -> {
|
||||
SysUser sysUser = userService.selectUserByIdAndNotDelFlag(item.getUserId());
|
||||
item.setNickName(sysUser.getUserName());
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询离职管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<EmployeeOffboardingVo> queryList(EmployeeOffboardingBo bo) {
|
||||
LambdaQueryWrapper<EmployeeOffboarding> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EmployeeOffboarding> buildQueryWrapper(EmployeeOffboardingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EmployeeOffboarding> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getUserId() != null, EmployeeOffboarding::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getResignationDate() != null, EmployeeOffboarding::getResignationDate, bo.getResignationDate());
|
||||
lqw.eq(bo.getExitInterview() != null, EmployeeOffboarding::getExitInterview, bo.getExitInterview());
|
||||
lqw.eq(bo.getHandoverCompleted() != null, EmployeeOffboarding::getHandoverCompleted, bo.getHandoverCompleted());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getExitReason()), EmployeeOffboarding::getExitReason, bo.getExitReason());
|
||||
lqw.eq(bo.getFinalSalary() != null, EmployeeOffboarding::getFinalSalary, bo.getFinalSalary());
|
||||
lqw.eq(bo.getResignationApplicationSubmitted() != null, EmployeeOffboarding::getResignationApplicationSubmitted, bo.getResignationApplicationSubmitted());
|
||||
lqw.eq(bo.getDataBackupCompleted() != null, EmployeeOffboarding::getDataBackupCompleted, bo.getDataBackupCompleted());
|
||||
lqw.eq(bo.getHandoverArranged() != null, EmployeeOffboarding::getHandoverArranged, bo.getHandoverArranged());
|
||||
lqw.eq(bo.getSalarySettled() != null, EmployeeOffboarding::getSalarySettled, bo.getSalarySettled());
|
||||
lqw.eq(bo.getBenefitsSettled() != null, EmployeeOffboarding::getBenefitsSettled, bo.getBenefitsSettled());
|
||||
lqw.eq(bo.getExitCertificateIssued() != null, EmployeeOffboarding::getExitCertificateIssued, bo.getExitCertificateIssued());
|
||||
lqw.eq(bo.getOffboardingConfirmed() != null, EmployeeOffboarding::getOffboardingConfirmed, bo.getOffboardingConfirmed());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增离职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EmployeeOffboardingBo bo) {
|
||||
EmployeeOffboarding add = BeanUtil.toBean(bo, EmployeeOffboarding.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOffboardingId(add.getOffboardingId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改离职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EmployeeOffboardingBo bo) {
|
||||
EmployeeOffboarding update = BeanUtil.toBean(bo, EmployeeOffboarding.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EmployeeOffboarding entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除离职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.ruoyi.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.oa.domain.EmployeeOnboarding;
|
||||
import com.ruoyi.oa.domain.bo.EmployeeOnboardingBo;
|
||||
import com.ruoyi.oa.domain.vo.EmployeeOnboardingVo;
|
||||
import com.ruoyi.oa.mapper.EmployeeOnboardingMapper;
|
||||
import com.ruoyi.oa.service.IEmployeeOnboardingService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 入职管理Service业务层处理
|
||||
*
|
||||
* @author hdka
|
||||
* @date 2025-02-15
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EmployeeOnboardingServiceImpl implements IEmployeeOnboardingService {
|
||||
|
||||
private final EmployeeOnboardingMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询入职管理
|
||||
*/
|
||||
@Override
|
||||
public EmployeeOnboardingVo queryById(Long onboardingId){
|
||||
EmployeeOnboardingVo employeeOnboardingVo = baseMapper.selectVoById(onboardingId);
|
||||
SysUser sysUser = userService.selectUserByIdAndNotDelFlag(employeeOnboardingVo.getUserId());
|
||||
employeeOnboardingVo.setUserName(sysUser.getUserName());
|
||||
employeeOnboardingVo.setNickName(sysUser.getNickName());
|
||||
employeeOnboardingVo.setEmail(sysUser.getEmail());
|
||||
employeeOnboardingVo.setPhonenumber(sysUser.getPhonenumber());
|
||||
employeeOnboardingVo.setBankCard(sysUser.getBankCard());
|
||||
employeeOnboardingVo.setIdCard(sysUser.getIdCard());
|
||||
employeeOnboardingVo.setDeptId(sysUser.getDeptId());
|
||||
return employeeOnboardingVo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入职管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EmployeeOnboardingVo> queryPageList(EmployeeOnboardingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EmployeeOnboarding> lqw = buildQueryWrapper(bo);
|
||||
Page<EmployeeOnboardingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(employeeOnboardingVo -> {
|
||||
SysUser sysUser = userService.selectUserByIdAndNotDelFlag(employeeOnboardingVo.getUserId());
|
||||
employeeOnboardingVo.setNickName(sysUser.getNickName());
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入职管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<EmployeeOnboardingVo> queryList(EmployeeOnboardingBo bo) {
|
||||
LambdaQueryWrapper<EmployeeOnboarding> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EmployeeOnboarding> buildQueryWrapper(EmployeeOnboardingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EmployeeOnboarding> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getUserId() != null, EmployeeOnboarding::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getJoiningDate() != null, EmployeeOnboarding::getJoiningDate, bo.getJoiningDate());
|
||||
lqw.eq(bo.getProbationPeriodEnd() != null, EmployeeOnboarding::getProbationPeriodEnd, bo.getProbationPeriodEnd());
|
||||
lqw.eq(bo.getManagerId() != null, EmployeeOnboarding::getManagerId, bo.getManagerId());
|
||||
lqw.eq(bo.getDocumentsSubmitted() != null, EmployeeOnboarding::getDocumentsSubmitted, bo.getDocumentsSubmitted());
|
||||
lqw.eq(bo.getOrientationCompleted() != null, EmployeeOnboarding::getOrientationCompleted, bo.getOrientationCompleted());
|
||||
lqw.eq(bo.getJoiningStatus() != null, EmployeeOnboarding::getJoiningStatus, bo.getJoiningStatus());
|
||||
lqw.eq(bo.getRecruitmentCompleted() != null, EmployeeOnboarding::getRecruitmentCompleted, bo.getRecruitmentCompleted());
|
||||
lqw.eq(bo.getOfferIssued() != null, EmployeeOnboarding::getOfferIssued, bo.getOfferIssued());
|
||||
lqw.eq(bo.getContractSigned() != null, EmployeeOnboarding::getContractSigned, bo.getContractSigned());
|
||||
lqw.eq(bo.getMaterialsPrepared() != null, EmployeeOnboarding::getMaterialsPrepared, bo.getMaterialsPrepared());
|
||||
lqw.eq(bo.getTrainingCompleted() != null, EmployeeOnboarding::getTrainingCompleted, bo.getTrainingCompleted());
|
||||
lqw.eq(bo.getWorkConditionsPrepared() != null, EmployeeOnboarding::getWorkConditionsPrepared, bo.getWorkConditionsPrepared());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EmployeeOnboardingBo bo) {
|
||||
EmployeeOnboarding add = BeanUtil.toBean(bo, EmployeeOnboarding.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOnboardingId(add.getOnboardingId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EmployeeOnboardingBo bo) {
|
||||
EmployeeOnboarding update = BeanUtil.toBean(bo, EmployeeOnboarding.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EmployeeOnboarding entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入职管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.EmployeeOffboardingMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.EmployeeOffboarding" id="EmployeeOffboardingResult">
|
||||
<result property="offboardingId" column="offboarding_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="resignationDate" column="resignation_date"/>
|
||||
<result property="exitInterview" column="exit_interview"/>
|
||||
<result property="handoverCompleted" column="handover_completed"/>
|
||||
<result property="exitReason" column="exit_reason"/>
|
||||
<result property="finalSalary" column="final_salary"/>
|
||||
<result property="resignationApplicationSubmitted" column="resignation_application_submitted"/>
|
||||
<result property="dataBackupCompleted" column="data_backup_completed"/>
|
||||
<result property="handoverArranged" column="handover_arranged"/>
|
||||
<result property="salarySettled" column="salary_settled"/>
|
||||
<result property="benefitsSettled" column="benefits_settled"/>
|
||||
<result property="exitCertificateIssued" column="exit_certificate_issued"/>
|
||||
<result property="offboardingConfirmed" column="offboarding_confirmed"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.EmployeeOnboardingMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.EmployeeOnboarding" id="EmployeeOnboardingResult">
|
||||
<result property="onboardingId" column="onboarding_id"/>
|
||||
<result property="idPhoto" column="id_photo"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="joiningDate" column="joining_date"/>
|
||||
<result property="probationPeriodEnd" column="probation_period_end"/>
|
||||
<result property="managerId" column="manager_id"/>
|
||||
<result property="documentsSubmitted" column="documents_submitted"/>
|
||||
<result property="orientationCompleted" column="orientation_completed"/>
|
||||
<result property="joiningStatus" column="joining_status"/>
|
||||
<result property="recruitmentCompleted" column="recruitment_completed"/>
|
||||
<result property="offerIssued" column="offer_issued"/>
|
||||
<result property="contractSigned" column="contract_signed"/>
|
||||
<result property="materialsPrepared" column="materials_prepared"/>
|
||||
<result property="trainingCompleted" column="training_completed"/>
|
||||
<result property="workConditionsPrepared" column="work_conditions_prepared"/>
|
||||
<result property="highestDegree" column="highest_degree"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="birthDate" column="birth_date"/>
|
||||
<result property="ethnicity" column="ethnicity"/>
|
||||
<result property="confirmDate" column="confirm_date"/>
|
||||
<result property="maritalStatus" column="marital_status"/>
|
||||
<result property="politicalStatus" column="political_status"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="weight" column="weight"/>
|
||||
<result property="staffType" column="staff_type"/>
|
||||
<result property="emergencyContact1" column="emergency_contact1"/>
|
||||
<result property="emergencyContact2" column="emergency_contact2"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -93,5 +93,10 @@ public interface SysUserMapper extends BaseMapperPlus<SysUserMapper, SysUser, Sy
|
||||
SysUser selectUserById(Long userId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有用户包括被删除的
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByIdAndNotDelFlag(Long userId);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,14 @@ public interface ISysUserService {
|
||||
*/
|
||||
SysUser selectUserById(Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
SysUser selectUserByIdAndNotDelFlag(Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户所属角色组
|
||||
*
|
||||
|
||||
@@ -170,6 +170,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
return baseMapper.selectUserById(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUser selectUserByIdAndNotDelFlag(Long userId) {
|
||||
return baseMapper.selectUserByIdAndNotDelFlag(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户所属角色组
|
||||
*
|
||||
|
||||
@@ -145,8 +145,10 @@
|
||||
<include refid="selectUserVo"/>
|
||||
where u.del_flag = '0' and u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserByIdAndNotDelFlag" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
44
ruoyi-ui/src/api/oa/offboarding.js
Normal file
44
ruoyi-ui/src/api/oa/offboarding.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询离职管理列表
|
||||
export function listOffboarding(query) {
|
||||
return request({
|
||||
url: '/system/offboarding/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询离职管理详细
|
||||
export function getOffboarding(offboardingId) {
|
||||
return request({
|
||||
url: '/system/offboarding/' + offboardingId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增离职管理
|
||||
export function addOffboarding(data) {
|
||||
return request({
|
||||
url: '/system/offboarding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改离职管理
|
||||
export function updateOffboarding(data) {
|
||||
return request({
|
||||
url: '/system/offboarding',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除离职管理
|
||||
export function delOffboarding(offboardingId) {
|
||||
return request({
|
||||
url: '/system/offboarding/' + offboardingId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
ruoyi-ui/src/api/oa/onboarding.js
Normal file
44
ruoyi-ui/src/api/oa/onboarding.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询入职管理列表
|
||||
export function listOnboarding(query) {
|
||||
return request({
|
||||
url: '/system/onboarding/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入职管理详细
|
||||
export function getOnboarding(onboardingId) {
|
||||
return request({
|
||||
url: '/system/onboarding/' + onboardingId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增入职管理
|
||||
export function addOnboarding(data) {
|
||||
return request({
|
||||
url: '/system/onboarding',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改入职管理
|
||||
export function updateOnboarding(data) {
|
||||
return request({
|
||||
url: '/system/onboarding',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除入职管理
|
||||
export function delOnboarding(onboardingId) {
|
||||
return request({
|
||||
url: '/system/onboarding/' + onboardingId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -101,6 +101,43 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/people',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'updateOnboarding/:onboardingId(\\d+)',
|
||||
component: () => import('@/views/oa/onboarding/update'),
|
||||
name: 'updateOnboarding',
|
||||
meta: { title: '更新入职数据', activeMenu: '/people/onboarding' }
|
||||
},
|
||||
|
||||
{
|
||||
path: 'addOffboarding',
|
||||
component: () => import('@/views/oa/offboarding/add'),
|
||||
name: 'addOffboarding',
|
||||
meta: { title: '新增离职申请' ,activeMenu: '/people/offboarding' }
|
||||
},
|
||||
|
||||
{
|
||||
path: 'updateOffboarding/:offboardingId(\\d+)',
|
||||
component: () => import('@/views/oa/offboarding/update'),
|
||||
name: 'updateOffboarding',
|
||||
meta: { title: '新增离职申请' ,activeMenu: '/people/offboarding' }
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// path: '/people/updateOffboarding/:offboardingId(\\d+)',
|
||||
// component: () => import('@/views/oa/offboarding/update'),
|
||||
// hidden: true,
|
||||
// name: 'offboarding',
|
||||
// meta: { title: '跟进离职流程', activeMenu: '/people/offboarding' }
|
||||
// },
|
||||
/* {
|
||||
path: '/finance',
|
||||
component: Layout,
|
||||
|
||||
123
ruoyi-ui/src/views/oa/offboarding/add.vue
Normal file
123
ruoyi-ui/src/views/oa/offboarding/add.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
|
||||
<el-header style="background-color: #fff;display: flex;justify-content:center;border-radius: 10px">
|
||||
<h1>员工离职申请表</h1>
|
||||
</el-header>
|
||||
<el-container style="background-color: #fff;border-radius: 10px;margin-top: 30px;flex-direction: column;padding: 20px">
|
||||
<div style="display: flex;justify-content: space-between;align-items: center;">
|
||||
|
||||
<div>基本信息</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="saveFormToOffboarding">
|
||||
<i class="el-icon-check"></i>提交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="离职人员" required>
|
||||
<el-select v-model="form.userId" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
:label="item.nickName"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="离职时间" required>
|
||||
<el-date-picker
|
||||
v-model="form.resignationDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="离职原因" required>
|
||||
<el-input type="textarea" v-model="form.exitReason" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {addOffboarding} from "@/api/oa/offboarding";
|
||||
import {listUser} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Offboarding",
|
||||
dicts: [],
|
||||
data() {
|
||||
return{
|
||||
form:{},
|
||||
userList:[],
|
||||
user:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
//获取用户列表
|
||||
getUserList() {
|
||||
listUser().then(res => {
|
||||
this.userList = res.rows;
|
||||
console.log(res.rows)
|
||||
})
|
||||
},
|
||||
//保存离职信息
|
||||
saveFormToOffboarding(){
|
||||
addOffboarding(this.form).then(res=>{
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
})
|
||||
},
|
||||
/** 返回页面 */
|
||||
goBack() {
|
||||
// 关闭当前标签页并返回上个页面
|
||||
this.$tab.closePage(this.$route)
|
||||
this.$router.back()
|
||||
},
|
||||
querySearchAsync(queryString, cb) {
|
||||
var userList = this.userList;
|
||||
var results = queryString ? userList.filter(this.createStateFilter(queryString)) : userList;
|
||||
|
||||
clearTimeout(this.timeout);
|
||||
cb(results);
|
||||
},
|
||||
createStateFilter(queryString) {
|
||||
return (user) => {
|
||||
console.log(user);
|
||||
return (user.nickName.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
||||
};
|
||||
},
|
||||
handleSelect(item) {
|
||||
this.form.userId = item.userId
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped >
|
||||
|
||||
.main{
|
||||
padding: 20px;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
</style>
|
||||
337
ruoyi-ui/src/views/oa/offboarding/index.vue
Normal file
337
ruoyi-ui/src/views/oa/offboarding/index.vue
Normal file
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="离职日期" prop="resignationDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.resignationDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择离职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:offboarding:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:offboarding:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:offboarding:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:offboarding:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="offboardingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index"/>
|
||||
<el-table-column label="姓名" align="center" prop="nickName" />
|
||||
<el-table-column label="离职日期" align="center" prop="resignationDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.resignationDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职面谈" align="center" prop="exitInterview">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.exitInterview===1?'success':'warning'">{{ scope.row.exitInterview===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作交接" align="center" prop="handoverCompleted">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.handoverCompleted===1?'success':'warning'">{{ scope.row.handoverCompleted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职原因" align="center" prop="exitReason" />
|
||||
<el-table-column label="最终工资" align="center" prop="finalSalary" />
|
||||
<el-table-column label="离职申请书" align="center" prop="resignationApplicationSubmitted">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.resignationApplicationSubmitted===1?'success':'warning'">{{ scope.row.resignationApplicationSubmitted===1?'已提交':'未提交' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职证明" align="center" prop="exitCertificateIssued">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">{{ scope.row.exitCertificateIssued===1?'已开据':'未开据' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职状态" align="center" prop="offboardingConfirmed">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">{{ scope.row.exitCertificateIssued===1?'已离职':'手续未完善' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.dataBackupCompleted!==1"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:offboarding:edit']"
|
||||
>离职跟进</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:offboarding:remove']"
|
||||
>删除</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
v-if="scope.row.offboardingConfirmed===1&&scope.row.dataBackupCompleted!==1"
|
||||
@click="handleClose(scope.row)"
|
||||
v-hasPermi="['system:offboarding:remove']"
|
||||
>离职完成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOffboarding, getOffboarding, delOffboarding, addOffboarding, updateOffboarding } from "@/api/oa/offboarding";
|
||||
import {delUser} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Offboarding",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 离职管理表格数据
|
||||
offboardingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: undefined,
|
||||
resignationDate: undefined,
|
||||
exitInterview: undefined,
|
||||
handoverCompleted: undefined,
|
||||
exitReason: undefined,
|
||||
finalSalary: undefined,
|
||||
resignationApplicationSubmitted: undefined,
|
||||
dataBackupCompleted: undefined,
|
||||
handoverArranged: undefined,
|
||||
salarySettled: undefined,
|
||||
benefitsSettled: undefined,
|
||||
exitCertificateIssued: undefined,
|
||||
offboardingConfirmed: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 操作离职删除oa账号
|
||||
handleClose(row){
|
||||
this.$confirm('此操作将永久删除该办公系统账号, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delUser(row.userId).then(response => {
|
||||
row.dataBackupCompleted = 1;
|
||||
updateOffboarding(row).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getList();
|
||||
})
|
||||
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 查询离职管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOffboarding(this.queryParams).then(response => {
|
||||
this.offboardingList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
offboardingId: undefined,
|
||||
userId: undefined,
|
||||
resignationDate: undefined,
|
||||
exitInterview: undefined,
|
||||
handoverCompleted: undefined,
|
||||
exitReason: undefined,
|
||||
finalSalary: undefined,
|
||||
resignationApplicationSubmitted: undefined,
|
||||
dataBackupCompleted: undefined,
|
||||
handoverArranged: undefined,
|
||||
salarySettled: undefined,
|
||||
benefitsSettled: undefined,
|
||||
exitCertificateIssued: undefined,
|
||||
offboardingConfirmed: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
remark: undefined,
|
||||
delFlag: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.offboardingId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.$router.push('/people/addOffboarding')
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$router.push('/people/updateOffboarding/' + row.offboardingId);
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.offboardingId != null) {
|
||||
updateOffboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addOffboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const offboardingIds = row.offboardingId || this.ids;
|
||||
this.$modal.confirm('是否确认删除离职管理编号为"' + offboardingIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delOffboarding(offboardingIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/offboarding/export', {
|
||||
...this.queryParams
|
||||
}, `offboarding_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
177
ruoyi-ui/src/views/oa/offboarding/update.vue
Normal file
177
ruoyi-ui/src/views/oa/offboarding/update.vue
Normal file
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
|
||||
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本信息" name="first">
|
||||
<el-header style="background-color: #fff;display: flex;justify-content:center;border-radius: 10px">
|
||||
<h1>员工离职申请表</h1>
|
||||
</el-header>
|
||||
<el-container style="background-color: #fff;border-radius: 10px;margin-top: 10px;flex-direction: column;padding: 20px">
|
||||
<div style="display: flex;justify-content: space-between;align-items: center;">
|
||||
|
||||
<div>基本信息</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="saveFormToOffboarding">
|
||||
<i class="el-icon-check"></i>提交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="离职人员" required>
|
||||
<el-select v-model="form.userId" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
:label="item.nickName"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="离职时间" required>
|
||||
<el-date-picker
|
||||
v-model="form.resignationDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="离职原因" required>
|
||||
<el-input type="textarea" v-model="form.exitReason" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="流程跟进" name="second">
|
||||
<div style="background-color: #fff;border-radius: 10px;margin-top: 10px;flex-direction: column;padding: 20px">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-form-item label="是否面谈">
|
||||
<el-radio-group v-model="form.exitInterview">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="离职交接">
|
||||
<el-radio-group v-model="form.handoverCompleted">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="最终工资结算(¥)">
|
||||
<el-input v-model="form.finalSalary"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="离职申请书提交">
|
||||
<el-radio-group v-model="form.resignationApplicationSubmitted">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="离职证明">
|
||||
<el-radio-group v-model="form.exitCertificateIssued">
|
||||
<el-radio :label="0">未开据</el-radio>
|
||||
<el-radio :label="1">已开据</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div>
|
||||
<el-button type="primary" @click="saveFormToOffboarding">
|
||||
保存信息
|
||||
</el-button>
|
||||
<el-button type="warning"
|
||||
v-if="form.exitInterview===1&&
|
||||
form.handoverCompleted===1&&
|
||||
form.resignationApplicationSubmitted===1"
|
||||
@click="completeOffboarding"
|
||||
>确认离职</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {addOffboarding, getOffboarding, updateOffboarding} from "@/api/oa/offboarding";
|
||||
import {listUser} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Offboarding",
|
||||
dicts: [],
|
||||
data() {
|
||||
return{
|
||||
|
||||
activeName:"first",
|
||||
form:{},
|
||||
userList:[],
|
||||
user:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getForm(this.$route.params.offboardingId);
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
getForm(offboardingId) {
|
||||
getOffboarding(offboardingId).then(res => {
|
||||
this.form = res.data;
|
||||
})
|
||||
},
|
||||
//获取用户列表
|
||||
getUserList() {
|
||||
listUser().then(res => {
|
||||
this.userList = res.rows;
|
||||
console.log(res.rows)
|
||||
})
|
||||
},
|
||||
//保存离职信息
|
||||
saveFormToOffboarding(){
|
||||
updateOffboarding(this.form).then(res=>{
|
||||
this.$modal.msgSuccess("跟进成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
})
|
||||
},
|
||||
/** 返回页面 */
|
||||
goBack() {
|
||||
// 关闭当前标签页并返回上个页面
|
||||
this.$tab.closePage(this.$route)
|
||||
this.$router.back()
|
||||
},
|
||||
completeOffboarding() {
|
||||
// 代表完成离职
|
||||
this.form.offboardingConfirmed = 1;
|
||||
this.saveFormToOffboarding();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped >
|
||||
|
||||
.main{
|
||||
padding: 20px;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
</style>
|
||||
280
ruoyi-ui/src/views/oa/onboarding/add.vue
Normal file
280
ruoyi-ui/src/views/oa/onboarding/add.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div class="main" v-loading="loading">
|
||||
<div class="container">
|
||||
<div class="">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<h1 class="">员工入职登记信息表</h1>
|
||||
<div style="display: flex;justify-content:center;align-items: center">
|
||||
<el-button type="primary" @click="saveFormToOnboarding">
|
||||
<i class="el-icon-check"></i>保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<h2 class="">基础信息</h2>
|
||||
<div style="display: flex">
|
||||
<div>
|
||||
<image-upload v-model="form.idPhoto" style="display: flex;justify-content:center;flex-direction: column;align-items: center;"/>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
<el-row :gutter="15" style="margin:0px 30px">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" required >
|
||||
<el-input v-model="form.nickName" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统账号" required >
|
||||
<el-input v-model="form.userName" placeholder="请输入办公系统账号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职部门" required>
|
||||
<el-select v-model="form.deptId" placeholder="请选择归属部门" class="w-full">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:label="item.label" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" required>
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" required>
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入电话" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="职位">-->
|
||||
<!-- <el-select v-model="form.position" placeholder="请选择职位" class="w-full">-->
|
||||
<!-- <el-option label="开发工程师" value="developer" />-->
|
||||
<!-- <el-option label="产品经理" value="pm" />-->
|
||||
<!-- <el-option label="设计师" value="designer" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="入职日期" required>
|
||||
<el-date-picker
|
||||
v-model="form.joiningDate"
|
||||
type="date"
|
||||
placeholder="请选择入职日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" required>
|
||||
<el-radio-group v-model="form.sex">
|
||||
<el-radio label="0">男</el-radio>
|
||||
<el-radio label="1">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="银行卡号" required >
|
||||
<el-input placeholder="请输入银行卡号" v-model="form.bankCard"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="最高学历" required>
|
||||
<el-radio-group v-model="form.highestDegree">
|
||||
<el-radio label="初中">初中</el-radio>
|
||||
<el-radio label="高中">高中</el-radio>
|
||||
<el-radio label="大专">大专</el-radio>
|
||||
<el-radio label="本科">本科</el-radio>
|
||||
<el-radio label="硕士">硕士</el-radio>
|
||||
<el-radio label="博士">博士</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="民族">
|
||||
<el-select v-model="form.ethnicity" placeholder="请选择民族" class="w-full">
|
||||
<el-option label="汉族" value="han" />
|
||||
<el-option label="少数民族" value="minority" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出生日期" required>
|
||||
<el-date-picker
|
||||
v-model="form.birthDate"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转正日期">
|
||||
<el-date-picker
|
||||
v-model="form.confirmDate"
|
||||
type="date"
|
||||
placeholder="请选择转正日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="border-b pb-4">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="扩展信息">
|
||||
<div class="grid grid-cols-3 gap-6">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-row :gutter="18">
|
||||
<el-col span="8">
|
||||
<el-form-item label="婚姻状况">
|
||||
<el-radio-group v-model="form.maritalStatus">
|
||||
<el-radio label="未婚">未婚</el-radio>
|
||||
<el-radio label="已婚">已婚</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌">
|
||||
<el-radio-group v-model="form.politicalStatus">
|
||||
<el-radio label="群众">群众</el-radio>
|
||||
<el-radio label="党员">党员</el-radio>
|
||||
<el-radio label="预备党员">预备党员</el-radio>
|
||||
<el-radio label="团员">团员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<el-form-item label="身高">
|
||||
<el-input v-model="form.height" placeholder="请输入身高(单位厘米)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体重">
|
||||
<el-input v-model="form.weight" placeholder="请输入体重(单位千克)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<el-form-item label="编制类型" >
|
||||
<el-radio-group v-model="form.staffType">
|
||||
<el-radio label="实习">实习</el-radio>
|
||||
<el-radio label="试用">试用</el-radio>
|
||||
<el-radio label="正式">正式</el-radio>
|
||||
<el-radio label="兼职">兼职</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="户籍信息">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="家庭住址">
|
||||
<el-input v-model="form.address" placeholder="请输入家庭住址" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="紧急联系人">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="紧急联系人1">
|
||||
<el-input v-model="form.emergencyContact1" placeholder="请输入紧急联系人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人2">
|
||||
<el-input v-model="form.emergencyContact2" placeholder="请输入紧急联系人手机号" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="其他">
|
||||
<div class="p-4">其他内容(待拓展)</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addUser, deptTreeSelect, listUser} from "@/api/system/user";
|
||||
import {addOnboarding} from "@/api/oa/onboarding";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
onboardingId: [
|
||||
{ required: true, message: "入职记录ID不能为空", trigger: "blur" }
|
||||
],
|
||||
highestDegree: [
|
||||
{ required: true, message: "最高学历不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
deptOptions:[]
|
||||
};
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDeptList();
|
||||
},
|
||||
methods: {
|
||||
getDeptList(){
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data[0].children;
|
||||
});
|
||||
},
|
||||
/** 新增入职 */
|
||||
//TODO status:0 现在新增后账号立马开通不走流程
|
||||
saveFormToOnboarding(){
|
||||
this.loading=true;
|
||||
let userForm = {
|
||||
userName: this.form.userName,
|
||||
nickName: this.form.nickName,
|
||||
phonenumber: this.form.phonenumber,
|
||||
email: this.form.email,
|
||||
address: this.form.address,
|
||||
password: "123456",
|
||||
sex:this.form.sex,
|
||||
userType:"sys_user",
|
||||
deptId:this.form.deptId,
|
||||
avatar:this.form.idPhoto,
|
||||
status:0,
|
||||
idCard:this.form.idCard,
|
||||
bankCard:this.form.bankCard,
|
||||
}
|
||||
// 添加入职后添加用户账号
|
||||
addUser(userForm).then(response => {
|
||||
userForm.password = null;
|
||||
listUser(userForm).then(response => {
|
||||
this.form.userId = response.rows[0].userId;
|
||||
addOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 返回页面 */
|
||||
goBack() {
|
||||
// 关闭当前标签页并返回上个页面
|
||||
this.$tab.closePage(this.$route)
|
||||
this.$router.back()
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main{
|
||||
padding: 10px;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.container{
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
449
ruoyi-ui/src/views/oa/onboarding/index.vue
Normal file
449
ruoyi-ui/src/views/oa/onboarding/index.vue
Normal file
@@ -0,0 +1,449 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="入职日期" prop="joiningDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.joiningDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="试用结束" prop="probationPeriodEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.probationPeriodEnd"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择试用期结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="学历" prop="highestDegree">
|
||||
<el-input
|
||||
v-model="queryParams.highestDegree"
|
||||
placeholder="请输入学历"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="toAddOnboarding"
|
||||
v-hasPermi="['system:onboarding:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:onboarding:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:onboarding:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:onboarding:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="onboardingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index"/>
|
||||
<el-table-column label="姓名" align="center" prop="nickName"/>
|
||||
<el-table-column label="入职日期" align="center" prop="joiningDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.joiningDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="试用结束" align="center" prop="confirmDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.probationPeriodEnd, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入职资料" align="center" prop="documentsSubmitted">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.documentsSubmitted===1?'success':'warning'">{{ scope.row.documentsSubmitted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="入职培训" align="center" prop="orientationCompleted" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.orientationCompleted===1?'success':'warning'">{{ scope.row.orientationCompleted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入职状态" align="center" prop="joiningStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.joining_status" :value="scope.row.joiningStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成面试" align="center" prop="recruitmentCompleted" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.recruitmentCompleted===1?'success':'warning'">{{ scope.row.recruitmentCompleted===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Offer发放" align="center" prop="offerIssued" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.offerIssued===1?'success':'warning'">{{ scope.row.offerIssued===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签署合同" align="center" prop="contractSigned" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.contractSigned===1?'success':'warning'">{{ scope.row.contractSigned===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="条件准备" align="center" prop="workConditionsPrepared" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.workConditionsPrepared===1?'success':'warning'">{{ scope.row.workConditionsPrepared===1?'完成':'未完成' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学历" align="center" prop="highestDegree" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:onboarding:edit']"
|
||||
>完善信息</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:onboarding:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改入职管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户ID (外键)" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID (外键)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职日期" prop="joiningDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.joiningDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择入职日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="试用期结束日期" prop="probationPeriodEnd">
|
||||
<el-date-picker clearable
|
||||
v-model="form.probationPeriodEnd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择试用期结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="直属经理ID" prop="managerId">
|
||||
<el-input v-model="form.managerId" placeholder="请输入直属经理ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否提交入职资料" prop="documentsSubmitted">
|
||||
<el-input v-model="form.documentsSubmitted" placeholder="请输入是否提交入职资料" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否完成入职培训" prop="orientationCompleted">
|
||||
<el-input v-model="form.orientationCompleted" placeholder="请输入是否完成入职培训" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职状态(pending,completed,onboarding)" prop="joiningStatus">
|
||||
<el-select v-model="form.joiningStatus" placeholder="请选择入职状态(pending,completed,onboarding)">
|
||||
<el-option
|
||||
v-for="dict in dict.type.joining_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="最高学历" prop="highestDegree">
|
||||
<el-input v-model="form.highestDegree" placeholder="请输入最高学历" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOnboarding, getOnboarding, delOnboarding, addOnboarding, updateOnboarding } from "@/api/oa/onboarding";
|
||||
|
||||
export default {
|
||||
name: "Onboarding",
|
||||
dicts: ['joining_status'],
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 入职管理表格数据
|
||||
onboardingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
idPhoto: undefined,
|
||||
userId: undefined,
|
||||
joiningDate: undefined,
|
||||
probationPeriodEnd: undefined,
|
||||
managerId: undefined,
|
||||
documentsSubmitted: undefined,
|
||||
orientationCompleted: undefined,
|
||||
joiningStatus: undefined,
|
||||
recruitmentCompleted: undefined,
|
||||
offerIssued: undefined,
|
||||
contractSigned: undefined,
|
||||
materialsPrepared: undefined,
|
||||
trainingCompleted: undefined,
|
||||
workConditionsPrepared: undefined,
|
||||
highestDegree: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
onboardingId: [
|
||||
{ required: true, message: "入职记录ID不能为空", trigger: "blur" }
|
||||
],
|
||||
idPhoto: [
|
||||
{ required: true, message: "证件照不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户ID (外键)不能为空", trigger: "blur" }
|
||||
],
|
||||
joiningDate: [
|
||||
{ required: true, message: "入职日期不能为空", trigger: "blur" }
|
||||
],
|
||||
probationPeriodEnd: [
|
||||
{ required: true, message: "试用期结束日期不能为空", trigger: "blur" }
|
||||
],
|
||||
managerId: [
|
||||
{ required: true, message: "直属经理ID不能为空", trigger: "blur" }
|
||||
],
|
||||
documentsSubmitted: [
|
||||
{ required: true, message: "是否提交入职资料不能为空", trigger: "blur" }
|
||||
],
|
||||
orientationCompleted: [
|
||||
{ required: true, message: "是否完成入职培训不能为空", trigger: "blur" }
|
||||
],
|
||||
joiningStatus: [
|
||||
{ required: true, message: "入职状态(pending,completed,onboarding)不能为空", trigger: "change" }
|
||||
],
|
||||
recruitmentCompleted: [
|
||||
{ required: true, message: "是否完成招聘与面试不能为空", trigger: "change" }
|
||||
],
|
||||
offerIssued: [
|
||||
{ required: true, message: "是否已发放Offer不能为空", trigger: "change" }
|
||||
],
|
||||
contractSigned: [
|
||||
{ required: true, message: "是否已签署合同不能为空", trigger: "change" }
|
||||
],
|
||||
materialsPrepared: [
|
||||
{ required: true, message: "入职材料/工作准备是否完成不能为空", trigger: "change" }
|
||||
],
|
||||
trainingCompleted: [
|
||||
{ required: true, message: "是否完成入职培训不能为空", trigger: "change" }
|
||||
],
|
||||
workConditionsPrepared: [
|
||||
{ required: true, message: "是否完成工作条件准备不能为空", trigger: "change" }
|
||||
],
|
||||
highestDegree: [
|
||||
{ required: true, message: "最高学历不能为空", trigger: "blur" }
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 新增入职员工界面 */
|
||||
toAddOnboarding(){
|
||||
|
||||
this.$router.push({
|
||||
path: '/people/addOnboarding',
|
||||
})
|
||||
},
|
||||
/** 查询入职管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOnboarding(this.queryParams).then(response => {
|
||||
this.onboardingList = response.rows;
|
||||
console.log(this.onboardingList)
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
onboardingId: undefined,
|
||||
idPhoto: undefined,
|
||||
userId: undefined,
|
||||
joiningDate: undefined,
|
||||
probationPeriodEnd: undefined,
|
||||
managerId: undefined,
|
||||
documentsSubmitted: undefined,
|
||||
orientationCompleted: undefined,
|
||||
joiningStatus: undefined,
|
||||
recruitmentCompleted: undefined,
|
||||
offerIssued: undefined,
|
||||
contractSigned: undefined,
|
||||
materialsPrepared: undefined,
|
||||
trainingCompleted: undefined,
|
||||
workConditionsPrepared: undefined,
|
||||
highestDegree: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
remark: undefined,
|
||||
delFlag: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.onboardingId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加入职管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$router.push('/people/updateOnboarding/'+row.onboardingId);
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.onboardingId != null) {
|
||||
updateOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const onboardingIds = row.onboardingId || this.ids;
|
||||
this.$modal.confirm('是否确认删除入职管理编号为"' + onboardingIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delOnboarding(onboardingIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/onboarding/export', {
|
||||
...this.queryParams
|
||||
}, `onboarding_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
341
ruoyi-ui/src/views/oa/onboarding/update.vue
Normal file
341
ruoyi-ui/src/views/oa/onboarding/update.vue
Normal file
@@ -0,0 +1,341 @@
|
||||
<template>
|
||||
<div class="main" v-loading="loading">
|
||||
<div class="container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本信息" name="first">
|
||||
<div class="">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<h1 class="">员工入职登记信息表</h1>
|
||||
<div style="display: flex;justify-content:center;align-items: center">
|
||||
<el-button type="primary" @click="saveFormToOnboarding">
|
||||
<i class="el-icon-check"></i>保存
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<h2 class="">基础信息</h2>
|
||||
<div style="display: flex">
|
||||
<div>
|
||||
<image-upload v-model="form.idPhoto" style="display: flex;justify-content:center;flex-direction: column;align-items: center;"/>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="">
|
||||
<el-row :gutter="15" style="margin:0px 30px">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" required >
|
||||
<el-input v-model="form.nickName" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统账号" required >
|
||||
<el-input v-model="form.userName" placeholder="请输入办公系统账号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职部门" required>
|
||||
<el-select v-model="form.deptId" placeholder="请选择归属部门" class="w-full">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:label="item.label" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" required>
|
||||
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" required>
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入电话" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="职位">-->
|
||||
<!-- <el-select v-model="form.position" placeholder="请选择职位" class="w-full">-->
|
||||
<!-- <el-option label="开发工程师" value="developer" />-->
|
||||
<!-- <el-option label="产品经理" value="pm" />-->
|
||||
<!-- <el-option label="设计师" value="designer" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="入职日期" required>
|
||||
<el-date-picker
|
||||
v-model="form.joiningDate"
|
||||
type="date"
|
||||
placeholder="请选择入职日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" required>
|
||||
<el-radio-group v-model="form.sex">
|
||||
<el-radio label="0">男</el-radio>
|
||||
<el-radio label="1">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="银行卡号" required >
|
||||
<el-input placeholder="请输入银行卡号" v-model="form.bankCard"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="最高学历" required>
|
||||
<el-radio-group v-model="form.highestDegree">
|
||||
<el-radio label="初中">初中</el-radio>
|
||||
<el-radio label="高中">高中</el-radio>
|
||||
<el-radio label="大专">大专</el-radio>
|
||||
<el-radio label="本科">本科</el-radio>
|
||||
<el-radio label="硕士">硕士</el-radio>
|
||||
<el-radio label="博士">博士</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="民族">
|
||||
<el-select v-model="form.ethnicity" placeholder="请选择民族" class="w-full">
|
||||
<el-option label="汉族" value="han" />
|
||||
<el-option label="少数民族" value="minority" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出生日期" required>
|
||||
<el-date-picker
|
||||
v-model="form.birthDate"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="转正日期">
|
||||
<el-date-picker
|
||||
v-model="form.confirmDate"
|
||||
type="date"
|
||||
placeholder="请选择转正日期"
|
||||
class="w-full"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div class="border-b pb-4">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="扩展信息">
|
||||
<div class="grid grid-cols-3 gap-6">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-row :gutter="18">
|
||||
<el-col span="8">
|
||||
<el-form-item label="婚姻状况">
|
||||
<el-radio-group v-model="form.maritalStatus">
|
||||
<el-radio label="未婚">未婚</el-radio>
|
||||
<el-radio label="已婚">已婚</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌">
|
||||
<el-radio-group v-model="form.politicalStatus">
|
||||
<el-radio label="群众">群众</el-radio>
|
||||
<el-radio label="党员">党员</el-radio>
|
||||
<el-radio label="预备党员">预备党员</el-radio>
|
||||
<el-radio label="团员">团员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<el-form-item label="身高">
|
||||
<el-input v-model="form.height" placeholder="请输入身高(单位厘米)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体重">
|
||||
<el-input v-model="form.weight" placeholder="请输入体重(单位千克)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="8">
|
||||
<el-form-item label="编制类型" >
|
||||
<el-radio-group v-model="form.staffType">
|
||||
<el-radio label="实习">实习</el-radio>
|
||||
<el-radio label="试用">试用</el-radio>
|
||||
<el-radio label="正式">正式</el-radio>
|
||||
<el-radio label="兼职">兼职</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="户籍信息">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="家庭住址">
|
||||
<el-input v-model="form.address" placeholder="请输入家庭住址" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="紧急联系人">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
<el-form-item label="紧急联系人1">
|
||||
<el-input v-model="form.emergencyContact1" placeholder="请输入紧急联系人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急联系人2">
|
||||
<el-input v-model="form.emergencyContact2" placeholder="请输入紧急联系人手机号" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="其他">
|
||||
<div class="p-4">其他内容(待拓展)</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="补充资料上传" name="second">
|
||||
<div>
|
||||
<div style="display: flex;justify-content: flex-end;align-items: center">
|
||||
<el-button type="primary" @click="saveFormToOnboarding">
|
||||
<i class="el-icon-check"></i>保存
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="15">
|
||||
<el-col span="15">
|
||||
<el-form ref="form" :model="form" :rules="rules">
|
||||
|
||||
<el-form-item label="是否完成招聘与面试">
|
||||
<el-radio-group v-model="form.recruitmentCompleted">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否发放offer">
|
||||
<el-radio-group v-model="form.offerIssued">
|
||||
<el-radio :label="0">未发放</el-radio>
|
||||
<el-radio :label="1">已发放</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否签约合同">
|
||||
<el-radio-group v-model="form.contractSigned">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否提交入职材料">
|
||||
<el-radio-group v-model="form.documentsSubmitted">
|
||||
<el-radio :label="0">未提交</el-radio>
|
||||
<el-radio :label="1">已提交</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否完成入职培训">
|
||||
<el-radio-group v-model="form.orientationCompleted">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="入职状态">
|
||||
<el-select v-model="form.joiningStatus" placeholder="请选择入职状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.joining_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否完成入职准备(权限分配工位分配等)">
|
||||
<el-radio-group v-model="form.workConditionsPrepared">
|
||||
<el-radio :label="0">未完成</el-radio>
|
||||
<el-radio :label="1">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getOnboarding, updateOnboarding} from "@/api/oa/onboarding";
|
||||
import {deptTreeSelect} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
dicts: ['joining_status'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
activeName:"first",
|
||||
loading:false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
onboardingId: [
|
||||
{ required: true, message: "入职记录ID不能为空", trigger: "blur" }
|
||||
],
|
||||
highestDegree: [
|
||||
{ required: true, message: "最高学历不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
deptOptions:[]
|
||||
};
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDeptList();
|
||||
this.getOnboardingById(this.$route.params.onboardingId);
|
||||
},
|
||||
methods: {
|
||||
getDeptList(){
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data[0].children;
|
||||
});
|
||||
},
|
||||
getOnboardingById(id){
|
||||
getOnboarding(id).then(response => {
|
||||
this.form = response.data;
|
||||
})
|
||||
},
|
||||
saveFormToOnboarding(){
|
||||
this.loading = true;
|
||||
updateOnboarding(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.loading = false;
|
||||
this.goBack()
|
||||
})
|
||||
},
|
||||
/** 返回页面 */
|
||||
goBack() {
|
||||
// 关闭当前标签页并返回上个页面
|
||||
this.$tab.closePage(this.$route)
|
||||
this.$router.back()
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main{
|
||||
padding: 10px;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.container{
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user