This commit is contained in:
@jyuhsin
2026-01-22 13:53:50 +08:00
parent 7eac8b00b5
commit c50bcbf869
52 changed files with 1454 additions and 446 deletions
@@ -31,6 +31,7 @@ RoleConstant {
SCHOOL_UNION_ARTICLE_FGH_ADMIN("校工会分工会新闻审批管理员"),
SCHOOL_UNION_ARTICLE_ADMIN("校工会新闻审批管理员"),
SCHOOL_OUTLAY_ADMIN("校工会经费管理员"),
SCHOOL_PUBLICITY_AND_CULTURAL("校宣传与文体办公室负责人"),
BRANCH_UNION_ADMIN("分工会管理员"),
BRANCH_UNION_CHAIRMAN("分工会主席"),
@@ -0,0 +1,55 @@
package com.budwk.app.flow.handler;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.exception.BaseException;
import com.budwk.app.flow.engine.AssignmentHandler;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.engine.model.TaskModel;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.web.controllers.open.commons.service.CommonService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.lang.Lang;
import java.util.List;
/**
* @ClassName FlowRoleHandler
* @Author JyuHsin
* @Date 2026/1/15 15:56
* @Version 1.0
* @Description 根据传入的角色获取审核人
*/
public class FlowRoleHandler implements AssignmentHandler {
@Override
public List<String> assign(TaskModel model, Execution execution) {
String roleCode = execution.getArgs().getStr("roleCode");
if (StrUtil.isBlank(roleCode)) {
throw new BaseException("参数 roleCode 不能为空");
}
CommonService commonService = ServiceContext.find(CommonService.class);
List<Sys_user> users = commonService.findUserInfoByRoleCode(roleCode);
if(Lang.isEmpty(users)) {
throw new BaseException("未查询到相关审批人");
}
return users.stream().map(Sys_user::getId).toList();
}
@Override
public String getMessage() {
return "根据传入的角色获取审核人(通用版本,根据args中的roleCode";
}
@Override
public int getOrder() {
return AssignmentHandler.super.getOrder();
}
}
@@ -23,6 +23,7 @@ import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.sys.services.SysMsgService;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.web.controllers.open.commons.service.CommonService;
import com.budwk.app.zhgh.club.model.ClubUser;
@@ -53,133 +54,140 @@ import java.util.List;
@Ok("json:full")
public class ClubUserJoinApplyController {
@Inject
private Dao dao;
@Inject
private CommonService commonService;
@Inject
private SysMsgService sysMsgService;
@Inject
private FlowEngine flowEngine;
@Inject
private FlowCommonService flowCommonService;
@Inject
private Dao dao;
@Inject
private CommonService commonService;
@Inject
private SysMsgService sysMsgService;
@Inject
private FlowEngine flowEngine;
@Inject
private FlowCommonService flowCommonService;
@At("/")
@At("/")
@SaCheckPermission("club.join.apply")
@Ok("beetl:/platform/zhgh/club/join/apply/index.html")
public void index() {}
@Ok("beetl:/platform/zhgh/club/join/apply/index.html")
public void index() {
}
@At("/h5")
@SaCheckPermission("h5.club.join.apply")
@Ok("beetl:/platform/zhghh5/club/apply/index.html")
public void h5Index() {}
public void h5Index() {
}
@At
@ApiOperation("详情")
@At
@ApiOperation("详情")
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
public Result info(@Valid String id) {
Sql sql = Sqls.create("""
SELECT
cua.*,
club.clubName,
u.loginname AS loginName,
u.username AS userName,
u.sex,
u.unitName,
u.unionName,
u.technicalTitle,
u.education,
u.academicDegree
FROM
club_user_apply cua
LEFT JOIN sys_club club ON club.id = cua.clubId
LEFT JOIN vw_user u ON u.id = cua.userId
WHERE cua.id = @id
""").setParam("id", id);
sql.setCallback(Sqls.callback.map());
dao.execute(sql);
return Result.success(sql.getResult());
}
public Result info(@Valid String id) {
Sql sql = Sqls.create("""
SELECT
cua.*,
club.clubName,
u.loginname AS loginName,
u.username AS userName,
u.sex,
u.unitName,
u.unionName,
u.technicalTitle,
u.education,
u.academicDegree
FROM
club_user_apply cua
LEFT JOIN sys_club club ON club.id = cua.clubId
LEFT JOIN vw_user u ON u.id = cua.userId
WHERE cua.id = @id
""").setParam("id", id);
sql.setCallback(Sqls.callback.map());
dao.execute(sql);
return Result.success(sql.getResult());
}
@At
@ApiOperation("保存申请")
@At
@ApiOperation("保存申请")
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
@SLog(tag = "协会管理系统-申请入会", msg = "保存协会入会")
public Result save(@Param("data") ClubUserApply clubUserApply) {
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
clubUserApply.setMode(true);
clubUserApply.setApplyDate(new Date());
dao.insertOrUpdate(clubUserApply);
return Result.success();
}
public Result save(@Param("data") ClubUserApply clubUserApply) {
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
clubUserApply.setMode(true);
clubUserApply.setApplyDate(new Date());
dao.insertOrUpdate(clubUserApply);
return Result.success();
}
@At
@ApiOperation("提交")
@At
@ApiOperation("提交")
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
@Aop(TransAop.READ_COMMITTED)
@Aop(TransAop.READ_COMMITTED)
@SLog(tag = "协会管理系统-申请入会", msg = "申请协会入会")
public Result submit(ClubUserApply clubUserApply) {
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isBlank(userApply.getId())) {
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(),ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
}
}
public Result submit(ClubUserApply clubUserApply) {
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isBlank(userApply.getId())) {
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
return Result.error("您有该协会的申请记录尚未完成,请到我的申请里查看!");
}
}
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
clubUserApply.setMode(true);
clubUserApply.setApplyDate(new Date());
dao.insertOrUpdate(clubUserApply);
clubUserApply.setRoleCode(RoleConstant.CLUB_MEMBER.name());
clubUserApply.setMode(true);
clubUserApply.setApplyDate(new Date());
dao.insertOrUpdate(clubUserApply);
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, clubUserApply);
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, clubUserApply);
args.set("clubId", clubUserApply.getClubId());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHRH", clubUserApply.getId(), SecurityUtil.getUserId(), args);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHRH", clubUserApply.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();
}
// 自动完成第一个申请任务
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)
@At
@ApiOperation("重新提交申请")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
public Result submitAgain(@Param("data") ClubUserApply clubUserApply, @Param("taskId") Long taskId) {
dao.insertOrUpdate(clubUserApply);
public Result submitAgain(@Param("data") ClubUserApply clubUserApply, @Param("taskId") Long taskId) {
dao.insertOrUpdate(clubUserApply);
Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
dict.set("clubId", clubUserApply.getClubId());
flowCommonService.executeTask(dict);
return Result.success();
}
flowCommonService.executeTask(dict);
return Result.success();
}
@At
@ApiOperation("校验是否申请过协会")
@At
@ApiOperation("校验是否申请过协会")
@SaCheckPermission(value = {"club.join.apply", "h5.club.join.apply"}, mode = SaMode.OR)
public Result checkApplyClub(@Valid String clubId) {
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("clubId", "=", clubId).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("clubId", "=", clubId));
if (ObjectUtil.isEmpty(userApply) && ObjectUtil.isEmpty(clubUser)) {
return Result.success();
}
public Result checkApplyClub(@Valid String clubId) {
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
if (user.getMember() != 1) {
return Result.error(99, "抱歉,您不满足入会的条件!");
}
if (ObjectUtil.isNotEmpty(clubUser)) {
return Result.error(99, "请勿重复申请!");
}
ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("clubId", "=", clubId).and("mode", "=", 1).desc(ClubUserApply::getApplyDate));
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("clubId", "=", clubId));
if (ObjectUtil.isEmpty(userApply) && ObjectUtil.isEmpty(clubUser)) {
return Result.success();
}
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(),ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
return Result.error(99, "您有该协会的申请记录尚未完成,请到我的申请里查看!");
}
return Result.success();
}
if (ObjectUtil.isNotEmpty(clubUser)) {
return Result.error(99, "请勿重复申请!");
}
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", userApply.getId()));
if (!List.of(ProcessInstanceStateEnum.REJECT.getCode(), ProcessInstanceStateEnum.FINISHED.getCode()).contains(processInstance.getState())) {
return Result.error(99, "您有该协会的申请记录尚未完成,请到我的申请里查看!");
}
return Result.success();
}
}
@@ -79,6 +79,7 @@ public class ClubUserJoinMineController {
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
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
@@ -88,6 +89,7 @@ public class ClubUserJoinMineController {
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
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -0,0 +1,186 @@
package com.budwk.app.zhgh.club.controller.infoManage;
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 cn.hutool.json.JSONObject;
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.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.club.model.ClubPayRecord;
import com.budwk.app.zhgh.club.model.ClubUserApply;
import com.budwk.app.zhgh.club.service.ClubPayRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
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.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* @ClassName ClubPayRecordController
* @Author JyuHsin
* @Date 2026/1/17 15:39
* @Version 1.0
* @Description TODO
*/
@Slf4j
@IocBean
@Ok("json:full")
@Api(tags = "协会缴费记录")
@At("/platform/club/pay")
public class ClubPayRecordController {
@Inject
private ClubPayRecordService payRecordService;
@At("")
@SaCheckPermission("club.infoManage.pay")
@Ok("beetl:/platform/zhgh/club/infoManage/pay/index.html")
public void index() {
}
@At
@SaCheckPermission("club.infoManage.pay")
public Result pageData(@Valid PageForm pageForm,
@Param("year") Integer year,
@Param("clubId") String clubId,
@Param("payed") Integer payed,
@Param("assign") Integer assign) {
Sql sql = Sqls.create("""
SELECT
cpr.*,
c.clubName,
u.loginName,
u.userName,
u.unitName,
u.retireDate,
(SELECT createdAt FROM club_user WHERE clubId = cpr.clubId AND userId = cpr.userId ORDER BY createdAt LIMIT 1) AS applyTime,
u.userState
FROM
`club_pay_record` cpr
LEFT JOIN sys_club c ON cpr.clubid = c.id
LEFT JOIN vw_user u ON u.id = cpr.userId
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("cpr.year", "=", year);
cnd.andEX("cpr.clubId", "=", clubId);
cnd.andEX("cpr.payed", "=", payed);
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 (assign != null) {
SqlExpressionGroup mainGroup = new SqlExpressionGroup();
if (assign == 0) {
SqlExpressionGroup noAssignGroup = new SqlExpressionGroup();
// 不拨付条件1:payed=false(原代码第一行直接return false
noAssignGroup.or("cpr.payed", "=", false);
// 不拨付条件2:payed=true,但用户状态是退休 且 无退休日期
SqlExpressionGroup retireNoDateGroup = new SqlExpressionGroup();
retireNoDateGroup.and("cpr.payed", "=", true);
retireNoDateGroup.and("u.userState", "=", "退休");
retireNoDateGroup.and("u.retireDate", "is", null);
// 不拨付条件3:payed=true,用户状态是退休,有退休日期,但退休年份 < 缴费年份
SqlExpressionGroup retireYearLessGroup = new SqlExpressionGroup();
retireYearLessGroup.and("cpr.payed", "=", true);
retireYearLessGroup.and("u.userState", "=", "退休");
retireYearLessGroup.and("u.retireDate", "is not", null);
// 计算缴费年份
// 退休年份 < 缴费年份
retireYearLessGroup.and("YEAR(u.retireDate)", "<", "cpr.year");
// 合并所有不拨付条件(满足任一即不拨付)
noAssignGroup.or(retireNoDateGroup);
noAssignGroup.or(retireYearLessGroup);
mainGroup.and(noAssignGroup);
} else {
SqlExpressionGroup assignGroup = new SqlExpressionGroup();
// 拨付前提:payed必须为true
assignGroup.and("cpr.payed", "=", true);
// 拨付条件1:用户状态≠退休
SqlExpressionGroup userNotRetireGroup = new SqlExpressionGroup();
userNotRetireGroup.or("u.userState", "<>", "退休");
// 拨付条件2:用户状态=退休,有退休日期,且退休年份≥缴费年份
SqlExpressionGroup retireQualifiedGroup = new SqlExpressionGroup();
retireQualifiedGroup.and("u.userState", "=", "退休");
retireQualifiedGroup.and("u.retireDate", "is not", null);
retireQualifiedGroup.and("YEAR(u.retireDate)", ">=", "cpr.year");
// 合并拨付条件(满足任一即拨付)
userNotRetireGroup.or(retireQualifiedGroup);
assignGroup.and(userNotRetireGroup);
mainGroup.and(assignGroup);
}
cnd.and(mainGroup);
}
sql.setCondition(cnd);
Pagination pagination = payRecordService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
List<NutMap> list = pagination.getList();
for (NutMap nutMap : list) {
boolean assigned = payRecordService.calAssigned(nutMap.getString("id"));
nutMap.put("assign", assigned);
}
return Result.success(pagination);
}
@At
@ApiOperation("修改协会成员缴费状态")
@SaCheckPermission("club.infoManage.pay")
@SLog(tag = "协会管理系统-缴费记录", msg = "修改协会成员缴费状态")
public Result handle(@Param("ids") String[] ids,
@Param("payed") Boolean payed) {
List<ClubPayRecord> list = payRecordService.query(Cnd.where("id", "in", ids));
for (ClubPayRecord payRecord : list) {
List<JSONObject> logs = Optional.ofNullable(payRecord.getOperateLogs()).orElseGet(ArrayList::new);
JSONObject log = new JSONObject();
log.set("operatorUserId", SecurityUtil.getUserId());
log.set("operatorUserName", SecurityUtil.getUserUsername());
log.set("operatorTime", DateUtil.now());
log.set("operatorType", "缴费管理-手动设置");
log.set("oldValue", payRecord.getPayed());
log.set("newValue", payed);
logs.add(log);
payRecord.setOperateLogs(logs);
payRecord.setPayed(payed);
}
payRecordService.update(list);
return Result.success();
}
}
@@ -7,6 +7,7 @@ import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
import com.budwk.app.zhgh.club.service.SysClubService;
import com.budwk.app.zhgh.club.vo.ClubRegisterPageVo;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
@@ -37,26 +38,10 @@ public class ClubConfirmController {
public void index() {
}
@At
@SaCheckPermission("club.register.clubConfirm")
public Result pageData(@Valid ClubUserPageForm pageForm) {
Pagination pagination = sysClubService.clubConfirmPageData(pageForm);
return Result.success(pagination);
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.register.clubConfirm")
@SLog(tag = "协会管理系统-协会注册", msg = "协会确认")
public Result doAudit() {
return Result.success();
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.register.clubConfirm")
@SLog(tag = "协会管理系统-协会注册", msg = "协会确认撤回")
public Result withdraw(@Valid Long processTaskId) {
return Result.success();
}
@At
@SaCheckPermission("club.register.clubConfirm")
public Result pageData(@Valid ClubUserPageForm pageForm) {
Pagination<ClubRegisterPageVo> pagination = sysClubService.clubConfirmPageData(pageForm);
return Result.success(pagination);
}
}
@@ -0,0 +1,64 @@
package com.budwk.app.zhgh.club.controller.register;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
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.flow.service.FlowCommonService;
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
import com.budwk.app.zhgh.club.service.SysClubService;
import com.budwk.app.zhgh.club.vo.ClubRegisterPageVo;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
/**
* @ClassName ClubOfficeAuditController
* @Author JyuHsin
* @Date 2026/1/15 16:32
* @Version 1.0
* @Description TODO
*/
@IocBean
@Ok("json")
@At("/platform/club/register/officeAudit")
public class ClubOfficeAuditController {
@Inject
private SysClubService sysClubService;
@Inject
private FlowCommonService flowCommonService;
@At("")
@Ok("beetl:/platform/zhgh/club/register/officeAudit/index.html")
@SaCheckPermission("club.register.officeAudit")
public void index() {}
@At
@SaCheckPermission("club.register.officeAudit")
public Result pageData(@Valid ClubUserPageForm pageForm) {
Pagination<ClubRegisterPageVo> pagination = sysClubService.officeAuditPageData(pageForm);
return Result.success(pagination);
}
@At("/executeTask")
@ApiOperation("执行任务")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.register.officeAudit")
public Result executeTask(@Param("data") String param) {
Dict args = Json.fromJson(Dict.class, param);
args.set("roleCode", RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name());
flowCommonService.executeTask(args);
return Result.success();
}
}
@@ -7,6 +7,7 @@ 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.result.Result;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
@@ -97,6 +98,7 @@ public class ClubRegistApplyController {
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, sysClub);
args.set("roleCode", RoleConstant.SCHOOL_PUBLICITY_AND_CULTURAL.name());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("XHZC", sysClub.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
@@ -53,36 +53,10 @@ public class ClubSchoolLeaderAuditController {
public void index() {
}
@At
@SaCheckPermission("club.register.schoolLeaderAudit")
public Result pageData(@Valid ClubUserPageForm pageForm) {
Pagination<ClubRegisterPageVo> pagination = sysClubService.schoolLeaderAuditPageData(pageForm);
return Result.success(pagination);
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.register.schoolLeaderAudit")
@SLog(tag = "协会管理系统-协会注册", msg = "分管领导审核注册协会")
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
approvalParam.getBpmTaskApprovalTypeEnum();
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
List<String> assignments = new ArrayList<>();
if(approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)){
List<Sys_user> schoolClubManageUser = commonService.findUserInfoByRoleCode(RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name());
assignments.addAll(schoolClubManageUser.stream().map(Sys_user::getLoginname).toList());
}
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, assignments);
return Result.success();
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.register.schoolLeaderAudit")
@SLog(tag = "协会管理系统-协会注册", msg = "分管领导撤回注册协会")
public Result revoke(@Valid String taskId) {
bpmService.revokeTask(taskId);
return Result.success();
}
@At
@SaCheckPermission("club.register.schoolLeaderAudit")
public Result pageData(@Valid ClubUserPageForm pageForm) {
Pagination<ClubRegisterPageVo> pagination = sysClubService.schoolLeaderAuditPageData(pageForm);
return Result.success(pagination);
}
}
@@ -1,10 +1,13 @@
package com.budwk.app.zhgh.club.interceptor;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.sys.services.SysRoleService;
@@ -31,31 +34,37 @@ public class ClubRegisterInterceptor implements FlowInterceptor {
public void intercept(Execution execution) {
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
SysClub club = Json.fromJson(SysClub.class, formDataStr);
Dao dao = ServiceContext.find(Dao.class);
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
// 因为是前置节点,所以要有if
Dict args = execution.getArgs();
Integer submitType = args.getInt("submitType");
if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.AGREE.getCode())) {
SysClub club = Json.fromJson(SysClub.class, formDataStr);
// 审核通过,就给角色,找理事机构
List<ClubUser> clubUsers = dao.query(
ClubUser.class,
Cnd.where("clubId", "=", club.getId())
);
List<Sys_user_role> list = new ArrayList<>();
for (ClubUser clubUser : clubUsers) {
for (String role : clubUser.getRoleCode()) {
Sys_user_role userRole = new Sys_user_role();
Sys_role sysRole = sysRoleService.getByCode(role);
userRole.setRoleId(sysRole.getId());
userRole.setUserId(clubUser.getUserId());
userRole.setClubId(club.getId());
list.add(userRole);
Dao dao = ServiceContext.find(Dao.class);
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
// 审核通过,就给角色,找理事机构
List<ClubUser> clubUsers = dao.query(
ClubUser.class,
Cnd.where("clubId", "=", club.getId())
);
List<Sys_user_role> list = new ArrayList<>();
for (ClubUser clubUser : clubUsers) {
for (String role : clubUser.getRoleCode()) {
Sys_user_role userRole = new Sys_user_role();
Sys_role sysRole = sysRoleService.getByCode(role);
userRole.setRoleId(sysRole.getId());
userRole.setUserId(clubUser.getUserId());
userRole.setClubId(club.getId());
list.add(userRole);
}
}
}
dao.insert(list);
sysUserService.clearCache();
sysRoleService.clearCache();
dao.insert(list);
sysUserService.clearCache();
sysRoleService.clearCache();
}
}
}
@@ -1,14 +1,20 @@
package com.budwk.app.zhgh.club.interceptor;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.club.model.ClubPayRecord;
import com.budwk.app.zhgh.club.model.ClubUser;
import com.budwk.app.zhgh.club.model.ClubUserApply;
import com.budwk.app.zhgh.club.service.SysClubUserService;
import org.bouncycastle.jcajce.provider.util.SecretKeyUtil;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
import org.nutz.json.Json;
@@ -28,15 +34,47 @@ public class ClubUserJoinInterceptor implements FlowInterceptor {
@Aop(TransAop.READ_COMMITTED)
public void intercept(Execution execution) {
// 获取表单参数
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
Boolean payed = execution.getArgs().getBool(FlowConst.TASK_FORM_DATA_PREFIX + "payed");
ClubUserApply clubUserApply = Json.fromJson(ClubUserApply.class, formDataStr);
// 获取操作类
Dao dao = ServiceContext.find(Dao.class);
SysClubUserService userService = ServiceContext.find(SysClubUserService.class);
// 将申请信息复制一份,插入协会成员表
ClubUser clubUser = BeanUtil.copyProperties(clubUserApply, ClubUser.class);
dao.insert(clubUser);
// 还要加到协会成员缴费表中
// 对了,如果同一个人,在同一年,多次加入同一协会,则只插入一条
int count = dao.count(
ClubPayRecord.class,
Cnd.where(ClubPayRecord::getClubId, "=", clubUser.getClubId())
.and(ClubPayRecord::getUserId, "=", clubUser.getUserId())
.and(ClubPayRecord::getYear, "=", DateUtil.thisYear())
);
if (count == 0) {
ClubPayRecord record = new ClubPayRecord();
record.setClubId(clubUser.getClubId());
record.setUserId(clubUser.getUserId());
record.setYear(DateUtil.thisYear());
record.setPayed(payed);
JSONObject log = new JSONObject();
log.set("operatorUserId", SecurityUtil.getUserId());
log.set("operatorUserName", SecurityUtil.getUserUsername());
log.set("operatorTime", DateUtil.now());
log.set("operatorType", "入会审核");
log.set("oldValue", null);
log.set("newValue", payed);
record.setOperateLogs(List.of(log));
dao.insert(record);
}
// 江苏卫生才有的,cao,将申请的人加入到活动组别里面去
userService.clubUser2Scope(clubUser.getClubId(), List.of(clubUser.getUserId()));
}
}
@@ -0,0 +1,58 @@
package com.budwk.app.zhgh.club.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 org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.List;
/**
* @ClassName ClubPayRecord
* @Author JyuHsin
* @Date 2026/1/17 15:31
* @Version 1.0
* @Description TODO
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("club_pay_record")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("协会会员缴费记录表")
public class ClubPayRecord extends BaseModel {
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("年份")
@ColDefine(type = ColType.INT)
private Integer year;
@Column
@Comment("协会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String clubId;
@Column
@Comment("用户ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("是否缴费")
@ColDefine(type = ColType.BOOLEAN)
@Default(value = "0")
private Boolean payed;
// 防止有人今天操作缴费,明天操作未缴费,还是记录一下吧
@Column
@Comment("操作记录")
@ColDefine(type = ColType.MYSQL_JSON)
private List<JSONObject> operateLogs;
}
@@ -0,0 +1,26 @@
package com.budwk.app.zhgh.club.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.club.model.ClubPayRecord;
/**
* @ClassName ClubPayRecordService
* @Author JyuHsin
* @Date 2026/1/17 15:40
* @Version 1.0
* @Description TODO
*/
public interface ClubPayRecordService extends BaseService<ClubPayRecord> {
/**
* 获取协会成员是否拨付
* @param userId
* @param clubId
*/
boolean calAssigned(String userId, String clubId);
boolean calAssigned(String primaryId);
boolean calAssigned(ClubPayRecord payRecord);
}
@@ -39,6 +39,8 @@ public interface SysClubService extends BaseService<SysClub> {
Pagination<ClubRegisterPageVo> schoolLeaderAuditPageData(@Valid ClubUserPageForm pageForm);
Pagination<ClubRegisterPageVo> officeAuditPageData(@Valid ClubUserPageForm pageForm);
Pagination<ClubRegisterPageVo> schoolReplyPageData(@Valid ClubUserPageForm pageForm);
Pagination<ClubRegisterPageVo> clubConfirmPageData(@Valid ClubUserPageForm pageForm);
@@ -0,0 +1,62 @@
package com.budwk.app.zhgh.club.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.zhgh.club.model.ClubPayRecord;
import com.budwk.app.zhgh.club.service.ClubPayRecordService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import java.util.Objects;
/**
* @ClassName ClubPayRecordServiceImpl
* @Author JyuHsin
* @Date 2026/1/17 15:40
* @Version 1.0
* @Description TODO
*/
@IocBean(args = {"refer:dao"})
public class ClubPayRecordServiceImpl extends BaseServiceImpl<ClubPayRecord> implements ClubPayRecordService {
public ClubPayRecordServiceImpl(Dao dao) {
super(dao);
}
@Override
public boolean calAssigned(String userId, String clubId) {
Cnd cnd = Cnd.NEW();
cnd.and("userId", "=", userId);
cnd.and("clubId", "=", clubId);
cnd.desc(ClubPayRecord::getCreatedAt);
ClubPayRecord payRecord = dao().fetch(ClubPayRecord.class, cnd);
return calAssigned(payRecord);
}
@Override
public boolean calAssigned(String primaryId) {
ClubPayRecord payRecord = fetch(primaryId);
return calAssigned(payRecord);
}
@Override
public boolean calAssigned(ClubPayRecord payRecord) {
// 如果是未缴费直接是不拨付
if (!payRecord.getPayed()) {
return false;
}
Sys_user user = dao().fetch(Sys_user.class, payRecord.getUserId());
if (!Objects.equals("退休", user.getUserState())) {
return true;
}
if (Lang.isEmpty(user.getRetireDate())) {
return false;
}
int retireYear = DateUtil.year(user.getRetireDate());
return retireYear >= (payRecord.getYear() != null ? payRecord.getYear() : DateUtil.thisYear());
}
}
@@ -227,6 +227,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
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
@@ -236,6 +237,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
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
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -245,18 +247,29 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
cnd.andEX("year(info.createTime)", "=", pageForm.getYear());
cnd.and("info.userId", "=", SecurityUtil.getUserId());
cnd.desc("createTime");
cnd.groupBy("info.id");
sql.setCondition(cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
}
@Override
public Pagination<ClubRegisterPageVo> schoolLeaderAuditPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW();
cnd.and("nd.nodeCode", "=", 20);
Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "1e239d94-a6ec-4561-8cff-0645b0b82a96");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
}
@Override
public Pagination<ClubRegisterPageVo> officeAuditPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "b4adf2d7-fb95-4444-b212-6d2a08e9cffd");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
}
@Override
public Pagination<ClubRegisterPageVo> schoolReplyPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW();
@@ -268,10 +281,11 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
@Override
public Pagination<ClubRegisterPageVo> clubConfirmPageData(ClubUserPageForm pageForm) {
Cnd cnd = Cnd.NEW();
cnd.and("nd.nodeCode", "=", 80);
Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "b57dc4e4-12cd-4f3c-b400-b34ebcf2f2d4");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
Sql sql = generateSql(pageForm, cnd);
return listPageVO(pageForm, sql, ClubRegisterPageVo.class);
}
private Sql generateSql(ClubUserPageForm pageForm, Cnd cnd) {
@@ -729,4 +729,8 @@ td.no-b {
/*********END********设置工作流表单el-description嵌套el-form的格式**************************END*********/
.el-form-item .form-item-tooltip {
color: rgb(153, 153, 153);
font-size: 13px;
display: block;
}
@@ -36,7 +36,7 @@ const businessTool = {
}
})
},
listCLubByRole() {
listClubByRole() {
return commonUtil
.axiosService()
.post("/platform/club/common/listClubByRole", {})
@@ -661,7 +661,7 @@ module.exports = {
async created() {
this.listSession()
await this.getRolesAndUnion()
this.clubOptions = await this.$businessTool.listCLubByRole()
this.clubOptions = await this.$businessTool.listClubByRole()
if ((this.is_sysadmin || this.is_A06 || this.is_H02) === false && this.is_H04 === true) {
this.unions = this.$businessTool.listUnion(this.unionid)
this.$set(this.pageForm, "unionId", this.unions[0].id)
@@ -23,7 +23,10 @@ module.exports = {
<div>
<el-row type="flex" justify="space-between" slot="header">
<h3 style="color: var(--color-primary)">{{ label }}</h3>
<el-link type="primary" @click="openChart">流程图</el-link>
<div class="header-right">
<slot name="header-right-label"></slot>
<el-link type="primary" @click="openChart">流程图</el-link>
</div>
</el-row>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
@@ -31,5 +34,9 @@ module.exports = {
</template>
<style scoped>
.header-right {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
@@ -432,7 +432,7 @@ layout("/layouts/platform.html"){
async created() {
this.init()
//社团查询
this.$businessTool.listCLubByRole().then((res) => (this.clubList = res))
this.$businessTool.listClubByRole().then((res) => (this.clubList = res))
}
})
</script>
@@ -201,7 +201,7 @@ layout("/layouts/platform.html"){
},
async created() {
this.pageData()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -230,7 +230,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -230,7 +230,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -549,7 +549,7 @@ layout("/layouts/platform.html"){
},
},
async created() {
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.initBudgetType()
if (this.bizId) {
this.findOne()
@@ -247,7 +247,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -245,7 +245,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -246,7 +246,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -245,7 +245,7 @@ layout("/layouts/platform.html"){
async created() {
this.pageData()
this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listCLubByRole()
this.clubs = await this.$businessTool.listClubByRole()
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
@@ -23,6 +23,15 @@ const REGISTER_INFO_COMPONENT = {
<el-descriptions-item label="协会类型">
{{ viewData.typeName }}
</el-descriptions-item>
<el-descriptions-item label="报名联系人">
{{ viewData.concatPersonName }}
</el-descriptions-item>
<el-descriptions-item label="联系人电话">
{{ viewData.concatPersonMobile }}
</el-descriptions-item>
<el-descriptions-item label="联系人邮箱">
{{ viewData.concatPersonEmail }}
</el-descriptions-item>
<el-descriptions-item label="申请时间">
{{viewData.createTime}}
</el-descriptions-item>
@@ -0,0 +1,262 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-tooltip__popper {
line-height: 20px;
}
.left-span-label {
margin: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<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"
:clearable="false"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="协会名称">
<el-select clearable filterable placeholder="请选择协会" @change="doSearch"
style="width: 100%;" v-model="pageForm.clubId">
<el-option :label="item.clubName" :value="item.id"
v-for="item in clubs"></el-option>
</el-select>
</search-item>
<search-item label="关键字">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
clearable @keyup.enter="doSearch"></el-input>
</search-item>
<search-item label="缴费状态">
<el-select clearable filterable placeholder="请选择缴费状态" @change="doSearch"
style="width: 100%;" v-model="pageForm.payed">
<el-option label="已缴费" :value="1"></el-option>
<el-option label="未缴费" :value="0"></el-option>
</el-select>
</search-item>
<search-item label="拨付状态">
<el-select clearable filterable placeholder="请选择拨付状态" @change="doSearch"
style="width: 100%;" v-model="pageForm.assign">
<el-option label="拨付" :value="1"></el-option>
<el-option label="不拨付" :value="0"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="缴费记录">
<el-button @click="batchOperatePay" size="small" type="primary">
批量设置
</el-button>
</table-tool>
<el-table :data="tableData" row-key="id" @selection-change="handleSelectionChange" ref="tableRef">
<el-table-column
:reserve-selection="true"
type="selection"
width="55">
</el-table-column>
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="工号" prop="loginName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="姓名" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="所属单位" prop="unitName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="加入时间" prop="applyTime" sortable show-overflow-tooltip>
<template v-slot="{ row }">
{{ $moment(row.applyTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column label="在职状态" prop="userState" sortable show-overflow-tooltip>
<template v-slot="{ row }">
<span v-if="row.userState === '退休' && row.retireDate">
{{ row.userState + '(' + row.retireDate + ')' }}
</span>
<span v-else>{{ row.userState }}</span>
</template>
</el-table-column>
<el-table-column label="拨付状态" prop="assign" show-overflow-tooltip>
<template slot="header" slot-scope="scope">
<el-tooltip placement="bottom">
<div slot="content">
是否具备拨付资格,将按以下规则判定:<br/>
第一步:缴费记录必须是已缴费状态,否则直接判定无资格;<br/>
第二步:如果在职状态不是“退休”,则直接判定有领取资格;<br/>
第三步:如果是“退休”状态但未有退休日期信息,判定无领取资格;<br/>
第四步:如果是“退休”状态且填写了退休日期,当您的退休年份 ≥ 缴费记录年份(无缴费年份则按今年算)时,判定有资格,反之则无。
</div>
<span>是否拨付<i class="el-icon-question"></i></span>
</el-tooltip>
</template>
<template v-slot="{ row }">
<el-tag v-if="row.assign === true" size="mini" type="success">拨付</el-tag>
<el-tag v-else size="mini" type="danger">不拨付</el-tag>
</template>
</el-table-column>
<el-table-column label="缴费状态" prop="payed" sortable show-overflow-tooltip>
<template v-slot="{ row }">
<el-tag v-if="row.payed === true" size="mini" type="success">已缴费</el-tag>
<el-tag v-else size="mini" type="danger">未缴费</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="160">
<template v-slot="{ row }">
<el-button @click="onHandle(row)" size="mini" type="primary">设置状态</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
</template>
</guava>
<el-dialog
:close-on-click-modal="false"
:visible.sync="payDialogVisible"
title="缴费设置"
width="30%">
<div v-if="isBatch" class="left-span-label">
{{ '您选择了' + multipleSelection.length + '位人员,请确认这' + multipleSelection.length + '位人员' + pageForm.year + '年的缴费状态' }}
</div>
<div v-if="!isBatch" class="left-span-label">
{{ '您选择了1位人员,请确认这1位人员' + pageForm.year + '年的缴费状态' }}
</div>
<div class="demo-input-suffix mt20">
缴费状态:
<el-radio v-model="payed" :label="true" border size="medium">已缴费</el-radio>
<el-radio v-model="payed" :label="false" border size="medium">未缴费</el-radio>
</div>
<span class="dialog-footer" slot="footer">
<el-button @click="row = {}; payDialogVisible = false">取消</el-button>
<el-button @click="onBatchHandle" type="primary">确定</el-button>
</span>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
},
data() {
return {
pageForm: {
payed: null,
year: new Date().getFullYear() + '',
},
clubs: [],
row: {},
isBatch: false,
payDialogVisible: false,
payed: false,
multipleSelection: [],
}
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val
},
onHandle(row) {
const year = new Date().getFullYear()
if(this.pageForm.year > year) {
this.$message.error('只能设置今年之前的缴费记录')
return
}
this.row = row
this.isBatch = false
this.payDialogVisible = true
},
batchOperatePay() {
const year = new Date().getFullYear()
if(this.pageForm.year > year) {
this.$message.error('只能设置今年之前的缴费记录')
return
}
if (this.multipleSelection.length === 0) {
this.$message.error('请先选择需要设置的成员')
return
}
/*const length = this.multipleSelection.filter(m => m.systemUser === "否").length
if (length>0){
this.$message.warning('您选择的人员当中有不是库内人员,暂无法设置!')
return
}*/
this.isBatch = true
this.payDialogVisible = true
},
onBatchHandle() {
let data
if (!this.isBatch) {
data = [this.row.id]
} else {
data = this.multipleSelection.map(item => item.id)
}
this.operateRequest(data)
},
operateRequest(data) {
let message
if (this.payed === false) {
message = '您确定要设置为未缴费吗,此操作将影响该成员的拨付状态。'
} else {
message = '您确定要设置为缴费吗?'
}
this.$confirm(message, '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
const resp = await this.$axios.post("/platform/club/pay/handle", {
ids: JSON.stringify(data),
payed: this.payed,
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.doSearch()
this.payDialogVisible = false
this.multipleSelection = []
this.$refs.tableRef.clearSelection()
} else {
this.$message.error(resp.msg)
}
})
.catch(() => {})
},
async pageData() {
const resp = await this.$axios.post("/platform/club/pay/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.$message.warning(resp.msg)
}
}
},
async created() {
this.clubs = await this.$businessTool.listClubByRole()
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -3,7 +3,7 @@ layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<el-card shadow="never">
<custom-card>
<snaker-start slot="header" label="文体协会会员申请" define_key="XHRH"></snaker-start>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-descriptions border class="descriptions-form">
@@ -78,33 +78,33 @@ layout("/layouts/platform.html"){
<el-descriptions-item label="同时参加其他协会情况" :span="3">
<el-form-item prop="sameTimeJoinOtherClubSituation" label="同时参加其他协会情况">
<el-input
maxlength="500"
v-model="formData.sameTimeJoinOtherClubSituation"
placeholder="请填写同时参加其他协会情况"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6}"
maxlength="500"
v-model="formData.sameTimeJoinOtherClubSituation"
placeholder="请填写同时参加其他协会情况"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6}"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="文化、体育方面的活动经历、获奖情况" :span="3">
<el-form-item prop="awardsExperience" label="文化、体育方面的活动经历、获奖情况">
<el-input
maxlength="500"
v-model="formData.awardsExperience"
placeholder="请填写文化、体育方面的活动经历、获奖情况"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6}"
maxlength="500"
v-model="formData.awardsExperience"
placeholder="请填写文化、体育方面的活动经历、获奖情况"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6}"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="照片" :span="3">
<el-form-item prop="avatar" label="照片">
<file-upload
:value.sync="formData.avatar"
:upload_number="1"
upload_mode="image"
upload_result_category="interval"
upload_result_type="url"
:value.sync="formData.avatar"
:upload_number="1"
upload_mode="image"
upload_result_category="interval"
upload_result_type="url"
></file-upload>
</el-form-item>
</el-descriptions-item>
@@ -113,17 +113,17 @@ layout("/layouts/platform.html"){
<pc-signature v-model="formData.signature"></pc-signature>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="本人承诺" :span="3">
<el-checkbox v-model="isAgree">注:本人已仔细阅读并愿意遵守所参加本校教职工文体协会的章程和规定,自愿加入所报名协会。</el-checkbox>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-row class="mt20">
<el-checkbox v-model="isAgree">注:本人已仔细阅读并愿意遵守所参加本校教职工文体协会的章程和规定,自愿加入所报名协会。</el-checkbox>
</el-row>
<el-row type="flex" justify="end" class="mt10">
<template slot="footer">
<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>提交</el-button>
</el-row>
</el-card>
</template>
</custom-card>
</div>
<script nonce="${cspNonce!}">
@@ -77,8 +77,17 @@ layout("/layouts/platform.html"){
<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 :model="formData" ref="formRef" label-width="80px" :rules="formRules" label-suffix="">
<el-form-item label="缴费状态" prop="payed"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<span class="form-item-tooltip">
(说明:请确认{{ formData.userName }}当年是否缴费)
</span>
<el-radio-group v-model="formData.tf_payed" size="medium">
<el-radio-button :label="false">未缴费</el-radio-button>
<el-radio-button :label="true">已缴费</el-radio-button>
</el-radio-group>
</el-form-item>
<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>
@@ -130,7 +139,9 @@ layout("/layouts/platform.html"){
this.$refs.guava.public(() => {
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
taskName: row.curTaskName,
tf_payed: false,
userName: row.userName
}
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
@@ -67,6 +67,9 @@ layout("/layouts/platform.html"){
<el-descriptions-item label="协会编码">{{viewData.clubCode}}</el-descriptions-item>
<el-descriptions-item label="协会类型">{{viewData.typeName}}</el-descriptions-item>
<el-descriptions-item label="发起人">{{viewData.sponsorName}}</el-descriptions-item>
<el-descriptions-item label="报名联系人">{{viewData.concatPersonName}}</el-descriptions-item>
<el-descriptions-item label="联系人电话">{{viewData.concatPersonMobile}}</el-descriptions-item>
<el-descriptions-item label="联系人邮箱">{{viewData.concatPersonEmail}}</el-descriptions-item>
<el-descriptions-item>
<template slot="label">会费标准</template>
{{viewData.due}}
@@ -33,7 +33,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column prop="applyDate" label="申请时间"></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -9,7 +9,7 @@ const CLUB_FORM_TEMPLATE = {
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="协会编码" prop="clubCode">
<el-form-item label="协会编码" prop="clubCode" required>
<el-input v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" placeholder="请输入协会编码" v-model="formData.clubCode"></el-input>
<el-input v-else placeholder="请输入协会编码" v-model="formData.clubCode" disabled></el-input>
</el-form-item>
@@ -32,39 +32,39 @@ const CLUB_FORM_TEMPLATE = {
</el-row>
<el-row :gutter="30">
<!-- <el-col :span="12">-->
<!-- <el-form-item label="报名联系人" prop="concatPerson">-->
<!-- <user-select-->
<!-- placeholder="请输入姓名或工号选择报名联系人"-->
<!-- ref="userSelectRef"-->
<!-- @change="concatPersonChange"-->
<!-- v-model="formData.concatPerson"-->
<!-- style="width: 100%"-->
<!-- api="/platform/club/register/clubRegisterApply/getUserByKeyWord"-->
<!-- api_input_key_name="keyWord"-->
<!-- :option_label_func="(item)=>{return item.userName + item.loginName + '(' + item.unitName + ')'}"-->
<!-- ></user-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="所属单位" prop="concatPersonUnitName">-->
<!-- <el-input placeholder="此项自动填充" readonly v-model="formData.concatPersonUnitName"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="联系人电话" prop="concatPersonMobile">-->
<!-- <el-input placeholder="请填写联系人电话" v-model="formData.concatPersonMobile"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item-->
<!-- label="联系人邮箱"-->
<!-- prop="concatPersonEmail"-->
<!-- :rules="[{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]"-->
<!-- >-->
<!-- <el-input placeholder="请填写联系人邮箱" type="email" v-model="formData.concatPersonEmail"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="报名联系人" prop="concatPerson">
<user-select
placeholder="请输入姓名或工号选择报名联系人"
ref="userSelectRef"
@change="concatPersonChange"
v-model="formData.concatPerson"
style="width: 100%"
api="/platform/club/register/clubRegisterApply/getUserByKeyWord"
api_input_key_name="keyWord"
:option_label_func="(item)=>{return item.userName + item.loginName + '(' + item.unitName + ')'}"
></user-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属单位" prop="concatPersonUnitName">
<el-input placeholder="此项自动填充" readonly v-model="formData.concatPersonUnitName"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人电话" prop="concatPersonMobile">
<el-input placeholder="请填写联系人电话" v-model="formData.concatPersonMobile"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="联系人邮箱"
prop="concatPersonEmail"
:rules="[{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]"
>
<el-input placeholder="请填写联系人邮箱" type="email" v-model="formData.concatPersonEmail"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="成立时间" prop="foundTime">
@@ -162,23 +162,23 @@ const CLUB_FORM_TEMPLATE = {
clubName: [{ required: true, message: "请填写协会名称", trigger: ["blur", "change"] }],
clubCode: [{ required: false, message: "请填写协会编码", trigger: ["blur", "change"] }],
clubType: [{ required: true, message: "请选择协会类型", trigger: ["blur", "change"] }],
concatPerson: [{ required: true, message: "请选择协会联系人", trigger: ["blur", "change"] }],
foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }]
// establishReport: [{ required: true, message: "请上传申请成立报告", trigger: ["blur", "change"] }]
//rulesFile: [{ required: true, message: "请上传章程草案", trigger: ["blur", "change"] }],
//manageFile: [{ required: true, message: "请上传经费来源及管理办法", trigger: ["blur", "change"] }],
//yearPlanFile: [{ required: true, message: "请上传年度活动计划", trigger: ["blur", "change"] }]
//concatPerson: [{ required: true, message: "请选择协会联系人", trigger: ["blur", "change"] }],
foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }],
establishReport: [{ required: true, message: "请上传申请成立报告", trigger: ["blur", "change"] }],
rulesFile: [{ required: true, message: "请上传章程草案", trigger: ["blur", "change"] }],
manageFile: [{ required: true, message: "请上传经费来源及管理办法", trigger: ["blur", "change"] }],
yearPlanFile: [{ required: true, message: "请上传年度活动计划", trigger: ["blur", "change"] }]
}
}
},
computed: {},
methods: {
/*concatPersonChange(id) {
concatPersonChange(id) {
const user = this.$refs.userSelectRef.options.find((user) => user.id === id)
this.$set(this.formData, "concatPersonUnitName", user.unitName)
this.$set(this.formData, "concatPersonMobile", user.mobile)
this.$set(this.formData, "concatPersonEmail", user.email)
}*/
}
},
created() {}
}
@@ -58,7 +58,7 @@ const CLUB_MANAGER_TEMPLATE = {
</template>
<template slot-scope="scope">
<el-button
:disabled="scope.row.roleCode === 'CLUB_PRESIDENT'"
:disabled="['CLUB_PRESIDENT', 'CLUB_SECRETARY'].includes(scope.row.roleCode)"
@click="deleteRow(scope.row, scope.$index)"
size="mini" type="danger">删除
</el-button>
@@ -2,6 +2,15 @@
layout("/layouts/platform.html"){
#-->
<style>
.el-step__title.is-process {
color: var(--color-primary);
}
.el-step__head.is-process .el-step__icon.is-text {
border-color: var(--color-primary);
}
</style>
<div id="app" v-cloak>
<custom-card>
@@ -58,51 +67,48 @@ layout("/layouts/platform.html"){
activeName: 0,
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
from: GetQueryString("from")
from: GetQueryString("from"),
retryCount: 0, // 新增:重试计数器
maxRetryTimes: 3 // 新增:最大重试次数
}
},
methods: {
nextStep() {
let valid = true
this.$refs.clubFormRef.$refs.form.validateField(
["clubName", "establishReport", "rulesFile", "manageFile", "yearPlanFile"],
(errMsg) => {
if (!errMsg) {
valid = false
}
this.$refs.clubFormRef.$refs.form.validateField(["clubName"], (errMsg) => {
if (!errMsg) {
valid = false
} else {
this.$message.error(errMsg)
}
)
})
if (valid) return
this.activeName = 1
},
async onSave() {
let valid = true
this.$refs.clubFormRef.$refs.form.validateField("clubName", (errMsg) => {
if (errMsg) {
if (!errMsg) {
valid = false
} else {
this.$message.error(errMsg)
}
})
if (!valid) return
if (valid) return
await this.doHandle("onSave")
},
onSubmit() {
this.$refs.clubFormRef.$refs.form.validate().then(() => {
this.doHandle("onSubmit")
}).catch(() => {
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
})
async onSubmit() {
const valid = await this.$refs.clubFormRef.$refs.form.validate()
if(valid) await this.doHandle("onSubmit")
},
onFinishTask() {
this.$refs.clubFormRef.$refs.form.validate().then(() => {
this.doHandle("onFinishTask")
}).catch(() => {
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
})
async onFinishTask() {
const valid = await this.$refs.clubFormRef.$refs.form.validate()
if(valid) await this.doHandle("onFinishTask")
},
async doHandle(type) {
let formData = {}
try {
/*let hz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_PRESIDENT)
let hz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_PRESIDENT)
if (hz.length !== 1) {
this.$message.warning({ title: "警告", message: "会长需要1人" })
return
@@ -111,14 +117,14 @@ layout("/layouts/platform.html"){
if (msz.length !== 1) {
this.$message.warning({ title: "警告", message: "秘书长需要1人" })
return
}*/
}
formData.sponsor = this.$refs.clubSponsorRef.sponsorData
.filter((o) => o.userId !== "" && o.userId !== undefined)
.map((o) => o.userId)
/*if (['onFinishTask', 'onSubmit'].includes(type) && formData.sponsor && formData.sponsor.length < 3) {
if (['onFinishTask', 'onSubmit'].includes(type) && formData.sponsor && formData.sponsor.length < 3) {
this.$message.warning({ title: "警告", message: "发起人要求不少于3人" })
return
}*/
}
let manageValid = false
for (const item of this.$refs.clubManagerRef.managePerson) {
if (!item.userId) {
@@ -126,10 +132,10 @@ layout("/layouts/platform.html"){
break
}
}
/*if (['onFinishTask', 'onSubmit'].includes(type) && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
if (['onFinishTask', 'onSubmit'].includes(type) && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
this.$message.warning({ title: "警告", message: "请填写理事机构信息" })
return
}*/
}
const cloneData = clone(this.$refs.clubFormRef.formData)
let array = []
if (formData.sponsor) {
@@ -210,7 +216,7 @@ layout("/layouts/platform.html"){
this.$refs.clubSponsorRef.sponsorData.push(row)
})
this.$refs.clubFormRef.formData = formData
//await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
}
} else {
this.$axios.post("/platform/club/register/clubRegisterApply/createCode").then((res) => {
@@ -221,10 +227,36 @@ layout("/layouts/platform.html"){
}
})
}
}
},
async init() {
await this.$nextTick()
// 检查是否满足初始化条件
if (this.$refs.clubFormRef && this.$refs.clubSponsorRef && this.$refs.clubManagerRef) {
await this.initData()
// 重置重试计数器(避免后续再次调用时计数异常)
this.retryCount = 0
} else {
// 检查是否已达到最大重试次数
if (this.retryCount < this.maxRetryTimes) {
this.retryCount++
// 延迟100ms后重试,给组件挂载留时间
setTimeout(() => {
this.init()
}, 100)
} else {
// 达到最大重试次数,提示错误
this.$message.error({
title: "初始化失败",
message: '尝试' + this.maxRetryTimes + '次后仍未加载完成组件,请刷新页面重试!'
})
// 重置计数器
this.retryCount = 0
}
}
},
},
created() {
this.initData()
this.init()
}
})
</script>
@@ -13,21 +13,21 @@ layout("/layouts/platform.html"){
<search @search="doSearch">
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
placeholder="选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="协会名称:">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入协会名称"
clearable
style="width: 100%"
v-model="pageForm.clubName"
@keyup.enter.native="doSearch"
clearable
placeholder="请输入协会名称"
clearable
style="width: 100%"
v-model="pageForm.clubName"
></el-input>
</search-item>
</search>
@@ -49,23 +49,18 @@ layout("/layouts/platform.html"){
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="300px">
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
@click="openRevoke(row.processInstanceTaskId)"
size="mini"
type="danger"
>
撤回
</el-button>
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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>
@@ -73,21 +68,26 @@ layout("/layouts/platform.html"){
</el-card>
<template #public>
<register-info ref="registerInfoRef"></register-info>
<div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div>
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
</el-row>
</div>
<register-info ref="registerInfoRef">
<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>
<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>
</register-info>
</template>
</guava>
</div>
@@ -104,7 +104,7 @@ layout("/layouts/platform.html"){
name: "",
audit: false
},
viewData: {},
formData: {},
showApprovalForm: false
}
},
@@ -112,44 +112,49 @@ layout("/layouts/platform.html"){
"register-info": REGISTER_INFO_COMPONENT
},
methods: {
openView(row) {
onView(row) {
this.$refs.guava.public(() => {
this.$refs.registerInfoRef.onOpen(row.id)
this.$refs.registerInfoRef.onOpen(row)
this.showApprovalForm = false
})
},
openApproval(row) {
onAudit(row) {
this.$refs.guava.public(() => {
this.$refs.registerInfoRef.onOpen(row.id)
this.formData = row.approvalParam
this.showApprovalForm = true
})
},
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
this.$refs.approvalFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.showApprovalForm = true
this.$refs.registerInfoRef.onOpen(row)
})
},
openRevoke(taskId) {
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()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
@@ -0,0 +1,183 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.left-span-label {
margin: 10px 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年&emsp;&emsp;度:">
<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
@keyup.enter.native="doSearch"
clearable
placeholder="请输入协会名称"
clearable
style="width: 100%"
v-model="pageForm.clubName"
></el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.audit" @change="doSearch" size="small">
<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" :size="tableSize">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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 #public>
<register-info ref="registerInfoRef">
<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>
<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>
</register-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("../../common/clubRoleConstant.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
pageForm: {
name: "",
audit: false
},
formData: {},
showApprovalForm: false
}
},
components: {
"register-info": REGISTER_INFO_COMPONENT
},
methods: {
onView(row) {
this.$refs.guava.public(() => {
this.$refs.registerInfoRef.onOpen(row)
this.showApprovalForm = false
})
},
onAudit(row) {
this.$refs.guava.public(() => {
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.showApprovalForm = true
this.$refs.registerInfoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/club/register/officeAudit/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()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
async pageData() {
const resp = await this.$axios.post("/platform/club/register/officeAudit/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.$message.warning(resp.msg)
}
}
},
async created() {
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -13,21 +13,21 @@ layout("/layouts/platform.html"){
<search @search="doSearch">
<search-item label="年&emsp;&emsp;度:">
<el-date-picker
placeholder="选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
placeholder="选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="协会名称:">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入协会名称"
clearable
style="width: 100%"
v-model="pageForm.clubName"
@keyup.enter.native="doSearch"
clearable
placeholder="请输入协会名称"
clearable
style="width: 100%"
v-model="pageForm.clubName"
></el-input>
</search-item>
</search>
@@ -49,23 +49,18 @@ layout("/layouts/platform.html"){
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="300px">
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<template v-slot="{ row }">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
@click="openRevoke(row.processInstanceTaskId)"
size="mini"
type="danger"
>
撤回
</el-button>
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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>
@@ -73,21 +68,26 @@ layout("/layouts/platform.html"){
</el-card>
<template #public>
<register-info ref="registerInfoRef"></register-info>
<div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div>
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
</el-row>
</div>
<register-info ref="registerInfoRef">
<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>
<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>
</register-info>
</template>
</guava>
</div>
@@ -104,7 +104,7 @@ layout("/layouts/platform.html"){
name: "",
audit: false
},
viewData: {},
formData: {},
showApprovalForm: false
}
},
@@ -112,44 +112,49 @@ layout("/layouts/platform.html"){
"register-info": REGISTER_INFO_COMPONENT
},
methods: {
openView(row) {
onView(row) {
this.$refs.guava.public(() => {
this.$refs.registerInfoRef.onOpen(row.id)
this.$refs.registerInfoRef.onOpen(row)
this.showApprovalForm = false
})
},
openApproval(row) {
onAudit(row) {
this.$refs.guava.public(() => {
this.$refs.registerInfoRef.onOpen(row.id)
this.formData = row.approvalParam
this.showApprovalForm = true
})
},
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
this.$refs.approvalFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.showApprovalForm = true
this.$refs.registerInfoRef.onOpen(row)
})
},
openRevoke(taskId) {
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()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
@@ -122,7 +122,8 @@ layout("/layouts/platform.html"){
this.$refs.guava.public(() => {
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
taskName: row.curTaskName,
clubId: row.id
}
this.showApprovalForm = true
this.$refs.registerInfoRef.onOpen(row)
@@ -94,7 +94,7 @@ layout("/layouts/platform.html"){
created() {
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
this.$businessTool.listCLubByRole().then((res) => (this.clubOptions = res))
this.$businessTool.listClubByRole().then((res) => (this.clubOptions = res))
this.pageData()
}
})
@@ -257,7 +257,7 @@ layout("/layouts/platform.html"){
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.unionList = await this.$businessTool.listUnion()
this.getApplyMoney()
this.pageData()
@@ -344,7 +344,7 @@ layout("/layouts/platform.html"){
await this.getActivityBudgetType()
await this.getSchoolBudget()
this.unionList = await this.$businessTool.listUnion(this.$store.state.user.union.id)
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
}
})
</script>
@@ -233,7 +233,7 @@ layout("/layouts/platform.html"){
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.unionList = await this.$businessTool.listUnion()
this.getApplyMoney()
this.pageData()
@@ -113,7 +113,7 @@ layout("/layouts/platform.html"){
},
async created() {
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.pageData()
}
})
@@ -302,7 +302,7 @@ layout("/layouts/platform.html"){
}
},
async init() {
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
const budgetTypeOption = []
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
@@ -488,7 +488,7 @@ layout("/layouts/platform.html"){
created() {
this.init()
//社团查询
this.$businessTool.listCLubByRole().then((res) => (this.clubOptions = res))
this.$businessTool.listClubByRole().then((res) => (this.clubOptions = res))
}
})
</script>
@@ -386,7 +386,7 @@ layout("/layouts/platform_h5.html"){
}
},
async init() {
this.clubOption = await this.$businessTool.listCLubByRole()
this.clubOption = await this.$businessTool.listClubByRole()
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
const budgetTypeOption = []
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
@@ -581,7 +581,7 @@ layout("/layouts/platform_h5.html"){
// 查询社团
queryClubs() {
this.$businessTool.listCLubByRole().then((res) => {
this.$businessTool.listClubByRole().then((res) => {
this.clubOptions = res
this.clubColumns = res.map(item => {
return { text: item.clubName, value: item.id }