commit
This commit is contained in:
+129
@@ -1,5 +1,30 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
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 javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
@@ -7,5 +32,109 @@ package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
* @Date 2025/7/31 15:46
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报")
|
||||
@At("/platform/activityDeclare/apply")
|
||||
public class ActivityDeclareApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityDeclareService activityDeclareService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/apply/view.html")
|
||||
public void view() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动申报,我的申请列表")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.applyTime,
|
||||
info.activityName,
|
||||
info.activityAddress,
|
||||
info.startTime,
|
||||
info.endTime,
|
||||
info.declareUnitName,
|
||||
info.activityType,
|
||||
info.activityContent,
|
||||
info.activityNumber,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
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
|
||||
activity_declare_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();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动申报,查看活动申报")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result findOne(@Valid String id) {
|
||||
ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, id);
|
||||
return Result.success().addData(info);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除活动申报")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SLog(tag = "活动申报", msg = "删除活动申报id: ${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(ActivityDeclareInfo.class, Cnd.where("id", "=", id));
|
||||
// 删除流程相关
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Dao;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareBranchUnionController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,分工会管理员审核")
|
||||
@At("/platform/activityDeclare/branchUnion")
|
||||
public class ActivityDeclareBranchUnionController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityDeclareService activityDeclareService;
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/branchunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/branchunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分工会审核列表")
|
||||
@SaCheckPermission("activityDeclare.branchUnion")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareClubPrincipalController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,协会负责人审核")
|
||||
@At("/platform/activityDeclare/clubPrincipal")
|
||||
public class ActivityDeclareClubPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/clubprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/clubprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareSchoolPrincipalController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会负责人审核")
|
||||
@At("/platform/activityDeclare/schoolPrincipal")
|
||||
public class ActivityDeclareSchoolPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareSchoolUnionController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会审核")
|
||||
@At("/platform/activityDeclare/schoolUnion")
|
||||
public class ActivityDeclareSchoolUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityDeclare.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityDeclare.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/declare/schoolunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.interceptor;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareInterceptor
|
||||
* @Date 2025/8/1 11:05
|
||||
* @注释
|
||||
*/
|
||||
public class ActivityDeclareInterceptor {
|
||||
}
|
||||
+110
-1
@@ -1,9 +1,15 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.models;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudget;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.Table;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -13,6 +19,109 @@ import org.nutz.dao.entity.annotation.Table;
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityDeclareInfo extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年份")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("申请人id")
|
||||
@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 = 200)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("申报单位(校工会/二级工会名称/协会名称)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String declareUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("协会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyTime;
|
||||
|
||||
@Column
|
||||
@Comment("用户签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("活动名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityName;
|
||||
|
||||
@Column
|
||||
@Comment("活动地址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 150)
|
||||
private String activityAddress;
|
||||
|
||||
@Column
|
||||
@Comment("活动开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String startTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String endTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String activityType;
|
||||
|
||||
@Column
|
||||
@Comment("活动内容")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String activityContent;
|
||||
|
||||
@Column
|
||||
@Comment("活动人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activityNumber;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
@Column
|
||||
@Comment("活动经费预算")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<ActivityBudget> budgets;
|
||||
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareService
|
||||
* @Date 2025/8/1 9:09
|
||||
* @注释
|
||||
*/
|
||||
public interface ActivityDeclareService extends BaseService<ActivityDeclareInfo> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.declare.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.service.ActivityDeclareService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareServiceImpl
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ActivityDeclareServiceImpl extends BaseServiceImpl<ActivityDeclareInfo> implements ActivityDeclareService {
|
||||
|
||||
public ActivityDeclareServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.enums;
|
||||
|
||||
import com.budwk.app.base.annotation.DictEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityDeclareReimbursement
|
||||
* @Date 2025/7/31 17:01
|
||||
* @注释
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
@DictEnum(key = "ActivityDeclareReimbursement", name = "申报类型")
|
||||
public enum ActivityDeclareReimbursement {
|
||||
|
||||
/**
|
||||
* 校工会
|
||||
*/
|
||||
SCHOOL_UNION("校工会活动"),
|
||||
/**
|
||||
* 分工会
|
||||
*/
|
||||
BRANCH_UNION("分工会活动"),
|
||||
/**
|
||||
* 协会
|
||||
*/
|
||||
CLUB("协会活动");
|
||||
|
||||
private final String typeName;
|
||||
}
|
||||
+120
@@ -1,5 +1,30 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
||||
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 javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
@@ -7,5 +32,100 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controlle
|
||||
* @Date 2025/7/31 15:47
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动报销")
|
||||
@At("/platform/activityReimbursement/apply")
|
||||
public class ActivityReimbursementApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ActivityReimbursementService activityReimbursementService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/apply/view.html")
|
||||
public void view() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("活动报销,我的申请列表")
|
||||
@SaCheckPermission("activityDeclare.apply")
|
||||
public Result pageData(CommonPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.applyTime,
|
||||
info.activityName,
|
||||
info.activityAddress,
|
||||
info.startTime,
|
||||
info.endTime,
|
||||
info.declareUnitName,
|
||||
info.activityType,
|
||||
info.activityContent,
|
||||
info.activityNumber,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
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
|
||||
activity_reimbursement_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();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除活动报销")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SLog(tag = "活动报销", msg = "删除活动报销id: ${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(ActivityReimbursementInfo.class, Cnd.where("id", "=", id));
|
||||
// 删除流程相关
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementBranchUnionController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,分工会管理员审核")
|
||||
@At("/platform/activityReimbursement/branchUnion")
|
||||
public class ActivityReimbursementBranchUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/branchunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.branchUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/branchunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementClubPrincipalController
|
||||
* @Date 2025/8/1 10:15
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,协会负责人审核")
|
||||
@At("/platform/activityReimbursement/clubPrincipal")
|
||||
public class ActivityReimbursementClubPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/clubprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.clubPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/clubprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolPrincipalController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会负责人审核")
|
||||
@At("/platform/activityReimbursement/schoolPrincipal")
|
||||
public class ActivityReimbursementSchoolPrincipalController {
|
||||
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolprincipal/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.schoolPrincipal")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolprincipal/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolUnionController
|
||||
* @Date 2025/8/1 10:16
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("活动申报,校工会审核")
|
||||
@At("/platform/activityReimbursement/schoolUnion")
|
||||
public class ActivityReimbursementSchoolUnionController {
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("activityReimbursement.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activityReimbursement.schoolUnion")
|
||||
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/form.html")
|
||||
public void form() {
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.interceptor;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementInterceptor
|
||||
* @Date 2025/8/1 11:05
|
||||
* @注释
|
||||
*/
|
||||
public class ActivityReimbursementInterceptor {
|
||||
}
|
||||
+28
-3
@@ -1,9 +1,12 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.Table;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -13,6 +16,28 @@ import org.nutz.dao.entity.annotation.Table;
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityReimbursementInfo extends BaseModel {
|
||||
public class ActivityReimbursementInfo extends ActivityDeclareInfo {
|
||||
|
||||
@Column
|
||||
@Comment("申报id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String declareId;
|
||||
|
||||
@Column
|
||||
@Comment("发票")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> billFiles;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> photoFiles;
|
||||
|
||||
@Column
|
||||
@Comment("其他")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> otherFiles;
|
||||
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementService
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
public interface ActivityReimbursementService extends BaseService<ActivityReimbursementInfo> {
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementServiceImpl
|
||||
* @Date 2025/8/1 9:10
|
||||
* @注释
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ActivityReimbursementServiceImpl extends BaseServiceImpl<ActivityReimbursementInfo> implements ActivityReimbursementService {
|
||||
public ActivityReimbursementServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityBudget
|
||||
* @Date 2025/7/31 16:23
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("费用预算")
|
||||
public class ActivityBudget {
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "预算费用")
|
||||
private Double budgetPrice;
|
||||
|
||||
@ApiModelProperty(value = "实际费用")
|
||||
private Double actualPrice;
|
||||
|
||||
@ApiModelProperty(value = "收款人id")
|
||||
private String payeeId;
|
||||
|
||||
@ApiModelProperty(value = "收款人姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "收款人工号")
|
||||
private String loginName;
|
||||
|
||||
@ApiModelProperty(value = "支行名称")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "报销卡号")
|
||||
private String bankCardNum;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.budwk.app.zhgh.activity.declarereimbursement.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.enums.ActivityDeclareReimbursement;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:CommonPageParam
|
||||
* @Date 2025/7/31 16:44
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("通用分页参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonPageParam extends PageForm<ActivityDeclareInfo> {
|
||||
|
||||
private Integer year;
|
||||
|
||||
private String clubId;
|
||||
|
||||
private String unionId;
|
||||
|
||||
|
||||
public void buildSearch(Cnd cnd, String prefix) {
|
||||
if (cnd == null) {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(prefix + "userName", this.getSearchKeyword());
|
||||
seg.orLike(prefix + "loginName", this.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
|
||||
cnd.and(prefix + "declareUnitName", "<>", ActivityDeclareReimbursement.SCHOOL_UNION.name());
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(),
|
||||
RoleConstant.BRANCH_UNION_ADMIN.name(),
|
||||
RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and(prefix + "unionid", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name())) {
|
||||
// cnd.and(prefix + "clubId", "=", );
|
||||
}
|
||||
} else {
|
||||
cnd.andEX(prefix + "unionId", "=", this.getUnionId());
|
||||
cnd.andEX(prefix + "clubId", "=", this.getClubId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+9
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
@@ -8,6 +9,7 @@ import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
@@ -36,6 +38,13 @@ public class DifficultHelpPageParam extends PageForm<DifficultHelpInfo> {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(prefix + "userName", this.getSearchKeyword());
|
||||
seg.orLike(prefix + "loginName", this.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX("YEAR(" + prefix + "applyTime)", "=", this.getYear());
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
<div id="activity_declare_apply">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="活动名称">
|
||||
<el-form-item prop="activityName">
|
||||
<el-input placeholder="请输入内容" style="width: 100%" v-model="formData.activityName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型">
|
||||
<el-form-item prop="activityType">
|
||||
<el-select @change="activityTypeChange" placeholder="请选择活动类型"
|
||||
style="width: 100%" v-model="formData.activityType">
|
||||
<el-option
|
||||
:key="item.name"
|
||||
:label="item.typeName"
|
||||
:value="item.name"
|
||||
v-for="item in activityDeclareReimbursementList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请人姓名">
|
||||
<el-form-item prop="userName">
|
||||
<el-input disabled type="text" v-model="formData.userName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.activityType == 'CLUB'">
|
||||
<el-descriptions-item label="申请协会">
|
||||
<el-form-item prop="clubId" label="申请协会">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择协会"
|
||||
@change="setDeclareUnitName" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="申请单位">
|
||||
<el-form-item prop="declareUnitName">
|
||||
<el-input readonly v-model="formData.declareUnitName" type="text" placeholder="请选择项目类型,自动填充"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile" placeholder="请输入联系方式" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-input disabled type="text" v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动计划时间">
|
||||
<el-form-item prop="planDate">
|
||||
<el-date-picker
|
||||
start-placeholder="开始日期"
|
||||
range-separator="-"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
<el-form-item prop="activityNumber">
|
||||
<el-input-number v-model="formData.activityNumber" placeholder="请输入活动人数"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动地址" :span="2">
|
||||
<el-form-item prop="activityAddress">
|
||||
<el-input maxlength="150" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.activityAddress"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动预算费用" :span="2">
|
||||
<el-form-item prop="budgets">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
|
||||
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
||||
<el-table-column label="费用项目名称" prop="name">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" maxlength="50"
|
||||
placeholder="请输入费用项目名称"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预算费用" prop="budgetPrice">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.budgetPrice'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="预算费用" v-model="row.budgetPrice" :precision="2"
|
||||
style="width: 100%" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
|
||||
size="mini">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.budgets.length==1"
|
||||
@click="formData.budgets.splice(scope.$index,1)"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动方案及简介" :span="2">
|
||||
<el-form-item prop="activityContent">
|
||||
<text-editor v-model="formData.activityContent"></text-editor>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<el-form-item prop="files">
|
||||
<file-upload :value.sync="formData.files"
|
||||
upload_mode="drag"
|
||||
:upload_number="10" upload_result_category="array"
|
||||
complete_result></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#activity_declare_apply',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
},
|
||||
|
||||
formRules: {
|
||||
activityName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fundsUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
declareUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
budgets: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
|
||||
activityDeclareReimbursementList: [],
|
||||
clubList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 提交
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.instanceId) {
|
||||
this.handleApply(val)
|
||||
} else {
|
||||
this.handleReApply(val)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交申请
|
||||
handleApply(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post("/flow/common/startInstanceAndExecute", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 重新提交申请
|
||||
handleReApply(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: val.taskId,
|
||||
processInstanceId: val.instanceId,
|
||||
submitType: val.submitType,
|
||||
f_data: JSON.stringify(this.formData)
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete"
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
handleSaveDraft(val) {
|
||||
this.$confirm("您确定要保存吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/flow/common/startInstance", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "task-complete"
|
||||
},
|
||||
"*"
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消
|
||||
handleCancel() {
|
||||
|
||||
},
|
||||
// 设置申报主体名称
|
||||
setDeclareUnitName(val){
|
||||
const club = this.clubList.find(v => v.id === val)
|
||||
this.$set(this.formData, "declareUnitName", club ? club.clubName : null)
|
||||
},
|
||||
// 申请类型选中
|
||||
activityTypeChange(val) {
|
||||
if (val === "SCHOOL_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", "校工会")
|
||||
} else if (val === "BRANCH_UNION") {
|
||||
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
|
||||
}
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post("/activity/declare/apply/findOne", { id })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (res.data.clubId) {
|
||||
this.setDeclareUnitName(res.data.clubId)
|
||||
}
|
||||
if (this.formData.budgets) {
|
||||
this.formData.budgets = JSON.parse(res.data.budgets)
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
|
||||
if (this.businessId) {
|
||||
this.findOne(this.businessId)
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "applyTime", this.$moment().format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "budgets", [])
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-descriptions-item__label {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<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>
|
||||
|
||||
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</template>
|
||||
|
||||
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER, CLUB_PRESIDENT')">
|
||||
<search-item label="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
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>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报记录">
|
||||
<el-button size="small" type="primary" @click="onApply">活动申报</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginName'">
|
||||
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask'" @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 @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "申报人", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式"},
|
||||
{ prop: "activityName", label: "活动名称"},
|
||||
{ prop: "activityType", label: "活动类型"},
|
||||
{ prop: "declareUnitName", label: "申报单位/协会", sortable: true },
|
||||
{ prop: "activityNumber", label: "活动人数", sortable: true },
|
||||
{ prop: "applyTime", label: "申报时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
|
||||
unions: [],
|
||||
units: [],
|
||||
clubs: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onApply() {
|
||||
window.open("/flow/common/approval/form?defineKey=HDSB")
|
||||
},
|
||||
openView(row) {
|
||||
window.open("/flow/common/approval/form?instanceId=" + (row.instanceId || "") + "&businessId=" + row.id + "&defineKey=HDSB")
|
||||
},
|
||||
onEdit(row) {
|
||||
window.open(
|
||||
"/flow/common/approval/form?taskId=" +
|
||||
(row.taskId || "") +
|
||||
"&instanceId=" +
|
||||
(row.instanceId || "") +
|
||||
"&businessId=" +
|
||||
row.id +
|
||||
"&defineKey=HYRH"
|
||||
)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/activityDeclare/apply/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
} else {
|
||||
if (this.$auth.hasRoleOr('CLUB_MANAGER, CLUB_PRESIDENT')) {
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
}
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="signature">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="申请记录">
|
||||
<table-tool label="申请记录">
|
||||
<el-button size="small" type="primary" @click="onApply">帮扶申请</el-button>
|
||||
</table-tool>
|
||||
|
||||
@@ -102,8 +102,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: []
|
||||
|
||||
Reference in New Issue
Block a user