Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
# Conflicts: # src/main/resources/views/layouts/v4/apps.html
This commit is contained in:
@@ -2,6 +2,7 @@ package com.budwk.app;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import com.budwk.app.base.utils.AppIocUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.sys.services.SysTaskService;
|
||||
import com.budwk.app.task.services.TaskPlatformService;
|
||||
@@ -81,6 +82,8 @@ public class MainLauncher {
|
||||
init_auth();
|
||||
ioc.get(Globals.class);
|
||||
ioc.get(FlowEngine.class);
|
||||
|
||||
AppIocUtil.setIoc(ioc);
|
||||
}
|
||||
|
||||
public void init_auth() {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean
|
||||
public class Test2SysUserEventListener implements SysUserEventListener{
|
||||
|
||||
@Override
|
||||
public void onEvent(SysUserEvent event) {
|
||||
System.out.println("-----------------------------------");
|
||||
System.out.println(event);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean
|
||||
public class TestSysUserEventListener implements SysUserEventListener{
|
||||
|
||||
@Override
|
||||
public void onEvent(SysUserEvent event) {
|
||||
System.out.println("-----------------------------------");
|
||||
System.out.println(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:UserChangeEventListener
|
||||
* @Date 2025/8/13 14:18
|
||||
* @注释
|
||||
*/
|
||||
public interface UserChangeEventListener {
|
||||
|
||||
void receive(UserChangeMsg message);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:UserChangeMsg
|
||||
* @Date 2025/8/13 11:51
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserChangeMsg {
|
||||
|
||||
/**
|
||||
* 变更资源,用户Id
|
||||
*/
|
||||
private List<String> userIds;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
private Integer operationType;
|
||||
|
||||
/**
|
||||
* 变更前的单位Id,当operationType值为1时,该字段有效
|
||||
*/
|
||||
private String sourceUnitId;
|
||||
|
||||
/**
|
||||
* 变更后的单位Id,当operationType值为1时,该字段有效
|
||||
*/
|
||||
private String targetUnitId;
|
||||
|
||||
/**
|
||||
* 单位变动
|
||||
*/
|
||||
public final static int UNIT_CHANGE_OPERATION = 1;
|
||||
|
||||
/**
|
||||
* 退休
|
||||
*/
|
||||
public final static int RETIRE_OPERATION = 2;
|
||||
|
||||
/**
|
||||
* 入会
|
||||
*/
|
||||
public final static int RESTORE_OPERATION = 3;
|
||||
|
||||
|
||||
public UserChangeMsg(List<String> userIds, Integer operationType) {
|
||||
super();
|
||||
this.userIds = userIds;
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
|
||||
public UserChangeMsg(List<String> userIds, Integer operationType, String sourceUnitId) {
|
||||
super();
|
||||
this.userIds = userIds;
|
||||
this.operationType = operationType;
|
||||
this.sourceUnitId = sourceUnitId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import com.budwk.app.base.utils.AppIocUtil;
|
||||
import org.nutz.ioc.Ioc;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:UserChangePublisher
|
||||
* @Date 2025/8/13 14:23
|
||||
* @注释
|
||||
*/
|
||||
public class UserChangePublisher {
|
||||
|
||||
// 发送消息给所有订阅者
|
||||
public static void broadcast(UserChangeMsg msg) {
|
||||
Ioc ioc = AppIocUtil.get();
|
||||
|
||||
String[] names = ioc.getNamesByType(UserChangeEventListener.class);
|
||||
for (String listener : names) {
|
||||
UserChangeEventListener listenerBean = ioc.get(UserChangeEventListener.class, listener);
|
||||
listenerBean.receive(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.budwk.app.base.utils;
|
||||
|
||||
import org.nutz.ioc.Ioc;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:AppIocUtil
|
||||
* @Date 2025/8/26 17:40
|
||||
* @注释
|
||||
*/
|
||||
public class AppIocUtil {
|
||||
|
||||
private static Ioc ioc;
|
||||
|
||||
public static void setIoc(Ioc ioc) {
|
||||
AppIocUtil.ioc = ioc;
|
||||
}
|
||||
|
||||
public static Ioc get() {
|
||||
if (ioc == null) {
|
||||
throw new IllegalStateException("Ioc not initialized yet!");
|
||||
}
|
||||
return ioc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +1,29 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.entity.ProcessCategory;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.flow.entity.ProcessDesign;
|
||||
import com.budwk.app.flow.service.ProcessDefineService;
|
||||
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,12 +35,59 @@ public class FlowCategoryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ProcessDefineService defineService;
|
||||
|
||||
@At
|
||||
@At("")
|
||||
@Ok("beetl:/platform/flow/category/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("flow.category")
|
||||
public Result pageData(PageForm pageForm, String name) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
*,
|
||||
(select count(1) from wf_process_design where category = pc.id) as categoryCount
|
||||
from
|
||||
wf_process_category pc
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(Cnd.likeEX(ProcessCategory::getName, name));
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = defineService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("flow.category")
|
||||
@SLog(tag = "流程管理-流程分类", msg = "新增/编辑流程分类")
|
||||
public Result submit(ProcessCategory category) {
|
||||
dao.insertOrUpdate(category);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("flow.category")
|
||||
@SLog(tag = "流程管理-流程分类", msg = "删除流程分类")
|
||||
public Result delete(String id) {
|
||||
int count = dao.count(ProcessDesign.class, Cnd.where(ProcessDesign::getCategory, "=", id));
|
||||
if(count > 0) {
|
||||
return Result.error("此分类已关联%s个流程,无法删除".formatted(count));
|
||||
}
|
||||
dao.delete(ProcessCategory.class, id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result list() {
|
||||
List<ProcessCategory> list = dao.query(ProcessCategory.class, Cnd.NEW());
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.flow.entity.ProcessDesign;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.service.ProcessDefineService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -13,14 +16,18 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/flow/define")
|
||||
@@ -35,7 +42,7 @@ public class FlowDefineController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/flow/define/index.html")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("flow.define")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@@ -56,11 +63,10 @@ public class FlowDefineController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("删除流程定义")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("flow.define")
|
||||
public Result delete(@Param("id") Long id) {
|
||||
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getProcessDefineId, "=", id));
|
||||
if (count > 0) {
|
||||
@@ -79,17 +85,44 @@ public class FlowDefineController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取流程定义分页列表")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String type, String name, String displayName) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Pagination pagination = processDefineService.listPage(pageNumber, pageSize, cnd);
|
||||
return Result.success(pagination);
|
||||
@SaCheckPermission("flow.define")
|
||||
public Result pageData(PageForm pageForm, String displayName, String name, String category) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
*,
|
||||
ROW_NUMBER() OVER (ORDER BY name ) AS rowNum
|
||||
FROM
|
||||
( SELECT *, ROW_NUMBER() OVER ( PARTITION BY NAME ORDER BY version DESC ) AS rn FROM wf_process_define ) t
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and("rn", "=", 1);
|
||||
cnd.and(Cnd.likeEX(ProcessDesign::getDisplayName, displayName));
|
||||
cnd.and(Cnd.likeEX(ProcessDesign::getName, name));
|
||||
cnd.andEX(ProcessDesign::getCategory, "=", category);
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = processDefineService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
|
||||
List<NutMap> list = pagination.getList(NutMap.class);
|
||||
for (NutMap nutMap : list) {
|
||||
List<ProcessDefine> defineList = dao.query(
|
||||
ProcessDefine.class,
|
||||
Cnd.where(ProcessDefine::getName, "=", nutMap.getString("name"))
|
||||
.and("id", "!=", nutMap.getString("id"))
|
||||
.desc(ProcessDefine::getVersion)
|
||||
);
|
||||
nutMap.put("children", defineList);
|
||||
}
|
||||
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("启用流程定义")
|
||||
@SaCheckPermission("flow.define")
|
||||
public Result enable(@Param("id") Long id) {
|
||||
ProcessDefine define = new ProcessDefine();
|
||||
define.setId(id);
|
||||
@@ -99,8 +132,8 @@ public class FlowDefineController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("禁用流程定义")
|
||||
@SaCheckPermission("flow.define")
|
||||
public Result disable(@Param("id") Long id) {
|
||||
ProcessDefine define = new ProcessDefine();
|
||||
define.setId(id);
|
||||
@@ -108,6 +141,4 @@ public class FlowDefineController {
|
||||
dao.updateIgnoreNull(define);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.ClassScanner;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.CandidateHandler;
|
||||
@@ -89,10 +91,9 @@ public class FlowDesignController {
|
||||
CANDIDATE_HANDLER_LIST = Collections.unmodifiableList(list);
|
||||
}
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/flow/design/index.html")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("flow.design")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@@ -104,17 +105,23 @@ public class FlowDesignController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取流程设计分页列表")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String name, String key, String category) {
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result pageData(PageForm pageForm, String displayName, String name, String category, Boolean deployed) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Pagination pagination = processDesignService.listPage(pageNumber, pageSize, cnd);
|
||||
|
||||
cnd.and(Cnd.likeEX(ProcessDesign::getDisplayName, displayName));
|
||||
cnd.and(Cnd.likeEX(ProcessDesign::getName, name));
|
||||
cnd.andEX(ProcessDesign::getCategory, "=", category);
|
||||
cnd.andEX(ProcessDesign::getIsDeployed, "=", deployed);
|
||||
|
||||
Pagination pagination = processDesignService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("保存流程设计")
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result insert(@Param("design") ProcessDesign processDesign) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set("name", processDesign.getName());
|
||||
@@ -132,8 +139,8 @@ public class FlowDesignController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("修改流程设计")
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result update(@Param("design") ProcessDesign processDesign) {
|
||||
JSONObject jsonObject = processDesign.getContent();
|
||||
jsonObject.set("name", processDesign.getName());
|
||||
@@ -151,8 +158,8 @@ public class FlowDesignController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("修改流程设计")
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result updateContent(@Param("design") ProcessDesign processDesign) {
|
||||
JSONObject jsonObject = processDesign.getContent();
|
||||
jsonObject.set("name", processDesign.getName());
|
||||
@@ -170,8 +177,8 @@ public class FlowDesignController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("删除流程设计")
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result delete(@Param("id") Long id) {
|
||||
dao.delete(ProcessDesign.class, id);
|
||||
return Result.success();
|
||||
@@ -186,9 +193,9 @@ public class FlowDesignController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("发布流程设计")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("flow.design")
|
||||
public Result deploy(@Param("id") Long id) {
|
||||
processDesignService.deploy(id);
|
||||
return Result.success();
|
||||
@@ -230,5 +237,4 @@ public class FlowDesignController {
|
||||
List<NutMap> list = sysUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ public class SysUnitController {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
nodeList.add(new TreeNode<>(list.get(i).getId(), list.get(i).getParentId(), list.get(i).getName(), i));
|
||||
}
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "1"));
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0000"));
|
||||
|
||||
// NutMap menuMap = NutMap.NEW();
|
||||
// for (Sys_unit unit : list) {
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.club.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -113,7 +114,7 @@ public class ClubUserJoinMineController {
|
||||
|
||||
@At
|
||||
@ApiOperation("申请详情")
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result info(@Valid String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ClubCommonController {
|
||||
private SysRoleService sysRoleService;
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result listClub() {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.club.controller.evaluate;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
@@ -134,7 +135,7 @@ public class ClubEvaluateApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getMyClubAndYearAuditPass(Integer year) {
|
||||
//List<NutMap> list = sysClubService.getMyClubAndYearAuditPass(year);
|
||||
|
||||
|
||||
+8
-7
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.club.controller.examine;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
@@ -65,7 +66,7 @@ public class ClubExamineApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getCount(@Valid String id, @Valid Integer year) {
|
||||
List<SysClubExamineRegister> list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", id).and("year(registerDate)", "=", year));
|
||||
List<ProcessInstance> instanceList = dao.query(
|
||||
@@ -77,28 +78,28 @@ public class ClubExamineApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getClubsByRole() {
|
||||
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
||||
return Result.success(myManageClub);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getClubUserNum(@Valid String clubId) {
|
||||
List<NutMap> result = sysClubExamineService.getClubUserNum(clubId);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getJgUser(@Valid String clubId) {
|
||||
List<NutMap> result = sysClubExamineService.getJgUser(clubId);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getClubMemberMoney(@Valid String clubId) {
|
||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId));
|
||||
SysClub club = dao.fetch(SysClub.class, clubId);
|
||||
@@ -107,7 +108,7 @@ public class ClubExamineApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getXghBkMoney(@Valid String clubId) {
|
||||
/*jf_club club = dao().fetch(jf_club.class, Cnd.where("club_id", "=", id));
|
||||
Double total_quota = Double.valueOf(club.getTotal_quota());*/
|
||||
@@ -115,7 +116,7 @@ public class ClubExamineApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result getLasYearSurplus(@Valid String clubId) {
|
||||
SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId)
|
||||
.and("YEAR(registerDate)", "=", DateUtil.thisYear() - 1));
|
||||
|
||||
+4
-3
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.club.controller.register;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
@@ -150,7 +151,7 @@ public class ClubRegistApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result queryUserByIds(@Valid String[] ids) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -173,14 +174,14 @@ public class ClubRegistApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result info(@Valid String id) {
|
||||
ClubRegisterVo clubRegisterVo = sysClubService.findOne(id);
|
||||
return Result.success(clubRegisterVo);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("club")
|
||||
@SaCheckLogin
|
||||
public Result createCode() {
|
||||
int count = sysClubService.count(Cnd.where("year(createTime)", "=", DateUtil.thisYear()));
|
||||
String s = String.format("%02d", count + 1);
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ApiModel("疗休养综合查询查询参数")
|
||||
@ApiModel("干部培训综合查询查询参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CadreTrainingActPageForm extends PageForm {
|
||||
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.maternityLeave.models.MaternityLeave;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MutualInsuranceApplyController
|
||||
* @Date 2024/11/23 14:34
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/apply")
|
||||
@Api("互助保障申请")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html")
|
||||
@SaCheckPermission("mutualInsurance.apply")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/apply/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.apply")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
@SLog(tag = "生育休假-休假申请", msg = "保存休假申请")
|
||||
public Result save(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, mutualInsuranceUserInfo);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("SJHZBZ", mutualInsuranceUserInfo.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.apply", "h5.mutualInsurance.apply"}, mode = SaMode.OR)
|
||||
public Result submitAgain(@Param("data") MutualInsuranceUserInfo mutualInsuranceUserInfo, @Param("taskId") Long taskId) {
|
||||
if (StrUtil.isBlank(mutualInsuranceUserInfo.getId())) mutualInsuranceUserInfo.setApplyTime(new Date());
|
||||
|
||||
dao.insertOrUpdate(mutualInsuranceUserInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result findOne(String id) {
|
||||
return Result.success(baseService.dao().fetch(MutualInsuranceUserInfo.class, id));
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取受助人")
|
||||
@SaCheckPermission("mutualInsurance.apply")
|
||||
public Result queryRecipients(String key){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
loginname,
|
||||
username,
|
||||
birthday,
|
||||
mobile,
|
||||
sex,
|
||||
unitName,
|
||||
unionName,
|
||||
unionId,
|
||||
unitId
|
||||
FROM
|
||||
`vw_user`
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||
} else {
|
||||
cnd.and("id", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
}
|
||||
if (Strings.isNotBlank(key)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("username", key);
|
||||
group.orLike("loginname", key);
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = mutualInsuranceUserService.listPageMap(1, 10, sql);
|
||||
return Result.success().addData(pagination.getList());
|
||||
}
|
||||
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.maternityLeave.vo.MaternityLeaveCollectExcelVO;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.vo.MutualInsuranceCollectExcelVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:38
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/collect")
|
||||
@Api("查询统计")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceCollectController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/collect/index.html")
|
||||
@SaCheckPermission("mutualInsurance.collect")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/collect/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.collect")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.collect", "h5.mutualInsurance.collect"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.collect", "h5.mutualInsurance.collect"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceUserService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission(value = {"maternityLeave.collect", "h5.maternityLeave.collect"}, mode = SaMode.OR)
|
||||
@ApiOperation("导出省级互助保障表")
|
||||
public void onExport(@Param(value = "projectId") String projectId,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "unitId") String unitId,
|
||||
@Param(value = "userName") String userName,
|
||||
@Param(value = "sex") String sex,
|
||||
HttpServletResponse response) {
|
||||
//查询审核通过的数据
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.state instanceState
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.desc("info.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
List<MutualInsuranceCollectExcelVO> list = mutualInsuranceUserService.listVO(sql, MutualInsuranceCollectExcelVO.class);
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, MutualInsuranceCollectExcelVO.class, list);
|
||||
CommonDownloadUtil.download("省级互助保障申请表.xlsx", workbook, response);
|
||||
}
|
||||
}
|
||||
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ZheJiangMutualInsuranceMineController
|
||||
* @Date 2024/11/23 14:34
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/mine")
|
||||
@Api("我的申请")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceMineController {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/mine/index.html")
|
||||
@SaCheckPermission("mutualInsurance.mine")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/mine/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.mine")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.mine", "h5.mutualInsurance.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm, @Param(value = "year") Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
mutual_insurance_user_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
// 年度查询条件
|
||||
cnd.andEX("year(info.applyTime)", "=", year);
|
||||
cnd.desc("info.applyTime");
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.mine", "h5.mutualInsurance.mine"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceUserService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.Sys_home_activity;
|
||||
import com.budwk.app.zhgh.dayofficework.cadreTraining.model.CadreTrainingAct;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceProjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MutualInsuranceProjectController
|
||||
* @Date 2024/11/23 14:33
|
||||
* @注释
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/project")
|
||||
@Api("项目管理")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceProjectController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MutualInsuranceProjectService mutualInsuranceProjectService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/project/index.html")
|
||||
@SaCheckPermission("mutualInsurance.project")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/project/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.project")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("事项分页")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result pageData(@Valid PageForm pageForm, Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX("projectName", pageForm.getSearchKeyword()));
|
||||
}
|
||||
Pagination pagination = mutualInsuranceProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("事项保存")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result save( @Param("data")MutualInsuranceProject mutualInsuranceProject) {
|
||||
if (StrUtil.isBlank(mutualInsuranceProject.getId())) mutualInsuranceProject.setYear(DateUtil.thisYear());
|
||||
dao.insertOrUpdate(mutualInsuranceProject);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("状态切换")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result switchChange(MutualInsuranceProject mutualInsuranceProject) {
|
||||
mutualInsuranceProjectService.updateIgnoreNull(mutualInsuranceProject);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result delete(@Param("id") String id) {
|
||||
mutualInsuranceProjectService.delete(id);
|
||||
dao.clear(CadreTrainingAct.class, Cnd.where(CadreTrainingAct::getId, "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询事项列表")
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result listProject(Integer year){
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("`year`", "=", year == null ? DateUtil.thisYear() : year);
|
||||
cnd.and("isOpen", "=", true);
|
||||
List<MutualInsuranceProject> query = mutualInsuranceProjectService.query(cnd);
|
||||
return Result.success(query);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"mutualInsurance.project", "h5.mutualInsurance.project"}, mode = SaMode.OR)
|
||||
public Result findOne(String id){
|
||||
MutualInsuranceProject project = mutualInsuranceProjectService.fetch(id);
|
||||
return Result.success(project);
|
||||
}
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:35
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/schoolAudit")
|
||||
@Api("校工会审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceSchoolAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.schoolAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.schoolAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.schoolAudit", "h5.mutualInsurance.schoolAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "3e4e3785-64f4-4e7c-89bc-ea54dca216cd");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:42
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/secretaryAudit")
|
||||
@Api("党委书记审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceSecretaryAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.secretaryAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.secretaryAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.secretaryAudit", "h5.mutualInsurance.secretaryAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "8567fa6e-7207-4958-ab82-767e22d04159");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:35
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@At("/platform/mutualInsurance/unionAudit")
|
||||
@Api("分工会审核")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class MutualInsuranceUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/unionAudit/index.html")
|
||||
@SaCheckPermission("mutualInsurance.unionAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/unionAudit/index.html")
|
||||
@SaCheckPermission("h5.mutualInsurance.unionAudit")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"mutualInsurance.unionAudit", "h5.mutualInsurance.unionAudit"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
String projectId,
|
||||
String unionId,
|
||||
String unitId,
|
||||
String userName,
|
||||
String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "7e4a33fb-cd1e-4373-9bc5-815125568471");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
// 年度查询条件
|
||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
||||
|
||||
//事项id查询
|
||||
cnd.andEX("info.projectId", "=", projectId);
|
||||
|
||||
// 工会、单位名称查询条件
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
cnd.andEX("info.unitId", "=", unitId);
|
||||
|
||||
// 性别查询条件
|
||||
cnd.andEX("info.sex", "=", sex);
|
||||
|
||||
// 姓名查询条件
|
||||
if (StrUtil.isNotBlank(userName)) {
|
||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.model;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 16:09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("mutual_insurance_project")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("省级互助保障")
|
||||
public class MutualInsuranceProject extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("项目名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String projectName;
|
||||
|
||||
@Column
|
||||
@Comment("开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date startTime;
|
||||
|
||||
@Column
|
||||
@Comment("结束时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date endTime;
|
||||
|
||||
@Column
|
||||
@Comment("详细信息")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("是否发布")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isOpen;
|
||||
|
||||
@Column
|
||||
@Comment("封面")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> cover;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.model;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 16:09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("mutual_insurance_user_info")
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("个人信息")
|
||||
public class MutualInsuranceUserInfo extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("项目Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String projectId;
|
||||
|
||||
@Column
|
||||
@Comment("项目名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String projectName;
|
||||
|
||||
@Column
|
||||
@Comment("申请模式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mode;
|
||||
|
||||
@Column
|
||||
@Comment("填写人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String proxyUserId;
|
||||
|
||||
@Column
|
||||
@Comment("填写人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String proxyUserName;
|
||||
|
||||
@Column
|
||||
@Comment("填写人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String proxyLoginName;
|
||||
|
||||
@Column
|
||||
@Comment("userid")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("手机号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("身份证件号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("所属单位Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("所属单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("在职状态(年度在岗,不在岗,有个时间范围,在某个时间之后退休的不能参加)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String insuranceUserState;
|
||||
|
||||
@Column
|
||||
@Comment("不在岗时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private Date noDutyTime;
|
||||
|
||||
@Column
|
||||
@Comment("医保状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String medicalInsuranceState;
|
||||
|
||||
@Column
|
||||
@Comment("签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyTime;
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
|
||||
|
||||
public interface MutualInsuranceProjectService extends BaseService<MutualInsuranceProject> {
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
|
||||
public interface MutualInsuranceUserService extends BaseService<MutualInsuranceUserInfo> {
|
||||
|
||||
// /**
|
||||
// * 设置基础信息
|
||||
// * @param userInfo
|
||||
// */
|
||||
// void setBasicUserInfo(MutualInsuranceUserInfo userInfo);
|
||||
//
|
||||
// /**
|
||||
// * 获取查询统计sql
|
||||
// * @param pageForm
|
||||
// * @return
|
||||
// */
|
||||
// Sql getQuerySql(MutualInsuranceUserPageForm pageForm);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceProjectService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/23 17:55
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MutualInsuranceProjectServiceImpl extends BaseServiceImpl<MutualInsuranceProject> implements MutualInsuranceProjectService {
|
||||
public MutualInsuranceProjectServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.model.MutualInsuranceUserInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ZheJiangMutualInsuranceUserServiceImpl
|
||||
* @Date 2024/11/23 15:33
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class MutualInsuranceUserServiceImpl extends BaseServiceImpl<MutualInsuranceUserInfo> implements MutualInsuranceUserService {
|
||||
public MutualInsuranceUserServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void setBasicUserInfo(MutualInsuranceUserInfo userInfo) {
|
||||
// User user = dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
// if (user != null) {
|
||||
// userInfo.setUnitId(user.getUnitid());
|
||||
// userInfo.setUnitName(user.getUnitname());
|
||||
// userInfo.setUnionId(user.getUnionid());
|
||||
// userInfo.setUnionName(user.getUnionname());
|
||||
// userInfo.setUserState(user.getUserState());
|
||||
// userInfo.setPersonType(user.getPersonType());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public Sql getQuerySql(MutualInsuranceUserPageForm pageForm) {
|
||||
// Sql sql = Sqls.create("""
|
||||
// SELECT
|
||||
// u.loginname,
|
||||
// u.username,
|
||||
// u.unitname AS unitName,
|
||||
// u.unionname AS unionName,
|
||||
// u.sex,
|
||||
// u.mobile,
|
||||
// info.signature
|
||||
// FROM
|
||||
// `user` u
|
||||
// LEFT JOIN zhe_jiang_mutual_insurance_user_info info ON info.loginname = u.loginname
|
||||
// $condition
|
||||
// """);
|
||||
// Cnd cnd = Cnd.NEW();
|
||||
// cnd.and("u.member", "=", MemberMode.NORMAL.getCode());
|
||||
// switch (pageForm.getApplyState()) {
|
||||
// case "all" -> {
|
||||
// }
|
||||
// case "apply" -> {
|
||||
// cnd.and("info.stateId", "=", 10030);
|
||||
// }
|
||||
// case "unApply" -> {
|
||||
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
// seg.or("info.stateId", "!=", 10030);
|
||||
// seg.or("info.stateId", "is", null);
|
||||
// cnd.and(seg);
|
||||
// }
|
||||
// }
|
||||
// if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
// if (ShiroUtil.hasAnyRoles("H04")) {
|
||||
// cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
// cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||
// } else {
|
||||
// cnd.and("u.userId", "=", ShiroUtil.getUserId());
|
||||
// }
|
||||
// } else {
|
||||
// cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||
// cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||
// }
|
||||
// if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
// seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
// seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
// cnd.and(seg);
|
||||
// }
|
||||
// if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
// cnd.orderBy("u." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
// } else {
|
||||
// cnd.desc("info.applyTime");
|
||||
// }
|
||||
// sql.setCondition(cnd);
|
||||
// return sql;
|
||||
// }
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author : hongqiwei
|
||||
* @description :
|
||||
* @createDate : 2025/9/25 9:54
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MutualInsuranceCollectExcelVO {
|
||||
|
||||
@Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd")
|
||||
private Date applyTime;
|
||||
|
||||
@Excel(name = "申请模式", width = 20)
|
||||
private String mode;
|
||||
|
||||
@Excel(name = "填写人工号", width = 20)
|
||||
private String proxyLoginName;
|
||||
|
||||
@Excel(name = "填写人", width = 20)
|
||||
private String proxyUserName;
|
||||
|
||||
@Excel(name = "工号", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", width = 20)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "性别", width = 20)
|
||||
private String sex;
|
||||
|
||||
@Excel(name = "身份证号码", width = 20)
|
||||
private String idCard;
|
||||
|
||||
@Excel(name = "分工会", width = 20)
|
||||
private String unionName;
|
||||
|
||||
@Excel(name = "单位", width = 20)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "事项名称", width = 20)
|
||||
private String projectName;
|
||||
|
||||
@Excel(name = "医保状态", width = 20)
|
||||
private String medicalInsuranceState;
|
||||
|
||||
@Excel(name = "在职状态", width = 20)
|
||||
private String insuranceUserState;
|
||||
|
||||
@Excel(name = "电话", width = 20)
|
||||
private String mobile;
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class MemberChangeApplyController {
|
||||
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set("origin", "personType");
|
||||
args.set("origin", "person");
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, memberChangeRecord);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HYBG", memberChangeRecord.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ public class MemberBatchMakeController {
|
||||
}
|
||||
|
||||
dao.update(Sys_user.class, Chain.make("member", true)
|
||||
.addSpecial("memberTime", DateUtil.now()),
|
||||
.add("memberTime", DateUtil.now()),
|
||||
Cnd.where("id", "in", userIds));
|
||||
|
||||
// 添加会员角色
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 141 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 164 KiB |
@@ -243,6 +243,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
|
||||
|
||||
try {
|
||||
debugger
|
||||
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
||||
$("#sub-app-container #sidebar-menu .menu-header .menu-title").text(app?.name)
|
||||
} catch (e) {
|
||||
@@ -323,16 +324,53 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
if (res.code === 0) {
|
||||
this.menus = res.data
|
||||
window.sessionStorage.setItem("zhgh_sub_app_menus", JSON.stringify(res.data))
|
||||
this.echoMenus()
|
||||
this.matchUrlToMenu()
|
||||
} else {
|
||||
this.menus = []
|
||||
}
|
||||
this.echoMenus()
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 按 URL 精准激活
|
||||
matchUrlToMenu() {
|
||||
// 跳转带过来的地址
|
||||
const pathname = window.location.pathname
|
||||
const find = (list, parentIds = []) => {
|
||||
for (const m of list) {
|
||||
if (m.href && pathname.includes(m.href.split('?')[0])) {
|
||||
return { menu: m, parentIds }
|
||||
}
|
||||
if (m.children?.length) {
|
||||
const hit = find(m.children, [...parentIds, m.id])
|
||||
if (hit) return hit
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
const hit = find(this.menus)
|
||||
if (hit) {
|
||||
// 激活跳转菜单
|
||||
this.activeMenuIndex = hit.menu.id
|
||||
this.openedMenus = hit.parentIds
|
||||
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
||||
$("#sub-app-container #sidebar-menu .menu-header .menu-title").text(app?.name)
|
||||
this.$nextTick(() => {
|
||||
this.menuSelect(hit.menu.id, hit.parentIds)
|
||||
// 保证内容区对应
|
||||
commonUtil.pjaxPush(hit.menu.href)
|
||||
})
|
||||
} else if (!this.activeMenuIndex) {
|
||||
// 没命中且缓存也没有 → 再降级到第一个
|
||||
this.defaultSelect()
|
||||
}
|
||||
},
|
||||
|
||||
// 设置应用信息
|
||||
setAppInfo(app) {
|
||||
if (app) {
|
||||
debugger
|
||||
// 储存到缓存
|
||||
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
|
||||
// 储存到div中
|
||||
|
||||
@@ -322,7 +322,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
|
||||
<div class="apps-wrapper" id="app">
|
||||
<div class="apps-hero">
|
||||
<img src="https://i.cug.edu.cn/data/sys-attach/download/1i8hmpaqdwmvwajjvw2c8isi61jj0gkmosw0" alt="应用中心"/>
|
||||
<img src="/assets/platform/img/v4/lczx.png" alt="流程中心"/>
|
||||
</div>
|
||||
|
||||
<div class="apps-container">
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.design-dialog .el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="分类名称">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入分类名称" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button type="primary" @click="onAdd" size="small" icon="el-icon-plus">新增</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="name" label="分类名称"></el-table-column>
|
||||
<el-table-column prop="categoryCount" label="关联流程数"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="450px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="onEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" @click="onDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="40%">
|
||||
<el-form :model="formData" ref="formRef" label-width="80px">
|
||||
<el-form-item label="类型名称" prop="name"
|
||||
:rules="{ required: true, message: '请输入类型名称', trigger: 'blur' }">
|
||||
<el-input v-model="formData.name" placeholder="请输入类型名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="icon">
|
||||
<el-input v-model="formData.icon" placeholder="请输入图标"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAdd() {
|
||||
this.formData = {}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
onEdit(row) {
|
||||
this.dialogVisible = true
|
||||
this.formData = { ...row }
|
||||
},
|
||||
onSubmit() {
|
||||
this.$axios.post("/flow/category/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
this.dialogVisible = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/category/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -6,38 +6,61 @@ layout("/layouts/platform.html"){
|
||||
.design-dialog .el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
.el-table__row--level-1 {
|
||||
background-color: #FDF5E6 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="名称">
|
||||
<el-input v-model="pageForm.displayName" placeholder="名称" clearable></el-input>
|
||||
<search-item label="流程名称">
|
||||
<el-input v-model="pageForm.displayName" placeholder="请输入流程名称" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="编码">
|
||||
<el-input v-model="pageForm.name" placeholder="编码" clearable></el-input>
|
||||
<search-item label="流程编码">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入流程编码" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="流程分类">
|
||||
<el-select v-model="pageForm.category" placeholder="请选择流程分类" style="width: 100%"
|
||||
@change="doSearch" clearable>
|
||||
<el-option v-for="item in categoryOptions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="displayName" label="流程定义名称"></el-table-column>
|
||||
<el-table-column prop="name" label="流程定义编码"></el-table-column>
|
||||
<el-table-column prop="categoryName" label="流程分类">
|
||||
<template slot-scope="{row}">{{categoryOptions.find(item => item.id === row.category)?.categoryName}}</template>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%"
|
||||
row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||
<el-table-column label="序号" type="index" width="60">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.rowNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="version" label="版本号"></el-table-column>
|
||||
<el-table-column prop="state" label="状态">
|
||||
<template slot-scope="{row}">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'categoryName'">
|
||||
{{ categoryOptions.find(item => item.id === row.category)?.name }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'state'">
|
||||
<el-tag size="mini" v-if="row.state===1" type="success">启用</el-tag>
|
||||
<el-tag size="mini" v-else-if="row.state===0" type="info">停用</el-tag>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'createTime'">
|
||||
{{ $moment(row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="350px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" size="mini" @click="onView(row)">查看</el-button>
|
||||
@@ -66,7 +89,15 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
categoryOptions: [],
|
||||
designVisible: false,
|
||||
designUrl: null
|
||||
designUrl: null,
|
||||
tableColumns: [
|
||||
{prop: 'displayName', label: '流程定义名称'},
|
||||
{prop: 'name', label: '流程定义编码'},
|
||||
{prop: 'categoryName', label: '流程分类'},
|
||||
{prop: 'version', label: '版本号'},
|
||||
{prop: 'state', label: '状态'},
|
||||
{prop: 'createTime', label: '创建时间'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -12,11 +12,25 @@ layout("/layouts/platform.html"){
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="名称">
|
||||
<el-input v-model="pageForm.displayName" placeholder="名称" clearable></el-input>
|
||||
<search-item label="流程名称">
|
||||
<el-input v-model="pageForm.displayName" placeholder="请输入流程名称" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="编码">
|
||||
<el-input v-model="pageForm.name" placeholder="编码" clearable></el-input>
|
||||
<search-item label="流程编码">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入流程编码" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="流程分类">
|
||||
<el-select v-model="pageForm.category" placeholder="请选择流程分类" style="width: 100%"
|
||||
@change="doSearch" clearable>
|
||||
<el-option v-for="item in categoryOptions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="是否部署">
|
||||
<el-select v-model="pageForm.deployed" placeholder="请选择是否部署" style="width: 100%"
|
||||
@change="doSearch" clearable>
|
||||
<el-option label="全部" :value="null"></el-option>
|
||||
<el-option label="已部署" :value="true"></el-option>
|
||||
<el-option label="未部署" :value="false"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
@@ -70,7 +84,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="流程分类" prop="category"
|
||||
:rules="{ required: false, message: '请选择流程分类', trigger: 'change' }"
|
||||
style="width: 100%">
|
||||
<el-select v-model="formData.category" placeholder="请选择流程分类" clearable>
|
||||
<el-select v-model="formData.category" placeholder="请选择流程分类" clearable style="width: 100%">
|
||||
<el-option v-for="item in categoryOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -119,7 +133,7 @@ layout("/layouts/platform.html"){
|
||||
categoryOptions: [],
|
||||
designVisible: false,
|
||||
designUrl: null,
|
||||
formData: {}
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -213,7 +227,7 @@ layout("/layouts/platform.html"){
|
||||
this.categoryOptions = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
|
||||
@@ -13,11 +13,11 @@ layout("/layouts/platform.html"){
|
||||
ref="treeRef"
|
||||
:expand-on-click-node="false"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}"
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}"
|
||||
node-key="id"
|
||||
:default-expanded-keys="['1']"
|
||||
default-expand-all
|
||||
@node-click="treeNodeClick"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
|
||||
+7
-2
@@ -1,6 +1,6 @@
|
||||
const formEdit = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible="visible" width="70%" :close-on-click-modal="false">
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible="visible" width="70%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<el-steps :active="activeStep" finish-status="success" simple>
|
||||
<el-step title="基础信息"></el-step>
|
||||
<el-step title="名额设置"></el-step>
|
||||
@@ -96,7 +96,7 @@ const formEdit = {
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button @click="prevStep" v-if="activeStep > 0">
|
||||
<i class="el-icon-arrow-left"></i> 上一步
|
||||
</el-button>
|
||||
@@ -188,6 +188,11 @@ const formEdit = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 处理关闭弹窗
|
||||
handleClose() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
// 检查名额是否未设置
|
||||
isQuotaUnset(value) {
|
||||
return value === null || value === undefined
|
||||
|
||||
+2
-3
@@ -30,8 +30,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
@@ -151,7 +151,6 @@ layout("/layouts/platform.html"){
|
||||
this.activityList = res.data;
|
||||
// 默认选中最新的活动(第一个)
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.pageForm.activityId = res.data[0].id;
|
||||
this.pageData()
|
||||
} else {
|
||||
this.pageForm.activityId = ""; // 数据为空时设为空字符串
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -22,7 +22,7 @@ layout("/layouts/platform.html"){
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出生年月" prop="birthday">
|
||||
<el-input v-model="formData.birthday" readonly></el-input>
|
||||
<el-input :value="formatDate(formData.birthday)" readonly ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -55,8 +55,8 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -190,6 +190,31 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -9,19 +9,19 @@ const DSZNFMTX_INFO = {
|
||||
<el-descriptions :column="3" border class="flow-task-form">
|
||||
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{formatDate(viewData.birthday)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="原工作单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休时间" >{{viewData.retireTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休时间" >{{formatDate(viewData.retireTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="爱人姓名">{{viewData.loverName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.loverSex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" :span="2">{{viewData.loverUnitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结婚日期">{{viewData.marryTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{viewData.childrenBirthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领独生子女证时间">{{viewData.getCertificateTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结婚日期">{{formatDate(viewData.marryTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{formatDate(viewData.childrenBirthday)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领独生子女证时间">{{formatDate(viewData.getCertificateTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="独生子女光荣证号">{{viewData.childrenGraceNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="办证机关">{{viewData.office}}</el-descriptions-item>
|
||||
<el-descriptions-item label="奖励金额">{{viewData.bonus}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item :span="3" label="独生子女父母光荣证">
|
||||
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
@@ -88,6 +88,32 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
@@ -120,6 +146,4 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -25,8 +25,8 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -227,7 +227,7 @@ layout("/layouts/platform.html"){
|
||||
isMale(newVal) {
|
||||
if (newVal) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ layout("/layouts/platform.html"){
|
||||
isFemale(newVal) {
|
||||
if (newVal) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
}
|
||||
@@ -389,7 +389,7 @@ layout("/layouts/platform.html"){
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0,因为男性不休产假
|
||||
@@ -397,7 +397,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="省级互助保障" define_key="SJHZBZ"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="140px" label-position="right"
|
||||
label-suffix=":">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="10">
|
||||
<el-form-item prop="projectId" label="所属事项">
|
||||
<el-select v-model="formData.projectId"
|
||||
style="width: 100%"
|
||||
placeholder="请选择所属事项">
|
||||
<el-option v-for="item in projectList" :key="item.id" :label="item.projectName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin-top: 8px">
|
||||
<span style="color: #0a84ff;cursor: pointer;" @click="onView">查看详情</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mode" label="申请模式">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||
<el-option label="本人申请" value="本人申请"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="替他人申请"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="proxyUserName" label="填写人姓名">
|
||||
<el-input readonly v-model="formData.proxyUserName" placeholder="请输入姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="proxyLoginName" label="填写人工号">
|
||||
<el-input readonly v-model="formData.proxyLoginName" placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="userId" label="申请人" label-width="140px">
|
||||
<el-select :remote-method="queryRecipients"
|
||||
@change="userChange"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
placeholder="输入工号或者姓名查找"
|
||||
style="width: 100%"
|
||||
v-model="formData.userId"
|
||||
v-if="formData.mode == '替他人申请'">
|
||||
<el-option :key="o.id"
|
||||
:label="o.username+'('+o.loginname+')'"
|
||||
:value="o.id"
|
||||
v-for="o in subsidizedList"></el-option>
|
||||
</el-select>
|
||||
<el-input v-else
|
||||
readonly
|
||||
v-model="formData.userName"
|
||||
placeholder="申请人姓名">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input readonly v-model="formData.loginName" placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="unitName" label="所属单位">
|
||||
<el-input readonly v-model="formData.unitName" placeholder="请输入所属单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="unionName" label="所属工会">
|
||||
<el-input readonly v-model="formData.unionName" placeholder="请输入所属工会"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sex" label="性别">
|
||||
<el-input readonly v-model="formData.sex" placeholder="请输入性别"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mobile" label="手机号">
|
||||
<el-input v-model="formData.mobile" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="idCard" label="身份证号">
|
||||
<el-input v-model="formData.idCard" placeholder="请输入身份证号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="medicalInsuranceState" label="医保状态">
|
||||
<dict-select v-model="formData.medicalInsuranceState" code="USER_MEDICINE" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="insuranceUserState" label="在职状态">
|
||||
<el-select clearable placeholder="请选择在职状态"
|
||||
style="width: 100%;"
|
||||
v-model="formData.insuranceUserState">
|
||||
<el-option :label="item.name" :value="item.code" :key="item.code"
|
||||
v-for="item in dict.type.USER_STATE"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="noDutyTime" label="不在岗时间">
|
||||
<el-date-picker
|
||||
v-model="formData.noDutyTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
clearable
|
||||
placeholder="请选择不在岗时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item prop="sign" label="签字">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<project-info ref="projectInfoRef"></project-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/projectInfo.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["USER_STATE", "USER_MEDICINE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'project-info': projectInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
mode: '本人申请' // 默认为本人申请
|
||||
},
|
||||
// 替他人申请相关
|
||||
subsidizedList: [],
|
||||
formRules: {
|
||||
projectId: [{ required: true, message: '请选择所属事项', trigger: 'change' }],
|
||||
mode: [{ required: true, message: '请选择申请模式', trigger: 'change' }],
|
||||
proxyUserName: [{ required: true, message: '请填写填写人姓名', trigger: 'blur' }],
|
||||
proxyLoginName: [{ required: true, message: '请填写填写人工号', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '请选择申请人', trigger: 'change' }],
|
||||
loginName: [{ required: true, message: '请填写工号', trigger: 'blur' }],
|
||||
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
|
||||
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
|
||||
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
|
||||
mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' }],
|
||||
idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }],
|
||||
medicalInsuranceState: [{ required: true, message: '请选择医保状态', trigger: 'change' }],
|
||||
insuranceUserState: [{ required: true, message: '请选择在职状态', trigger: 'change' }],
|
||||
sign: [{ required: true, message: '请签字', trigger: 'change' }]
|
||||
},
|
||||
projectList: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听 projectId 变化,自动设置 projectName
|
||||
'formData.projectId': {
|
||||
handler(newVal) {
|
||||
if (newVal && this.projectList.length > 0) {
|
||||
const project = this.projectList.find(item => item.id === newVal);
|
||||
if (project) {
|
||||
this.$set(this.formData, 'projectName', project.projectName);
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 申请模式切换
|
||||
modeChange(val) {
|
||||
const user = this.$store.state.user;
|
||||
if (val === "本人申请") {
|
||||
// 本人申请
|
||||
this.$set(this.formData, 'userId', user.id);
|
||||
this.$set(this.formData, 'userName', user.username);
|
||||
this.$set(this.formData, 'loginName', user.loginname);
|
||||
this.$set(this.formData, 'proxyUserId', user.id);
|
||||
this.$set(this.formData, 'proxyUserName', user.username);
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname);
|
||||
this.$set(this.formData, 'unitId', user.unit.id);
|
||||
this.$set(this.formData, 'unitName', user.unit.name);
|
||||
this.$set(this.formData, 'unionId', user.union.id);
|
||||
this.$set(this.formData, 'unionName', user.union.name);
|
||||
this.$set(this.formData, 'sex', user.sex);
|
||||
this.$set(this.formData, 'nation', user.nation);
|
||||
this.$set(this.formData, 'birthday', user.birthday);
|
||||
this.$set(this.formData, 'mobile', user.mobile);
|
||||
} else {
|
||||
// 替他人申请,清空被帮助人信息
|
||||
this.$set(this.formData, 'proxyUserId', user.id);
|
||||
this.$set(this.formData, 'proxyUserName', user.username);
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname);
|
||||
this.$set(this.formData, 'userId', null);
|
||||
this.$set(this.formData, 'userName', null);
|
||||
this.$set(this.formData, 'loginName', null);
|
||||
this.$set(this.formData, 'unitId', null);
|
||||
this.$set(this.formData, 'unitName', null);
|
||||
this.$set(this.formData, 'unionId', null);
|
||||
this.$set(this.formData, 'unionName', null);
|
||||
this.$set(this.formData, 'sex', null);
|
||||
this.$set(this.formData, 'nation', null);
|
||||
this.$set(this.formData, 'birthday', null);
|
||||
this.$set(this.formData, 'mobile', null);
|
||||
}
|
||||
},
|
||||
|
||||
// 查询受助人
|
||||
queryRecipients(key) {
|
||||
this.$axios.get("/platform/mutualInsurance/apply/queryRecipients", {
|
||||
params: { key }
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.subsidizedList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 用户选择变化
|
||||
async userChange() {
|
||||
const user = this.subsidizedList.find(item => item.id === this.formData.userId);
|
||||
if (user) {
|
||||
this.$set(this.formData, 'userId', user.id);
|
||||
this.$set(this.formData, 'userName', user.username);
|
||||
this.$set(this.formData, 'loginName', user.loginname);
|
||||
this.$set(this.formData, 'sex', user.sex);
|
||||
this.$set(this.formData, 'unitId', user.unitId);
|
||||
this.$set(this.formData, 'unitName', user.unitName);
|
||||
this.$set(this.formData, 'unionId', user.unionId);
|
||||
this.$set(this.formData, 'unionName', user.unionName);
|
||||
this.$set(this.formData, 'birthday', user.birthday);
|
||||
this.$set(this.formData, 'mobile', user.mobile);
|
||||
} else {
|
||||
this.$set(this.formData, 'userId', null);
|
||||
this.$set(this.formData, 'userName', null);
|
||||
this.$set(this.formData, 'loginName', null);
|
||||
this.$set(this.formData, 'sex', null);
|
||||
this.$set(this.formData, 'unitId', null);
|
||||
this.$set(this.formData, 'unitName', null);
|
||||
this.$set(this.formData, 'unionId', null);
|
||||
this.$set(this.formData, 'unionName', null);
|
||||
this.$set(this.formData, 'birthday', null);
|
||||
this.$set(this.formData, 'mobile', null);
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交验证
|
||||
validateBeforeSubmit() {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
resolve(true);
|
||||
} else {
|
||||
this.$message.error('请完善必填信息');
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
async onFinishTask() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView() {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.projectInfoRef.onOpen(this.formData.projectId)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/mutualInsurance/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async listProject() {
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
const resp = await $.post('/platform/mutualInsurance/project/listProject', {year: currentYear})
|
||||
if (resp.code === 0) {
|
||||
this.projectList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.formData, 'projectId', resp.data[0].id)
|
||||
this.$set(this.formData, 'projectName', resp.data[0].projectName)
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId).then(async data => {
|
||||
this.formData = data
|
||||
})
|
||||
} else {
|
||||
// 初始化为本人申请模式
|
||||
this.modeChange("本人申请");
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.listProject()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onExport() {
|
||||
this.$downLoad('/platform/mutualInsurance/collect/onExport', this.pageForm)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/mutualInsurance/collect/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
const formEdit = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :title="formData.id ? '编辑项目' : '新增项目'" :visible="visible" width="70%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<el-form :model="formData" :rules="formRules" label-width="110px" ref="form">
|
||||
<el-form-item label="事项名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入事项名称" maxlength="50"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="datetime"
|
||||
placeholder="请选择活动开始时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="formData.endTime" type="datetime"
|
||||
placeholder="请选择活动结束时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="内容详情" prop="content">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload :upload_number="5" :value.sync="formData.files"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传附件"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="cover" label="封面">
|
||||
<file-upload :upload_number="5" :value.sync="formData.cover"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传封面"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" style="text-align: right">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary" :loading="submitting">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
// 日期验证器
|
||||
const validateDateRange = (rule, value, callback) => {
|
||||
const { startTime, endTime } = this.formData
|
||||
|
||||
if (rule.field === "endTime" && startTime && endTime) {
|
||||
if (new Date(endTime) <= new Date(startTime)) {
|
||||
callback(new Error("结束时间必须晚于开始时间"))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
visible: false,
|
||||
submitting: false,
|
||||
formData: {},
|
||||
formRules: {
|
||||
projectName: [
|
||||
{ required: true, message: "请输入事项名称", trigger: "blur" },
|
||||
{ min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: "请选择活动开始时间", trigger: "blur" }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: "请选择活动结束时间", trigger: "blur" },
|
||||
{ validator: validateDateRange, trigger: "blur" }
|
||||
],
|
||||
content: [{ required: true, message: "内容详情", trigger: "blur" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 处理关闭弹窗
|
||||
handleClose() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
// 打开表单
|
||||
onOpen(id) {
|
||||
this.visible = true
|
||||
this.formData = {}
|
||||
|
||||
if (id) {
|
||||
// 如果是编辑模式,加载数据
|
||||
this.$axios.post("/platform/mutualInsurance/project/findOne", { id: id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
this.submitting = true
|
||||
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/project/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.visible = false
|
||||
this.$message.success(res.msg)
|
||||
this.submitting = false
|
||||
// 通过 $emit 触发父组件的刷新方法
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.submitting = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
const projectInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">事项信息</div>
|
||||
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="年度">{{viewData.year}}</el-descriptions-item>
|
||||
<el-descriptions-item label="事项名称">{{viewData.projectName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{viewData.startTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{viewData.endTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="详细信息" :span="2">
|
||||
<div v-html="stripHtmlTags(viewData.content)"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||
<span v-else>暂无附件</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(projectId) {
|
||||
this.projectId = projectId
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/mutualInsurance/project/findOne', {id: this.projectId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去除HTML标签的方法
|
||||
stripHtmlTags(html) {
|
||||
if (!html) return '';
|
||||
// 去除所有HTML标签
|
||||
return html.replace(/<[^>]*>/g, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
const userInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="所属事项">{{viewData.projectName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">{{ viewData.mode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{viewData.idCard}}</el-descriptions-item>
|
||||
<el-descriptions-item label="医保状态" >{{viewData.medicalInsuranceState}}</el-descriptions-item>
|
||||
<el-descriptions-item label="在职状态">{{viewData.insuranceUserState}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不在岗时间">{{viewData.noDutyTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" >
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
class="signature-image"
|
||||
style="height: 60px"
|
||||
></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<el-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"
|
||||
style="height: 60px"
|
||||
></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/findOne', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/mutualInsurance/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker placeholder="选择年度" type="year" style="width: 100%" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称:">
|
||||
<el-input placeholder="请输入事项名称查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openAdd">新增</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="projectName" label="事项名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="year" label="年度" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||
<el-table-column prop="isOpen" label="是否发布">
|
||||
<template slot-scope="{row}">
|
||||
<el-switch @change="switchChange(row)" active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isOpen"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<form-edit ref="formEditRef" @refresh="doSearch"></form-edit>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/formEdit.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"form-edit": formEdit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY') + "",
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 重写分页数据获取方法,使用正确的接口路径
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios
|
||||
.post("/platform/mutualInsurance/project/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.formEditRef.onOpen()
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.formEditRef.onOpen(row.id)
|
||||
},
|
||||
async switchChange(row) {
|
||||
const resp = await this.$axios.post("/platform/mutualInsurance/project/switchChange", row)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
const { code, msg } = await this.$axios.post("/platform/mutualInsurance/project/delete", { id: id })
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/secretaryAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/unionAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -27,14 +27,14 @@ layout("/layouts/platform.html"){
|
||||
<dict-select v-model="pageForm.userState" placeholder="在职状态" @change="doSearch"
|
||||
code="USER_STATE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personType" placeholder="教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBy" placeholder="编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personType" placeholder="教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="变更类型">
|
||||
<dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"
|
||||
code="MEMBER_CHANGE_TYPE"></dict-select>
|
||||
@@ -155,8 +155,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "username", label: "姓名", sortable: true },
|
||||
{ prop: "sex", label: "性别", sortable: true, width: "100px" },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true },
|
||||
|
||||
@@ -18,7 +18,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="出生年月" v-model="formData.birthday" placeholder="从信息中心获取"
|
||||
<van-field label="出生年月" v-model="formattedBirthday" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="原工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
@@ -155,8 +155,8 @@ layout("/layouts/platform_h5.html"){
|
||||
// 性别选择器
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男性', text: '男性' },
|
||||
{ value: '女性', text: '女性' }
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
// 日期选择器
|
||||
showDatePopup: false,
|
||||
@@ -165,8 +165,39 @@ layout("/layouts/platform_h5.html"){
|
||||
maxDate: new Date(2040, 11, 31)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 格式化出生年月显示
|
||||
formattedBirthday() {
|
||||
return this.formatDate(this.formData.birthday);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
// 显示日期选择器
|
||||
showDatePicker(fieldName) {
|
||||
this.currentDatePickerField = fieldName;
|
||||
@@ -175,7 +206,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
// 日期确认事件
|
||||
onDateConfirm(value) {
|
||||
const formattedDate = this.$moment(value).format("YYYY-MM-DD");
|
||||
const formattedDate = this.formatDate(value);
|
||||
this.$set(this.formData, this.currentDatePickerField, formattedDate);
|
||||
this.showDatePopup = false;
|
||||
},
|
||||
@@ -351,6 +382,13 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data;
|
||||
// 格式化所有日期字段
|
||||
const dateFields = ['birthday', 'retireTime', 'marryTime', 'childrenBirthday', 'getCertificateTime'];
|
||||
dateFields.forEach(field => {
|
||||
if (this.formData[field]) {
|
||||
this.$set(this.formData, field, this.formatDate(this.formData[field]));
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -363,7 +401,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "birthday", user.birthday)
|
||||
this.$set(this.formData, "birthday", this.formatDate(user.birthday))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,15 +6,15 @@ const DSZNFMTX_INFO = {
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="出生年月">{{ formatDate(viewData.birthday) }}</van-cell>
|
||||
<van-cell title="原工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="退休时间">{{ viewData.retireTime }}</van-cell>
|
||||
<van-cell title="退休时间">{{ formatDate(viewData.retireTime) }}</van-cell>
|
||||
<van-cell title="爱人姓名">{{ viewData.loverName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.loverSex }}</van-cell>
|
||||
<van-cell title="工作单位">{{ viewData.loverUnitName }}</van-cell>
|
||||
<van-cell title="结婚日期">{{ viewData.loverBirthday }}</van-cell>
|
||||
<van-cell title="子女出生日">{{ viewData.loverBirthday }}</van-cell>
|
||||
<van-cell title="领独生子女光时间">{{ viewData.getCertificateTime }}</van-cell>
|
||||
<van-cell title="结婚日期">{{ formatDate(viewData.marryTime) }}</van-cell>
|
||||
<van-cell title="子女出生日">{{ formatDate(viewData.childrenBirthday) }}</van-cell>
|
||||
<van-cell title="领独生子女光时间">{{ formatDate(viewData.getCertificateTime) }}</van-cell>
|
||||
<van-cell title="独生子女光荣证号">{{ viewData.childrenGraceNumber }}</van-cell>
|
||||
<van-cell title="办证机关">{{ viewData.office }}</van-cell>
|
||||
<van-cell title="奖励金额">{{ viewData.bonus }}</van-cell>
|
||||
@@ -39,7 +39,7 @@ const DSZNFMTX_INFO = {
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{ task.finishTime}}
|
||||
{{ formatDate(task.finishTime) }}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
@@ -51,7 +51,7 @@ const DSZNFMTX_INFO = {
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{ task.finishTime}}
|
||||
{{ formatDate(task.finishTime) }}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
@@ -86,6 +86,32 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
|
||||
+6
-6
@@ -173,8 +173,8 @@ layout("/layouts/platform_h5.html"){
|
||||
// 性别
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男性', text: '男性' },
|
||||
{ value: '女性', text: '女性' }
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
showLoverBirthdayPicker: false,
|
||||
showStartTimePicker: false,
|
||||
@@ -249,7 +249,7 @@ layout("/layouts/platform_h5.html"){
|
||||
isMale(newVal) {
|
||||
if (newVal) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ layout("/layouts/platform_h5.html"){
|
||||
isFemale(newVal) {
|
||||
if (newVal) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
}
|
||||
@@ -561,7 +561,7 @@ layout("/layouts/platform_h5.html"){
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0
|
||||
@@ -569,7 +569,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
|
||||
Reference in New Issue
Block a user