This commit is contained in:
2025-12-09 09:58:25 +08:00
parent ade83bf8d5
commit 7e4fd94817
44 changed files with 1548 additions and 774 deletions
@@ -92,6 +92,11 @@ RoleConstant {
PSYCHOLOGY_DOCTOR("心理咨询师"),
LEGAL_DOCTOR("法律顾问"),
UNION_REIMBURSEMENT_MANAGER("分工会报销负责人"),
CLUB_REIMBURSEMENT_MANAGER("协会报销负责人"),
SCHOOL_REIMBURSEMENT_MANAGER("校工会报销负责人"),
;
/**
* 避免和枚举类的name冲突
@@ -3,6 +3,7 @@ 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.ActivityBudgetVO;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
@@ -22,6 +23,7 @@ import java.util.List;
@Data
@Table
@EqualsAndHashCode(callSuper = true)
@ApiOperation(value = "活动经费申报信息")
public class ActivityDeclareInfo extends BaseModel {
@Name
@@ -6,6 +6,7 @@ import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
@@ -15,11 +16,13 @@ import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
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 com.budwk.app.zhgh.dayofficework.outlay.outlayReimburse.service.OutlayReimburseApplyService;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
@@ -38,7 +41,9 @@ import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* @version 1.0
@@ -61,6 +66,8 @@ public class ActivityReimbursementApplyController {
private FlowCommonService flowCommonService;
@Inject
private ActivityReimbursementService activityReimbursementService;
@Inject
private OutlayReimburseApplyService outlayReimburseApplyService;
@At("")
@SaCheckPermission("activityReimbursement.apply")
@@ -80,6 +87,10 @@ public class ActivityReimbursementApplyController {
@SaCheckPermission("member.apply.submit")
@SLog(tag = "活动申报", msg = "保存申请,申请人: ${args[0].username}")
public Result save(@Param("data") ActivityReimbursementInfo activityReimbursementInfo) {
activityReimbursementInfo.setUserId(SecurityUtil.getUserId());
activityReimbursementInfo.setLoginName(SecurityUtil.getUserLoginname());
activityReimbursementInfo.setUserName(SecurityUtil.getUserUsername());
activityReimbursementInfo.setApplyTime(new Date());
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getDeclareId());
}
@@ -88,6 +99,12 @@ public class ActivityReimbursementApplyController {
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
.sum();
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
// 验证金额
Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId());
if (Lang.isNotEmpty(result)) {
return result;
}
dao.insertOrUpdate(activityReimbursementInfo);
return Result.success();
}
@@ -98,7 +115,11 @@ public class ActivityReimbursementApplyController {
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("member.apply.submit")
@SLog(tag = "活动申报", msg = "提交申请,申请人: ${args[0].username}")
public Result submit(@Param("data") ActivityReimbursementInfo activityReimbursementInfo){
public Result submit(@Param("data") ActivityReimbursementInfo activityReimbursementInfo) {
activityReimbursementInfo.setUserId(SecurityUtil.getUserId());
activityReimbursementInfo.setLoginName(SecurityUtil.getUserLoginname());
activityReimbursementInfo.setUserName(SecurityUtil.getUserUsername());
activityReimbursementInfo.setApplyTime(new Date());
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getDeclareId());
}
@@ -108,13 +129,20 @@ public class ActivityReimbursementApplyController {
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
.sum();
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
// 验证金额
Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId());
if (Lang.isNotEmpty(result)) {
return result;
}
dao.insertOrUpdate(activityReimbursementInfo);
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, activityReimbursementInfo);
args.set("type", activityReimbursementInfo.getActivityType());
args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
@@ -141,6 +169,13 @@ public class ActivityReimbursementApplyController {
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
.sum();
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
// 验证金额
Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId());
if (Lang.isNotEmpty(result)) {
return result;
}
dao.insertOrUpdate(activityReimbursementInfo);
Dict dict = Dict.create();
@@ -154,29 +189,48 @@ public class ActivityReimbursementApplyController {
@At
@ApiOperation("获取当前用户活动报销")
@SaCheckPermission("activityReimbursement.apply")
public Result getActivityReimbursementByUser(String id) {
public Result getActivityReimbursementByUser(String id, String outlayManageSource, String clubId) {
String activityType = "";
if (StrUtil.isNotBlank(id)) {
ActivityReimbursementInfo reimbursementInfo = dao.fetch(ActivityReimbursementInfo.class, id);
if (Objects.equals(reimbursementInfo.getActivityReimbursementMode(), "daily")) {
return Result.success();
}
ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, reimbursementInfo.getDeclareId());
return Result.success().addData(List.of(info));
}
// 查询已经报销成功的记录
Cnd reiCnd = Cnd.NEW();
reiCnd.and("info.outlayManageSource", "=", outlayManageSource);
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
reiCnd.and("info.unionId", "=", SecurityUtil.getUnionId());
} else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) {
reiCnd.and("info.clubId", "=", clubId);
}
reiCnd.and("ins.state", "in", List.of(10, 20));
Sql reiSql = Sqls.create("""
SELECT
info.declareId
FROM
activity_reimbursement_info info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
WHERE
userId = @userId
AND ins.state IN (10, 20)
""").setParam("userId", SecurityUtil.getUserId());
$condition
""");
reiSql.setCondition(reiCnd);
reiSql.setCallback(Sqls.callback.strList());
dao.execute(reiSql);
List<String> reiDecIdList = reiSql.getList(String.class);
Sql sql = Sqls.create("select declareId from activity_reimbursement_info where userId = @userId").setParam("userId", SecurityUtil.getUserId());
Cnd cnd = Cnd.NEW();
cnd.and("outlayManageSource", "=", outlayManageSource);
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
cnd.and("unionId", "=", SecurityUtil.getUnionId());
} else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) {
cnd.and("clubId", "=", clubId);
}
Sql sql = Sqls.create("select declareId from activity_reimbursement_info $condition");
sql.setCondition(cnd);
sql.setCallback(Sqls.callback.strList());
dao.execute(sql);
List<String> declareIdList = sql.getList(String.class);
@@ -189,23 +243,32 @@ public class ActivityReimbursementApplyController {
LEFT JOIN wf_process_instance ins ON info.id = ins.businessNo
$condition
""");
Cnd cnd = Cnd.NEW();
Cnd applyCnd = Cnd.NEW();
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
applyCnd.and("info.unionId", "=", SecurityUtil.getUnionId());
activityType="BRANCH_UNION";
} else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) {
applyCnd.and("info.clubId", "=", clubId);
activityType="CLUB";
}else{
activityType="SCHOOL_UNION";
}
applyCnd.and("info.activityType", "=", activityType);
if (Lang.isNotEmpty(declareIdList)) {
cnd.and("info.id", "not in", declareIdList);
applyCnd.and("info.id", "not in", declareIdList);
}
if (Lang.isNotEmpty(reiDecIdList)) {
cnd.and("info.id", "not in", reiDecIdList);
applyCnd.and("info.id", "not in", reiDecIdList);
}
cnd.and("info.userId", "=", SecurityUtil.getUserId());
cnd.and("ins.state", "=", 20);
applySql.setCondition(cnd);
applyCnd.and("ins.state", "=", 20);
applySql.setCondition(applyCnd);
List<NutMap> resultList = activityReimbursementService.listMap(applySql);
return Result.success().addData(resultList);
}
@At
@ApiOperation("获取收款人卡号")
@SaCheckPermission("activityReimbursement.apply")
@@ -234,4 +297,13 @@ public class ActivityReimbursementApplyController {
return Result.success().addData(map);
}
@At
@ApiOperation("获取申报的记录")
@SaCheckPermission("activityReimbursement.apply")
public Result getBudgetByYear(String outlayManageSource, String clubId) {
List<NutMap> budgetMoney = activityReimbursementService.getBudgetMoney(outlayManageSource, clubId);
return Result.success(budgetMoney);
}
}
@@ -69,6 +69,11 @@ public class ActivityReimbursementBranchUnionController {
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
@@ -89,6 +94,7 @@ public class ActivityReimbursementBranchUnionController {
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
@@ -99,6 +105,9 @@ public class ActivityReimbursementBranchUnionController {
cnd.and("t.taskName", "=", "1e4cc473-beae-427d-b9dc-c1c4d0eb07c8");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -69,6 +69,11 @@ public class ActivityReimbursementClubPrincipalController {
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
@@ -89,6 +94,7 @@ public class ActivityReimbursementClubPrincipalController {
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
@@ -99,6 +105,9 @@ public class ActivityReimbursementClubPrincipalController {
cnd.and("t.taskName", "=", "5afcf810-7a8b-4896-9aa7-c99995e0856b");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -97,6 +97,10 @@ public class ActivityReimbursementMineController {
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
@@ -144,7 +148,19 @@ public class ActivityReimbursementMineController {
@ApiOperation("活动报销,查看活动报销")
@SaCheckPermission("activityReimbursement.mine")
public Result findOne(@Valid String id) {
ActivityReimbursementInfo info = dao.fetch(ActivityReimbursementInfo.class, id);
Sql sql = Sqls.create("""
SELECT
info.*,
ab.activityMatter deductionBudgetName
FROM
`activity_reimbursement_info` info
LEFT JOIN activity_budget ab ON ab.id = info.deductionBudgetId
WHERE
info.id = @id
""").setParam("id", id);
sql.setCallback(Sqls.callback.map());
dao.execute(sql);
NutMap info = (NutMap) sql.getResult();
return Result.success().addData(info);
}
@@ -69,6 +69,11 @@ public class ActivityReimbursementSchoolPrincipalController {
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
@@ -89,6 +94,7 @@ public class ActivityReimbursementSchoolPrincipalController {
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
@@ -99,6 +105,9 @@ public class ActivityReimbursementSchoolPrincipalController {
cnd.and("t.taskName", "=", "6dd2e8b3-fd0d-4b35-bb2a-1eef227cba96");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -1,23 +1,34 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import cn.hutool.core.lang.Dict;
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.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.sys.models.Sys_home_activity;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementSchoolUnionService;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.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 java.util.List;
@@ -37,6 +48,11 @@ public class ActivityReimbursementSchoolUnionController {
@Inject
private ActivityReimbursementService activityReimbursementService;
@Inject
private ActivityReimbursementSchoolUnionService activityReimbursementSchoolUnionService;
@At("")
@SaCheckPermission("activityReimbursement.schoolUnion")
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/index.html")
@@ -69,6 +85,11 @@ public class ActivityReimbursementSchoolUnionController {
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
@@ -89,6 +110,7 @@ public class ActivityReimbursementSchoolUnionController {
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
@@ -99,6 +121,9 @@ public class ActivityReimbursementSchoolUnionController {
cnd.and("t.taskName", "=", "47bfdf53-288c-4352-a403-0653483b54eb");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -116,4 +141,13 @@ public class ActivityReimbursementSchoolUnionController {
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
return Result.success().addData(pagination);
}
@At
@SLog(tag = "报销", msg = "校工会审核了一条记录")
@SaCheckPermission("activityReimbursement.schoolUnion")
public Result doReview(@Param("data") String param, String id) {
activityReimbursementSchoolUnionService.doReview( param, id);
return Result.success();
}
}
@@ -2,6 +2,7 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models;
import cn.hutool.json.JSONObject;
import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
@@ -19,8 +20,9 @@ import java.util.List;
* @注释
*/
@Data
@Table
@Table("activity_reimbursement_info")
@EqualsAndHashCode(callSuper = true)
@ApiOperation(value = "报销信息")
public class ActivityReimbursementInfo extends ActivityDeclareInfo {
@Name
@@ -34,6 +36,21 @@ public class ActivityReimbursementInfo extends ActivityDeclareInfo {
@ColDefine(type = ColType.VARCHAR, width = 32)
private String declareId;
@Column
@Comment("报销模式")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String activityReimbursementMode;
@Column
@Comment("经费类型")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String outlayManageSource;
@Column
@Comment("扣款预算")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String deductionBudgetId;
@Column
@Comment("实际总金额")
@ColDefine(customType = "decimal(10,2)")
@@ -0,0 +1,10 @@
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;
public interface ActivityReimbursementSchoolUnionService extends BaseService<ActivityReimbursementInfo> {
void doReview(String param, String id);
}
@@ -1,8 +1,13 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
import org.nutz.dao.sql.Sql;
import org.nutz.lang.util.NutMap;
import java.math.BigDecimal;
import java.util.List;
/**
* @version 1.0
@@ -15,4 +20,18 @@ public interface ActivityReimbursementService extends BaseService<ActivityReimbu
Sql getActivityUserNumAndMoneySql(Integer startYear, Integer endYear, Boolean isActivityMoney);
List<NutMap> getBudgetMoney(String outlayManageSource, String clubId);
/**
* 预算扣除预算验证
* @param deductionBudgetId
* @param moneyBig
* @param outlayManageSource
* @param clubId
* @return
*/
Result bxAddValidate(String deductionBudgetId, BigDecimal moneyBig, String outlayManageSource, String clubId);
}
@@ -0,0 +1,130 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import com.budwk.app.base.exception.BaseException;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementSchoolUnionService;
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget;
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.club.model.OutlayManageClub;
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.model.OutlayUseDetail;
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.school.model.OutlayManageSchool;
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.model.OutlayManageUnion;
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.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
/**
* @author zhf
* @date 2025/12/4 18:06
* @description
*/
@IocBean(args = {"refer:dao"})
public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl<ActivityReimbursementInfo> implements ActivityReimbursementSchoolUnionService {
public ActivityReimbursementSchoolUnionServiceImpl(Dao dao) {
super(dao);
}
@Inject
private FlowCommonService flowCommonService;
@Override
@Aop(TransAop.READ_COMMITTED)
public void doReview(String param, String id) {
Dict args = Json.fromJson(Dict.class, param);
if (args.getInt("submitType") == 1) {
ActivityReimbursementInfo info = dao().fetch(ActivityReimbursementInfo.class, id);
OutlayUseDetail detail = new OutlayUseDetail();
detail.setProjectName(info.getActivityName());
detail.setAdjustMoney(info.getActualMoney());
detail.setAdjustReason(info.getActivityName());
detail.setAdjustUserId(SecurityUtil.getUserId());
detail.setAdjustUserName(SecurityUtil.getUserUsername());
detail.setAdjustLoginName(SecurityUtil.getUserLoginname());
detail.setOutlayReimburseId(info.getId());
detail.setActivityTime(String.valueOf(info.getStartTime()));
// 更新校工会经费表
if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) {
detail.setActivityTime(String.valueOf(info.getApplyTime()));
OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
if (ObjectUtil.isEmpty(school)) {
throw new BaseException("该年份没有设置金额!");
}
if (school.getTotalQuota().subtract(school.getUsedQuota()).compareTo(info.getActualMoney()) < 0) {
throw new BaseException("剩余配额不足!剩余:" + school.getTotalQuota().subtract(school.getUsedQuota()));
}
school.setUsedQuota(school.getUsedQuota().add(info.getActualMoney()));
dao().updateIgnoreNull(school);
//添加使用记录到经费管理表
detail.setOutlayManageId(school.getId());
dao().insert(detail);
} else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) {
ActivityBudget budget = dao().fetch(ActivityBudget.class, Cnd.where("id", "=", info.getDeductionBudgetId()));
if (ObjectUtil.isNotEmpty(budget)&&budget.getIsSchoolBudget()){
//如果分工会报销了校工会的余额
OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
if (ObjectUtil.isEmpty(school)) {
throw new BaseException("该年份没有设置金额!");
}
if (school.getTotalQuota().subtract(school.getUsedQuota()).compareTo(info.getActualMoney()) < 0) {
throw new BaseException("剩余配额不足!剩余:" + school.getTotalQuota().subtract(school.getUsedQuota()));
}
school.setUsedQuota(school.getUsedQuota().add(info.getActualMoney()));
dao().updateIgnoreNull(school);
//添加使用记录到经费管理表
detail.setOutlayManageId(school.getId());
dao().insert(detail);
}else{
// 更新分工会活动经费表
OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class,
Cnd.where("year", "=", DateUtil.thisYear())
.and("unionId", "=", info.getUnionId()));
if (ObjectUtil.isEmpty(manageUnion)) {
throw new BaseException("该年份没有设置金额!");
}
if (manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota()).compareTo(info.getActualMoney()) < 0) {
throw new BaseException("剩余配额不足!剩余:" + manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota()));
}
manageUnion.setUsedQuota(manageUnion.getUsedQuota().add(info.getActualMoney()));
dao().updateIgnoreNull(manageUnion);
//添加使用记录到经费管理表
detail.setOutlayManageId(manageUnion.getId());
dao().insert(detail);
}
}else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")){
// 更新分工会活动经费表
OutlayManageClub manageClub = dao().fetch(OutlayManageClub.class,
Cnd.where("year", "=", DateUtil.thisYear())
.and("clubId", "=", info.getClubId()));
if (ObjectUtil.isEmpty(manageClub)) {
throw new BaseException("该年份没有设置金额!");
}
if (manageClub.getTotalQuota().subtract(manageClub.getUsedQuota()).compareTo(info.getActualMoney()) < 0) {
throw new BaseException("剩余配额不足!剩余:" + manageClub.getTotalQuota().subtract(manageClub.getUsedQuota()));
}
manageClub.setUsedQuota(manageClub.getUsedQuota().add(info.getActualMoney()));
dao().updateIgnoreNull(manageClub);
//添加使用记录到经费管理表
detail.setOutlayManageId(manageClub.getId());
dao().insert(detail);
}
}
flowCommonService.executeTask(args);
}
}
@@ -1,12 +1,25 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget;
import io.swagger.annotations.ApiOperation;
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.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
/**
* @version 1.0
@@ -53,4 +66,87 @@ public class ActivityReimbursementServiceImpl extends BaseServiceImpl<ActivityRe
""").setParam("startYear", startYear).setParam("endYear", endYear);
}
}
@Override
public List<NutMap> getBudgetMoney(String outlayManageSource, String clubId) {
String sqlStr = """
SELECT
ab.id,
ab.isSchoolBudget,
ab.schoolBudgetId,
ab.totalBudgetMoney,
ab.activityMatter
FROM
activity_budget ab
LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id
$condition
""";
//找出今年的预算
Sql sql = Sqls.create(sqlStr);
Cnd cnd = Cnd.NEW();
cnd.and("YEAR(ab.applyDate)", "=", DateUtil.thisYear());
cnd.and("ins.state", "=", 20);
cnd.and("ab.outlayManageSource", "=", outlayManageSource);
if (Objects.equals("ACTIVITY_BUDGET_TYPE_TWO", outlayManageSource)) {
cnd.and("ab.unionId", "=", SecurityUtil.getUnionId());
} else if (Objects.equals("ACTIVITY_BUDGET_TYPE_THREE", outlayManageSource)) {
cnd.and("ab.clubId", "=", clubId);
}
sql.setCondition(cnd);
List<NutMap> budgetList = listMap(sql);
Sql sql1 = Sqls.create("""
SELECT
info.deductionBudgetId,
info.actualMoney
FROM
`activity_reimbursement_info` info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
WHERE
ins.state = 20
""");
List<NutMap> infoList = listMap(sql1);
budgetList.forEach(v -> {
double usedBudgetMoney = infoList.stream().filter(info -> info.getString("deductionBudgetId").equals(v.getString("id")))
.mapToDouble(info -> info.getDouble("actualMoney")).sum();
v.setv("usedBudgetMoney", usedBudgetMoney);
});
return budgetList;
}
@Override
@ApiOperation("预算验证")
public Result bxAddValidate(String deductionBudgetId, BigDecimal moneyBig, String outlayManageSource, String clubId) {
if (StrUtil.isAllEmpty(deductionBudgetId, outlayManageSource)) {
return Result.error("参数错误");
}
ActivityBudget budget = dao().fetch(ActivityBudget.class, deductionBudgetId);
if (Lang.isEmpty(budget)) {
return Result.error("预算不存在");
}
Sql sql = Sqls.create("""
SELECT
info.actualMoney
FROM
`activity_reimbursement_info` info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
WHERE
ins.state = 20 and info.deductionBudgetId=@deductionBudgetId
""").setParam("deductionBudgetId", budget.getId());
List<NutMap> infoList = listMap(sql);
double usedBudgetMoney = infoList.stream().mapToDouble(info -> info.getDouble("actualMoney")).sum();
BigDecimal usedBudgetMoneyBig = BigDecimal.valueOf(usedBudgetMoney);
if (usedBudgetMoneyBig.add(moneyBig).compareTo(budget.getTotalBudgetMoney()) > 0) {
BigDecimal subtract = budget.getTotalBudgetMoney().subtract(usedBudgetMoneyBig);
return Result.error("您申报的金额已超过总金额!当前预算还剩下:" + subtract);
}
return null;
}
}
@@ -30,6 +30,11 @@ public class CommonPageParam extends PageForm {
private String unionId;
private String activityReimbursementMode;
private String outlayManageSource;
private String budgetReimburseType;
public void buildSearch(Cnd cnd, String prefix) {
if (cnd == null) {
@@ -60,5 +65,6 @@ public class CommonPageParam extends PageForm {
cnd.andEX(prefix + "clubId", "=", this.getClubId());
}
}
}
@@ -57,8 +57,8 @@ public class ActivityBudgetApplyListController {
@At
@ApiOperation("分页查询")
@SaCheckPermission("activity.budget.applyList")
public Result pageData(PageForm pageForm, Integer year, String activityMatter) {
Sql sqlByApplyList = activityBudgetService.getSqlByApplyList(pageForm, year, activityMatter, Cnd.NEW());
public Result pageData(PageForm pageForm, Integer year, String activityMatter, String budgetReimburseType) {
Sql sqlByApplyList = activityBudgetService.getSqlByApplyList(pageForm, year, activityMatter, budgetReimburseType, Cnd.NEW());
Pagination pagination = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sqlByApplyList);
return Result.success(pagination);
}
@@ -67,7 +67,7 @@ public class ActivityBudgetApplyListController {
@ApiOperation("批量删除申报数据")
@SaCheckPermission("activity.budget.applyList")
@Aop(TransAop.READ_COMMITTED)
@SLog( tag = "年度预算申报-我的申报", msg = "删除了${ids.length}条数据,${ids}")
@SLog(tag = "年度预算申报-我的申报", msg = "删除了${ids.length}条数据,${ids}")
public Result batchDelete(@Param("ids[]") @Valid String[] ids) {
if (ObjectUtil.isNotEmpty(ids)) {
activityBudgetService.clear(Cnd.where("id", "in", ids));
@@ -80,7 +80,7 @@ public class ActivityBudgetApplyListController {
@ApiOperation("删除一条申报数据")
@SaCheckPermission("activity.budget.applyList")
@Aop(TransAop.READ_COMMITTED)
@SLog( tag = "年度预算申报-我的申报", msg = "删除了一条条数据,${id}")
@SLog(tag = "年度预算申报-我的申报", msg = "删除了一条条数据,${id}")
public Result doDelete(String id) {
activityBudgetService.dao().delete(ActivityBudget.class, id);
activityBudgetService.dao().clear(ActivityBudgetDetails.class, Cnd.where("budgetId", "=", id));
@@ -90,7 +90,7 @@ public class ActivityBudgetApplyListController {
@At
@ApiOperation("提交申报数据")
@SaCheckPermission("activity.budget.applyList")
@SLog( tag = "年度预算申报-我的申报", msg = "提交了${ids.length}条数据,${ids}")
@SLog(tag = "年度预算申报-我的申报", msg = "提交了${ids.length}条数据,${ids}")
public Result batchSubmit(@Valid @Param("ids[]") String[] ids) {
List<ActivityBudget> budgetList = activityBudgetService.query(Cnd.where("id", "in", ids));
List<ActivityBudget> budgets = budgetList.stream().filter(a ->
@@ -121,11 +121,11 @@ public class ActivityBudgetApplyListController {
@At
@ApiOperation("查询申报的金额")
@SaCheckPermission("activity.budget.applyList")
public Result getApplyMoney(Integer year, String activityMatter) {
public Result getApplyMoney(Integer year, String activityMatter, String budgetReimburseType) {
Cnd cnd = Cnd.NEW();
cnd.andEX("info.isSchoolBudget", "=", 0);
cnd.andEX("ins.state", "=", 20);
Sql sql = activityBudgetService.getSqlByApplyList(null, year, activityMatter, cnd);
Sql sql = activityBudgetService.getSqlByApplyList(null, year, activityMatter, budgetReimburseType, cnd);
sql.setCondition(cnd);
List<NutMap> list = activityBudgetService.listMap(sql);
double declareTotalBudgetMoney = list.stream().mapToDouble(map -> map.getDouble("declareTotalBudgetMoney")).sum();
@@ -137,9 +137,9 @@ public class ActivityBudgetApplyListController {
@At
@Ok("void")
@SaCheckPermission("activity.budget.applyList")
public void doExport(@Valid Integer year, String activityMatter, HttpServletResponse response) {
public void doExport(@Valid Integer year, String activityMatter, String budgetReimburseType,HttpServletResponse response) {
activityBudgetService.doExport(year, activityMatter, response);
activityBudgetService.doExport(year, activityMatter, budgetReimburseType,response);
}
@@ -61,8 +61,8 @@ public class ActivityBudgetApplyStatisticsController {
@At
@ApiOperation("分页查询")
@SaCheckPermission("activity.budget.applyStatistics")
public Result pageData(PageForm pageForm, Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter);
public Result pageData(PageForm pageForm, Integer year, String unionId, String clubId, String outlayManageSource, String budgetReimburseType, String activityMatter) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter, budgetReimburseType);
Pagination pagination = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@@ -70,8 +70,8 @@ public class ActivityBudgetApplyStatisticsController {
@At
@ApiOperation("查询预算有多少钱")
@SaCheckPermission("activity.budget.applyStatistics")
public Result getApplyMoney(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter);
public Result getApplyMoney(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter, String budgetReimburseType) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter, budgetReimburseType);
List<NutMap> list = activityBudgetService.listMap(sql);
list = list.stream().filter(v -> !v.getBoolean("isSchoolBudget")).toList();
double declareTotalBudgetMoney = list.stream().mapToDouble(map -> map.getDouble("declareTotalBudgetMoney")).sum();
@@ -83,13 +83,16 @@ public class ActivityBudgetApplyStatisticsController {
@Ok("void")
@ApiOperation("导出")
@SaCheckPermission("activity.budget.applyStatistics")
public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, HttpServletResponse response) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, null);
public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, String budgetReimburseType, HttpServletResponse response) {
Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, null, budgetReimburseType);
List<NutMap> mapList = activityBudgetService.listMap(sql);
List<Sys_dict> dictList = sysDictService.getSubListByCode("ACTIVITY_BUDGET_TYPE");
List<Sys_dict> dictList2 = sysDictService.getSubListByCode("ACTIVITY_BUDGET_REIMBURSE_TYPE");
mapList.forEach(map -> {
Sys_dict dict = dictList.stream().filter(d -> d.getCode().equals(map.getString("outlayManageSource"))).findFirst().orElse(null);
map.put("outlayManageSource", dict.getName());
Sys_dict dict2 = dictList2.stream().filter(d -> d.getCode().equals(map.getString("budgetReimburseType"))).findFirst().orElse(null);
map.put("budgetReimburseType", dict2.getName());
});
ArrayList<ExcelExportEntity> entities = new ArrayList<>();
entities.add(new ExcelExportEntity("年度", "year", 20));
@@ -97,6 +100,7 @@ public class ActivityBudgetApplyStatisticsController {
entities.add(new ExcelExportEntity("申报人工号", "loginName", 20));
entities.add(new ExcelExportEntity("联系方式", "mobile", 20));
entities.add(new ExcelExportEntity("申报类型", "outlayManageSource", 20));
entities.add(new ExcelExportEntity("预算条目", "budgetReimburseType", 20));
entities.add(new ExcelExportEntity("申报单位", "helpUnitName", 20));
entities.add(new ExcelExportEntity("事项", "activityMatter", 20));
ExcelExportEntity draftCodeEntity = new ExcelExportEntity("申报预算金额", "declareTotalBudgetMoney", 20);
@@ -52,16 +52,16 @@ public class ActivityBudgetQueryStatisticsController {
@At
@ApiOperation("分页查询")
@SaCheckPermission("activity.budget.queryStatistics")
public Result pageData(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource) {
return Result.success(statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource));
public Result pageData(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource,String budgetReimburseType) {
return Result.success(statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource,budgetReimburseType));
}
@At
@Ok("void")
@ApiOperation("导出")
@SaCheckPermission("activity.budget.queryStatistics")
public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, HttpServletResponse response) {
List<NutMap> mapList = statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource);
public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, String budgetReimburseType,HttpServletResponse response) {
List<NutMap> mapList = statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource,budgetReimburseType);
if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_TWO")){
mapList.forEach(m->{
if (StrUtil.isEmpty(m.getString("unionName"))){
@@ -54,6 +54,7 @@ public class ActivityBudgetSchoolAuditController {
Integer year,
String unionId,
String clubId,
String budgetReimburseType,
Boolean approval,
String outlayManageSource,
String activityMatter) {
@@ -88,9 +89,10 @@ public class ActivityBudgetSchoolAuditController {
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "b6f29037-972d-4b97-8677-c3b3672ef0dc");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("info.unionId", "=", unionId);
cnd.andEX("info.outlayManageSource", "=", outlayManageSource);
cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType);
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -78,6 +78,10 @@ public class ActivityBudget extends BaseModel implements Serializable {
@ColDefine(type = ColType.VARCHAR, width = 200)
private String outlayManageSource;
@Column
@Comment("预算条目")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String budgetReimburseType;
@Column
@Comment("创建人工会")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@@ -5,7 +5,7 @@ import org.nutz.dao.sql.Sql;
public interface ActivityBudgetApplyStatisticsService extends BaseService {
Sql getsql(Integer year, String unionId,String clubId, String outlayManageSource,String activityMatter);
Sql getsql(Integer year, String unionId,String clubId, String outlayManageSource,String activityMatter,String budgetReimburseType);
void doDelete(String id);
@@ -7,5 +7,5 @@ import java.util.List;
public interface ActivityBudgetQueryStatisticsService extends BaseService {
List<NutMap> getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource);
List<NutMap> getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource,String budgetReimburseType);
}
@@ -13,10 +13,11 @@ import javax.servlet.http.HttpServletResponse;
public interface ActivityBudgetService extends BaseService<ActivityBudget> {
Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter, Cnd cnd);
Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter, String budgetReimburseType, Cnd cnd);
/**
* 提交年度预算申报
*
* @param activityBudget
*/
Result submit(ActivityBudget activityBudget);
@@ -24,5 +25,5 @@ public interface ActivityBudgetService extends BaseService<ActivityBudget> {
NutMap findOne(String id);
void doExport(Integer year, String activityMatter, HttpServletResponse response);
void doExport(Integer year, String activityMatter, String budgetReimburseType, HttpServletResponse response);
}
@@ -35,7 +35,7 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im
@Override
public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) {
public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter,String budgetReimburseType) {
Sql sql = Sqls.create("""
SELECT
YEAR(ab.applyDate) year,
@@ -60,6 +60,7 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im
}*/
cnd.andEX("ab.clubId", "=", clubId);
cnd.andEX("ab.outlayManageSource", "=", outlayManageSource);
cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType);
cnd.andEX("ins.state", "=", 20);
cnd.desc("ab.applyDate");
sql.setCondition(cnd);
@@ -19,7 +19,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
}
@Override
public List<NutMap> getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource) {
public List<NutMap> getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource,String budgetReimburseType) {
if (List.of("ACTIVITY_BUDGET_TYPE_ONE").contains(outlayManageSource)) {
Sql sql = Sqls.create("""
SELECT
@@ -34,6 +34,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
Cnd cnd = Cnd.NEW();
cnd.andEX("YEAR(ab.applyDate)", "=", year);
cnd.andEX("ab.outlayManageSource", "=", outlayManageSource);
cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType);
cnd.andEX("wpi.state", "=", 20);
sql.setCondition(cnd);
return listMap(sql);
@@ -56,6 +57,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
cnd.andEX("ab.unionId", "=", unionId);
cnd.andEX("ab.isSchoolBudget", "=", 0);
cnd.andEX("ab.outlayManageSource", "=", "ACTIVITY_BUDGET_TYPE_TWO");
cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType);
cnd.andEX("wpi.state", "=", 20);
cnd.andEX("YEAR(ab.applyDate)", "=", year);
cnd.groupBy("ab.unionId");
@@ -81,6 +83,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im
cnd.andEX("ab.clubId", "=", clubId);
cnd.andEX("ab.isSchoolBudget", "=", 0);
cnd.andEX("ab.outlayManageSource", "=", "ACTIVITY_BUDGET_TYPE_THREE");
cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType);
cnd.andEX("wpi.state", "=", 20);
cnd.andEX("YEAR(ab.applyDate)", "=", year);
cnd.groupBy("ab.clubId");
@@ -59,7 +59,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
private FlowEngine flowEngine;
@Override
public Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter,Cnd cnd) {
public Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter,String budgetReimburseType,Cnd cnd) {
Sql sql = Sqls.create("""
SELECT
@@ -117,6 +117,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
cnd.and(group);
}
cnd.andEX("YEAR(info.applyDate)", "=", year);
cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType);
cnd.desc("info.applyDate");
sql.setCondition(cnd);
return sql;
@@ -245,9 +246,9 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
}
@Override
public void doExport(Integer year, String activityMatter, HttpServletResponse response) {
public void doExport(Integer year, String activityMatter, String budgetReimburseType,HttpServletResponse response) {
Sql sql = getSqlByApplyList(null, year, activityMatter,Cnd.NEW());
Sql sql = getSqlByApplyList(null, year, activityMatter,budgetReimburseType,Cnd.NEW());
List<NutMap> mapList = listMap(sql);
List<Sys_dict> dictList = sysDictService.getSubListByCode("ACTIVITY_BUDGET_TYPE");
mapList.forEach(map -> {
@@ -112,7 +112,7 @@ public class OutlayManageClubController {
@SaCheckPermission("outlay.outlayManage.club.manage")
@SLog(tag = "协会预算分配", msg = "根据申报的金额修改本年的预算预算")
public Result issuedOutlay() {
Sql sql = Sqls.create("""
/* Sql sql = Sqls.create("""
SELECT
ab.clubId,
ab.totalBudgetMoney
@@ -122,11 +122,11 @@ public class OutlayManageClubController {
WHERE
YEAR(ab.applyDate) = @year
AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_THREE'
AND ab.isSchoolBudget =0
AND ab.isSchoolBudget =0
AND wpi.state = 20
""").setParam("year", DateUtil.thisYear());
List<NutMap> budgetList = baseService.listMap(sql);
*/
Sql sqlClub = Sqls.create("""
SELECT
c.*
@@ -141,16 +141,16 @@ public class OutlayManageClubController {
List<OutlayManageClub> insertUnionList = new ArrayList<>();
clubList.forEach(v -> {
BigDecimal totalBudgetMoney = budgetList.stream()
/* BigDecimal totalBudgetMoney = budgetList.stream()
.filter(budget -> budget.getString("clubId").equals(v.getId()))
.map(budget -> new BigDecimal(budget.getString("totalBudgetMoney"))) // 提取 money 属性
.reduce(BigDecimal.ZERO, BigDecimal::add);
.reduce(BigDecimal.ZERO, BigDecimal::add);*/
OutlayManageClub outlayManageClub = new OutlayManageClub();
outlayManageClub.setYear(DateUtil.thisYear());
outlayManageClub.setClubName(v.getClubName());
outlayManageClub.setClubCode(v.getClubCode());
outlayManageClub.setClubId(v.getId());
outlayManageClub.setTotalQuota(totalBudgetMoney);
// outlayManageClub.setTotalQuota(totalBudgetMoney);
insertUnionList.add(outlayManageClub);
});
baseService.insert(insertUnionList);
@@ -95,7 +95,7 @@ public class OutlayManageSchoolController {
@SaCheckPermission("outlay.outlayManage.school.manage")
@SLog(tag = "校工会预算分配", msg = "下发预算的金额:${args[0]}")
public Result issuedOutlay() {
Sql sql = Sqls.create("""
/* Sql sql = Sqls.create("""
SELECT
totalBudgetMoney
FROM
@@ -109,10 +109,10 @@ public class OutlayManageSchoolController {
List<NutMap> budgetList = baseService.listMap(sql);
BigDecimal totalBudgetMoney = budgetList.stream()
.map(v->new BigDecimal(v.getString("totalBudgetMoney"))) // 提取 money 属性
.reduce(BigDecimal.ZERO, BigDecimal::add);
.reduce(BigDecimal.ZERO, BigDecimal::add);*/
OutlayManageSchool outlayManageSchool = new OutlayManageSchool();
outlayManageSchool.setYear(DateUtil.thisYear());
outlayManageSchool.setTotalQuota(totalBudgetMoney);
// outlayManageSchool.setTotalQuota(totalBudgetMoney);
baseService.insert(outlayManageSchool);
return Result.success();
}
@@ -106,7 +106,7 @@ public class OutlayManageUnionController {
@SaCheckPermission("outlay.outlayManage.union.manage")
@SLog(tag = "分工会预算分配", msg = "根据申报的金额修改本年的预算预算")
public Result issuedOutlay() {
Sql sql = Sqls.create("""
/* Sql sql = Sqls.create("""
SELECT
unionId,
totalBudgetMoney
@@ -116,25 +116,25 @@ public class OutlayManageUnionController {
WHERE
YEAR(ab.applyDate) = @year
AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_TWO'
AND ab.isSchoolBudget =0
AND ab.isSchoolBudget =0
AND wpi.state = 20
""").setParam("year", DateUtil.thisYear());
List<NutMap> budgetList = baseService.listMap(sql);
List<NutMap> budgetList = baseService.listMap(sql);*/
List<Sys_union> unionList = baseService.dao().query(Sys_union.class, Cnd.NEW());
List<OutlayManageUnion> insertUnionList = new ArrayList<>();
unionList.forEach(v -> {
BigDecimal totalBudgetMoney = budgetList.stream()
/*BigDecimal totalBudgetMoney = budgetList.stream()
.filter(budget -> budget.getString("unionId").equals(v.getId()))
.map(budget -> new BigDecimal(budget.getString("totalBudgetMoney"))) // 提取 money 属性
.reduce(BigDecimal.ZERO, BigDecimal::add);
.reduce(BigDecimal.ZERO, BigDecimal::add);*/
OutlayManageUnion outlayManageUnion = new OutlayManageUnion();
outlayManageUnion.setYear(DateUtil.thisYear());
outlayManageUnion.setUnionName(v.getName());
outlayManageUnion.setUnionCode(v.getUnionCode());
outlayManageUnion.setUnionId(v.getId());
outlayManageUnion.setTotalQuota(totalBudgetMoney);
// outlayManageUnion.setTotalQuota(totalBudgetMoney);
insertUnionList.add(outlayManageUnion);
});
baseService.insert(insertUnionList);
@@ -24,7 +24,6 @@ module.exports = {
watch: {
value: {
handler(val) {
console.log(val)
if(val){
this.signatureContent = val
this.$emit("input", this.signatureContent)
@@ -309,7 +309,6 @@ layout("/layouts/v4/baseLayout.html"){
},
methods: {
menuSelect(index, indexPath) {
debugger
try {
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
window.sessionStorage.setItem("zhgh_sub_app_left_menu_active_index-" + app.id, index)
@@ -319,7 +318,6 @@ layout("/layouts/v4/baseLayout.html"){
},
// 获取菜单
getMenus(appId) {
debugger
if (!appId) return
this.$axios.post("/platform/sys/user/subAppMenus", {appId}).then((res) => {
if (res.code === 0) {
@@ -334,7 +332,6 @@ layout("/layouts/v4/baseLayout.html"){
// 设置应用信息
setAppInfo(app) {
debugger
if (app) {
// 储存到缓存
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
@@ -350,13 +347,10 @@ layout("/layouts/v4/baseLayout.html"){
},
// 菜单回显
echoMenus() {
debugger
try {
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id)
this.openedMenus = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app_left_menu_opens-" + app.id)) || []
console.log(this.openedMenus)
console.log(this.activeMenuIndex)
// !this.activeMenuIndex &&
if ('/platform/v4/subApp' === getBaseSubAppPath()) {
@@ -371,7 +365,6 @@ layout("/layouts/v4/baseLayout.html"){
// 地址选中
hrefSelect() {
debugger
function findMenuPath(menus, targetHref) {
function search(items, path) {
for (const item of items) {
@@ -451,7 +444,6 @@ layout("/layouts/v4/baseLayout.html"){
},
init() {
debugger
// 页面加载时获取到正确的菜单
const pathname = window.location.pathname
if (!pathname.startsWith("/platform/v4/subApp")) {
@@ -217,7 +217,6 @@
this.subscribers.get(type).add(callback)
setTimeout(() => {
console.log(this.ws.readyState)
// 所有订阅完成后,发送 join 消息
if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) {
this.isSubscribed = true
@@ -149,8 +149,8 @@
}
connect() {
//const WS_URL = window.location.host + "${base}/websocket"
const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket"
const WS_URL = window.location.host + "${base}/websocket"
// const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket"
const protocol = window.location.protocol === "http:" ? "ws://" : "wss://"
this.ws = new WebSocket(protocol + WS_URL)
}
@@ -163,7 +163,6 @@
this.subscribers.get(type).add(callback)
setTimeout(() => {
console.log(this.ws.readyState)
// 所有订阅完成后,发送 join 消息
if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) {
this.isSubscribed = true
@@ -2,374 +2,551 @@
layout("/layouts/platform.html"){
#-->
<style>
.el-descriptions-item__label {
width: 15% !important;
}
.el-descriptions-item__label {
width: 15% !important;
}
</style>
<div id="app">
<div>
<el-card shadow="never">
<snaker-start slot="header" label="活动报销" define_key="HDBX"></snaker-start>
<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="declareId">
<el-select v-model="formData.declareId"
style="width: 100%;"
@change="activityChange"
filterable placeholder="请选择活动">
<el-option
v-for="item in activityOptions"
:key="item.id"
:label="item.activityName + '(' + item.declareUnitName + ')'"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<div>
<el-card shadow="never">
<snaker-start slot="header" label="活动报销" define_key="HDBX"></snaker-start>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-descriptions :column="2" border>
<template v-if="formData.declareId">
<el-descriptions-item label="相关数据">
<el-button size="small" type="primary" @click="viewDeclare">查看申报信息</el-button>
</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="经费类型">
<el-form-item label="经费类型" prop="outlayManageSource"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.outlayManageSource" @change="outlayManageSourceChange">
<el-radio border :label="i.code" :key="i.code" v-for="i in budgetTypeOption">
{{i.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="实际活动时间">
<el-form-item prop="activityTime">
<el-date-picker
start-placeholder="开始日期"
range-separator="-"
end-placeholder="结束日期"
style="width: 100%"
type="daterange"
v-model="formData.activityTime"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="报销模式">
<el-form-item prop="activityReimbursementMode"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.activityReimbursementMode" @change="getActivityReimbursementByUser">
<el-radio-button label="activity">活动报销</el-radio-button>
<el-radio-button label="daily">日常报销</el-radio-button>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属协会"
v-if="['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)">
<el-form-item label="所属协会" prop="clubId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select
placeholder="请选择协会"
style="width: 100%;" v-model="formData.clubId"
@change="clubIdChange">
<el-option
:key="item.id"
:label="item.clubName"
:value="item.id"
v-for="item in clubOption">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<template>
<el-descriptions-item label="项目名称" v-if="formData.activityReimbursementMode==='activity'">
<el-row :gutter="10">
<el-col :span="18">
<el-form-item prop="declareId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select v-model="formData.declareId"
style="width: 100%;"
@change="activityChange"
filterable placeholder="请选择活动">
<el-option
v-for="item in activityOptions"
:key="item.id"
:label="item.activityName + '(' + item.declareUnitName + ')'"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-button size="small" type="primary" @click="viewDeclare"
v-if="formData.declareId">
查看申报信息
</el-button>
</el-col>
</el-row>
</el-descriptions-item>
<el-descriptions-item label="项目名称" v-else>
<el-form-item prop="activityName"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.activityName" maxlength="50"
placeholder="请输入项目名称"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item label="扣款预算">
<el-form-item prop="deductionBudgetId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select v-model="formData.deductionBudgetId"
style="width: 100%;"
filterable placeholder="选择扣款预算">
<el-option
v-for="item in budgetOption"
:key="item.id"
:label="'预算名称:'+item.activityMatter + ',申报预算:' + item.totalBudgetMoney + ',已使用:'+item.usedBudgetMoney"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
v-if="formData.activityReimbursementMode!=='activity'
&&
['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
<el-descriptions-item label="活动计划时间">
<el-form-item prop="planDate">
<el-date-picker
readonly
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>
<template v-if="formData.activityReimbursementMode==='activity'">
<el-descriptions-item label="实际活动时间">
<el-form-item prop="activityTime"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-date-picker
start-placeholder="开始日期"
range-separator="-"
end-placeholder="结束日期"
style="width: 100%"
type="daterange"
v-model="formData.activityTime"
value-format="yyyy-MM-dd">
</el-date-picker>
</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 fixed type="index" width="60"></el-table-column>
<el-table-column label="费用项目名称" fixed prop="name" width="200">
<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" style="width: 100%" maxlength="50"
placeholder="请输入费用项目名称"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="预算费用" prop="budgetPrice" width="250">
<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 label="实际费用" prop="actualPrice" width="250">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.actualPrice'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请填写实际费用" v-model="row.actualPrice"
:precision="2" style="width: 100%"
:min="0"></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="收款人" prop="payeeId" width="200">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.payeeId'">
<el-input v-model="row.username" maxlength="50"
@input="getCardNumberByPayeeId(row)"
placeholder="请输入收款人"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="支行名称" prop="bankName" width="300">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.bankName'">
<el-input v-model="row.bankName" maxlength="80"
placeholder="请输入支行名称"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="报销卡号" prop="bankCardNum" width="250">
<template scope="{row,$index}">
<el-form-item label-width="0">
<el-input type="number" v-model="row.bankCardNum"
maxlength="50"
placeholder="请输入报销卡号"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="400">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.remark'">
<el-input v-model="row.remark" maxlength="200"
placeholder="请输入备注"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column fixed="right" header-align="center" label="操作" width="100">
<template slot="header" slot-scope="scope">
<el-button @click="formData.budgets.push({})" 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="活动计划时间">
<el-form-item prop="planDate"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-date-picker
readonly
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
v-if="formData.activityReimbursementMode==='activity'
&&
['ACTIVITY_BUDGET_TYPE_THREE'].includes(formData.outlayManageSource)"></el-descriptions-item>
</template>
<el-descriptions-item label="发票" :span="2">
<el-form-item prop="billFiles">
<file-upload :value.sync="formData.billFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
complete_result></file-upload>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动报道照片/总结/链接" :span="2">
<el-form-item prop="photoFiles">
<file-upload :value.sync="formData.photoFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
complete_result></file-upload>
</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 fixed type="index" width="60"></el-table-column>
<el-table-column label="费用项目名称" fixed prop="name" width="200">
<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" style="width: 100%" maxlength="50"
placeholder="请输入费用项目名称"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="预算费用" prop="budgetPrice" width="250"
v-if="formData.activityReimbursementMode==='activity'">
<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 label="实际费用" prop="actualPrice" width="250">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.actualPrice'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="请填写实际费用" v-model="row.actualPrice"
:precision="2" style="width: 100%"
:min="0"></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="收款人" prop="username" width="200">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.username'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="row.username" maxlength="50"
@input="getCardNumberByPayeeId(row)"
placeholder="请输入收款人"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="支行名称" prop="bankName" width="300">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.bankName'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="row.bankName" maxlength="80"
placeholder="请输入支行名称"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="报销卡号" prop="bankCardNum" width="250">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.bankCardNum'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input type="number" v-model="row.bankCardNum"
maxlength="50"
placeholder="请输入报销卡号"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="400">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.remark'">
<el-input v-model="row.remark" maxlength="200"
placeholder="请输入备注"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column fixed="right" header-align="center" label="操作" width="100">
<template slot="header" slot-scope="scope">
<el-button @click="formData.budgets.push({})" 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="otherFiles">
<file-upload :value.sync="formData.otherFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
complete_result></file-upload>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="发票" :span="2">
<el-form-item prop="billFiles">
<file-upload :value.sync="formData.billFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
complete_result></file-upload>
</el-form-item>
</el-descriptions-item>
<template v-if="formData.activityReimbursementMode==='activity'">
<el-descriptions-item label="活动报道照片/总结/链接" :span="2">
<el-form-item prop="photoFiles">
<file-upload :value.sync="formData.photoFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
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>
<el-descriptions-item label="奖品/纪念品/服装/道具等活动人员名单" :span="2">
<el-form-item prop="otherFiles">
<file-upload :value.sync="formData.otherFiles"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".doc, .docx, .xls, .xlsx, .pdf, .ppt, .jpg, .jpeg, .png"
complete_result></file-upload>
</el-form-item>
</el-descriptions-item>
</template>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
<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>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
<el-dialog title="申报数据" :visible.sync="declareDialogVisible" width="60%">
<div style="max-height: 68vh;overflow-y: auto">
<info ref="infoRef"></info>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="declareDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<el-dialog title="申报数据" :visible.sync="declareDialogVisible" width="60%">
<div style="max-height: 68vh;overflow-y: auto">
<info ref="infoRef"></info>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="declareDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</div>
</div>
<script>
<!--#include("../../declare/common/info.js"){}#-->
<!--#include("../../declare/common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE"],
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {
id: GetQueryString("businessId"),
activityTime: [],
budgets: [],
planDate: [],
},
formRules: {
id: [{required: true, message: "必填", trigger: ['change', 'blur']}]
},
formData: {
id: GetQueryString("businessId"),
activityTime: [],
budgets: [],
planDate: [],
},
formRules: {
id: [{required: true, message: "必填", trigger: ['change', 'blur']}]
},
activityOptions: [],
activityOptions: [],
declareDialogVisible: false
}
},
components: {
"info": INFO,
},
methods: {
// 保存
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
declareDialogVisible: false,
budgetOption: [],
budgetTypeOption: [],
clubOption: []
}
},
components: {
"info": INFO,
},
methods: {
clubIdChange() {
this.$set(this.formData, 'deductionBudgetId', null)
const club = this.clubOption.find(v => v.id === this.formData.clubId)
this.$set(this.formData, 'declareUnitName', club.clubName)
this.getBudgetByYear()
this.getActivityReimbursementByUser()
},
outlayManageSourceChange(val) {
this.$set(this.formData, 'clubId', null)
this.$set(this.formData, 'deductionBudgetId', null)
if (val === "ACTIVITY_BUDGET_TYPE_ONE") {
this.$set(this.formData, "declareUnitName", "校工会")
} else if (val === "ACTIVITY_BUDGET_TYPE_TWO") {
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
this.$set(this.formData, "declareUnitName", this.$store.state.user.union.name)
}
this.getBudgetByYear()
this.getActivityReimbursementByUser()
},
getBudgetByYear() {
this.budgetOption = []
this.$axios.post('/platform/activityReimbursement/apply/getBudgetByYear', {
outlayManageSource: this.formData.outlayManageSource,
clubId: this.formData.clubId
}).then(res => {
if (res.code === 0) {
this.budgetOption = res.data
}
})
},
// 保存
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
commonUtil.pjaxPush('/platform/activityReimbursement/mine')
}
})
})
},
}
})
})
},
// 提交
onSubmit() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/activityReimbursement/mine')
}
})
})
},
// 提交
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (this.budgets && this.budgets.length === 0) {
this.$message.error("请填写费用!")
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/activityReimbursement/mine')
}
})
})
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/activityReimbursement/mine')
}
})
})
},
onFinishTask() {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (this.budgets && this.budgets.length === 0) {
this.$message.error("请填写费用!")
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (this.formData.activityTime && this.formData.activityTime.length > 0) {
this.formData.startTime = this.formData.activityTime[0]
this.formData.endTime = this.formData.activityTime[1]
}
this.$axios.post('/platform/activityReimbursement/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/activityReimbursement/mine')
}
})
})
}
})
},
// 查看申报数据
viewDeclare() {
this.declareDialogVisible = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen({id: this.formData.declareId})
})
},
// 查看申报数据
viewDeclare() {
this.declareDialogVisible = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen({id: this.formData.declareId})
})
},
async getCardNumberByPayeeId(row) {
const resp = await this.$axios.post('/platform/activityReimbursement/apply/getCardNumberByPayeeId', {username:row.username})
if (resp.code === 0) {
if (resp.data) {
this.$set(row, "bankCardNum", resp.data.bankCardNum)
this.$set(row, "bankName", resp.data.bankName)
}
}
},
async activityChange(id) {
const {code, data} = await this.$axios.post('/platform/activityDeclare/mine/findOne', {id: id})
if (code === 0) {
this.formData = {
...this.formData,
...data
}
async getCardNumberByPayeeId(row) {
const resp = await this.$axios.post('/platform/activityReimbursement/apply/getCardNumberByPayeeId', {username: row.username})
if (resp.code === 0) {
if (resp.data) {
this.$set(row, "bankCardNum", resp.data.bankCardNum)
this.$set(row, "bankName", resp.data.bankName)
}
}
},
async activityChange(id) {
const {code, data} = await this.$axios.post('/platform/activityDeclare/mine/findOne', {id: id})
if (code === 0) {
this.formData = {
...this.formData,
...data
}
this.formData.id = this.bizId ? this.bizId : null
this.formData.id = this.bizId ? this.bizId : null
if (data.planStartTime && data.planEndTime) {
this.formData.planDate = [data.planStartTime, data.planEndTime]
}
}
},
async getActivityReimbursementByUser(id) {
const {code, data} = await this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser',{id});
if (code === 0) {
this.activityOptions = data
}
},
findOne(){
this.$axios.post('/platform/activityReimbursement/mine/findOne', {id: this.bizId})
.then(res => {
if (res.code === 0) {
this.formData = res.data
if (res.data.planStartTime && res.data.planEndTime) {
this.formData.planDate = [res.data.planStartTime, res.data.planEndTime]
}
if (res.data.startTime && res.data.endTime) {
this.formData.activityTime = [res.data.startTime, res.data.endTime]
}
// this.activityChange(res.data.activityId)
}
})
},
},
async created() {
await this.getActivityReimbursementByUser(this.bizId)
if (this.bizId) {
this.findOne()
}
}
})
if (data.planStartTime && data.planEndTime) {
this.formData.planDate = [data.planStartTime, data.planEndTime]
}
}
},
getActivityReimbursementByUser() {
this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser', {
id: this.bizId,
outlayManageSource: this.formData.outlayManageSource,
clubId: this.formData.clubId
}).then(res => {
if (res.code === 0) {
this.activityOptions = res.data
}
});
},
findOne() {
this.$axios.post('/platform/activityReimbursement/mine/findOne', {id: this.bizId})
.then(res => {
if (res.code === 0) {
if (res.data.billFiles) res.data.billFiles = JSON.parse(res.data.billFiles)
if (res.data.budgets) res.data.budgets = JSON.parse(res.data.budgets)
this.formData = res.data
if (res.data.planStartTime && res.data.planEndTime) {
this.formData.planDate = [res.data.planStartTime, res.data.planEndTime]
}
if (res.data.startTime && res.data.endTime) {
this.formData.activityTime = [res.data.startTime, res.data.endTime]
}
this.getBudgetByYear()
}
})
},
initBudgetType() {
this.budgetTypeOption = this.dict.type.ACTIVITY_BUDGET_TYPE
const budgetTypeCloseOption = []
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
} else {
if (this.$auth.hasRoleOr(["SCHOOL_REIMBURSEMENT_MANAGER"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_ONE"].includes(v.code)) {
budgetTypeCloseOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["UNION_REIMBURSEMENT_MANAGER"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_TWO"].includes(v.code)) {
budgetTypeCloseOption.push(v)
}
})
}
if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER"])) {
this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeCloseOption.push(v)
}
})
}
this.budgetTypeOption = budgetTypeCloseOption
}
},
},
async created() {
this.clubOption = await this.$businessTool.listCLubByRole()
this.initBudgetType()
if (this.bizId) {
this.findOne()
}
}
})
</script>
<!--#
}
@@ -18,6 +18,19 @@ layout("/layouts/platform.html"){
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
@@ -68,8 +81,14 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='activityType'">
<span>{{ getActivityTypeName(row.activityType) }}</span>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
@@ -122,21 +141,23 @@ layout("/layouts/platform.html"){
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"],
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: "流程状态"}
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
@@ -18,6 +18,19 @@ layout("/layouts/platform.html"){
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select>
</search-item>
<search-item label="所属协会">
<el-select clearable filterable placeholder="所属协会"
@@ -55,8 +68,14 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='activityType'">
<span>{{ getActivityTypeName(row.activityType) }}</span>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
@@ -109,21 +128,23 @@ layout("/layouts/platform.html"){
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"],
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: "流程状态"}
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
@@ -1,122 +1,135 @@
const INFO = {
template: /*language=HTML*/ `
<div>
<div class="process-title">申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="2" border>
<el-descriptions-item label="活动名称">{{ viewData.activityName }}</el-descriptions-item>
<el-descriptions-item label="活动类型">{{ getActivityTypeName(viewData.activityType) }}
</el-descriptions-item>
<el-descriptions-item label="申请人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
</el-descriptions-item>
<el-descriptions-item :label="viewData.activityType == 'CLUB' ? '申请协会' : '申请单位'">{{
viewData.declareUnitName }}
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.applyTime }}</el-descriptions-item>
<el-descriptions-item label="活动计划时间">{{ (viewData.planStartTime ? viewData.planStartTime : '未填写')
+ ' ~ ' + (viewData.planEndTime ? viewData.planEndTime : '未填写') }}
</el-descriptions-item>
<el-descriptions-item label="活动人数">{{ viewData.activityNumber }}</el-descriptions-item>
<el-descriptions-item label="实际活动时间" :span="2">{{ (viewData.startTime ? viewData.startTime :
'未填写') + ' ~ ' + (viewData.endTime ? viewData.endTime : '未填写') }}
</el-descriptions-item>
<el-descriptions-item label="活动地址" :span="2">{{ viewData.activityAddress }}</el-descriptions-item>
<el-descriptions-item label="活动预算费用" :span="2">
<el-table :data="viewData.budgets" border max-height="500" size="mini"
style="width: calc(1200px - 150px - 15%)">
<el-table-column label="序号" sortable type="index" fixed></el-table-column>
<el-table-column label="费用项目名称" fixed prop="name" fixed></el-table-column>
<el-table-column label="预算费用" prop="budgetPrice"></el-table-column>
<el-table-column label="实际费用" prop="actualPrice"></el-table-column>
<el-table-column label="收款人" prop="username"></el-table-column>
<el-table-column label="支行名称" prop="bankName"></el-table-column>
<el-table-column label="报销卡号" prop="bankCardNum"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
</el-table>
</el-descriptions-item>
<el-descriptions-item label="活动方案及简介" :span="2">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="2">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<el-descriptions-item label="发票" :span="2">
<file-preview v-if="viewData.billFiles && viewData.billFiles.length > 0" :files="viewData.billFiles"
complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<el-descriptions-item label="活动报道照片/总结/链接" :span="2">
<file-preview v-if="viewData.photoFiles && viewData.photoFiles.length > 0"
:files="viewData.photoFiles" complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<el-descriptions-item label="奖品/纪念品/服装/道具等活动人员名单" :span="2">
<file-preview v-if="viewData.otherFiles && viewData.otherFiles.length > 0"
:files="viewData.otherFiles" complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<el-image v-if="viewData.sign"
:src="viewData.sign"
class="signature-image"></el-image>
<span v-else>暂无</span>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="process-title">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
<div class="process-title">申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="2" border>
<el-descriptions-item label="报销模式">
{{ viewData.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}
</el-descriptions-item>
<el-descriptions-item label="经费类型">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="viewData.outlayManageSource"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="扣款预算">
{{viewData.deductionBudgetName}}
</el-descriptions-item>
<el-descriptions-item label="项目名称">{{ viewData.activityName }}</el-descriptions-item>
<el-descriptions-item label="申请">{{ viewData.userName + '(' + viewData.loginName + ')' }}
</el-descriptions-item>
<el-descriptions-item
:label="viewData.outlayManageSource == 'ACTIVITY_BUDGET_TYPE_THREE' ? '申请协会' : '申请单位'">
{{viewData.declareUnitName }}
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.applyTime }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<template v-if="viewData.activityReimbursementMode==='activity'">
<el-descriptions-item label="活动计划时间">{{ (viewData.planStartTime ? viewData.planStartTime :
'未填写')
+ ' ~ ' + (viewData.planEndTime ? viewData.planEndTime : '未填写') }}
</el-descriptions-item>
<el-descriptions-item label="活动人数">{{ viewData.activityNumber }}</el-descriptions-item>
<el-descriptions-item label="实际活动时间" :span="2">{{ (viewData.startTime ? viewData.startTime :
'未填写') + ' ~ ' + (viewData.endTime ? viewData.endTime : '未填写') }}
</el-descriptions-item>
<el-descriptions-item label="活动地址" :span="2">{{ viewData.activityAddress }}
</el-descriptions-item>
</template>
<el-descriptions-item label="费用" :span="2">
<el-table :data="viewData.budgets" border max-height="500" size="mini"
style="width: calc(1200px - 150px - 15%)">
<el-table-column label="序号" sortable type="index" fixed></el-table-column>
<el-table-column label="费用项目名称" fixed prop="name" fixed></el-table-column>
<el-table-column label="预算费用" prop="budgetPrice"
v-if="viewData.activityReimbursementMode==='activity'"></el-table-column>
<el-table-column label="实际费用" prop="actualPrice"></el-table-column>
<el-table-column label="收款人" prop="username"></el-table-column>
<el-table-column label="支行名称" prop="bankName"></el-table-column>
<el-table-column label="报销卡号" prop="bankCardNum" width="180"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
</el-table>
</el-descriptions-item>
<el-descriptions-item label="发票" :span="2">
<file-preview v-if="viewData.billFiles && viewData.billFiles.length > 0"
:files="viewData.billFiles"
complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<template v-if="viewData.activityReimbursementMode==='activity'">
<!-- <el-descriptions-item label="活动方案及简介" :span="2">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>-->
<!-- <el-descriptions-item label="附件" :span="2">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>-->
<el-descriptions-item label="活动报道照片/总结/链接" :span="2">
<file-preview v-if="viewData.photoFiles && viewData.photoFiles.length > 0"
:files="viewData.photoFiles" complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
<el-descriptions-item label="奖品/纪念品/服装/道具等活动人员名单" :span="2">
<file-preview v-if="viewData.otherFiles && viewData.otherFiles.length > 0"
:files="viewData.otherFiles" complete_result></file-preview>
<span v-else>暂无</span>
</el-descriptions-item>
</template>
<el-descriptions-item label="签字" :span="2">
<el-image v-if="viewData.sign"
:src="viewData.sign"
class="signature-image"></el-image>
<span v-else>暂无</span>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="process-title">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
dicts: ["PROCESS_TASK_SUBMIT_TYPE", "ACTIVITY_BUDGET_TYPE"],
data() {
return {
viewData: {},
@@ -136,8 +149,10 @@ const INFO = {
// 获取申请信息
info() {
this.$axios.post("/platform/activityReimbursement/mine/findOne", { id: this.row.id }).then((res) => {
this.$axios.post("/platform/activityReimbursement/mine/findOne", {id: this.row.id}).then((res) => {
if (res.code === 0) {
if (res.data.billFiles) res.data.billFiles = JSON.parse(res.data.billFiles)
if (res.data.budgets) res.data.budgets = JSON.parse(res.data.budgets)
this.viewData = res.data
}
})
@@ -145,7 +160,7 @@ const INFO = {
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
@@ -153,7 +168,7 @@ const INFO = {
},
// 查看流程图
openChart(){
openChart() {
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
},
@@ -2,219 +2,229 @@
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<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>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-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>
<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>
<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>
<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-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 :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=='activityType'">
<span>{{ getActivityTypeName(row.activityType) }}</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="操作" fixed="right" width="350px" fixed="right">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
<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=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</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="操作" fixed="right" width="350px" fixed="right">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)"
size="mini" type="primary">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)"
size="mini" type="danger">删除
</el-button>
<el-button @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
<el-button v-if="row.instanceState === 20" @click="doExportReimbursement(row)" size="mini" type="primary">报销凭证导出</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-button @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
<el-button v-if="row.instanceState === 20" @click="doExportReimbursement(row)" size="mini"
type="primary">报销凭证导出
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include("../common/info.js"){}#-->
<!--#include("../common/info.js"){}#-->
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: "流程状态"}
],
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE"],
data() {
return {
pageForm: {
year: this.$moment().format("YYYY")
},
tableColumns: [
{prop: "loginName", label: "申报人", sortable: true,width: "180"},
{prop: "activityName", label: "项目名称",width: "280"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
unions: [],
units: [],
clubs: [],
unions: [],
units: [],
clubs: [],
activityDeclareReimbursementList: []
}
},
components: {
'info': INFO
},
methods: {
// 导出示例
doExportDeclare(row){
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.declareId)
},
// 导出报销凭证
doExportReimbursement(row){
this.$downLoad('/platform/activityReimbursement/mine/doExportReimbursement?id=' + row.id)
},
onApply() {
activityDeclareReimbursementList: []
}
},
components: {
'info': INFO
},
methods: {
// 导出示例
doExportDeclare(row) {
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.declareId)
},
// 导出报销凭证
doExportReimbursement(row) {
this.$downLoad('/platform/activityReimbursement/mine/doExportReimbursement?id=' + row.id)
},
onApply() {
commonUtil.pjaxPush('/platform/activityReimbursement/apply')
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
commonUtil.pjaxPush('/platform/activityReimbursement/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$message.success(resp.msg)
this.pageData()
})
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/activityReimbursement/mine/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)
}
},
getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : ""
},
},
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)
}
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
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/activityReimbursement/mine/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)
}
},
getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : ""
},
},
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)
}
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
</script>
<!--#
}
@@ -19,6 +19,20 @@ layout("/layouts/platform.html"){
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
@@ -68,8 +82,14 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='activityType'">
<span>{{ getActivityTypeName(row.activityType) }}</span>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
@@ -122,21 +142,23 @@ layout("/layouts/platform.html"){
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"],
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: "流程状态"}
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
@@ -18,6 +18,19 @@ layout("/layouts/platform.html"){
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
@@ -68,8 +81,14 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='activityType'">
<span>{{ getActivityTypeName(row.activityType) }}</span>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
@@ -122,21 +141,23 @@ layout("/layouts/platform.html"){
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"],
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: "流程状态"}
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
@@ -162,6 +183,7 @@ layout("/layouts/platform.html"){
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
id: row.id,
processTaskId: row.taskId,
taskName: row.curTaskName
}
@@ -175,11 +197,11 @@ layout("/layouts/platform.html"){
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/activityReimbursement/schoolUnion/doReview", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}), id: this.formData.id
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
@@ -23,6 +23,10 @@ layout("/layouts/platform.html"){
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</search-item>
<search-item label="预算条目">
<dict-select v-model="pageForm.budgetReimburseType"
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
@@ -76,6 +80,10 @@ layout("/layouts/platform.html"){
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop==='budgetReimburseType'">
<dict-tag :options="budgetReimburseTypeOption"
:value="row.budgetReimburseType"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop==='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
@@ -121,16 +129,18 @@ layout("/layouts/platform.html"){
totalBudgetMoney: 0,
pageForm: {year: new Date().getFullYear() + ""},
budgetTypeOption: [],
budgetReimburseTypeOption: [],
tableColumns: [
{prop: 'year', label: '年度', width: '80'},
{prop: 'userName', label: '申报人姓名'},
{prop: 'loginName', label: '申报人工号'},
{prop: 'mobile', label: '联系方式', width: '120'},
{prop: 'outlayManageSource', label: '申报类型'},
{prop: 'outlayManageSource', label: '申报类型', width: '140'},
{prop: 'budgetReimburseType', label: '预算条目'},
{prop: 'activityMatter', label: '活动项目', width: '300'},
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
{prop: 'totalBudgetMoney', label: '审核预算金额'},
{prop: 'applyDate', label: '申报时间'},
{prop: 'applyDate', label: '申报时间', width: '120'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
@@ -267,6 +277,7 @@ layout("/layouts/platform.html"){
this.getApplyMoney()
this.pageData()
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.budgetReimburseTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_REIMBURSE_TYPE")
}
})
</script>
@@ -21,6 +21,10 @@ layout("/layouts/platform.html"){
<el-input v-model="pageForm.activityMatter" placeholder="请输入活动项目"
clearable></el-input>
</search-item>
<search-item label="预算条目">
<dict-select v-model="pageForm.budgetReimburseType"
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
</search-item>
<search-item label="所属工会"
v-if="!pageForm.outlayManageSource||pageForm.outlayManageSource==='ACTIVITY_BUDGET_TYPE_TWO'">
<el-select v-model="pageForm.unionId" filterable
@@ -94,6 +98,10 @@ layout("/layouts/platform.html"){
<dict-tag :options="budgetTypeOption"
:value="row.outlayManageSource"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop==='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
:value="row.budgetReimburseType"></dict-tag>
</template>
<template v-slot="{row}" v-else-if="column.prop==='note'">
<span v-if="row.schoolBudgetId">费用使用校工会中的:{{row.activityMatterTwo}}</span>
@@ -135,6 +143,7 @@ layout("/layouts/platform.html"){
el: '#app',
store,
mixins: [initTableMixins],
dicts: ["ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() {
return {
declareTotalBudgetMoney: 0,
@@ -145,6 +154,7 @@ layout("/layouts/platform.html"){
pageForm: {
year: new Date().getFullYear() + "",
outlayManageSource: "",
budgetReimburseType: "",
unionId: "",
clubId: "",
},
@@ -154,12 +164,13 @@ layout("/layouts/platform.html"){
{prop: 'loginName', label: '申报人工号', fixed: "left"},
{prop: 'mobile', label: '联系方式', width: '120'},
{prop: 'outlayManageSource', label: '申报类型'},
{prop: 'budgetReimburseType', label: '预算条目'},
{prop: 'helpUnitName', label: '申报单位'},
{prop: 'activityMatter', label: '活动项目', width: '300'},
{prop: 'declareTotalBudgetMoney', label: '申报预算金额'},
{prop: 'totalBudgetMoney', label: '审核预算金额'},
{prop: 'note', label: '备注'},
{prop: 'applyDate', label: '申报时间'},
{prop: 'applyDate', label: '申报时间', width: '120'},
],
}
},
@@ -13,6 +13,10 @@ const ACTIVITY_BUDGET_INFO = {
<dict-tag :options="budgetTypeOption"
:value="viewData.outlayManageSource"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="预算条目">
<dict-tag :options="budgetReimburseTypeOption"
:value="viewData.budgetReimburseType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="申报(承办)单位">{{viewData.helpUnitName}}</el-descriptions-item>
<el-descriptions-item label="活动项目">{{viewData.activityMatter}}</el-descriptions-item>
<el-descriptions-item label="活动时间">{{viewData.activityDate}}</el-descriptions-item>
@@ -23,7 +27,6 @@ const ACTIVITY_BUDGET_INFO = {
<el-descriptions-item v-if="viewData.isSchoolBudget" label="校工会预算">{{viewData.activityMatterTwo}}
</el-descriptions-item>
<el-descriptions-item v-if="!viewData.isSchoolBudget"></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="活动内容(如训练、装备等)" :span="3">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
@@ -76,6 +79,7 @@ const ACTIVITY_BUDGET_INFO = {
viewData: {},
doneTasks: [],
budgetTypeOption: [],
budgetReimburseTypeOption: [],
row: null
}
},
@@ -87,6 +91,9 @@ const ACTIVITY_BUDGET_INFO = {
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE").then(resp => {
this.budgetTypeOption = resp
})
this.$businessTool.getDictOptions("ACTIVITY_BUDGET_REIMBURSE_TYPE").then(resp => {
this.budgetReimburseTypeOption = resp
})
this.getInfo()
this.getDoneTasks()
},
@@ -17,6 +17,10 @@ layout("/layouts/platform.html"){
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="预算条目">
<dict-select v-model="pageForm.budgetReimburseType"
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
@@ -69,6 +73,7 @@ layout("/layouts/platform.html"){
pageForm: {
year: new Date().getFullYear() + "",
outlayManageSource: "ACTIVITY_BUDGET_TYPE_ONE",
budgetReimburseType: '',
unionId: "",
clubId: "",
},
@@ -81,11 +86,12 @@ layout("/layouts/platform.html"){
},
methods: {
doExport() {
const {year, outlayManageSource, unionId, clubId} = this.pageForm
const {year, outlayManageSource, unionId, clubId, budgetReimburseType} = this.pageForm
window.open("/platform/activity/budget/queryStatistics/doExport?year=" + year
+ "&outlayManageSource=" + outlayManageSource
+ "&unionId=" + unionId
+ "&clubId=" + clubId
+ "&budgetReimburseType=" + budgetReimburseType
)
},
budgetTypeCodeChange(val) {
@@ -34,6 +34,10 @@ layout("/layouts/platform.html"){
</el-option>
</el-select>
</search-item>
<search-item label="预算条目">
<dict-select v-model="pageForm.budgetReimburseType"
code="ACTIVITY_BUDGET_REIMBURSE_TYPE"></dict-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
@@ -63,6 +67,12 @@ layout("/layouts/platform.html"){
:value="row.outlayManageSource"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="budgetReimburseType" label="预算条目">
<template slot-scope="{row}">
<dict-tag :options="budgetReimburseTypeOption"
:value="row.budgetReimburseType"></dict-tag>
</template>
</el-table-column>
<el-table-column prop="helpUnitName" label="申报单位"></el-table-column>
<el-table-column prop="activityMatter" label="活动项目"></el-table-column>
<el-table-column prop="declareTotalBudgetMoney" label="申报预算金额"></el-table-column>
@@ -129,6 +139,7 @@ layout("/layouts/platform.html"){
return {
pageDataUrl: "/platform/activity/budget/schoolAudit/pageData",
budgetTypeOption: [],
budgetReimburseTypeOption: [],
clubOption: [],
unionList: [],
pageForm: {
@@ -211,6 +222,7 @@ layout("/layouts/platform.html"){
},
async created() {
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
this.budgetReimburseTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_REIMBURSE_TYPE")
this.budgetTypeOption.unshift({name: "全部类型", code: ""})
this.unionList = await this.$businessTool.listUnion()
this.pageData()