活动申报、报销
This commit is contained in:
@@ -1,37 +1,12 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.services.SysMsgService;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* 校工会副主席审核
|
||||
* TODO
|
||||
*
|
||||
* @Author zhf
|
||||
* @Date 2022/11/25 17:27
|
||||
@@ -41,117 +16,10 @@ import org.nutz.mvc.annotation.Param;
|
||||
@At("/platform/jf/funds/accounting")
|
||||
public class FundsAccountingController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
@Inject
|
||||
private SysMsgService sysMsgService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsAccounting.html")
|
||||
@RequiresPermissions("sys.jf.funds.accounting")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.funds.accounting")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
cnd.and("act.state_id", ">=", 1030);
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1030);
|
||||
}
|
||||
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
}
|
||||
|
||||
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("sys.jf.funds.accounting")
|
||||
@SLog(tag = "活动经费校工会副主席审核")
|
||||
public Object doReview(@Param(value = "id", required = false) String id,
|
||||
@Param(value = "idea", required = false) String idea,
|
||||
@Param(value = "sign", required = false) String sign,
|
||||
@Param(value = "flag", required = false) Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1060" : "1035");
|
||||
aid.setAccounting_name(ShiroUtil.getUserId());
|
||||
aid.setAccounting_time(DateUtil.getDate());
|
||||
aid.setAccounting_idea(idea);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setAccounting(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.update(aid);
|
||||
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
ReimbursementToDoHandler.COMPLETE_PROCESS.exec(aid.getId(), null);
|
||||
String division_chairman_name = aid.getDivision_chairman_name();
|
||||
if (StrUtil.isNotBlank(division_chairman_name)){
|
||||
Sys_user fghUser = activityBxService.dao().fetch(Sys_user.class, division_chairman_name);
|
||||
String note = """
|
||||
<p style="text-indent: 2em;">您的申报已审批通过,请导出申请表,并自行打印,连同分工会主席和经办人签字后的发票、签收清单等报销材料至财务处(行政楼财务大厅15号柜台)何铭老师办理报销。</p>
|
||||
""";
|
||||
if(ObjectUtil.isNotEmpty(fghUser)){
|
||||
sysMsgService.sendMsg(fghUser.getLoginname(), "【活动经费申报】-" + aid.getActivity_name(), note, ShiroUtil.getUserId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
nodeName = "校工会副主席拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.service.ViService;
|
||||
@@ -16,22 +11,21 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -48,107 +42,44 @@ public class FundsApplyController {
|
||||
put("40003", "XH");
|
||||
put("40001", "GH");
|
||||
}};
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
@Inject("ActivityTissue")
|
||||
private ViService<ActivityTissue> tissueViService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/apply.html")
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2"},logical = Logical.OR)
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/funds/apply.html")
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
public void mobile(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "活动报销申请", msg = "添加")
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
public Object doAdd(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
||||
if (activityBx.getActivity_type().equals(40001)) {
|
||||
activityBx.setState_id("1030");
|
||||
} else if (activityBx.getActivity_type().equals(40003)) {
|
||||
activityBx.setState_id("1000");
|
||||
} else {
|
||||
activityBx.setFundsUnitId(vi.getUnionId());
|
||||
activityBx.setState_id("1010");
|
||||
@RequiresAuthentication
|
||||
public Object getActivity(Integer activity_type, @Param(value = "queryString", required = false) String queryString) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
activity_tissue actt $condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("type", "=", activity_type);
|
||||
if (activity_type == 40002) {
|
||||
cnd.and("unionId", "=", vi.getUnionId());
|
||||
} else if (activity_type == 40003) {
|
||||
cnd.and("clubId", "=", vi.getClubId());
|
||||
}
|
||||
activityBx.setApply_time(DateUtil.getDate());
|
||||
activityBx.setUser_id(ShiroUtil.getUserId());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doAdd(activityBx);
|
||||
|
||||
NutMap map = new NutMap();
|
||||
map.put("userId", ShiroUtil.getUserId());
|
||||
ReimbursementToDoHandler.START_PROCESS.exec(activityBx.getId(), map);
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
//校工会申请,校工会负责人审核
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
//分工会
|
||||
ReimbursementToDoHandler.CREATE_UNION_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
//协会
|
||||
map.put("clubName", activityBx.getFundsUnitName());
|
||||
ReimbursementToDoHandler.CREATE_CLUB_TASK.exec(activityBx.getId(), map);
|
||||
}
|
||||
return null;
|
||||
cnd.and(Cnd.likeEX("actt.name", queryString));
|
||||
cnd.and(new Static("( SELECT COUNT(*) FROM activity_bx ab WHERE ab.activity_id = actt.id )=0"));
|
||||
sql.setCondition(cnd);
|
||||
return tissueViService.listMap(sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "活动报销申请", msg = "编辑")
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
if (activityBx.getActivity_type().equals(40001)) {
|
||||
activityBx.setState_id("1030");
|
||||
} else if (activityBx.getActivity_type().equals(40003)) {
|
||||
activityBx.setState_id("1000");
|
||||
} else {
|
||||
activityBx.setState_id("1010");
|
||||
}
|
||||
activityBx.setFunds_money(0d);
|
||||
dao.updateIgnoreNull(activityBx);
|
||||
|
||||
NutMap map = new NutMap();
|
||||
map.put("userId", ShiroUtil.getUserId());
|
||||
//流程开始
|
||||
ReimbursementToDoHandler.START_PROCESS.exec(activityBx.getId(), map);
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
//校工会申请,校工会负责人审核
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
//分工会
|
||||
ReimbursementToDoHandler.CREATE_UNION_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
//协会
|
||||
map.put("clubName", activityBx.getFundsUnitName());
|
||||
ReimbursementToDoHandler.CREATE_CLUB_TASK.exec(activityBx.getId(), map);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 活动编号生成
|
||||
*
|
||||
@@ -157,7 +88,7 @@ public class FundsApplyController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2"},logical = Logical.OR)
|
||||
public Object generateProjectCode(String activity_type) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
int year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
@@ -166,23 +97,39 @@ public class FundsApplyController {
|
||||
return year + projectCodeMap.getString(activity_type) + code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录用户的社团信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
@RequiresAuthentication
|
||||
public Object getUserClub() {
|
||||
return activityBxService.dao().query(Sys_club_user.class, Cnd.where("userid", "=", ShiroUtil.getUserId()));
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.Funds.apply")
|
||||
public Object findOne(String id) {
|
||||
return activityBxService.queryOne(id);
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply"},logical = Logical.OR)
|
||||
public Object getCardNumberByPayeeId(String username){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
JT.bankName,
|
||||
JT.bankCardNum
|
||||
FROM
|
||||
activity_bx AS bx,
|
||||
JSON_TABLE(
|
||||
budgets,
|
||||
'$[*]' COLUMNS(
|
||||
username VARCHAR(255) PATH '$.username',
|
||||
bankName VARCHAR(255) PATH '$.bankName',
|
||||
bankCardNum VARCHAR(255) PATH '$.bankCardNum'
|
||||
)
|
||||
) AS JT
|
||||
WHERE
|
||||
JT.username = @username
|
||||
ORDER BY bx.apply_time DESC LIMIT 1
|
||||
""").setParam("username", username);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao.execute(sql);
|
||||
return sql.getResult();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +1,12 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* 协会审核
|
||||
* TODO
|
||||
*
|
||||
* @Author zhf
|
||||
* @Date 2022/11/25 17:17
|
||||
@@ -36,109 +16,9 @@ import org.nutz.mvc.annotation.Param;
|
||||
@At("/platform/jf/funds/association")
|
||||
public class FundsAssociationController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsAssociation.html")
|
||||
@RequiresPermissions("sys.jf.funds.association")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.funds.association", "sys.jf.activity_bx.association"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
cl.fzr,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit un ON u.unitid = un.id
|
||||
LEFT JOIN sys_club cl ON cl.fzr=u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
cnd.and("act.state_id", ">=", 1000);
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1000);
|
||||
}
|
||||
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
}
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
cnd.and("act.activity_type", "=", 40003);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
// cnd.and("cl.fzr", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
cnd.and("act.fundsUnitId","in",Sqls.create(vi.getMangeClubStr()));
|
||||
}
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.funds.association", "sys.jf.activity_bx.association"}, logical = Logical.OR)
|
||||
@SLog(tag = "活动报销协会审核", msg = "审核")
|
||||
public Object doReview(String id, String idea, String sign, double funds_money, Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1030" : "1005");
|
||||
aid.setAssociation_principal_id(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setAssociation_principal_time(DateUtil.getDate());
|
||||
aid.setAssociation_principal_idea(idea);
|
||||
aid.setFunds_money(funds_money);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setAssociation_principalSign_id(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(aid);
|
||||
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(id, new NutMap().addv("userId", aid.getUser_id()));
|
||||
nodeName = "校工会副主席审核";
|
||||
} else {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, aid.getUser_id());
|
||||
nodeName = "协会审核拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
}
|
||||
ReimbursementToDoHandler.COMPLETE_CLUB_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +1,12 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* 分工会审核
|
||||
* TODO
|
||||
*
|
||||
* @Author zhf
|
||||
* @Date 2022/11/25 17:23
|
||||
@@ -35,12 +16,6 @@ import org.nutz.mvc.annotation.Param;
|
||||
@At("/platform/jf/funds/division")
|
||||
public class FundsDivisionController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsDivision.html")
|
||||
@@ -48,97 +23,5 @@ public class FundsDivisionController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.funds.division")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit su ON su.id = u.unitid
|
||||
LEFT JOIN sys_union un ON su.unionid = un.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
cnd.and("act.state_id", ">=", 1010);
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1010);
|
||||
}
|
||||
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"H04", "gh01"})) {
|
||||
cnd.and("un.id", "=", vi.getUnionId());
|
||||
}
|
||||
}
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.funds.division")
|
||||
@SLog(tag = "活动报销分工会主席审核", msg = "审核")
|
||||
public Object doReview(String id, String idea, String sign,double funds_money, Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1030" : "1015");
|
||||
aid.setDivision_chairman_name(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setDivision_chairman_time(DateUtil.getDate());
|
||||
aid.setDivision_chairman_idea(idea);
|
||||
aid.setFunds_money(funds_money);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setDivision_chairman(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(aid);
|
||||
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
nodeName = "校工会副主席审核";
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(id, null);
|
||||
} else {
|
||||
nodeName = "基层工会主席拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
}
|
||||
ReimbursementToDoHandler.COMPLETE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,267 +0,0 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_log;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.model.*;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
/**
|
||||
* @ClassName FundsFinanceController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/10/29 10:25
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/jf/funds/finance")
|
||||
public class FundsFinanceController {
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsFinance.html")
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
cnd.and("act.state_id", "=", 1060);
|
||||
|
||||
cnd.and("act.apply_type", "=", "1");
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object getBalance(String unionId) {
|
||||
if (StrUtil.isBlank(unionId)) {
|
||||
unionId = Vi.getUnionId();
|
||||
}
|
||||
jf_yjgh yjgh = activityBxService.dao().fetch(jf_yjgh.class,
|
||||
Cnd.where("unionId", "=", unionId)
|
||||
.and("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1));
|
||||
if (yjgh != null) {
|
||||
double balance = yjgh.getTotalQuota() - yjgh.getUsedQuota();
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
double value = bigDecimal.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
return Result.success(0f);
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object getSchoolBudget() {
|
||||
jf_school jfSchool = activityBxService.dao().fetch(jf_school.class, Cnd.where("year", "=", DateUtil.getYear()).and("state", "=", 1));
|
||||
if (jfSchool != null) {
|
||||
double balance = jfSchool.getTotalQuota() - jfSchool.getUsedQuota();
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
double value = bigDecimal.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
return Result.success(0f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object getClubBudget(String clubId) {
|
||||
jf_club jf_club = activityBxService.dao().fetch(jf_club.class,
|
||||
Cnd.where("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1)
|
||||
.and("club_id", "=", clubId));
|
||||
if (jf_club != null) {
|
||||
double balance = jf_club.getTotal_quota() - jf_club.getUsed_quota();
|
||||
BigDecimal bigDecimal = new BigDecimal(balance);
|
||||
double value = bigDecimal.setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
return Result.success(value);
|
||||
}
|
||||
return Result.success(0f);
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object doSubmit(String id, String idea, String sign) {
|
||||
Dao dao = activityBxService.dao();
|
||||
ActivityBx activityBx = activityBxService.fetch(id);
|
||||
activityBx.setUnion_cashier(dao.insert(new Sys_signature(sign)).getId());
|
||||
activityBx.setUnion_cashier_name(ShiroUtil.getUserId());
|
||||
activityBx.setUnion_cashier_time(DateUtil.getDate());
|
||||
activityBx.setUnion_cashier_idea(idea);
|
||||
activityBx.setIsDeduction(true);
|
||||
activityBxService.doEdit(activityBx);
|
||||
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
jf_school jfSchool = dao.fetch(jf_school.class, Cnd.where("year", "=", DateUtil.getYear()).and("state", "=", 1));
|
||||
SchoolUse schoolUse = new SchoolUse();
|
||||
schoolUse.setReimbursementId(activityBx.getId());
|
||||
dao.insert(schoolUse);
|
||||
//往预算分配表减钱
|
||||
jfSchool.setUsedQuota(jfSchool.getUsedQuota() + activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(jfSchool);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
jf_yjgh yjgh = dao.fetch(jf_yjgh.class, Cnd.where("unionId", "=", activityBx.getFundsUnitId())
|
||||
.and("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1));
|
||||
//往经费使用表中添加一条数据
|
||||
jf_use jf_use = new jf_use();
|
||||
jf_use.setAdjust_id(yjgh.getId());
|
||||
jf_use.setProject(activityBx.getActivity_name());
|
||||
jf_use.setAdjust_money(activityBx.getFunds_money());
|
||||
jf_use.setAdjust_reason(activityBx.getCause());
|
||||
jf_use.setAdjust_time(DateUtil.getDateTime());
|
||||
jf_use.setAdjust_person(ShiroUtil.getUserId());
|
||||
jf_use.setApply_id(activityBx.getId());
|
||||
jf_use.setActivitie_number(activityBx.getActivity_number());
|
||||
jf_use.setActivitie_time(activityBx.getStartPlannedDate() + "-" + activityBx.getEndPlannedDate());
|
||||
dao.insert(jf_use);
|
||||
//往预算分配表减钱
|
||||
yjgh.setUsedQuota(yjgh.getUsedQuota() + activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(yjgh);
|
||||
} else {
|
||||
jf_club jf_club = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1)
|
||||
.and("club_id", "=", activityBx.getFundsUnitId()));
|
||||
//往经费使用表中添加一条数据
|
||||
jf_use jf_use = new jf_use();
|
||||
jf_use.setAdjust_id(jf_club.getId());
|
||||
jf_use.setProject(activityBx.getActivity_name());
|
||||
jf_use.setAdjust_money(activityBx.getFunds_money());
|
||||
jf_use.setAdjust_reason(activityBx.getActivity_content());
|
||||
jf_use.setAdjust_time(DateUtil.getDateTime());
|
||||
jf_use.setAdjust_person(ShiroUtil.getUserId());
|
||||
jf_use.setApply_id(activityBx.getId());
|
||||
jf_use.setActivitie_number(activityBx.getActivity_number());
|
||||
jf_use.setActivitie_time(activityBx.getStartPlannedDate() + "-" + activityBx.getEndPlannedDate());
|
||||
dao.insert(jf_use);
|
||||
//往预算分配表减钱
|
||||
jf_club.setUsed_quota(jf_club.getUsed_quota() + activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(jf_club);
|
||||
}
|
||||
Sys_log log = new Sys_log();
|
||||
log.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
log.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
log.setMsg("审核了一条记录" + activityBx.getFunds_money() + "_" + activityBx.getFundsUnitName());
|
||||
dao.insert(log);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "工会报销", msg = "撤回了一条记录", param = true, result = true)
|
||||
@RequiresPermissions("sys.jf.funds.finance")
|
||||
public Object doRecall(String id) {
|
||||
Dao dao = activityBxService.dao();
|
||||
ActivityBx activityBx = activityBxService.fetch(id);
|
||||
activityBx.setUnion_cashier(null);
|
||||
activityBx.setUnion_cashier_name(null);
|
||||
activityBx.setUnion_cashier_time(null);
|
||||
activityBx.setUnion_cashier_idea(null);
|
||||
activityBx.setIsDeduction(false);
|
||||
activityBxService.doEdit(activityBx);
|
||||
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
jf_school jfSchool = dao.fetch(jf_school.class, Cnd.where("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1));
|
||||
jfSchool.setUsedQuota(jfSchool.getUsedQuota() - activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(jfSchool);
|
||||
dao.clear(SchoolUse.class, Cnd.where("reimbursementId", "=", activityBx.getId()));
|
||||
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
jf_yjgh yjgh = dao.fetch(jf_yjgh.class, Cnd.where("unionId", "=", activityBx.getFundsUnitId())
|
||||
.and("year", "=", DateUtil.getYear()).and("state", "=", 1));
|
||||
yjgh.setUsedQuota(yjgh.getUsedQuota() - activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(yjgh);
|
||||
dao.clear(jf_use.class, Cnd.where("apply_id", "=", activityBx.getId()));
|
||||
|
||||
} else {
|
||||
jf_club jf_club = dao.fetch(jf_club.class, Cnd.where("year", "=", DateUtil.getYear())
|
||||
.and("state", "=", 1).and("club_id", "=", activityBx.getFundsUnitId()));
|
||||
jf_club.setUsed_quota(jf_club.getUsed_quota() - activityBx.getFunds_money());
|
||||
dao.updateIgnoreNull(jf_club);
|
||||
dao.clear(jf_use.class, Cnd.where("apply_id", "=", activityBx.getId()));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +1,6 @@
|
||||
package io.v.nutz.zhgh.jf.controller.Funds;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -25,40 +16,9 @@ import org.nutz.mvc.annotation.Ok;
|
||||
@At("/platform/jf/funds/reimbursement")
|
||||
public class FundsReimbursementController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsReimbursement.html")
|
||||
@RequiresPermissions("sys.jf.funds.reimbursement")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/funds/mineApply.html")
|
||||
@RequiresPermissions("sys.jf.funds.reimbursement")
|
||||
public void mobile() {
|
||||
}
|
||||
|
||||
@At("/mobileApplyInfo")
|
||||
@Ok("beetl:/mobile/funds/info.html")
|
||||
@RequiresPermissions("sys.jf.funds.reimbursement")
|
||||
public void mobileApplyInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除申请记录
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.funds.reimbursement")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doDelete(String id) {
|
||||
activityBxService.delete(id);
|
||||
ReimbursementToDoHandler.DELETE_PROCESS_AND_TASK.exec(id, null);
|
||||
return activityBxService.delete(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
public class FundsReimbursementViewController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/Funds/fundsReimbursementview.html")
|
||||
@Ok("beetl:/platform/jf/funds/fundsReimbursementview.html")
|
||||
@RequiresPermissions("sys.jf.funds.reimbursementview")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.model.Goods;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -25,6 +23,7 @@ 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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -51,6 +50,12 @@ public class AccountingCon {
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@@ -64,19 +69,20 @@ public class AccountingCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.accounting", "sys.jf.funds.accounting"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
@@ -84,61 +90,77 @@ public class AccountingCon {
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
cnd.and("act.state_id", ">=", 1030);
|
||||
cnd.and("act.state_id", ">=", 1020);
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1030);
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1020);
|
||||
}
|
||||
if (ShiroUtil.hasRole("xghng")) {
|
||||
cnd.and("act.projectTypeCode", "=", 50002);
|
||||
}
|
||||
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getGoods(String activity_id) {
|
||||
return baseService.dao().query(Goods.class, Cnd.where("reid", "=", activity_id));
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.accounting", "sys.jf.funds.accounting"}, logical = Logical.OR)
|
||||
@SLog(tag = "活动经费校工会副主席审核")
|
||||
public Object doReview(@Param(value = "id", required = false) String id,
|
||||
@Param(value = "idea", required = false) String idea,
|
||||
@Param(value = "sign", required = false) String sign,
|
||||
@Param(value = "flag", required = false) Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1060" : "1035");
|
||||
aid.setAccounting_name(ShiroUtil.getUserId());
|
||||
public Object doReview(String data) {
|
||||
NutMap nutMap = Json.fromJson(NutMap.class, data);
|
||||
ActivityBx aid = activityBxService.fetch(nutMap.getString("id"));
|
||||
aid.setState_id(nutMap.getBoolean("flag") ? "1040" : "1025");
|
||||
aid.setAccounting_name(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setAccounting_time(DateUtil.getDate());
|
||||
aid.setAccounting_idea(idea);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setAccounting(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
aid.setAccounting_idea(nutMap.getString("idea"));
|
||||
|
||||
if (Strings.isNotBlank(nutMap.getString("sign"))) {
|
||||
aid.setAccounting(sysSignatureService.insert(new Sys_signature(nutMap.getString("sign"))).getId());
|
||||
}
|
||||
activityBxService.update(aid);
|
||||
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
ReimbursementToDoHandler.COMPLETE_PROCESS.exec(aid.getId(), null);
|
||||
if (nutMap.getBoolean("flag")) {
|
||||
nodeName = "校工会主席审核";
|
||||
Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.GH_WYH_ZX));
|
||||
if (Lang.isNotEmpty(sys_user_role)) {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
msgApi.sendWxMsg("活动申报", "", "text", aid.getUser_name() + "申报了一条活动【" + aid.getActivity_name() + "】,请前往智慧工会进行审核。", List.of(user.getLoginname()), null);
|
||||
FundsToHandler.CREATE_SCHOOL_TASK.exec(aid.getId(), null, List.of(user.getLoginname()));
|
||||
}
|
||||
} else {
|
||||
nodeName = "校工会副主席拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
nodeName = "校工会负责人拒绝";
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, aid.getUser_id());
|
||||
msgApi.sendWxMsg("活动申报", "", "text", "您申报的活动【" + aid.getActivity_name() + "】被校工会负责人拒绝,审核意见:" + aid.getAccounting_idea(), List.of(user.getLoginname()), null);
|
||||
FundsToHandler.REFUSE_TASK.exec(aid.getId(), new NutMap().addv("option", nodeName), null);
|
||||
}
|
||||
FundsToHandler.COMPLETE_SCHOOL_FZR_TASK.exec(aid.getId(), new NutMap().addv("option", nodeName), null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+23
-22
@@ -28,6 +28,13 @@ import java.util.List;
|
||||
@At("/platform/activitybx/agent")
|
||||
public class ActivitybxAgentController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
//协会
|
||||
private static final String ASSOCIATION = "/platform/jf/activity_bx/association";
|
||||
//基层工会
|
||||
@@ -39,43 +46,37 @@ public class ActivitybxAgentController {
|
||||
private static final String UNION = "/platform/jf/activity_bx/union";
|
||||
//出纳
|
||||
private static final String CASHIER = "/platform/jf/activity_bx/cashier";
|
||||
@Inject
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getAgenda() {
|
||||
|
||||
final String title = "【活动报销】";
|
||||
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
if (ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", ASSOCIATION).setv("iconClass", vi.getIconByPath(ASSOCIATION)).setv("label", "协会负责人审核").setv("number", getAssociationCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("title", title).setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "待分工会审核").setv("number", getDivisionCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("title", title).setv("url", ACCOUNTING).setv("iconClass", vi.getIconByPath(ACCOUNTING)).setv("label", "待会计审核").setv("number", getAccountingCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("title", title).setv("url", CONFIRM).setv("iconClass", vi.getIconByPath(CONFIRM)).setv("label", "待校工会副主席审核").setv("number", getConfirmCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("title", title).setv("url", UNION).setv("iconClass", vi.getIconByPath(UNION)).setv("label", "待校工会主席审核").setv("number", getUnionCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("title", title).setv("url", CASHIER).setv("iconClass", vi.getIconByPath(CASHIER)).setv("label", "待校工会出纳审核").setv("number", getCashierCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("url", ASSOCIATION).setv("iconClass", vi.getIconByPath(ASSOCIATION)).setv("label", "活动报销协会负责人审核").setv("number", getAssociationCount()));
|
||||
result.add(new NutMap().setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "活动报销待基层工会审核").setv("number", getDivisionCount()));
|
||||
result.add(new NutMap().setv("url", ACCOUNTING).setv("iconClass", vi.getIconByPath(ACCOUNTING)).setv("label", "活动报销待负责人审核").setv("number", getAccountingCount()));
|
||||
result.add(new NutMap().setv("url", CONFIRM).setv("iconClass", vi.getIconByPath(CONFIRM)).setv("label", "活动报销待校工会副主席审核").setv("number", getConfirmCount()));
|
||||
result.add(new NutMap().setv("url", UNION).setv("iconClass", vi.getIconByPath(UNION)).setv("label", "活动报销待校工会主席审核").setv("number", getUnionCount()));
|
||||
result.add(new NutMap().setv("url", CASHIER).setv("iconClass", vi.getIconByPath(CASHIER)).setv("label", "活动报销待校工会出纳审核").setv("number", getCashierCount()));
|
||||
} else {
|
||||
if (ShiroUtil.hasAnyRoles("club01")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "待协会负责人审核").setv("number", getDivisionCount()).setv("title", "【活动报销系统】"));
|
||||
if (ShiroUtil.hasAnyRoles("H02")) {
|
||||
result.add(new NutMap().setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "活动报销待基层工会审核").setv("number", getDivisionCount()));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("H04,gh01")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "待分工会审核").setv("number", getDivisionCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("url", DIVISION).setv("iconClass", vi.getIconByPath(DIVISION)).setv("label", "活动报销待基层工会审核").setv("number", getDivisionCount()));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("SchoolUnionAccountant")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", ACCOUNTING).setv("iconClass", vi.getIconByPath(ACCOUNTING)).setv("label", "待会计审核").setv("number", getAccountingCount()).setv("title", "【活动报销系统】"));
|
||||
if (ShiroUtil.hasAnyRoles("H10,xghng")) {
|
||||
result.add(new NutMap().setv("url", ACCOUNTING).setv("iconClass", vi.getIconByPath(ACCOUNTING)).setv("label", "活动报销待负责人审核").setv("number", getAccountingCount()));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("wyh03")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", CONFIRM).setv("iconClass", vi.getIconByPath(CONFIRM)).setv("label", "待校工会副主席审核").setv("number", getConfirmCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("url", CONFIRM).setv("iconClass", vi.getIconByPath(CONFIRM)).setv("label", "活动报销待校工会副主席审核").setv("number", getConfirmCount()));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("wyh02")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", UNION).setv("iconClass", vi.getIconByPath(UNION)).setv("label", "待校工会审核").setv("number", getUnionCount()).setv("title", "【活动报销系统】"));
|
||||
result.add(new NutMap().setv("url", UNION).setv("iconClass", vi.getIconByPath(UNION)).setv("label", "活动报销待校工会审核").setv("number", getUnionCount()));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("SchoolUnionCashier")) {
|
||||
result.add(new NutMap().setv("title", title).setv("url", CASHIER).setv("iconClass", vi.getIconByPath(CASHIER)).setv("label", "待校工会出纳审核").setv("number", getCashierCount()).setv("title", "【活动报销系统】"));
|
||||
if (ShiroUtil.hasAnyRoles("xghcn")) {
|
||||
result.add(new NutMap().setv("url", CASHIER).setv("iconClass", vi.getIconByPath(CASHIER)).setv("label", "活动报销待校工会出纳审核").setv("number", getCashierCount()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,34 +1,48 @@
|
||||
package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:xsb
|
||||
* @Description: 活动报销申请
|
||||
* @Date:Created in 14:57 2021/1/19
|
||||
*
|
||||
* 活动申报,申请
|
||||
* 校工会活动——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
* 基层工会活动——>基层工会主席审核——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
* 协会活动——>协会负责人审核——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@@ -48,58 +62,172 @@ public class ApplyController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/apply.html")
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
@RequiresPermissions("sys.jf.activity_bx.apply")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/mobile/funds/apply.html")
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
public void mobile(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "活动报销申请", msg = "添加")
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
public Object doSave(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
activityBx.setState_id("999");
|
||||
activityBx.setYear(activityBx.getYear() != null ? activityBx.getYear() : DateUtil.getYear());
|
||||
activityBx.setApply_time(StrUtil.isNotBlank(activityBx.getApply_time()) ? activityBx.getApply_time() : DateUtil.getDateTime());
|
||||
activityBx.setUser_id(StrUtil.isNotBlank(activityBx.getUser_id()) ? activityBx.getUser_id() : ShiroUtil.getUserId());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(activityBx.getId())) {
|
||||
activityBxService.update(activityBx);
|
||||
} else {
|
||||
activityBxService.doAdd(activityBx);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
public Object doAdd(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
||||
if (activityBx.getActivity_type().equals(40001)) {
|
||||
activityBx.setState_id("1030");
|
||||
} else if (activityBx.getActivity_type().equals(40003)) {
|
||||
List<String> loginNames = new ArrayList<>();
|
||||
activityBx.setYear(activityBx.getYear() != null ? activityBx.getYear() : DateUtil.getYear());
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
// 校工会活动
|
||||
activityBx.setState_id("1020");
|
||||
loginNames.add("1019911404");
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
// 分工会活动
|
||||
activityBx.setState_id("1010");
|
||||
Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.GH01).and("unionid", "=", Vi.getUnionId()));
|
||||
if (Lang.isNotEmpty(sys_user_role)) {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
loginNames.add(user.getLoginname());
|
||||
}
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
// 协会活动
|
||||
Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.club01).and("stid", "=", activityBx.getClubId()));
|
||||
if (Lang.isNotEmpty(sys_user_role)) {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
loginNames.add(user.getLoginname());
|
||||
}
|
||||
activityBx.setState_id("1000");
|
||||
} else {
|
||||
activityBx.setState_id("1010");
|
||||
}
|
||||
activityBx.setApply_time(DateUtil.getDate());
|
||||
activityBx.setUser_id(ShiroUtil.getUserId());
|
||||
activityBx.setApply_time(StrUtil.isNotBlank(activityBx.getApply_time()) ? activityBx.getApply_time() : DateUtil.getDateTime());
|
||||
activityBx.setUser_id(StrUtil.isNotBlank(activityBx.getUser_id()) ? activityBx.getUser_id() : ShiroUtil.getUserId());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doAdd(activityBx);
|
||||
if (Lang.isNotEmpty(loginNames)) {
|
||||
// msgApi.sendWxMsg("活动申报", "", "text", activityBx.getUser_name() + "申请了一条活动申报【" + activityBx.getActivity_name() + "】,请前往智慧工会进行审核。", loginNames, null);
|
||||
|
||||
NutMap map = new NutMap();
|
||||
map.setv("userId",activityBx.getUser_id());
|
||||
map.setv("activityName",activityBx.getActivity_name());
|
||||
FundsToHandler.START_PROCESS.exec(activityBx.getId(),map,loginNames);
|
||||
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
FundsToHandler.CREATE_SCHOOL_FZR_TASK.exec(activityBx.getId(),map,loginNames);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
FundsToHandler.CREATE_UNION_TASK.exec(activityBx.getId(),map,loginNames);
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
FundsToHandler.CREATE_CLUB_TASK.exec(activityBx.getId(),map,loginNames);
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
List<String> loginNames = new ArrayList<>();
|
||||
ActivityBx oldActivity = activityBxService.dao().fetch(ActivityBx.class, activityBx.getId());
|
||||
activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
activityBx.setState_id("1020");
|
||||
loginNames.add("1019911404");
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
activityBx.setState_id("1010");
|
||||
Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.GH01).and("unionid", "=", Vi.getUnionId()));
|
||||
if (Lang.isNotEmpty(sys_user_role)) {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
loginNames.add(user.getLoginname());
|
||||
}
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
activityBx.setState_id("1000");
|
||||
// 协会活动
|
||||
Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.club01).and("stid", "=", activityBx.getClubId()));
|
||||
if (Lang.isNotEmpty(sys_user_role)) {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
loginNames.add(user.getLoginname());
|
||||
}
|
||||
} else {
|
||||
activityBx.setState_id("1010");
|
||||
}
|
||||
activityBx.setApply_time(DateUtil.getDateTime());
|
||||
activityBx.setUser_id(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
|
||||
if ("1025".equals(oldActivity.getState_id()) || "1045".equals(oldActivity.getState_id()) ) {
|
||||
activityBx.setState_id("1025".equals(oldActivity.getState_id()) ? "1020" : "1040");
|
||||
}
|
||||
activityBxService.doEdit(activityBx);
|
||||
|
||||
NutMap map = new NutMap();
|
||||
map.put("userId",ShiroUtil.getUserId());
|
||||
ReimbursementToDoHandler.START_PROCESS.exec(activityBx.getId(), map);
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
//校工会申请,校工会负责人审核
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
//分工会
|
||||
ReimbursementToDoHandler.CREATE_UNION_TASK.exec(activityBx.getId(),map);
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
//协会
|
||||
ReimbursementToDoHandler.CREATE_CLUB_TASK.exec(activityBx.getId(),map);
|
||||
map.setv("userId",activityBx.getUser_id());
|
||||
map.setv("activityName",activityBx.getActivity_name());
|
||||
FundsToHandler.START_PROCESS.exec(activityBx.getId(),map,loginNames);
|
||||
|
||||
if ("999".equals(activityBx.getState_id())) {
|
||||
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
FundsToHandler.CREATE_SCHOOL_FZR_TASK.exec(activityBx.getId(),NutMap.NEW().addv("userId",ShiroUtil.getUserId()),loginNames);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
FundsToHandler.CREATE_UNION_TASK.exec(activityBx.getId(),NutMap.NEW().addv("userId",ShiroUtil.getUserId()),List.of("1019971597"));
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
FundsToHandler.CREATE_CLUB_TASK.exec(activityBx.getId(),NutMap.NEW().addv("userId",ShiroUtil.getUserId()),loginNames);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply","sys.jf.activity_bx.apply"},logical = Logical.OR)
|
||||
public Object checkActivity(String activityName, String activityType) {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("999");
|
||||
switch (activityType) {
|
||||
case "40001": list.add("1020");
|
||||
case "40002": list.add("1010");
|
||||
case "40003": list.add("1000");
|
||||
}
|
||||
|
||||
ActivityBx activityBx = baseService.dao().fetch(ActivityBx.class, Cnd.where("activity_name", "=", activityName)
|
||||
.and("user_id", "=", ShiroUtil.getUserId()).and("activity_type", "=", activityType)
|
||||
.and("state_id", "in", list).desc("apply_time"));
|
||||
if (Lang.isNotEmpty(activityBx)) {
|
||||
return Result.success().addData(activityBx);
|
||||
} else {
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
@@ -46,7 +46,8 @@ public class AssociationCon {
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/association.html")
|
||||
@@ -57,12 +58,15 @@ public class AssociationCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.funds.association", "sys.jf.activity_bx.association"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year, Integer isAudit,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
@@ -70,15 +74,13 @@ public class AssociationCon {
|
||||
u.unionname bxr_unionname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
cl.fzr,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit un ON u.unitid = un.id
|
||||
LEFT JOIN sys_club cl ON cl.fzr=u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
@@ -88,54 +90,57 @@ public class AssociationCon {
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1000);
|
||||
}
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
|
||||
cnd.and("act.activity_type", "=", 40003);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cnd.and("cl.fzr", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
cnd.and("act.clubId", "in", vi.getMangeClubStr());
|
||||
}
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.funds.association", "sys.jf.activity_bx.association"}, logical = Logical.OR)
|
||||
@SLog(tag = "活动报销协会审核", msg = "审核")
|
||||
public Object doReview(String id, String idea, String sign, double funds_money, Boolean flag) {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doReview(@Param(value = "id", required = false) String id,
|
||||
@Param(value = "idea", required = false) String idea,
|
||||
@Param(value = "sign", required = false) String sign,
|
||||
@Param(value = "flag", required = false) Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1030" : "1005");
|
||||
aid.setState_id(flag ? "1020" : "1005");
|
||||
aid.setAssociation_principal_id(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setAssociation_principal_time(DateUtil.getDate());
|
||||
aid.setAssociation_principal_idea(idea);
|
||||
aid.setFunds_money(funds_money);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setAssociation_principalSign_id(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(aid);
|
||||
activityBxService.update(aid);
|
||||
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(id, new NutMap().addv("userId", aid.getUser_id()));
|
||||
nodeName = "校工会副主席审核";
|
||||
msgApi.sendWxMsg("活动申报", "", "text", aid.getUser_name() + "申报了一条活动【" + aid.getActivity_name() + "】,请前往智慧工会进行审核。", List.of("1019911404"), null);
|
||||
FundsToHandler.CREATE_SCHOOL_FZR_TASK.exec(id, new NutMap().addv("userId", aid.getUser_id()), List.of("1019911404"));
|
||||
nodeName = "校工会负责人审核";
|
||||
} else {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, aid.getUser_id());
|
||||
msgApi.sendWxMsg("活动申报", "", "text", "您申报的活动【" + aid.getActivity_name() + "】被协会拒绝,审核意见:" + aid.getAssociation_principal_idea(), List.of(user.getLoginname()), null);
|
||||
nodeName = "协会审核拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
FundsToHandler.REFUSE_TASK.exec(id, new NutMap().addv("option", nodeName), null);
|
||||
}
|
||||
ReimbursementToDoHandler.COMPLETE_CLUB_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
FundsToHandler.COMPLETE_CLUB_TASK.exec(id, new NutMap().addv("option", nodeName), null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ public class CashierCon {
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/cashier.html")
|
||||
@RequiresPermissions("sys.jf.activity_bx.cashier")
|
||||
@@ -48,19 +49,21 @@ public class CashierCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, Integer isAudit, String unitId, String unionId, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
public Object pageData(Integer year, Integer isAudit, String unitId, String unionId,String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("\t\n" +
|
||||
"SELECT\n" +
|
||||
"\tact.*,\n" +
|
||||
"\tu.loginname bxr_loginname,\n" +
|
||||
"\tu.unionname bxr_unionname,\n" +
|
||||
"\tu.unioncode,\n" +
|
||||
"\ts.state_name,\n" +
|
||||
"\ts.state_color \n" +
|
||||
"\ts.state_color , " +
|
||||
"abs.`name` absName\n" +
|
||||
"FROM\n" +
|
||||
"\t`activity_bx` act\n" +
|
||||
"\tLEFT JOIN `user` u ON act.user_id = u.id\n" +
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id $condition");
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id " +
|
||||
"LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectTypeCode" +
|
||||
"$condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
@@ -70,6 +73,7 @@ public class CashierCon {
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
|
||||
@@ -46,21 +46,25 @@ public class ConfirmCon {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, Integer isAudit, String unitId, String unionId, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
public Object pageData(Integer year, Integer isAudit, String unitId, String unionId,String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("\t\n" +
|
||||
"SELECT\n" +
|
||||
"\tact.*,\n" +
|
||||
"\tu.loginname bxr_loginname,\n" +
|
||||
"\tu.unionname bxr_unionname,\n" +
|
||||
"\tu.unioncode,\n" +
|
||||
"\ts.state_name,\n" +
|
||||
"\ts.state_color \n" +
|
||||
"\ts.state_color , " +
|
||||
"abs.`name` absName\n" +
|
||||
"FROM\n" +
|
||||
"\t`activity_bx` act\n" +
|
||||
"\tLEFT JOIN `user` u ON act.user_id = u.id\n" +
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id $condition");
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id " +
|
||||
"LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectTypeCode" +
|
||||
"$condition");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
|
||||
@@ -2,23 +2,26 @@ package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
@@ -41,6 +44,9 @@ public class DivisionCon {
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@@ -56,19 +62,20 @@ public class DivisionCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.division", "sys.jf.funds.division"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
@@ -78,7 +85,7 @@ public class DivisionCon {
|
||||
LEFT JOIN sys_unit su ON su.id = u.unitid
|
||||
LEFT JOIN sys_union un ON su.unionid = un.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
@@ -90,53 +97,61 @@ public class DivisionCon {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1010);
|
||||
}
|
||||
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"H04", "gh01"})) {
|
||||
cnd.and("un.id", "=", vi.getUnionId());
|
||||
}
|
||||
}
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.division", "sys.jf.funds.division"}, logical = Logical.OR)
|
||||
@SLog(tag = "活动报销分工会主席审核", msg = "审核")
|
||||
public Object doReview(String id, String idea, String sign,double funds_money, Boolean flag) {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doReview(@Param(value = "id", required = false) String id,
|
||||
@Param(value = "idea", required = false) String idea,
|
||||
@Param(value = "sign", required = false) String sign,
|
||||
@Param(value = "flag", required = false) Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1030" : "1015");
|
||||
aid.setState_id(flag ? "1020" : "1015");
|
||||
aid.setDivision_chairman_name(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setDivision_chairman_time(DateUtil.getDate());
|
||||
aid.setDivision_chairman_idea(idea);
|
||||
aid.setFunds_money(funds_money);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setDivision_chairman(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(aid);
|
||||
|
||||
activityBxService.update(aid);
|
||||
String nodeName = "";
|
||||
if (flag) {
|
||||
nodeName = "校工会副主席审核";
|
||||
ReimbursementToDoHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(id, null);
|
||||
nodeName = "校工会负责人审核";
|
||||
// Sys_user_role sys_user_role = activityBxService.dao().fetch(Sys_user_role.class, Cnd.where("roleId", "=", Roles.GH_WYH_ZX));
|
||||
// if (Lang.isNotEmpty(sys_user_role)) {
|
||||
// Sys_user user = activityBxService.dao().fetch(Sys_user.class, sys_user_role.getUserId());
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, Cnd.where("loginname","=","1019911404"));
|
||||
msgApi.sendWxMsg("活动申报", "", "text", aid.getUser_name() + "申报了一条活动【" + aid.getActivity_name() + "】,请前往智慧工会进行审核。", List.of(user.getLoginname()), null);
|
||||
FundsToHandler.CREATE_SCHOOL_FZR_TASK.exec(id, null, List.of(user.getLoginname()));
|
||||
// }
|
||||
} else {
|
||||
nodeName = "基层工会主席拒绝";
|
||||
ReimbursementToDoHandler.REFUSE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, aid.getUser_id());
|
||||
msgApi.sendWxMsg("活动申报", "", "text", "您申报的活动【" + aid.getActivity_name() + "】被基层工会主席拒绝,审核意见:" + aid.getDivision_chairman_idea(), List.of(user.getLoginname()), null);
|
||||
FundsToHandler.REFUSE_TASK.exec(id, new NutMap().addv("option", nodeName), null);
|
||||
}
|
||||
ReimbursementToDoHandler.COMPLETE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName));
|
||||
FundsToHandler.COMPLETE_UNION_TASK.exec(id, new NutMap().addv("option", nodeName), null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,52 +3,53 @@ package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.PictureType;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.model.Goods;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Html2Text;
|
||||
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.handler.reimbursement.ReimbursementToDoHandler;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityFileService;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Base64;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -60,18 +61,22 @@ import java.util.Objects;
|
||||
@At("/platform/jf/activity_bx/reimbursement")
|
||||
public class ReimbursementCon {
|
||||
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private ActivityFileService activityFileService;
|
||||
@Inject
|
||||
private OfficeTemplateUtil officeTemplateUtil;
|
||||
private FtpService ftpService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/reimbursement.html")
|
||||
@@ -79,31 +84,28 @@ public class ReimbursementCon {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursement", "sys.jf.funds.reimbursement"}, logical = Logical.OR)
|
||||
public Object doAdd(@Param("activityBx") ActivityBx activityBx, @Param(value = "sign", required = false) String sign) {
|
||||
public Object doAdd(@Param(value = "activityBx", required = false) ActivityBx activityBx, @Param(value = "sign", required = false) String sign) {
|
||||
activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"xghhdwy", "SchoolUnionAdmin"}) && activityBx.getActivity_type().equals(2)) {
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"xghhdwy", "A06"}) && activityBx.getActivity_type().equals(3)) {
|
||||
activityBx.setState_id("1020");
|
||||
} else if (ShiroUtil.hasAnyRoles(new String[]{"club01"}) && activityBx.getActivity_type().equals(3)) {
|
||||
activityBx.setActivity_type(3);
|
||||
} else if (ShiroUtil.hasAnyRoles(new String[]{"H02"}) && activityBx.getActivity_type().equals(2)) {
|
||||
activityBx.setState_id("1000");
|
||||
activityBx.setActivity_type(2);
|
||||
} else {
|
||||
activityBx.setState_id("1010");
|
||||
activityBx.setActivity_type(1);
|
||||
}
|
||||
activityBx.setApply_time(DateUtil.getDate());
|
||||
activityBx.setUser_id(ShiroUtil.getUserId());
|
||||
activityBx.setUser_id(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doAdd(activityBx);
|
||||
|
||||
ReimbursementToDoHandler.START_PROCESS.exec(activityBx.getId(), null);
|
||||
if (activityBx.getActivity_type().equals(3)) {
|
||||
ReimbursementToDoHandler.CREATE_CLUB_TASK.exec(activityBx.getId(), null);
|
||||
} else {
|
||||
ReimbursementToDoHandler.CREATE_UNION_TASK.exec(activityBx.getId(), null);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -111,58 +113,62 @@ public class ReimbursementCon {
|
||||
/**
|
||||
* 多功能查询
|
||||
*
|
||||
* @param year 根据年查
|
||||
* @param year 根据年查
|
||||
* @param searchName 根据名查
|
||||
* @param searchKeyword
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param pageOrderName
|
||||
* @param pageOrderBy
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursement", "sys.jf.funds.reimbursement"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
abs.`name` absName,
|
||||
bx.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
bxr.loginname bxr_loginname,
|
||||
bxr.unionname bxr_unionname,
|
||||
state.state_name,
|
||||
state.state_color,
|
||||
abs.`name` absName
|
||||
state.state_color
|
||||
FROM
|
||||
activity_bx bx
|
||||
LEFT JOIN `user` u ON bx.user_id = u.id
|
||||
LEFT JOIN `user` bxr ON bx.user_id = bxr.id
|
||||
LEFT JOIN state state ON state.state_id = bx.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectTypeCode
|
||||
$condition
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectJfCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cnd.and("bx.user_id", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
Vi.cndPlus(cnd, "bx.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
if (deductionInt != null && deductionInt == 2) {
|
||||
cnd.and("bx.isDeduction", "=", 1);
|
||||
} else if (deductionInt != null && deductionInt == 3) {
|
||||
cnd.and("bx.isDeduction", "=", 0);
|
||||
}
|
||||
cnd.and("bx.apply_type", "=", apply_type);
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("bx.state_id").desc("bx.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
Vi.cndPlus(cnd, "bxr.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "bxr.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@@ -172,29 +178,44 @@ public class ReimbursementCon {
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private ActivityFileService activityFileService;
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursement", "sys.jf.funds.reimbursement"}, logical = Logical.OR)
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param(value = "sign", required = false) String sign) {
|
||||
|
||||
if (StrUtil.isNotBlank(activityBx.getId())) {
|
||||
baseService.clear("goods", Cnd.where("reid", "=", activityBx.getId()));
|
||||
}
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doEdit(@Param(value = "activityBx", required = false) ActivityBx activityBx,
|
||||
@Param(value = "sign", required = false) String sign,
|
||||
@Param(value = "delNotesList", required = false) String[] delNotesList) {
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(activityBx);
|
||||
|
||||
activityBxService.update(activityBx);
|
||||
|
||||
if (Lang.isNotEmpty(activityBx.getGoods())) {
|
||||
baseService.dao().clear(Goods.class, Cnd.where("reid", "=", activityBx.getActivity_id()));
|
||||
activityBx.getGoods().forEach(v -> {
|
||||
v.setReid(activityBx.getActivity_id());
|
||||
});
|
||||
baseService.dao().insert(activityBx.getGoods());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursement", "sys.jf.funds.reimbursement"}, logical = Logical.OR)
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doDelete(String id) {
|
||||
ActivityBx activityBx = activityBxService.fetch(id);
|
||||
vi.deleteSysFiles(activityBx.getFiles());
|
||||
baseService.clear("goods", Cnd.where("reid", "=", id));
|
||||
return activityBxService.delete(id);
|
||||
vi.deleteSysFiles(activityBx.getBillFiles());
|
||||
vi.deleteSysFiles(activityBx.getOtherFiles());
|
||||
vi.deleteSysFiles(activityBx.getPhotoFiles());
|
||||
baseService.clear("goods", Cnd.where("reid", "=", activityBx.getActivity_id()));
|
||||
activityBxService.delete(id);
|
||||
FundsToHandler.DELETE_PROCESS_AND_TASK.exec(id, null, null);
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@@ -202,308 +223,128 @@ public class ReimbursementCon {
|
||||
@At
|
||||
@Ok("void")
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursement", "sys.jf.funds.reimbursement"}, logical = Logical.OR)
|
||||
public void doExport(String id, HttpServletResponse response) throws Exception {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tbx.user_name,\n" +
|
||||
"\tbx.apply_time,\n" +
|
||||
"\tbx.activity_name,\n" +
|
||||
"\tbx.activity_time,\n" +
|
||||
"\tbx.activity_number,\n" +
|
||||
"\tbx.activity_money,\n" +
|
||||
"\tbx.activity_card_number,\n" +
|
||||
"\tbx.venue,\n" +
|
||||
"\tbx.activity_content,\n" +
|
||||
"\tbx.activity_type,\n" +
|
||||
"\tun.`name` unitname,\n" +
|
||||
"\tms.`data` my_sign,\n" +
|
||||
"\tfzs.`data` fgh_zx_sign,\n" +
|
||||
"\tfks.`data` fgh_kj_sign,\n" +
|
||||
"\txzs.`data` xgh_zx_sign,\n" +
|
||||
"\tap.`data` ap_sign,\n" +
|
||||
"\tkj.`data` kj_sign,\n" +
|
||||
"\tct.`data` ct_sign\n" +
|
||||
"FROM\n" +
|
||||
"\tactivity_bx bx\n" +
|
||||
"\tLEFT JOIN sys_user us ON us.id=bx.user_id\n" +
|
||||
"\tLEFT JOIN sys_unit un ON un.id=us.unitid\n" +
|
||||
"\tLEFT JOIN sys_signature ms ON ms.id = bx.user_signature\n" +
|
||||
"\tLEFT JOIN sys_signature fzs ON fzs.id = bx.division_chairman\n" +
|
||||
"\tLEFT JOIN sys_signature fks ON fks.id = bx.accounting\n" +
|
||||
"\tLEFT JOIN sys_signature xzs ON xzs.id = bx.union_chairman\n" +
|
||||
"\tLEFT JOIN sys_signature ap ON ap.id = bx.association_principalSign_id \n" +
|
||||
"\tLEFT JOIN sys_signature kj on kj.id=bx.accounting \n" +
|
||||
"\tLEFT JOIN sys_signature ct on ct.id=bx.confirm_trade \n" +
|
||||
"\tWHERE bx.id = @id").setParam("id", id);
|
||||
Record o = activityBxService.list(sql).get(0);
|
||||
NutMap one = activityBxService.queryOne(id);
|
||||
if (StrUtil.isNotBlank(one.getString("activity_content"))) {
|
||||
one.setv("activity_content", Html2Text.getContent(one.getString("activity_content")));
|
||||
}
|
||||
one.setv("money_big", Convert.digitToChinese(one.getDouble("activity_money")));
|
||||
one.setv("apply_time", one.getString("apply_time").substring(0, 10));
|
||||
|
||||
List<Record> query = baseService.dao().query("goods", Cnd.where("reid", "=", id));
|
||||
o.set("activity_content", Html2Text.getContent(o.getString("activity_content")));
|
||||
String budgets = one.getString("budgets");
|
||||
List<NutMap> goods = JSONUtil.parseArray(budgets).toList(NutMap.class);
|
||||
|
||||
o.set("activity_money_big", Convert.digitToChinese(o.getDouble("activity_money")));
|
||||
one.put("goods",goods);
|
||||
|
||||
for (int i = 0; i < query.size(); i++) {
|
||||
double price = query.get(i).getDouble("price");
|
||||
int money_int = (int) price;
|
||||
double money_decimal = money_int - price;
|
||||
query.get(0).set("activity_name", o.get("activity_name"));
|
||||
query.get(i).set("one", money_int > 1000000 ? (money_int / 1000000) % 10 : null);
|
||||
query.get(i).set("two", money_int > 100000 ? (money_int / 100000) % 10 : null);
|
||||
query.get(i).set("three", money_int > 10000 ? (money_int / 10000) % 10 : null);
|
||||
query.get(i).set("four", money_int > 1000 ? (money_int / 1000) % 10 : null);
|
||||
query.get(i).set("five", money_int > 100 ? (money_int / 100) % 10 : null);
|
||||
query.get(i).set("six", money_int > 10 ? (money_int / 10) % 10 : null);
|
||||
query.get(i).set("seven", money_int > 10 ? money_int % 10 : null);
|
||||
query.get(i).set("eight", (int) (money_decimal / 1) * 10);
|
||||
query.get(i).set("nine", (int) (money_decimal / 0.1) * 100);
|
||||
if (one.getString("activity_type").equals("40001")) {
|
||||
one.setv("jfName", "校工会");
|
||||
} else if (one.getString("activity_type").equals("40002")) {
|
||||
one.setv("jfName", "分工会");
|
||||
} else if (one.getString("activity_type").equals("40003")) {
|
||||
one.setv("jfName", "协会");
|
||||
}
|
||||
|
||||
/*自己签字*/
|
||||
if (o.get("my_sign") != null) {
|
||||
o.set("my_sign", getImage((String) o.get("my_sign")));
|
||||
}
|
||||
double price = one.getDouble("activity_money");
|
||||
int money_int = (int) price;
|
||||
|
||||
BigDecimal priceBigDecimal = new BigDecimal(price);
|
||||
BigDecimal moneyDecimal = priceBigDecimal.subtract(new BigDecimal(money_int));
|
||||
|
||||
one.setv("one", money_int >= 1000000 ? (money_int / 1000000) % 10 : null);
|
||||
one.setv("two", money_int >= 100000 ? (money_int / 100000) % 10 : null);
|
||||
one.setv("three", money_int >= 10000 ? (money_int / 10000) % 10 : null);
|
||||
one.setv("four", money_int >= 1000 ? (money_int / 1000) % 10 : null);
|
||||
one.setv("five", money_int >= 100 ? (money_int / 100) % 10 : null);
|
||||
one.setv("six", money_int >= 10 ? (money_int / 10) % 10 : null);
|
||||
one.setv("seven", money_int >= 1 ? money_int % 10 : null);
|
||||
|
||||
// 提取小数部分的各个位上的数值
|
||||
BigDecimal tenthsPart = moneyDecimal.multiply(BigDecimal.TEN).setScale(0, RoundingMode.DOWN);
|
||||
int tenths = tenthsPart.intValue();
|
||||
BigDecimal hundredthsPart = moneyDecimal.multiply(BigDecimal.valueOf(100)).setScale(0, RoundingMode.DOWN);
|
||||
int hundredths = hundredthsPart.intValue();
|
||||
|
||||
// BigDecimal decimalPart1 = moneyDecimal.divide(new BigDecimal("1"), 1, RoundingMode.HALF_UP);
|
||||
// BigDecimal decimalPart2 = moneyDecimal.divide(new BigDecimal("0.1"), 1, RoundingMode.HALF_UP);
|
||||
one.setv("eight", (tenths % 10));
|
||||
one.setv("nine", (hundredths % 10) + 1);
|
||||
|
||||
|
||||
/*基层工会主席签字*/
|
||||
if (o.get("fgh_zx_sign") != null) {
|
||||
o.set("fgh_zx_sign", getImage((String) o.get("fgh_zx_sign")));
|
||||
}
|
||||
|
||||
/*校工会主席签字*/
|
||||
if (o.get("xgh_zx_sign") != null) {
|
||||
o.set("xgh_zx_sign", getImage((String) o.get("xgh_zx_sign")));
|
||||
if (one.get("dc_s") != null) {
|
||||
one.setv("dc_sign", getImage((String) one.get("dc_s")));
|
||||
}
|
||||
|
||||
/*协会负责人*/
|
||||
if (o.get("ap_sign") != null) {
|
||||
o.set("ap_sign", getImage((String) o.get("ap_sign")));
|
||||
if (one.get("ap_c") != null) {
|
||||
one.setv("ap_sign", getImage((String) one.get("ap_c")));
|
||||
}
|
||||
/*校工会副主席*/
|
||||
if (o.get("ct_sign") != null) {
|
||||
o.set("ct_sign", getImage((String) o.get("ct_sign")));
|
||||
|
||||
/*校工会主席签字*/
|
||||
if (one.get("ucc_s") != null) {
|
||||
one.setv("ucc_sign", getImage((String) one.get("ucc_s")));
|
||||
}
|
||||
|
||||
|
||||
/*会计*/
|
||||
if (o.get("kj_sign") != null) {
|
||||
o.set("kj_sign", getImage((String) o.get("kj_sign")));
|
||||
if (one.get("a_s") != null) {
|
||||
one.setv("a_sign", getImage((String) one.get("a_s")));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// 基层工会活动
|
||||
if (one.getString("activity_type").equals("1")) {
|
||||
one.setv("suffix", "基层工会主席签字");
|
||||
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds.docx");
|
||||
}
|
||||
// 校工会活动
|
||||
else if (one.getString("activity_type").equals("2")) {
|
||||
one.setv("suffix", "校工会主席签字");
|
||||
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/school.docx");
|
||||
}
|
||||
// 协会负责人
|
||||
else if (one.getString("activity_type").equals("3")) {
|
||||
one.setv("suffix", "协会负责人签字");
|
||||
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/association.docx");
|
||||
}
|
||||
*/
|
||||
|
||||
String fileName = Globals.schoolName + "【" + one.getString("activity_name") + "】报销凭证";
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("goods", policy).build();
|
||||
o.set("goods", query);
|
||||
o.set("schoolName", Globals.schoolName);
|
||||
|
||||
|
||||
String templateUrl = null;
|
||||
|
||||
// 基层工会活动
|
||||
if (o.getString("activity_type").equals("40002")) {
|
||||
o.set("suffix", "基层工会主席签字");
|
||||
templateUrl = officeTemplateUtil.getPath("activityBx_funds");
|
||||
}
|
||||
// 校工会活动
|
||||
else if (o.getString("activity_type").equals("40001")) {
|
||||
o.set("suffix", "校工会主席签字");
|
||||
templateUrl = officeTemplateUtil.getPath("activityBx_school");
|
||||
}
|
||||
// 协会负责人
|
||||
else if (o.getString("activity_type").equals("40003")) {
|
||||
o.set("suffix", "协会负责人签字");
|
||||
templateUrl = officeTemplateUtil.getPath("activityBx_association");
|
||||
}
|
||||
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds3.docx");
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String("活动费用报销单".getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(templateUrl, config).render(o).writeAndClose(response.getOutputStream());
|
||||
;
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(inputStream, config).render(one, response.getOutputStream());
|
||||
inputStream.close();
|
||||
}
|
||||
|
||||
private PictureRenderData getImage(String base64) throws IOException {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(70, 30, ".png", bytes);
|
||||
if (base64.startsWith("data")) {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(70, 30, ".png", bytes);
|
||||
} else {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ftpService.download(base64, os);
|
||||
os.close();
|
||||
return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getActivity(String query) {
|
||||
Sql sql = Sqls.create("SELECT YEAR\n" +
|
||||
"\t( hd.be_time ) YEAR,\n" +
|
||||
"\thd.*,\n" +
|
||||
"\ttype.`name` style,\n" +
|
||||
"\tproject.`name` project,\n" +
|
||||
"\tun.unionname,\n" +
|
||||
"\tclub.`name` clubname \n" +
|
||||
"FROM\n" +
|
||||
"\t(\n" +
|
||||
"\tSELECT\n" +
|
||||
"\t\t1 type,\n" +
|
||||
"\t\thd.id,\n" +
|
||||
"\t\thd.hdlxid style_id,\n" +
|
||||
"\t\thd.hdxmid project_id,\n" +
|
||||
"\t\thd.xhdmc `name`,\n" +
|
||||
"\t\thd.hddz address,\n" +
|
||||
"\t\t(SELECT count(1) from hd_xhdbm bm WHERE bm.hdid = hd.id) number,\n" +
|
||||
"\t\thd.bmkssj apply_be_time,\n" +
|
||||
"\t\thd.bmjssj apply_end_time,\n" +
|
||||
"\t\thd.hdkssj be_time,\n" +
|
||||
"\t\thd.hdjssj end_time,\n" +
|
||||
"\t\tNULL reid \n" +
|
||||
"\tFROM\n" +
|
||||
"\t\thd_xhd hd UNION ALL\n" +
|
||||
"\tSELECT\n" +
|
||||
"\t\t2 type,\n" +
|
||||
"\t\thd.id,\n" +
|
||||
"\t\thd.hdlxid style_id,\n" +
|
||||
"\t\thd.hdxmid project_id,\n" +
|
||||
"\t\thd.fhdmc `name`,\n" +
|
||||
"\t\thd.hddz address,\n" +
|
||||
"\t\t(SELECT count(1) from hd_fhdbm bm WHERE bm.hdid = hd.id) number,\n" +
|
||||
"\t\thd.bmkssj apply_be_time,\n" +
|
||||
"\t\thd.bmjssj apply_end_time,\n" +
|
||||
"\t\thd.hdkssj be_time,\n" +
|
||||
"\t\thd.hdjssj end_time,\n" +
|
||||
"\t\thd.unionid reid \n" +
|
||||
"\tFROM\n" +
|
||||
"\t\thd_fhhd hd UNION ALL\n" +
|
||||
"\tSELECT\n" +
|
||||
"\t\t3 type,\n" +
|
||||
"\t\thd.id,\n" +
|
||||
"\t\thd.hdlxid style_id,\n" +
|
||||
"\t\thd.hdxmid project_id,\n" +
|
||||
"\t\thd.hdmc `name`,\n" +
|
||||
"\t\thd.hddz address,\n" +
|
||||
"\t\t(SELECT count(1) from hd_sthdbm bm WHERE bm.sthdid = hd.id) number,\n" +
|
||||
"\t\thd.bmkssj apply_be_time,\n" +
|
||||
"\t\thd.bmjssj apply_end_time,\n" +
|
||||
"\t\thd.hdkssj be_time,\n" +
|
||||
"\t\thd.hdjssj end_time,\n" +
|
||||
"\t\thd.stid reid \n" +
|
||||
"\tFROM\n" +
|
||||
"\t\thd_sthd hd \n" +
|
||||
"\t) hd\n" +
|
||||
"\tLEFT JOIN hd_type type ON hd.style_id = type.id\n" +
|
||||
"\tLEFT JOIN hd_type project ON hd.project_id = project.id\n" +
|
||||
"\tLEFT JOIN sys_union un ON hd.reid = un.id\n" +
|
||||
"\tLEFT JOIN sys_club club ON hd.reid = club.id $condition");
|
||||
public Object getActivity(String type) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT * FROM activity_tissue where type=@type
|
||||
""").setParam("type", type);
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
return activityBxService.listPageMap(1, 50, sql).getList();
|
||||
|
||||
cnd.and(new Static("(SELECT count(1) from activity_bx bx WHERE bx.activity_id = hd.id) = 0 "));
|
||||
|
||||
SqlExpressionGroup exps1 = Cnd.exps(new Static("false"));
|
||||
SqlExpressionGroup exps2 = Cnd.exps(new Static("false"));
|
||||
SqlExpressionGroup exps3 = Cnd.exps(new Static("false"));
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
if (ShiroUtil.hasAnyRoles("SchoolUnionAdmin,xghhdwy")) {
|
||||
exps1 = new SqlExpressionGroup();
|
||||
exps1.and("hd.type", "=", 1);
|
||||
}
|
||||
|
||||
if (ShiroUtil.hasAnyRoles("H04,gh08")) {
|
||||
exps2 = new SqlExpressionGroup();
|
||||
exps2.and("hd.type", "=", 2);
|
||||
exps2.and("hd.reid", "=", vi.getUnionId());
|
||||
}
|
||||
|
||||
if (ShiroUtil.hasAnyRoles("club01")) {
|
||||
exps3 = new SqlExpressionGroup();
|
||||
exps3.and("hd.type", "=", 3);
|
||||
exps3.and(new Static(String.format("hd.reid in (SELECT club.id from sys_club club WHERE club.fzr = '%s')", ShiroUtil.getPrincipalProperty("id"))));
|
||||
}
|
||||
cnd.and(Cnd.NEW().where().or(exps1).or(exps2).or(exps3));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPage(1, 50, sql).getList();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("sys.jf.funds")
|
||||
public void exportApply(String id, HttpServletResponse response) {
|
||||
try {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.fundsUnitName,
|
||||
t1.activity_name,
|
||||
t1.activity_content,
|
||||
t1.budgets,
|
||||
t1.funds_money,
|
||||
t1.activity_type,
|
||||
t1.division_chairman_idea,
|
||||
t1.division_chairman_time,
|
||||
fghqz.`data` AS fghqz,
|
||||
t1.association_principal_time,
|
||||
t1.association_principal_idea,
|
||||
xhqz.`data` AS xhqz,
|
||||
t1.accounting_name,
|
||||
t1.accounting_time,
|
||||
t1.accounting_idea,
|
||||
xghqz.`data` AS xghqz
|
||||
FROM
|
||||
`activity_bx` t1
|
||||
LEFT JOIN sys_signature fghqz ON fghqz.id = t1.division_chairman
|
||||
LEFT JOIN sys_signature xhqz ON xhqz.id = t1.association_principalSign_id
|
||||
LEFT JOIN sys_signature xghqz ON xghqz.id = t1.accounting
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t1.id", "=", id);
|
||||
sql.setCondition(cnd);
|
||||
NutMap infoData = activityBxService.fetch(sql);
|
||||
|
||||
//活动费用预算
|
||||
String budgets = infoData.getString("budgets");
|
||||
if (StrUtil.isNotBlank(budgets)) {
|
||||
List<NutMap> list = Json.fromJsonAsList(NutMap.class, budgets);
|
||||
infoData.put("budgets", list);
|
||||
}
|
||||
//活动内容
|
||||
infoData.put("activity_content", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(infoData.getString("activity_content"))));
|
||||
//分工会签字
|
||||
if (StrUtil.isNotBlank(infoData.getString("fghqz"))) {
|
||||
infoData.put("fghqz", Vi.getImg(infoData.getString("fghqz")));
|
||||
}
|
||||
//协会签字
|
||||
if (StrUtil.isNotBlank(infoData.getString("xhqz"))) {
|
||||
infoData.put("xhqz", Vi.getImg(infoData.getString("xhqz")));
|
||||
}
|
||||
//校工会签字
|
||||
if (StrUtil.isNotBlank(infoData.getString("xghqz"))) {
|
||||
infoData.put("xghqz", Vi.getImg(infoData.getString("xghqz")));
|
||||
}
|
||||
|
||||
InputStream is = null;
|
||||
String path = "C:\\Users\\jug\\Desktop\\branchUnionReimburse.docx";
|
||||
String activityType = infoData.getString("activity_type");
|
||||
if (Objects.equals("40003", activityType)) {
|
||||
path = "C:\\Users\\jug\\Desktop\\clubReimburse.docx";
|
||||
is = officeTemplateUtil.getInputStream("clubReimburse");
|
||||
} else if (Objects.equals("40002", activityType)) {
|
||||
path = "C:\\Users\\jug\\Desktop\\branchUnionReimburse.docx";
|
||||
is = officeTemplateUtil.getInputStream("branchUnionReimburse");
|
||||
} else {
|
||||
is = officeTemplateUtil.getInputStream("branchUnionReimburse");
|
||||
}
|
||||
|
||||
String docxName = infoData.getString("fundsUnitName") + infoData.getString("activity_name") + "经费报销申请" + ".docx";
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(docxName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1) + "\".docx");
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
|
||||
Configure config = Configure.builder()
|
||||
.bind("budgets", policy)
|
||||
.build();
|
||||
XWPFTemplate.compile(is, config)
|
||||
.render(infoData)
|
||||
.write(outputStream);
|
||||
outputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.PictureType;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Html2Text;
|
||||
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.services.SysUnionService;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
@@ -32,10 +29,16 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -43,24 +46,21 @@ import java.util.List;
|
||||
* @description 活动报销查看
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/activity_bx/reimbursementview")
|
||||
public class ReimbursementViewCon {
|
||||
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
|
||||
@Inject
|
||||
private OfficeTemplateUtil officeTemplateUtil;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/reimbursementview.html")
|
||||
@RequiresPermissions("sys.jf.activity_bx.reimbursementview")
|
||||
@@ -70,182 +70,266 @@ public class ReimbursementViewCon {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursementview", "sys.jf.funds.reimbursementview"}, logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "deductionInt", required = false) Integer deductionInt,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
un.unionname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit su ON su.id = u.unitid
|
||||
LEFT JOIN sys_union un ON su.unionid = un.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
LEFT JOIN sys_club_user scu ON scu.userid=act.user_id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,wyh02")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,wyh02,H10,xghng")) {
|
||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
||||
group2.or("u.unionid", "=", vi.getUnionId());
|
||||
} else if (ShiroUtil.hasRole("H02")) {
|
||||
group2.or("scu.clubid", "=", vi.getClubId());
|
||||
} else {
|
||||
group2.or("act.user_id", "=", ShiroUtil.getPrincipalProperty("id").toString());
|
||||
}
|
||||
cnd.and(group2);
|
||||
}
|
||||
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
}
|
||||
|
||||
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
Vi.cndPlus(cnd, "act.apply_type", "=", apply_type);
|
||||
cnd.groupBy("act.id");
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下载名单
|
||||
*/
|
||||
@At
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.reimbursementview", "sys.jf.funds.reimbursementview"}, logical = Logical.OR)
|
||||
public void download(Integer year, @Param(value = "deductionInt", required = false) Integer deductionInt, HttpServletResponse response) throws IOException {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname ,
|
||||
u.unionname ,
|
||||
u.unioncode,
|
||||
abs.`name` absName,
|
||||
abs2.`name` activityTypeName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs2 ON abs2.`code` = act.activity_type
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
Vi.cndPlus(cnd, "act.state_id", "=", 1060);
|
||||
|
||||
if (deductionInt == 2) {
|
||||
cnd.and("act.isDeduction", "=", 1);
|
||||
} else if (deductionInt == 3) {
|
||||
cnd.and("act.isDeduction", "=", 0);
|
||||
private PictureRenderData getImage(String base64) throws IOException {
|
||||
if (base64.startsWith("data:")) {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(70, 30, ".png", bytes);
|
||||
} else {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ftpService.download(base64, os);
|
||||
os.close();
|
||||
return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray());
|
||||
}
|
||||
cnd.asc("u.unitid").asc("user_id");
|
||||
sql.setCondition(cnd);
|
||||
List<Record> list = activityBxService.list(sql);
|
||||
|
||||
int i = 0;
|
||||
for (Record record : list) {
|
||||
i++;
|
||||
record.set("index", i);
|
||||
record.set("activity_content", Html2Text.toPlainText(record.getString("activity_content")));
|
||||
}
|
||||
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("序号", "index", 20));
|
||||
entities.add(new ExcelExportEntity("申请人姓名", "user_name", 20));
|
||||
entities.add(new ExcelExportEntity("所属工会", "unionname", 20));
|
||||
entities.add(new ExcelExportEntity("活动时间", "activity_time", 20));
|
||||
entities.add(new ExcelExportEntity("地点", "venue", 20));
|
||||
entities.add(new ExcelExportEntity("活动项目类型", "absName", 20));
|
||||
entities.add(new ExcelExportEntity("活动主体类型", "activityTypeName", 20));
|
||||
entities.add(new ExcelExportEntity("活动方案及简介", "activity_content", 50));
|
||||
entities.add(new ExcelExportEntity("申请时间", "apply_time", 50));
|
||||
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String((Globals.schoolName + year + "活动经费报销表.xls").getBytes("utf-8"), "ISO8859-1"));
|
||||
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), entities, list);
|
||||
workbook.write(response.getOutputStream());
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExport(String id, HttpServletResponse response) throws Exception {
|
||||
NutMap nutMap = activityBxService.queryOne(id);
|
||||
nutMap.setv("activity_content", Html2Text.toPlainText(nutMap.getString("activity_content")));
|
||||
nutMap.setv("apply_time", nutMap.getString("apply_time").substring(0, 10));
|
||||
List<NutMap> goods = nutMap.getAsList("goods", NutMap.class);
|
||||
|
||||
String budgets = nutMap.getString("budgets");
|
||||
List<NutMap> goods = JSONUtil.parseArray(budgets).toList(NutMap.class);
|
||||
|
||||
// List<NutMap> goods = nutMap.getAsList("budgets", NutMap.class);
|
||||
|
||||
for (int i = 0; i < goods.size(); i++) {
|
||||
goods.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
|
||||
if (nutMap.get("dc_s") != null) {
|
||||
nutMap.setv("fgh_sign", Vi.getImg(nutMap.getString("dc_s")));
|
||||
nutMap.setv("fgh_sign", getImage((String) nutMap.get("dc_s")));
|
||||
}
|
||||
|
||||
if (nutMap.get("ap_s") != null) {
|
||||
nutMap.setv("ap_sign", Vi.getImg(nutMap.getString("ap_s")));
|
||||
nutMap.setv("ap_sign", getImage((String) nutMap.get("ap_s")));
|
||||
}
|
||||
if (nutMap.get("dc_s") == null && nutMap.get("ap_s") == null && !nutMap.getString("activity_type").equals("40001")) {
|
||||
if (nutMap.get("us_s") != null) {
|
||||
nutMap.setv("us_sign", Vi.getImg(nutMap.getString("us_s")));
|
||||
nutMap.setv("us_sign", getImage((String) nutMap.get("us_s")));
|
||||
nutMap.setv("division_chairman_time", nutMap.getString("apply_time"));
|
||||
}
|
||||
}
|
||||
|
||||
if (nutMap.get("a_s") != null) {
|
||||
nutMap.setv("a_sign", Vi.getImg(nutMap.getString("a_s")));
|
||||
nutMap.setv("a_sign", getImage((String) nutMap.get("a_s")));
|
||||
}
|
||||
|
||||
if (nutMap.get("a_s") == null && nutMap.getString("activity_type").equals("40001")) {
|
||||
if (nutMap.get("us_s") != null) {
|
||||
nutMap.setv("a_sign", Vi.getImg(nutMap.getString("us_s")));
|
||||
nutMap.setv("a_sign", getImage((String) nutMap.get("us_s")));
|
||||
nutMap.setv("accounting_time", nutMap.getString("apply_time"));
|
||||
}
|
||||
}
|
||||
|
||||
if (nutMap.get("ucc_s") != null) {
|
||||
nutMap.setv("xgh_sign", Vi.getImg(nutMap.getString("ucc_s")));
|
||||
nutMap.setv("xgh_sign", getImage((String) nutMap.get("ucc_s")));
|
||||
}
|
||||
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("goods", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("goods", goods);
|
||||
map.put("n", nutMap);
|
||||
map.put("schoolName", Globals.schoolName);
|
||||
String fileName = Globals.schoolName + "工会活动申报登记表";
|
||||
String fileName = Globals.schoolName + "【" + nutMap.getString("activity_name") + "】申报表";
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("activityBx_funds2"), config).render(map).writeAndClose(response.getOutputStream());
|
||||
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds2.docx");
|
||||
assert inputStream != null;
|
||||
XWPFTemplate.compile(inputStream, config).render(map, response.getOutputStream());
|
||||
inputStream.close();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExportZip(String id, HttpServletResponse response) {
|
||||
ActivityBx activityBx = activityBxService.fetch(id);
|
||||
String activityName = activityBx.getActivity_name();
|
||||
try {
|
||||
String zipName = Globals.schoolName + activityName + "申请表报销凭证.zip".replace("+","");
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode(zipName, "UTF-8"));
|
||||
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||
|
||||
String fileNameView = "申报表.docx";
|
||||
zipOutputStream.putNextEntry(new ZipEntry(fileNameView));
|
||||
activityBxService.exportByView(id,zipOutputStream);
|
||||
zipOutputStream.closeEntry();
|
||||
response.flushBuffer();
|
||||
|
||||
String fileNameCon = "报销凭证.docx";
|
||||
zipOutputStream.putNextEntry(new ZipEntry(fileNameCon));
|
||||
activityBxService.exportByCon(id,zipOutputStream);
|
||||
zipOutputStream.closeEntry();
|
||||
response.flushBuffer();
|
||||
|
||||
zipOutputStream.flush();
|
||||
zipOutputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出Excel类要用
|
||||
*/
|
||||
public class E {
|
||||
@Excel(name = "序号", width = 10d)
|
||||
private int index;
|
||||
|
||||
@Excel(name = "申请人姓名", width = 20d)
|
||||
private String user;
|
||||
|
||||
@Excel(name = "基层工会", width = 25d)
|
||||
private String unionname;
|
||||
|
||||
@Excel(name = "活动时间", width = 25d)
|
||||
private String activity_time;
|
||||
|
||||
@Excel(name = "会员人数", width = 25d)
|
||||
private String number;
|
||||
|
||||
@Excel(name = "地点", width = 25d)
|
||||
private String place;
|
||||
|
||||
@Excel(name = "内容", width = 25d)
|
||||
private String content;
|
||||
|
||||
|
||||
@Excel(name = "申请时间", width = 20d)
|
||||
private String reimbursement_time;
|
||||
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public String getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(String user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public String getUnionname() {
|
||||
return unionname;
|
||||
}
|
||||
|
||||
public void setUnionname(String unionname) {
|
||||
this.unionname = unionname;
|
||||
}
|
||||
|
||||
public String getActivity_time() {
|
||||
return activity_time;
|
||||
}
|
||||
|
||||
public void setActivity_time(String activity_time) {
|
||||
this.activity_time = activity_time;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getPlace() {
|
||||
return place;
|
||||
}
|
||||
|
||||
public void setPlace(String place) {
|
||||
this.place = place;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getReimbursement_time() {
|
||||
return reimbursement_time;
|
||||
}
|
||||
|
||||
public void setReimbursement_time(String reimbursement_time) {
|
||||
this.reimbursement_time = reimbursement_time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,27 +1,37 @@
|
||||
package io.v.nutz.zhgh.jf.controller.activitybx;
|
||||
|
||||
import io.v.nutz.zhgh.activity.services.ActivityTissueService;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.model.Goods;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.MsgApi;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||
import io.v.nutz.zhgh.activity.services.ActivityTissueService;
|
||||
import io.v.nutz.zhgh.jf.handle.funds.FundsToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2020/11/14 16:03
|
||||
@@ -36,19 +46,15 @@ public class UnionCon {
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private MsgApi msgApi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfUseService jfUseService;
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfYjghService jfYjghService;
|
||||
@Inject
|
||||
private ActivityTissueService activityTissueService;
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfClubService jfClubService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/union.html")
|
||||
@@ -56,21 +62,23 @@ public class UnionCon {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.union","sys.jf.funds.union"},logical = Logical.OR)
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "apply_type", required = false) Integer apply_type,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
public Object pageData(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Integer isAudit,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
u.unioncode,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
@@ -78,7 +86,7 @@ public class UnionCon {
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
@@ -90,14 +98,14 @@ public class UnionCon {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1040);
|
||||
}
|
||||
|
||||
cnd.and("act.apply_type", "=", apply_type);
|
||||
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
if (Vi.isNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword());
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
|
||||
if (Vi.isNotBlank(page.getPageOrderName(), page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy());
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
@@ -105,30 +113,85 @@ public class UnionCon {
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfUseService jfUseService;
|
||||
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfYjghService jfYjghService;
|
||||
|
||||
@Inject
|
||||
private ActivityTissueService activityTissueService;
|
||||
@Inject
|
||||
private io.v.nutz.zhgh.jf.service.jfClubService jfClubService;
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"sys.jf.activity_bx.union","sys.jf.funds.union"},logical = Logical.OR)
|
||||
public Object doReview(String id, String idea, String sign, Boolean flag) {
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setState_id(flag ? "1060" : "1045");
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doReview(String data) {
|
||||
NutMap nutMap = Json.fromJson(NutMap.class, data);
|
||||
|
||||
ActivityBx aid = activityBxService.fetch(nutMap.getString("id"));
|
||||
aid.setState_id(nutMap.getBoolean("flag") ? "1060" : "1045");
|
||||
aid.setUnion_chairman_name(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setUnion_chairman_time(DateUtil.getDate());
|
||||
aid.setUnion_chairman_idea(idea);
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
aid.setUnion_chairman(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doEdit(aid);
|
||||
aid.setUnion_chairman_idea(nutMap.getString("idea"));
|
||||
aid.setActivity_money(nutMap.getDouble("activity_money"));
|
||||
List<Goods> goods = nutMap.getAsList("goods", Goods.class);
|
||||
aid.setGoods(goods);
|
||||
|
||||
/* jf_yjgh jfYjgh = jfYjghService.fetch(Cnd.where("unionId", "=", vi.getUnionId(aid.getUser_id())).and("year", "=", Calendar.getInstance().get(Calendar.YEAR)));
|
||||
if (Strings.isNotBlank(nutMap.getString("sign"))) {
|
||||
aid.setUnion_chairman(sysSignatureService.insert(new Sys_signature(nutMap.getString("sign"))).getId());
|
||||
}
|
||||
|
||||
String nodeName = "";
|
||||
if (nutMap.getBoolean("flag")) {
|
||||
User user = activityBxService.dao().fetch(User.class, Cnd.where("id", "=", aid.getUser_id()));
|
||||
msgApi.sendWxMsg("活动申报", "", "text", "您申报的活动【" + aid.getActivity_name() + "】已审核通过,请前往智慧工会进行查看。", List.of(user.getLoginname()), null);
|
||||
|
||||
|
||||
if (aid.getActivity_id() == null) {
|
||||
ActivityTissue activityTissue = new ActivityTissue();
|
||||
activityTissue.setId(aid.getId());
|
||||
activityTissue.setApplyTime(DateUtil.getDate());
|
||||
activityTissue.setType(aid.getActivity_type());
|
||||
activityTissue.setActivityCode(aid.getProjectCode());
|
||||
activityTissue.setName(aid.getActivity_name());
|
||||
activityTissue.setUserId(aid.getUser_id());
|
||||
activityTissue.setStartPlannedDate(aid.getStartPlannedDate());
|
||||
activityTissue.setEndPlannedDate(aid.getEndPlannedDate());
|
||||
activityTissue.setStartTime(aid.getStartTime());
|
||||
activityTissue.setEndTime(aid.getEndTime());
|
||||
activityTissue.setAddress(aid.getAddress());
|
||||
if (aid.getActivity_type() == 40002) {
|
||||
activityTissue.setUnionId(user.getUnionid());
|
||||
} else if (aid.getActivity_type() == 40003) {
|
||||
activityTissue.setClubId(aid.getClubId());
|
||||
}
|
||||
activityTissue.setProjectTypeCode("50006");
|
||||
activityBxService.insert(activityTissue);
|
||||
aid.setActivity_id(activityTissue.getId());
|
||||
}
|
||||
nodeName = "审核通过";
|
||||
} else {
|
||||
Sys_user user = activityBxService.dao().fetch(Sys_user.class, aid.getUser_id());
|
||||
msgApi.sendWxMsg("活动申报", "", "text", "您申报的活动【" + aid.getActivity_name() + "】被校工会主席拒绝,审核意见:" + aid.getUnion_chairman_idea(), List.of(user.getLoginname()), null);
|
||||
FundsToHandler.REFUSE_TASK.exec(aid.getId(), new NutMap().addv("option", nodeName), null);
|
||||
}
|
||||
activityBxService.update(aid);
|
||||
FundsToHandler.COMPLETE_SCHOOL_TASK.exec(aid.getId(), new NutMap().addv("option", nodeName), null);
|
||||
|
||||
/*jf_yjgh jfYjgh = jfYjghService.fetch(Cnd.where("unionId", "=", vi.getUnionId(aid.getUser_id())).and("year", "=", Calendar.getInstance().get(Calendar.YEAR)));
|
||||
if (jfYjgh != null) {
|
||||
jf_use use = new jf_use();
|
||||
use.setAdjust_id(jfYjgh.getId());
|
||||
use.setApply_id(aid.getId());
|
||||
use.setProject(aid.getActivity_name());
|
||||
use.setAdjust_money(aid.getActivity_money());
|
||||
use.setAdjust_money((double) Math.round(aid.getActivity_money()));
|
||||
use.setAdjust_person(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
use.setAdjust_time(DateUtil.getDate());
|
||||
jfUseService.addUse(use, false);
|
||||
|
||||
@@ -119,7 +119,7 @@ public class clubTzController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("SchoolUnionAdmin")) {
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("A06")) {
|
||||
|
||||
} else {
|
||||
List<Sys_user_role> roleids = jfClubService.dao().query(Sys_user_role.class, Cnd.where("roleId", "=", Roles.club01));
|
||||
|
||||
@@ -19,6 +19,7 @@ import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementApplyController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 活动报销,报销申请
|
||||
* 校工会活动——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
* 基层工会活动——>基层工会主席审核——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
* 协会活动——>协会负责人审核——>校工会负责人(姜学军)审核——>校工会主席审核——>流程结束
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/apply")
|
||||
public class ActivityReimbursementApplyController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/apply.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doSave(@Param("activityBx") ActivityBx activityBx) {
|
||||
List<ActivityBx.Budget> budgets = activityBx.getBudgets();
|
||||
if (ArrayUtil.isNotEmpty(budgets)) {
|
||||
double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).sum();
|
||||
activityBx.setActivity_money(sum);
|
||||
activityBx.setReimbursement_apply_time(DateUtil.today());
|
||||
}
|
||||
|
||||
activityBx.setFiles(null);
|
||||
activityBx.setActivity_content(null);
|
||||
activityBx.setReimbursement_state_id(999);
|
||||
activityBxService.updateIgnoreNull(activityBx);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param(value = "sign", required = false) String sign) {
|
||||
int count = activityBxService.count(Cnd.where("id", "=", activityBx.getId()));
|
||||
|
||||
switch (activityBx.getActivity_type()) {
|
||||
case 40001 -> activityBx.setReimbursement_state_id(1020);
|
||||
case 40002 -> activityBx.setReimbursement_state_id(1010);
|
||||
case 40003 -> activityBx.setReimbursement_state_id(1000);
|
||||
}
|
||||
|
||||
List<ActivityBx.Budget> budgets = activityBx.getBudgets();
|
||||
double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).sum();
|
||||
activityBx.setActivity_money(sum);
|
||||
if (activityBx.getReimbursement_apply_time() == null){
|
||||
activityBx.setReimbursement_apply_time(DateUtil.today());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(activityBx.getId()) && count > 0) {
|
||||
activityBx.setFiles(null);
|
||||
activityBx.setActivity_content(null);
|
||||
activityBxService.updateIgnoreNull(activityBx);
|
||||
} else {
|
||||
// activityBxService.doAdd(activityBx);
|
||||
}
|
||||
|
||||
NutMap map = new NutMap();
|
||||
map.put("userId", ShiroUtil.getUserId());
|
||||
//流程开始
|
||||
ReimbursementToHandler.START_PROCESS.exec(activityBx.getId(), map);
|
||||
if (activityBx.getActivity_type() == 40001) {
|
||||
//校工会申请,校工会负责人审核
|
||||
ReimbursementToHandler.CREATE_SCHOOL_DIRECTOR_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40002) {
|
||||
//分工会
|
||||
ReimbursementToHandler.CREATE_UNION_TASK.exec(activityBx.getId(), map);
|
||||
} else if (activityBx.getActivity_type() == 40003) {
|
||||
//协会
|
||||
ReimbursementToHandler.CREATE_CLUB_TASK.exec(activityBx.getId(), map);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
public Object getActivityReimbursementByUser() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("state_id", "=", 1060);
|
||||
cnd.andEX("`year`", "=", DateUtil.thisYear());
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("reimbursement_state_id", "in", List.of(1005, 1015, 1025, 1045));
|
||||
seg.or("reimbursement_union_audit_id", "is", null);
|
||||
cnd.and(seg);
|
||||
// cnd.and("reimbursement_unit_secretary_audit_id", "is", null);
|
||||
// cnd.and("reimbursement_finance_audit_id", "is", null);
|
||||
// cnd.and("reimbursement_school_director_id", "is", null);
|
||||
// cnd.and("reimbursement_school_chairman_id", "is", null);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cnd.and("user_id", "=", ShiroUtil.getUserId());
|
||||
}
|
||||
return activityBxService.query(cnd);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.apply")
|
||||
public Object findOne(String id) {
|
||||
return activityBxService.queryOne(id);
|
||||
}
|
||||
}
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementBoardController
|
||||
* @Date 2024/5/14 14:48
|
||||
* @注释 活动报销图表展示
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/board")
|
||||
@Slf4j
|
||||
public class ActivityReimbursementBoardController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/board.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
public Sql activityNum(Integer startYear, Integer endYear, Boolean isActivityMoney) {
|
||||
if (isActivityMoney) {
|
||||
return Sqls.create("SELECT SUM(activity_money) FROM activity_bx where activity_type = @type and `year`>=@startYear and `year`<=@endYear")
|
||||
.setParam("startYear", startYear).setParam("endYear", endYear);
|
||||
} else {
|
||||
return Sqls.create("""
|
||||
SELECT
|
||||
IF(
|
||||
abx.activity_number > 0 and abx.activity_number is not null,
|
||||
abx.activity_number,
|
||||
( SELECT count( userId ) FROM activity_tissue_person WHERE tissueId = abx.activity_id )) AS activityNum
|
||||
FROM
|
||||
activity_bx abx
|
||||
WHERE
|
||||
abx.activity_type = @type AND abx.`year` >= @startYear
|
||||
AND abx.`year` <= @endYear
|
||||
""").setParam("startYear", startYear).setParam("endYear", endYear);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object getNumData(@Param(value = "startYear", required = false) Integer startYear,
|
||||
@Param(value = "endYear", required = false) Integer endYear) {
|
||||
try {
|
||||
Sql schoolSignNum = activityNum(startYear, endYear, false).setParam("type", 40001);
|
||||
Sql unionSignNum = activityNum(startYear, endYear, false).setParam("type", 40002);
|
||||
Sql clubSignNum = activityNum(startYear, endYear, false).setParam("type", 40003);
|
||||
|
||||
Sql schoolActivityMoney = activityNum(startYear, endYear, true).setParam("type", 40001);
|
||||
Sql unionActivityMoney = activityNum(startYear, endYear, true).setParam("type", 40002);
|
||||
Sql clubActivityMoney = activityNum(startYear, endYear, true).setParam("type", 40003);
|
||||
Map result = new HashMap() {{
|
||||
put("schoolSignNum", activityBxService.listMap(schoolSignNum).stream().mapToInt(v->v.getInt("activityNum")).sum());
|
||||
put("unionSignNum", activityBxService.listMap(unionSignNum).stream().mapToInt(v->v.getInt("activityNum")).sum());
|
||||
put("clubSignNum", activityBxService.listMap(clubSignNum).stream().mapToInt(v->v.getInt("activityNum")).sum());
|
||||
put("schoolActivityMoney", activityBxService.count(schoolActivityMoney));
|
||||
put("unionActivityMoney", activityBxService.count(unionActivityMoney));
|
||||
put("clubActivityMoney", activityBxService.count(clubActivityMoney));
|
||||
}};
|
||||
|
||||
return Result.success().addData(result);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object getActivityTypeChart(@Param(value = "startYear", required = false) Integer startYear,
|
||||
@Param(value = "endYear", required = false) Integer endYear) {
|
||||
try {
|
||||
Sql sql1 = Sqls.create("SELECT count(1) FROM activity_bx WHERE activity_type=40001 and `year` = @year");
|
||||
Sql sql2 = Sqls.create("SELECT count(1) FROM activity_bx WHERE activity_type=40002 and `year` = @year");
|
||||
Sql sql3 = Sqls.create("SELECT count(1) FROM activity_bx WHERE activity_type=40003 and `year` = @year");
|
||||
|
||||
List<NutMap> list = new ArrayList<>();
|
||||
if (startYear == null || endYear == null) {
|
||||
int nowYear = DateUtil.thisYear();
|
||||
startYear = nowYear - 9;
|
||||
endYear = nowYear;
|
||||
}
|
||||
|
||||
for (int i = startYear; i <= endYear; i++) {
|
||||
final int year = i;
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "校工会活动");
|
||||
put("num", activityBxService.count(sql1.setParam("year", year)));
|
||||
}});
|
||||
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "分工会活动");
|
||||
put("num", activityBxService.count(sql2.setParam("year", year)));
|
||||
}});
|
||||
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "社团活动");
|
||||
put("num", activityBxService.count(sql3.setParam("year", year)));
|
||||
}});
|
||||
}
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object getActivityTypePieNum(@Param(value = "startYear", required = false) Integer startYear,
|
||||
@Param(value = "endYear", required = false) Integer endYear) {
|
||||
try {
|
||||
Sql sql1 = Sqls.create("SELECT count(1) from activity_bx where activity_type = 40001 and `year`<=@startYear and `year`>=@endYear").setParam("startYear", startYear).setParam("endYear", endYear);
|
||||
Sql sql2 = Sqls.create("SELECT count(1) from activity_bx where activity_type = 40002 and `year`<=@startYear and `year`>=@endYear").setParam("startYear", startYear).setParam("endYear", endYear);
|
||||
Sql sql3 = Sqls.create("SELECT count(1) from activity_bx where activity_type = 40003 and `year`<=@startYear and `year`>=@endYear").setParam("startYear", startYear).setParam("endYear", endYear);
|
||||
|
||||
List<NutMap> list = new ArrayList<>();
|
||||
list.add(new NutMap() {{
|
||||
put("type", "校工会活动");
|
||||
put("num", activityBxService.count(sql1));
|
||||
}});
|
||||
list.add(new NutMap() {{
|
||||
put("type", "分工会活动");
|
||||
put("num", activityBxService.count(sql2));
|
||||
}});
|
||||
list.add(new NutMap() {{
|
||||
put("type", "社团活动");
|
||||
put("num", activityBxService.count(sql3));
|
||||
}});
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object getActivityJfChart(@Param(value = "startYear", required = false) Integer startYear,
|
||||
@Param(value = "endYear", required = false) Integer endYear) {
|
||||
try {
|
||||
Sql sql1 = Sqls.create("SELECT IFNULL(sum(activity_money),0) jf FROM activity_bx WHERE activity_type=40001 and `year` = @year");
|
||||
Sql sql2 = Sqls.create("SELECT IFNULL(sum(activity_money),0) jf FROM activity_bx WHERE activity_type=40002 and `year` = @year");
|
||||
Sql sql3 = Sqls.create("SELECT IFNULL(sum(activity_money),0) jf FROM activity_bx WHERE activity_type=40003 and `year` = @year");
|
||||
|
||||
List<NutMap> list = new ArrayList<>();
|
||||
if (startYear == null || endYear == null) {
|
||||
int nowYear = DateUtil.thisYear();
|
||||
startYear = nowYear - 9;
|
||||
endYear = nowYear;
|
||||
}
|
||||
|
||||
for (int i = startYear; i <= endYear; i++) {
|
||||
final int year = i;
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "校工会经费");
|
||||
put("num", activityBxService.list(sql1.setParam("year", year)).get(0).getDouble("jf"));
|
||||
}});
|
||||
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "分工会经费");
|
||||
put("num", activityBxService.list(sql2.setParam("year", year)).get(0).getDouble("jf"));
|
||||
}});
|
||||
|
||||
list.add(new NutMap() {{
|
||||
put("year", year);
|
||||
put("type", "社团经费");
|
||||
put("num", activityBxService.list(sql3.setParam("year", year)).get(0).getDouble("jf"));
|
||||
}});
|
||||
}
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object getActivityJfPieNum(@Param(value = "startYear", required = false) Integer startYear,
|
||||
@Param(value = "endYear", required = false) Integer endYear) {
|
||||
try {
|
||||
Sql schoolSql = activityNum(startYear, endYear, true).setParam("type", 40001);
|
||||
Sql unionSql = activityNum(startYear, endYear, true).setParam("type", 40002);
|
||||
Sql clubSql = activityNum(startYear, endYear, true).setParam("type", 40003);
|
||||
List<NutMap> list = new ArrayList<>();
|
||||
list.add(new NutMap() {{
|
||||
put("type", "校工会经费");
|
||||
put("num", activityBxService.count(schoolSql));
|
||||
}});
|
||||
list.add(new NutMap() {{
|
||||
put("type", "分工会经费");
|
||||
put("num", activityBxService.count(unionSql));
|
||||
}});
|
||||
list.add(new NutMap() {{
|
||||
put("type", "社团经费");
|
||||
put("num", activityBxService.count(clubSql));
|
||||
}});
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object allUnionActivityAndJf(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isUnionJf", required = false) Boolean isUnionJf) {
|
||||
try {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
su.unionname,
|
||||
$unionSql
|
||||
FROM
|
||||
sys_union su
|
||||
LEFT JOIN `user` u ON u.unionid = su.id
|
||||
LEFT JOIN activity_bx bx ON u.id = bx.user_id AND bx.activity_type = 40002 AND bx.`year` = @year
|
||||
GROUP BY
|
||||
su.unionname
|
||||
ORDER BY
|
||||
su.unionname
|
||||
""").setParam("year", year);
|
||||
|
||||
sql.setVar("unionSql", isUnionJf ? new Static(" COALESCE(SUM(bx.activity_money), 0) AS money ") : new Static(" count(bx.id) as money "));
|
||||
List<NutMap> list = activityBxService.listMap(sql);
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("sys.jf.reimbursement.board")
|
||||
public Object allClubActivityAndJf(@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isClubJf", required = false) Boolean isClubJf) {
|
||||
try {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
sc.`name` AS clubName,
|
||||
$clubSql
|
||||
FROM
|
||||
sys_club sc
|
||||
LEFT JOIN activity_bx bx ON bx.user_id = sc.fzr
|
||||
AND bx.`year` = @year
|
||||
AND bx.activity_type = 40003
|
||||
GROUP BY
|
||||
sc.id
|
||||
ORDER BY
|
||||
sc.`name`
|
||||
""").setParam("year", year);
|
||||
sql.setVar("clubSql", isClubJf ? new Static(" COALESCE(SUM(bx.activity_money), 0) AS money ") : new Static(" count(bx.id) as money "));
|
||||
List<NutMap> list = activityBxService.listMap(sql);
|
||||
return Result.success().addData(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementClubChairmanController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 活动报销,协会负责人审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/clubChairman")
|
||||
public class ActivityReimbursementClubChairmanController {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/clubChairman.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.clubChairman")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 活动报销协会审核
|
||||
* @param pageForm
|
||||
* @param year
|
||||
* @param clubId
|
||||
* @param activityName
|
||||
* @param isAudit 0,全部;1,已审核;2,未审核
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.clubChairman")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "clubId", required = false) String clubId,
|
||||
@Param(value = "activityName", required = false) String activityName,
|
||||
@Param(value = "isAudit", required = false) String isAudit) {
|
||||
Sql sql = activityBxService.activityReimbursementSql();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("act.`year`","=",year);
|
||||
if (StrUtil.isNotBlank(activityName)) {
|
||||
cnd.and(Cnd.likeEX("act.activity_name", activityName));
|
||||
}
|
||||
|
||||
cnd.and("act.reimbursement_state_id","is not",null);
|
||||
|
||||
//1已审核;2未审核;0全部
|
||||
cnd.and("act.reimbursement_state_id", "1".equals(isAudit) ? ">" : "2".equals(isAudit) ? "=" : ">=", 1000);
|
||||
|
||||
if (ShiroUtil.hasAnyRoles("sysadmin,A06")){
|
||||
cnd.andEX("act.clubId","=",clubId);
|
||||
} else {
|
||||
cnd.and("act.clubId","=",vi.getClubId());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("sys.jf.reimbursement.clubChairman")
|
||||
@SLog(type = "文体活动", tag = "活动报销", msg = "协会负责人审核", param = true, result = true)
|
||||
public Object doAuditing(@Param("id") String id,@Param("audit") Audit audit){
|
||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
audit.setAuditTime(new Date());
|
||||
activityBxService.dao().insert(audit);
|
||||
|
||||
Chain chain = Chain.make("reimbursement_club_audit_id", audit.getId());
|
||||
chain.add("reimbursement_state_id", audit.getAuditPass() ? 1020 : 1005);
|
||||
activityBxService.update(chain,Cnd.where("id","=",id));
|
||||
|
||||
ReimbursementToHandler.COMPLETE_CLUB_TASK.exec(id, NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "协会负责人通过" : "协会负责人拒绝"));
|
||||
if (audit.getAuditPass()) {
|
||||
ReimbursementToHandler.CREATE_SCHOOL_DIRECTOR_TASK.exec(id,null);
|
||||
} else {
|
||||
ReimbursementToHandler.REFUSE_UNION_TASK.exec(id,NutMap.NEW().addv("nodeName","协会负责人拒绝"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissuePerson;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.web.commons.utils.FileUtil;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementMineController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 活动报销,我的报销
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/mine")
|
||||
public class ActivityReimbursementMineController {
|
||||
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/mine.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.mine")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.mine")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "activityName", required = false) String activityName) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
un.unionname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit su ON su.id = u.unitid
|
||||
LEFT JOIN sys_union un ON su.unionid = un.id
|
||||
LEFT JOIN state s ON act.reimbursement_state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
LEFT JOIN sys_club_user scu ON scu.userid=act.user_id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
||||
group2.or("u.unionid", "=", vi.getUnionId());
|
||||
} else if (ShiroUtil.hasRole("H02")) {
|
||||
group2.or("scu.clubid", "=", vi.getClubId());
|
||||
} else {
|
||||
group2.or("act.user_id", "=", ShiroUtil.getUserId());
|
||||
}
|
||||
cnd.and(group2);
|
||||
}
|
||||
|
||||
cnd.andEX("act.`year`", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName()) && StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||
}
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.unionid", "=", unionId);
|
||||
cnd.andEX("act.activity_name", "=", activityName);
|
||||
cnd.and("reimbursement_state_id", "is not", null);
|
||||
cnd.and("reimbursement_state_id", "!=", "");
|
||||
|
||||
cnd.groupBy("act.id");
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy());
|
||||
} else {
|
||||
cnd.asc("act.reimbursement_state_id").desc("act.apply_time");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.mine")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doDelete(String id) {
|
||||
activityBxService.update(Chain.make("reimbursement_state_id", null)
|
||||
.add("reimbursement_apply_time", null).add("reimbursement_state_id",null),
|
||||
Cnd.where("id", "=", id));
|
||||
ReimbursementToHandler.DELETE_PROCESS_AND_TASK.exec(id,null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("sys.jf.reimbursement.mine")
|
||||
public void exportAllFiles(String id, String exportType, HttpServletResponse response) {
|
||||
|
||||
response.reset();
|
||||
response.setContentType("application/x-msdownload;charset=utf-8");
|
||||
|
||||
/**
|
||||
* 创建临时文件夹
|
||||
*/
|
||||
String tmpPath = "tmp/" + R.UU32();
|
||||
File tmpDir = new File(tmpPath + "/活动报销附件汇总");
|
||||
tmpDir.mkdirs();
|
||||
|
||||
|
||||
List<Sys_file> allFiles = new ArrayList<>();
|
||||
|
||||
NutMap nutMap = activityBxService.queryOne(id);
|
||||
List<Sys_file> billFiles = JSONObject.parseArray(nutMap.getString("billFiles"), Sys_file.class);
|
||||
List<Sys_file> photoFiles = JSONObject.parseArray(nutMap.getString("photoFiles"), Sys_file.class);
|
||||
List<Sys_file> otherFiles = JSONObject.parseArray(nutMap.getString("otherFiles"), Sys_file.class);
|
||||
|
||||
|
||||
if ("all".equals(exportType)) {
|
||||
if (Lang.isNotEmpty(billFiles)) allFiles.addAll(billFiles);
|
||||
if (Lang.isNotEmpty(photoFiles)) allFiles.addAll(photoFiles);
|
||||
if (Lang.isNotEmpty(otherFiles)) allFiles.addAll(otherFiles);
|
||||
} else if ("billFiles".equals(exportType)) {
|
||||
allFiles.addAll(billFiles);
|
||||
} else if ("photoFiles".equals(exportType)) {
|
||||
if (Lang.isNotEmpty(photoFiles)) allFiles.addAll(photoFiles);
|
||||
} else if ("otherFiles".equals(exportType)) {
|
||||
if (Lang.isNotEmpty(otherFiles)) allFiles.addAll(otherFiles);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
/**
|
||||
* 创建临时文件夹
|
||||
*/
|
||||
String fileName = nutMap.getString("activity_name");
|
||||
|
||||
File tDir = new File(tmpDir + "/" + fileName);
|
||||
tDir.mkdirs();
|
||||
|
||||
for (Sys_file file : allFiles) {
|
||||
if (Lang.isNotEmpty(file)) {
|
||||
FileOutputStream outputStream = new FileOutputStream(tDir.getPath() + "/" + file.getFilename());
|
||||
ftpService.download(file.getFilepath(), outputStream);
|
||||
outputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
String aimsDir = "zipTmp/" + R.UU32();
|
||||
String aimsName = "活动报销附件汇总.zip";
|
||||
String aimsPath = aimsDir + "/" + aimsName;
|
||||
FileUtil.compressToZip(tmpDir.getPath(), aimsDir, aimsName);
|
||||
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode(aimsName, "UTF-8"));
|
||||
|
||||
File aimsFile = new File(aimsPath);
|
||||
FileInputStream inputStream = new FileInputStream(aimsFile);
|
||||
IOUtils.copy(inputStream, response.getOutputStream());
|
||||
inputStream.close();
|
||||
aimsFile.delete();
|
||||
|
||||
FileUtil.deleteDir(new File(tmpPath));
|
||||
FileUtil.deleteDir(new File(aimsDir));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("sys.jf.reimbursement.mine")
|
||||
public void exportActivityJoinUser(String id, HttpServletResponse response) {
|
||||
List<ActivityTissuePerson> tissueUserList = activityBxService.dao().query(ActivityTissuePerson.class, Cnd.where("tissueId", "=", id));
|
||||
ActivityBx activityBx = activityBxService.fetch(id);
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 20));
|
||||
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||
|
||||
try {
|
||||
ViTool.excelResponse(response, activityBx.getActivity_name() + "活动报名人员.xls");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), exportEntities, tissueUserList);
|
||||
workbook.write(response.getOutputStream());
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolChairmanController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 报销,校工会主席审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/schoolChairman")
|
||||
public class ActivityReimbursementSchoolChairmanController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/schoolChairman.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolChairman")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolChairman")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "clubId",required = false) String clubId,
|
||||
@Param(value = "activityName", required = false) String activityName,
|
||||
@Param(value = "isAudit", required = false) String isAudit) {
|
||||
Sql sql = activityBxService.activityReimbursementSql();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("act.`year`","=",year);
|
||||
if (StrUtil.isNotBlank(activityName)) {
|
||||
cnd.and(Cnd.likeEX("act.activity_name", activityName));
|
||||
}
|
||||
|
||||
//1已审核;2未审核;0全部
|
||||
cnd.and("act.reimbursement_state_id", "1".equals(isAudit) ? ">" : "2".equals(isAudit) ? "=" : ">=", 1040);
|
||||
|
||||
cnd.andEX("u.unionid","=",unionId);
|
||||
cnd.andEX("u.unitId","=",unitId);
|
||||
cnd.andEX("act.clubId","=",clubId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolChairman")
|
||||
@SLog(type = "文体活动", tag = "活动报销", msg = "校工会主席审核", param = true, result = true)
|
||||
public Object doAuditing(@Param("id") String id,@Param("audit") Audit audit){
|
||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
audit.setAuditTime(new Date());
|
||||
activityBxService.dao().insert(audit);
|
||||
|
||||
Chain chain = Chain.make("reimbursement_school_chairman_id", audit.getId());
|
||||
chain.add("reimbursement_state_id", audit.getAuditPass() ? 1061 : 1045);
|
||||
activityBxService.update(chain,Cnd.where("id","=",id));
|
||||
|
||||
ReimbursementToHandler.COMPLETE_SCHOOL_CHAIRMAN_TASK.exec(id, NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "校工会主席通过" : "校工会主席拒绝"));
|
||||
if (audit.getAuditPass()) {
|
||||
ReimbursementToHandler.COMPLETE_PROCESS.exec(id,null);
|
||||
} else {
|
||||
ReimbursementToHandler.REFUSE_UNION_TASK.exec(id,NutMap.NEW().addv("nodeName","校工会主席拒绝"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementSchoolDirectorController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 报销校工会负责人审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/schoolDirector")
|
||||
public class ActivityReimbursementSchoolDirectorController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/schoolDirector.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolDirector")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolDirector")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "clubId",required = false) String clubId,
|
||||
@Param(value = "activityName", required = false) String activityName,
|
||||
@Param(value = "isAudit", required = false) String isAudit) {
|
||||
Sql sql = activityBxService.activityReimbursementSql();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("act.`year`","=",year);
|
||||
if (StrUtil.isNotBlank(activityName)) {
|
||||
cnd.and(Cnd.likeEX("act.activity_name", activityName));
|
||||
}
|
||||
|
||||
//1已审核;2未审核;0全部
|
||||
cnd.and("act.reimbursement_state_id", "1".equals(isAudit) ? ">" : "2".equals(isAudit) ? "=" : ">=", 1020);
|
||||
|
||||
cnd.andEX("u.unionid","=",unionId);
|
||||
cnd.andEX("u.unitId","=",unitId);
|
||||
cnd.andEX("act.clubId","=",clubId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.schoolDirector")
|
||||
@SLog(type = "文体活动", tag = "活动报销", msg = "校工会负责人审核", param = true, result = true)
|
||||
public Object doAuditing(@Param("id") String id,@Param("audit") Audit audit){
|
||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
audit.setAuditTime(new Date());
|
||||
activityBxService.dao().insert(audit);
|
||||
|
||||
Chain chain = Chain.make("reimbursement_school_director_id", audit.getId());
|
||||
//通过,校工会主席审核
|
||||
chain.add("reimbursement_state_id", audit.getAuditPass() ? 1040 : 1025);
|
||||
activityBxService.update(chain,Cnd.where("id","=",id));
|
||||
|
||||
ReimbursementToHandler.COMPLETE_SCHOOL_DIRECTOR_TASK.exec(id, NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "校工会负责人通过" : "校工会负责人拒绝"));
|
||||
if (audit.getAuditPass()) {
|
||||
ReimbursementToHandler.CREATE_SCHOOL_CHAIRMAN_TASK.exec(id,null);
|
||||
} else {
|
||||
ReimbursementToHandler.REFUSE_UNION_TASK.exec(id,NutMap.NEW().addv("nodeName","校工会负责人拒绝"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementStatisticsController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 活动报销,汇总统计
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/statistics")
|
||||
public class ActivityReimbursementStatisticsController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/statistics.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.statistics")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.statistics")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "clubId", required = false) String clubId,
|
||||
@Param(value = "activityType",required = false) String activityType,
|
||||
@Param(value = "activityName", required = false) String activityName) {
|
||||
Sql sql = activityBxService.activityReimbursementSql();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("act.`year`","=",year);
|
||||
if (StrUtil.isNotBlank(activityName)) {
|
||||
cnd.and(Cnd.likeEX("act.activity_name", activityName));
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(activityType) && !"0".equals(activityType)){
|
||||
cnd.and("act.activity_type","=",activityType);
|
||||
}
|
||||
|
||||
cnd.andEX("u.unionid","=",unionId);
|
||||
cnd.andEX("u.unitId","=",unitId);
|
||||
cnd.andEX("act.clubId","=",clubId);
|
||||
cnd.andEX("act.reimbursement_state_id","=",1061);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.statistics")
|
||||
public Object getActivityTypeNum(Integer year){
|
||||
List<ActivityBx> list = activityBxService.query(Cnd.where("`year`", "=", year).and("reimbursement_state_id","=",1061));
|
||||
Integer schoolNum = (int) list.stream().filter(v -> v.getActivity_type() == 40001).count();
|
||||
Integer unionNum = (int) list.stream().filter(v -> v.getActivity_type() == 40002).count();
|
||||
Integer clubNum = (int) list.stream().filter(v -> v.getActivity_type() == 40003).count();
|
||||
NutMap map = new NutMap();
|
||||
return map.addv("all",list.size()).addv("school",schoolNum).addv("union",unionNum).addv("club",clubNum);
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package io.v.nutz.zhgh.jf.controller.reimbursement;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.zhgh.jf.handle.reimbursement.ReimbursementToHandler;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ActivityReimbursementUnionChairmanController
|
||||
* @Date 2024/4/26 14:58
|
||||
* @注释 活动报销,分工会主席审核
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/jf/reimbursement/unionChairman")
|
||||
public class ActivityReimbursementUnionChairmanController {
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/reimbursement/unionChairman.html")
|
||||
@RequiresPermissions("sys.jf.reimbursement.unionChairman")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.unionChairman")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "activityName", required = false) String activityName,
|
||||
@Param(value = "isAudit", required = false) String isAudit) {
|
||||
Sql sql = activityBxService.activityReimbursementSql();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("act.`year`","=",year);
|
||||
if (StrUtil.isNotBlank(activityName)) {
|
||||
cnd.and(Cnd.likeEX("act.activity_name", activityName));
|
||||
}
|
||||
|
||||
//1已审核;2未审核;0全部
|
||||
cnd.and("act.reimbursement_state_id", "1".equals(isAudit) ? ">" : "2".equals(isAudit) ? "=" : ">=", 1010);
|
||||
|
||||
if (ShiroUtil.hasAnyRoles("sysadmin,A06")){
|
||||
cnd.andEX("u.unionid","=",unionId);
|
||||
} else {
|
||||
cnd.and("u.unionid","=", Vi.getUnionId());
|
||||
}
|
||||
cnd.andEX("u.unitId","=",unitId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(),sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基层工会活动报销
|
||||
* 基层工会活动——>基层工会主席审核——>校工会主席审核——>流程结束
|
||||
* @param id
|
||||
* @param audit
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.jf.reimbursement.unionChairman")
|
||||
@SLog(type = "文体活动", tag = "活动报销", msg = "分工会主席审核", param = true, result = true)
|
||||
public Object doAuditing(@Param("id") String id,@Param("audit") Audit audit){
|
||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
audit.setAuditTime(new Date());
|
||||
activityBxService.dao().insert(audit);
|
||||
|
||||
Chain chain = Chain.make("reimbursement_union_audit_id", audit.getId());
|
||||
//通过,校工会主席审核
|
||||
chain.add("reimbursement_state_id", audit.getAuditPass() ? 1020 : 1015);
|
||||
activityBxService.update(chain,Cnd.where("id","=",id));
|
||||
|
||||
ReimbursementToHandler.COMPLETE_UNION_TASK.exec(id, NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "基层工会通过" : "基层工会拒绝"));
|
||||
if (audit.getAuditPass()) {
|
||||
ReimbursementToHandler.CREATE_SCHOOL_DIRECTOR_TASK.exec(id,null);
|
||||
} else {
|
||||
ReimbursementToHandler.REFUSE_UNION_TASK.exec(id,NutMap.NEW().addv("nodeName","基层工会拒绝"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import io.v.nutz.base.utils.PageUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -73,7 +74,7 @@ public class jfsyController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("SchoolUnionAdmin")) {
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("A06")) {
|
||||
cnd.andEX("yjgh.id", "=", unionId);
|
||||
} else if (ShiroUtil.hasRole("H04")) {
|
||||
//基层工会管理员
|
||||
@@ -119,7 +120,7 @@ public class jfsyController {
|
||||
"ON jf.unionId = yjgh.id \n" +
|
||||
"AND jf.`year` = @year $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("SchoolUnionAdmin")) {
|
||||
if (ShiroUtil.hasRole("sysadmin") || ShiroUtil.hasRole("A06")) {
|
||||
|
||||
} else if (ShiroUtil.hasRole("H04")) {
|
||||
//基层工会管理员
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.v.nutz.zhgh.jf.model.jf_yjgh;
|
||||
import io.v.nutz.zhgh.jf.service.CostsSetService;
|
||||
import io.v.nutz.zhgh.jf.service.jfYjghService;
|
||||
import io.v.nutz.base.service.AsyncService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
|
||||
@@ -0,0 +1,269 @@
|
||||
package io.v.nutz.zhgh.jf.handle.funds;
|
||||
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import lombok.Getter;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName FundsToHandler
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/5/20 14:41
|
||||
*/
|
||||
@Getter
|
||||
public enum FundsToHandler {
|
||||
|
||||
/**
|
||||
* 流程开始
|
||||
*/
|
||||
START_PROCESS() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
Sql sql = Sqls.fetchString(Sqls.create("select username from sys_user where id = @id").setParam("id", extra.getString("userId")).toString());
|
||||
dao.execute(sql);
|
||||
String username = sql.getString();
|
||||
|
||||
localProcessService.startProcess(
|
||||
"【活动申报】申报人:" + username + ",活动名称:" + extra.getString("activityName"),
|
||||
"funds_apply@" + reimbursementId,
|
||||
"",
|
||||
extra.getString("userId"),
|
||||
"/platform/jf/activity_bx/reimbursement",
|
||||
"/platform/jf/activity_bx/reimbursement"
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 审核拒绝
|
||||
*/
|
||||
REFUSE_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.refuseProcess("funds_apply@" + reimbursementId, extra.getString("nodeName"));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 审核退回,重新修改申请
|
||||
*/
|
||||
CREATE_APPLY_RE_MODIFY_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", extra.getString("userId")).toString());
|
||||
dao.execute(sql);
|
||||
String loginname = sql.getString();
|
||||
localProcessService.createTask(
|
||||
"funds_apply@" + reimbursementId,
|
||||
"back",
|
||||
"退回重新修改",
|
||||
ShiroUtil.getUserId(),
|
||||
List.of(loginname),
|
||||
"/platform/fw/singleChild/report",
|
||||
"/platform/fw/singleChild/report",
|
||||
"/platform/fw/singleChild/report",
|
||||
"/platform/fw/singleChild/report"
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 退回后完成
|
||||
*/
|
||||
COMPLETE_APPLY_RE_MODIFY_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeTask(
|
||||
"back",
|
||||
"funds_apply@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("option")
|
||||
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建协会任务
|
||||
*/
|
||||
CREATE_CLUB_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.createTask(
|
||||
"funds_apply@" + reimbursementId,
|
||||
"funds_association",
|
||||
"协会负责人审核",
|
||||
ShiroUtil.getUserId(),
|
||||
loginNames,
|
||||
"/platform/jf/activity_bx/association",
|
||||
"/platform/jf/activity_bx/association",
|
||||
"/platform/jf/activity_bx/association",
|
||||
"/platform/jf/activity_bx/association"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, "协会负责人审核");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 协会完成
|
||||
*/
|
||||
COMPLETE_CLUB_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeTask(
|
||||
"funds_association",
|
||||
"funds_apply@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("option")
|
||||
);
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, extra.getString("option"));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建分工会任务
|
||||
*/
|
||||
CREATE_UNION_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.createTask(
|
||||
"funds_apply@" + reimbursementId,
|
||||
"funds_division",
|
||||
"基层工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
loginNames,
|
||||
"/platform/jf/activity_bx/division",
|
||||
"/platform/jf/activity_bx/division",
|
||||
"/platform/jf/activity_bx/division",
|
||||
"/platform/jf/activity_bx/division"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, "基层工会审核");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 分工会完成
|
||||
*/
|
||||
COMPLETE_UNION_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeTask(
|
||||
"funds_division",
|
||||
"funds_apply@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("option")
|
||||
);
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, extra.getString("option"));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建校工会负责人任务
|
||||
*/
|
||||
CREATE_SCHOOL_FZR_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.createTask(
|
||||
"funds_apply@" + reimbursementId,
|
||||
"funds_accounting",
|
||||
"校工会负责人审核",
|
||||
ShiroUtil.getUserId(),
|
||||
loginNames,
|
||||
"/platform/jf/activity_bx/accounting",
|
||||
"/platform/jf/activity_bx/accounting",
|
||||
"/platform/jf/activity_bx/accounting",
|
||||
"/platform/jf/activity_bx/accounting"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, "校工会负责人审核");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 校工会负责人完成
|
||||
*/
|
||||
COMPLETE_SCHOOL_FZR_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeTask(
|
||||
"funds_accounting",
|
||||
"funds_apply@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("option")
|
||||
);
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, extra.getString("option"));
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 创建校工会任务
|
||||
*/
|
||||
CREATE_SCHOOL_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.createTask(
|
||||
"funds_apply@" + reimbursementId,
|
||||
"funds_union",
|
||||
"校工会主席审核",
|
||||
ShiroUtil.getUserId(),
|
||||
loginNames,
|
||||
"/platform/jf/activity_bx/union",
|
||||
"/platform/jf/activity_bx/union",
|
||||
"/platform/jf/activity_bx/union",
|
||||
"/platform/jf/activity_bx/union"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, "校工会主席审核");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 校工会完成
|
||||
*/
|
||||
COMPLETE_SCHOOL_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeTask(
|
||||
"funds_union",
|
||||
"funds_apply@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
extra.getString("option")
|
||||
);
|
||||
localProcessService.updateProcessNodeName("funds_apply@" + reimbursementId, extra.getString("option"));
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 流程结束
|
||||
*/
|
||||
COMPLETE_PROCESS() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra, List<String> loginNames) {
|
||||
localProcessService.completeProcess("funds_apply@" + reimbursementId);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除流程及任务
|
||||
*/
|
||||
DELETE_PROCESS_AND_TASK() {
|
||||
@Override
|
||||
public void exec (String reimbursementId, NutMap extra, List<String> loginNames){
|
||||
localProcessService.deleteProcessInstance("funds_apply@" + reimbursementId);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public abstract void exec(String reimbursementId, NutMap extra, List<String> loginNames);
|
||||
|
||||
public Dao dao = ViResource.dao;
|
||||
public Vi vi = ViResource.ioc.get(Vi.class);
|
||||
public SysLocalProcessService localProcessService = ViResource.ioc.get(SysLocalProcessServiceImpl.class);
|
||||
}
|
||||
+61
-53
@@ -1,10 +1,7 @@
|
||||
package io.v.nutz.zhgh.jf.handler.reimbursement;
|
||||
package io.v.nutz.zhgh.jf.handle.reimbursement;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.models.Sys_club;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||
@@ -14,11 +11,8 @@ import io.v.nutz.zhgh.zgfw.service.impl.CondolenceServiceImpl;
|
||||
import lombok.Getter;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.Daos;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -30,7 +24,7 @@ import java.util.stream.Collectors;
|
||||
* @注释 活动报销待办
|
||||
*/
|
||||
@Getter
|
||||
public enum ReimbursementToDoHandler {
|
||||
public enum ReimbursementToHandler {
|
||||
|
||||
/**
|
||||
* 流程开始
|
||||
@@ -42,12 +36,12 @@ public enum ReimbursementToDoHandler {
|
||||
User user = dao.fetch(User.class, Cnd.where("id", "=", userId));
|
||||
|
||||
localProcessService.startProcess(
|
||||
user.getUnionname() + "(" + user.getUsername() + ")【活动报销】申请",
|
||||
"【活动报销】" + user.getUnionname() + "(" + user.getUsername() + ")",
|
||||
"activity_reimbursement@" + reimbursementId,
|
||||
"",
|
||||
userId,
|
||||
"/platform/jf/funds/reimbursement",
|
||||
"/platform/jf/funds/reimbursement/mobile"
|
||||
"/platform/jf/reimbursement/mine",
|
||||
"/platform/jf/reimbursement/mine"
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -114,13 +108,13 @@ public enum ReimbursementToDoHandler {
|
||||
localProcessService.createTask(
|
||||
"activity_reimbursement@" + reimbursementId,
|
||||
"activity_reimbursement_union_audit",
|
||||
"分工会审核",
|
||||
"基层工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
unionLeader,
|
||||
"/platform/jf/funds/division",
|
||||
"/platform/jf/funds/division",
|
||||
"/platform/jf/funds/division",
|
||||
"/platform/jf/funds/division"
|
||||
"/platform/jf/reimbursement/unionChairman",
|
||||
"/platform/jf/reimbursement/unionChairman",
|
||||
"/platform/jf/reimbursement/unionChairman",
|
||||
"/platform/jf/reimbursement/unionChairman"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, "基层工会审核");
|
||||
@@ -152,35 +146,8 @@ public enum ReimbursementToDoHandler {
|
||||
CREATE_CLUB_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra) {
|
||||
//先获取当前登录用户的协会信息
|
||||
String clubName = extra.getString("clubName");
|
||||
Sys_club club = dao.fetch(Sys_club.class, Cnd.where("name", "=", clubName));
|
||||
if(ObjectUtil.isEmpty(club)){
|
||||
throw new RuntimeException("协会负责人未设置,请联系管理员。");
|
||||
}
|
||||
//获取协会负责人的工号
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.loginname as loginName,
|
||||
u.username as userName,
|
||||
u.unitid as unitId,
|
||||
u.unitname as unitName,
|
||||
u.mobile,
|
||||
c.`name`
|
||||
FROM
|
||||
sys_user_role r
|
||||
LEFT JOIN
|
||||
`user` u ON r.userId = u.id
|
||||
LEFT JOIN
|
||||
sys_club c ON c.id = r.stid
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("stid", "=", club.getId());
|
||||
cnd.and("roleId", "in", Lang.array(Roles.club01));
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> clubManage = (List<NutMap>) Daos.query(dao, sql.toString(), Sqls.callback.maps());
|
||||
List<NutMap> clubManage = Vi.getClubManage(vi.getClubId());
|
||||
List<String> clubLeader = clubManage.stream().map(v -> v.getString("loginName")).collect(Collectors.toList());
|
||||
localProcessService.createTask(
|
||||
"activity_reimbursement@" + reimbursementId,
|
||||
@@ -188,10 +155,10 @@ public enum ReimbursementToDoHandler {
|
||||
"协会负责人审核",
|
||||
ShiroUtil.getUserId(),
|
||||
clubLeader,
|
||||
"/platform/jf/funds/association",
|
||||
"/platform/jf/funds/association",
|
||||
"/platform/jf/funds/association",
|
||||
"/platform/jf/funds/association"
|
||||
"/platform/jf/reimbursement/clubChairman",
|
||||
"/platform/jf/reimbursement/clubChairman",
|
||||
"/platform/jf/reimbursement/clubChairman",
|
||||
"/platform/jf/reimbursement/clubChairman"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, "协会负责人审核");
|
||||
@@ -216,6 +183,47 @@ public enum ReimbursementToDoHandler {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建校工会负责人任务
|
||||
*/
|
||||
CREATE_SCHOOL_DIRECTOR_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra) {
|
||||
//校工会负责人;暂时只有一人、姜学军:1019911404(工号)
|
||||
localProcessService.createTask(
|
||||
"activity_reimbursement@" + reimbursementId,
|
||||
"activity_reimbursement_school_director_audit",
|
||||
"校工会负责人审核",
|
||||
ShiroUtil.getUserId(),
|
||||
List.of("1019911404"),
|
||||
"/platform/jf/reimbursement/schoolDirector",
|
||||
"/platform/jf/reimbursement/schoolDirector",
|
||||
"/platform/jf/reimbursement/schoolDirector",
|
||||
"/platform/jf/reimbursement/schoolDirector"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, "校工会负责人审核");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 校工会负责人完成
|
||||
*/
|
||||
COMPLETE_SCHOOL_DIRECTOR_TASK() {
|
||||
@Override
|
||||
public void exec(String reimbursementId, NutMap extra) {
|
||||
String nodeName = extra.getString("nodeName");
|
||||
localProcessService.completeTask(
|
||||
"activity_reimbursement_school_director_audit",
|
||||
"activity_reimbursement@" + reimbursementId,
|
||||
ShiroUtil.getUserId(),
|
||||
nodeName
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, nodeName);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建校工会主席任务
|
||||
*/
|
||||
@@ -231,10 +239,10 @@ public enum ReimbursementToDoHandler {
|
||||
"校工会主席审核",
|
||||
ShiroUtil.getUserId(),
|
||||
schoolChairmanLeader,
|
||||
"/platform/jf/funds/accounting",
|
||||
"/platform/jf/funds/accounting",
|
||||
"/platform/jf/funds/accounting",
|
||||
"/platform/jf/funds/accounting"
|
||||
"/platform/jf/reimbursement/schoolChairman",
|
||||
"/platform/jf/reimbursement/schoolChairman",
|
||||
"/platform/jf/reimbursement/schoolChairman",
|
||||
"/platform/jf/reimbursement/schoolChairman"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("activity_reimbursement@" + reimbursementId, "校工会主席审核");
|
||||
@@ -6,7 +6,6 @@ import lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -40,11 +39,10 @@ public class ActivityBx {
|
||||
@Comment("申报(承办)单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String fundsUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("申报(承办)单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String fundsUnitId;
|
||||
@Comment("协会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String clubId;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@@ -71,18 +69,42 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String activity_time;
|
||||
|
||||
@Column
|
||||
@Comment("项目编号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String projectCode;
|
||||
|
||||
@Column
|
||||
@Comment("活动地点")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String venue;
|
||||
|
||||
@Column
|
||||
@Comment("活动地点")
|
||||
@Comment("项目编号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String projectCode;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String startPlannedDate;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String endPlannedDate;
|
||||
@Column
|
||||
@Comment("活动开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String startTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String endTime;
|
||||
|
||||
@Column
|
||||
@Comment("活动名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activity_name;
|
||||
|
||||
@Column
|
||||
@Comment("活动地址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@@ -92,9 +114,9 @@ public class ActivityBx {
|
||||
private String projectTypeCode;
|
||||
|
||||
@Column
|
||||
@Comment("活动名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activity_name;
|
||||
@Comment("活动经费类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String projectJfCode;
|
||||
|
||||
@Column
|
||||
@Comment("活动id (未必有)")
|
||||
@@ -106,11 +128,6 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String activity_content;
|
||||
|
||||
@Column
|
||||
@Comment("报销事由")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String cause;
|
||||
|
||||
@Column
|
||||
@Comment("活动人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@@ -126,36 +143,77 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||
private Double funds_money;
|
||||
|
||||
@Column
|
||||
@Comment("收款人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String payeeId;
|
||||
|
||||
@Column
|
||||
@Comment("支行名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activity_card_name;
|
||||
|
||||
@Column
|
||||
@Comment("报销卡号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activity_card_number;
|
||||
|
||||
@Column
|
||||
@Comment("活动类型(1.基层工会,2.校工会,3.社团)")
|
||||
@ColDefine(type = ColType.INT, width = 2)
|
||||
private Integer activity_type;
|
||||
|
||||
@Column
|
||||
@Comment("申请类型(1.经费申报2.报销申请)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
@ColDefine(type = ColType.INT, width = 2)
|
||||
private Integer apply_type;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String startPlannedDate;
|
||||
@Comment("活动类型(1.基层工会,3.校工会,2.社团)")
|
||||
@ColDefine(type = ColType.INT, width = 10)
|
||||
private Integer activity_type;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String endPlannedDate;
|
||||
|
||||
@Column
|
||||
@Comment("状态id")
|
||||
@Comment("申报状态Id")
|
||||
@ColDefine(type = ColType.INT, width = 8)
|
||||
private String state_id;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("报销状态ID")
|
||||
@ColDefine(type = ColType.INT, width = 8)
|
||||
private Integer reimbursement_state_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销工会审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_union_audit_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销协会审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_club_audit_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销单位书记审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_unit_secretary_audit_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销财务审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_finance_audit_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销校工会负责人审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_school_director_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销校工会主席审核Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String reimbursement_school_chairman_id;
|
||||
|
||||
@Column
|
||||
@Comment("报销申请时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String reimbursement_apply_time;
|
||||
|
||||
@Column
|
||||
@Comment("基层工会主席审核id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -311,26 +369,70 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String files_num;
|
||||
|
||||
@Column
|
||||
@Comment("申报经费预算")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Budget> budgets;
|
||||
@Many(field = "reid")
|
||||
private List<Goods> goods;
|
||||
|
||||
|
||||
@Column
|
||||
@Default("0")
|
||||
@Comment("是否已经扣款")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isDeduction;
|
||||
@Comment("发票")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> billFiles;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> photoFiles;
|
||||
|
||||
@Column
|
||||
@Comment("其他")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> otherFiles;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("新闻稿件说明")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String newsRemark;
|
||||
|
||||
@Column
|
||||
@Comment("图片附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> picFiles;
|
||||
|
||||
@Column
|
||||
@Comment("新闻附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> newsFiles;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("活动经费预算")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Budget> budgets;
|
||||
|
||||
/**
|
||||
* 活动费用预算
|
||||
*/
|
||||
@Data
|
||||
public static class Budget{
|
||||
// 名称
|
||||
private String name;
|
||||
private double unitPrice;
|
||||
private int num;
|
||||
private double total;
|
||||
// 预算费用
|
||||
private Double budgetPrice;
|
||||
// 实际费用
|
||||
private Double actualPrice;
|
||||
// 收款人id
|
||||
private String payeeId;
|
||||
// 收款人姓名
|
||||
private String username;
|
||||
// 收款人工号
|
||||
private String loginName;
|
||||
// 支行名称
|
||||
private String bankName;
|
||||
// 报销卡号
|
||||
private String bankCardNum;
|
||||
// 备注
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@Column
|
||||
@@ -339,5 +441,4 @@ public class ActivityBx {
|
||||
@SQL(db = DB.MYSQL, value = "SELECT CONCAT(YEAR(NOW()),LPAD(RIGHT((SELECT IFNULL(MAX(document_no),0) from activity_bx WHERE LEFT(document_no,4) = YEAR(NOW())),5)+1, 5, 0) )"),
|
||||
})
|
||||
private Integer document_no;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,12 @@ package io.v.nutz.zhgh.jf.service;
|
||||
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.base.service.ViService;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2020/11/13 10:37
|
||||
@@ -15,4 +19,31 @@ public interface ActivityBxService extends ViService<ActivityBx> {
|
||||
void doEdit(ActivityBx activityBx);
|
||||
|
||||
NutMap queryOne(String id);
|
||||
|
||||
void exportByView(String id, OutputStream outputStream);
|
||||
|
||||
void exportByCon(String id, OutputStream outputStream);
|
||||
|
||||
default Sql activityReimbursementSql(){
|
||||
return Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
u.loginname bxr_loginname,
|
||||
u.unionname bxr_unionname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
abs.`name` absName,
|
||||
u.unionname,
|
||||
u.unitname,
|
||||
sc.`name` AS clubName
|
||||
FROM
|
||||
`activity_bx` act
|
||||
LEFT JOIN `user` u ON act.user_id = u.id
|
||||
LEFT JOIN sys_unit un ON u.unitid = un.id
|
||||
LEFT JOIN state s ON act.reimbursement_state_id = s.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectJfCode
|
||||
LEFT JOIN sys_club sc on act.clubId = sc.id
|
||||
$condition
|
||||
""");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
package io.v.nutz.zhgh.jf.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.PictureType;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Html2Text;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.model.Goods;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||
import io.v.nutz.zhgh.jf.model.ActivityFile;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityFileService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -19,6 +33,14 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -34,33 +56,44 @@ public class ActivityBxServiceImpl extends ViServiceImpl<ActivityBx> implements
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private ActivityFileService activityFileService;
|
||||
private Vi vi;
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void doAdd(ActivityBx activityBx) {
|
||||
insertWith(activityBx, "goods");
|
||||
insert(activityBx);
|
||||
activityBx.getGoods().forEach(v -> {
|
||||
v.setReid(activityBx.getId());
|
||||
});
|
||||
this.dao().insert(activityBx.getGoods());
|
||||
// insertWith(activityBx, "goods");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void doEdit(ActivityBx activityBx) {
|
||||
updateWith(activityBx, "goods");
|
||||
|
||||
/*activityBx.getGoods().forEach(v -> {
|
||||
v.setReid(activityBx.getId());
|
||||
});
|
||||
dao().clear(Goods.class,Cnd.where("reid","=",activityBx.getId()));
|
||||
insert(activityBx.getGoods());*/
|
||||
update(activityBx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NutMap queryOne(String id) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
`user`.loginname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
a_p.username as ap_username,
|
||||
a_p.loginname as ap_loginname,
|
||||
payee.username payee_username,
|
||||
payee.loginname payee_loginname,
|
||||
d_c.username dc_username,
|
||||
d_c.loginname dc_loginname,
|
||||
a.username a_username,
|
||||
@@ -71,52 +104,42 @@ public class ActivityBxServiceImpl extends ViServiceImpl<ActivityBx> implements
|
||||
u_c.loginname uc_loginname,
|
||||
ucc_c.username ucc_username,
|
||||
ucc_c.loginname ucc_loginname,
|
||||
absType.`name` projectTypeName,
|
||||
absat.`name` activityTypeName
|
||||
ap_c.username ap_username,
|
||||
ap_c.loginname ap_loginname,
|
||||
dc_s.`data` dc_s,
|
||||
a_s.`data` a_s,
|
||||
ct_s.`data` ct_s,
|
||||
uc_s.`data` uc_s,
|
||||
ucc_s.`data` ucc_s,
|
||||
us_s.`data` us_s,
|
||||
ap_s.`data` ap_s,
|
||||
abs.`name` projectJfName
|
||||
FROM
|
||||
activity_bx act
|
||||
LEFT JOIN sys_user `user` ON act.user_id = `user`.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN sys_user a_p ON a_p.id = act.association_principal_id
|
||||
LEFT JOIN sys_user payee ON payee.id = act.payeeId
|
||||
LEFT JOIN sys_user d_c ON d_c.id = act.division_chairman_name
|
||||
LEFT JOIN sys_user a ON a.id = act.accounting_name
|
||||
LEFT JOIN sys_user c_t ON c_t.id = act.confirm_trade_name
|
||||
LEFT JOIN sys_user u_c ON u_c.id = act.union_cashier_name
|
||||
LEFT JOIN sys_user ucc_c ON ucc_c.id = act.union_chairman_name
|
||||
LEFT JOIN activity_basic_settings absType ON absType.`code` = act.projectTypeCode
|
||||
LEFT JOIN activity_basic_settings absat ON absat.`code` = act.activity_type
|
||||
LEFT JOIN sys_user ap_c ON ap_c.id = act.association_principal_id
|
||||
LEFT JOIN sys_signature dc_s ON dc_s.id = act.division_chairman
|
||||
LEFT JOIN sys_signature a_s ON a_s.id = act.accounting
|
||||
LEFT JOIN sys_signature ct_s ON ct_s.id = act.confirm_trade
|
||||
LEFT JOIN sys_signature uc_s ON uc_s.id = act.union_cashier
|
||||
LEFT JOIN sys_signature ucc_s ON ucc_s.id = act.union_chairman
|
||||
LEFT JOIN sys_signature us_s ON us_s.id = act.user_signature
|
||||
LEFT JOIN sys_signature ap_s ON ap_s.id = act.association_principalSign_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code`=act.projectJfCode
|
||||
WHERE
|
||||
act.id = @id
|
||||
act.id = @id
|
||||
""").setParam("id", id);
|
||||
NutMap record = fetch(sql);
|
||||
|
||||
if(StrUtil.isNotBlank(record.getString("association_principalSign_id"))){
|
||||
record.setv("ap_s", dao().fetch(Sys_signature.class, record.getString("association_principalSign_id")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("division_chairman"))) {
|
||||
record.setv("dc_s", dao().fetch(Sys_signature.class, record.getString("division_chairman")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("accounting"))) {
|
||||
record.setv("a_s", dao().fetch(Sys_signature.class, record.getString("accounting")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("confirm_trade"))) {
|
||||
record.setv("ct_s", dao().fetch(Sys_signature.class, record.getString("confirm_trade")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("union_cashier"))) {
|
||||
record.setv("uc_s", dao().fetch(Sys_signature.class, record.getString("union_cashier")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("union_chairman"))) {
|
||||
record.setv("ucc_s", dao().fetch(Sys_signature.class, record.getString("union_chairman")).getData());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("user_signature"))) {
|
||||
record.setv("us_s", dao().fetch(Sys_signature.class, record.getString("user_signature")).getData());
|
||||
}
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao().execute(sql);
|
||||
NutMap record = (NutMap) sql.getResult();
|
||||
// record.setv("Goods", dao().query("Goods", Cnd.where("reid", "=", record.getString("id"))));
|
||||
|
||||
if (record.size() == 0) {
|
||||
return null;
|
||||
@@ -124,11 +147,195 @@ public class ActivityBxServiceImpl extends ViServiceImpl<ActivityBx> implements
|
||||
|
||||
String activity_id = record.getString("activity_id");
|
||||
if (Strings.isNotBlank(activity_id)) {
|
||||
List<ActivityFile> files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time"));
|
||||
List<ActivityFile> files = dao().query(ActivityFile.class, Cnd.where("activity_id", "=", activity_id).desc("time"));
|
||||
LinkedHashMap<String, List<ActivityFile>> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
record.setv("activity_files", collect);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("reimbursement_club_audit_id"))){
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", record.getString("reimbursement_club_audit_id")));
|
||||
record.setv("reimbursement_club_audit",audit);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("reimbursement_union_audit_id"))){
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", record.getString("reimbursement_union_audit_id")));
|
||||
record.setv("reimbursement_union_audit",audit);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("reimbursement_school_director_id"))){
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", record.getString("reimbursement_school_director_id")));
|
||||
record.setv("reimbursement_school_director",audit);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(record.getString("reimbursement_school_chairman_id"))){
|
||||
Audit audit = dao().fetch(Audit.class, Cnd.where("id", "=", record.getString("reimbursement_school_chairman_id")));
|
||||
record.setv("reimbursement_school_chairman",audit);
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void exportByView(String id, OutputStream outputStream) {
|
||||
NutMap nutMap = queryOne(id);
|
||||
nutMap.setv("activity_content", Html2Text.toPlainText(nutMap.getString("activity_content")));
|
||||
nutMap.setv("apply_time", nutMap.getString("apply_time").substring(0, 10));
|
||||
|
||||
String budgets = nutMap.getString("budgets");
|
||||
List<NutMap> goods = JSONUtil.parseArray(budgets).toList(NutMap.class);
|
||||
|
||||
for (int i = 0; i < goods.size(); i++) {
|
||||
goods.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
if (nutMap.get("dc_s") != null) {
|
||||
nutMap.setv("fgh_sign", getImage((String) nutMap.get("dc_s")));
|
||||
}
|
||||
|
||||
if (nutMap.get("ap_s") != null) {
|
||||
nutMap.setv("ap_sign", getImage((String) nutMap.get("ap_s")));
|
||||
}
|
||||
if (nutMap.get("dc_s") == null && nutMap.get("ap_s") == null && !nutMap.getString("activity_type").equals("40001")) {
|
||||
if (nutMap.get("us_s") != null) {
|
||||
nutMap.setv("us_sign", getImage((String) nutMap.get("us_s")));
|
||||
nutMap.setv("division_chairman_time", nutMap.getString("apply_time"));
|
||||
}
|
||||
}
|
||||
|
||||
if (nutMap.get("a_s") != null) {
|
||||
nutMap.setv("a_sign", getImage((String) nutMap.get("a_s")));
|
||||
}
|
||||
|
||||
if (nutMap.get("a_s") == null && nutMap.getString("activity_type").equals("40001")) {
|
||||
if (nutMap.get("us_s") != null) {
|
||||
nutMap.setv("a_sign", getImage((String) nutMap.get("us_s")));
|
||||
nutMap.setv("accounting_time", nutMap.getString("apply_time"));
|
||||
}
|
||||
}
|
||||
|
||||
if (nutMap.get("ucc_s") != null) {
|
||||
nutMap.setv("xgh_sign", getImage((String) nutMap.get("ucc_s")));
|
||||
}
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("goods", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("goods", goods);
|
||||
map.put("n", nutMap);
|
||||
|
||||
// String fileName = Globals.schoolName + "【" + nutMap.getString("activity_name") + "】申报表";
|
||||
// response.addHeader("Content-Type", "application/octet-stream");
|
||||
// response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
|
||||
try {
|
||||
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds2.docx");
|
||||
assert inputStream != null;
|
||||
XWPFTemplate.compile(inputStream, config).render(map, outputStream);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportByCon(String id, OutputStream outputStream) {
|
||||
try {
|
||||
NutMap one = queryOne(id);
|
||||
if (StrUtil.isNotBlank(one.getString("activity_content"))) {
|
||||
one.setv("activity_content", Html2Text.getContent(one.getString("activity_content")));
|
||||
}
|
||||
one.setv("money_big", Convert.digitToChinese(one.getDouble("activity_money")));
|
||||
one.setv("apply_time", one.getString("apply_time").substring(0, 10));
|
||||
|
||||
String budgets = one.getString("budgets");
|
||||
List<NutMap> goods = JSONUtil.parseArray(budgets).toList(NutMap.class);
|
||||
|
||||
one.put("goods",goods);
|
||||
|
||||
switch (one.getString("activity_type")) {
|
||||
case "40001" -> one.setv("jfName", "校工会");
|
||||
case "40002" -> one.setv("jfName", "分工会");
|
||||
case "40003" -> one.setv("jfName", "协会");
|
||||
}
|
||||
|
||||
double price = one.getDouble("activity_money");
|
||||
int money_int = (int) price;
|
||||
|
||||
BigDecimal priceBigDecimal = new BigDecimal(price);
|
||||
BigDecimal moneyDecimal = priceBigDecimal.subtract(new BigDecimal(money_int));
|
||||
|
||||
one.setv("one", money_int >= 1000000 ? (money_int / 1000000) % 10 : null);
|
||||
one.setv("two", money_int >= 100000 ? (money_int / 100000) % 10 : null);
|
||||
one.setv("three", money_int >= 10000 ? (money_int / 10000) % 10 : null);
|
||||
one.setv("four", money_int >= 1000 ? (money_int / 1000) % 10 : null);
|
||||
one.setv("five", money_int >= 100 ? (money_int / 100) % 10 : null);
|
||||
one.setv("six", money_int >= 10 ? (money_int / 10) % 10 : null);
|
||||
one.setv("seven", money_int >= 1 ? money_int % 10 : null);
|
||||
|
||||
// 提取小数部分的各个位上的数值
|
||||
BigDecimal tenthsPart = moneyDecimal.multiply(BigDecimal.TEN).setScale(0, RoundingMode.DOWN);
|
||||
int tenths = tenthsPart.intValue();
|
||||
BigDecimal hundredthsPart = moneyDecimal.multiply(BigDecimal.valueOf(100)).setScale(0, RoundingMode.DOWN);
|
||||
int hundredths = hundredthsPart.intValue();
|
||||
|
||||
// BigDecimal decimalPart1 = moneyDecimal.divide(new BigDecimal("1"), 1, RoundingMode.HALF_UP);
|
||||
// BigDecimal decimalPart2 = moneyDecimal.divide(new BigDecimal("0.1"), 1, RoundingMode.HALF_UP);
|
||||
one.setv("eight", (tenths % 10));
|
||||
one.setv("nine", (hundredths % 10) + 1);
|
||||
|
||||
|
||||
/*基层工会主席签字*/
|
||||
if (one.get("dc_s") != null) {
|
||||
one.setv("dc_sign", getImage((String) one.get("dc_s")));
|
||||
}
|
||||
|
||||
/*协会负责人*/
|
||||
if (one.get("ap_c") != null) {
|
||||
one.setv("ap_sign", getImage((String) one.get("ap_c")));
|
||||
}
|
||||
|
||||
/*校工会主席签字*/
|
||||
if (one.get("ucc_s") != null) {
|
||||
one.setv("ucc_sign", getImage((String) one.get("ucc_s")));
|
||||
}
|
||||
|
||||
/*会计*/
|
||||
if (one.get("a_s") != null) {
|
||||
one.setv("a_sign", getImage((String) one.get("a_s")));
|
||||
}
|
||||
// String fileName = Globals.schoolName + "【" + one.getString("activity_name") + "】报销凭证";
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("goods", policy).build();
|
||||
|
||||
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds3.docx");
|
||||
// response.addHeader("Content-Type", "application/octet-stream");
|
||||
// response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
assert inputStream != null;
|
||||
XWPFTemplate.compile(inputStream, config).render(one, outputStream);
|
||||
// inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private PictureRenderData getImage(String base64) {
|
||||
try {
|
||||
if (base64.startsWith("data")) {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(70, 30, ".png", bytes);
|
||||
} else {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ftpService.download(base64, os);
|
||||
os.close();
|
||||
return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("转换失败------");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
nutz.application.name=zhgh_zufe
|
||||
nutz.application.name=zhgh_hmc
|
||||
server.port=80
|
||||
server.host=0.0.0.0
|
||||
jetty.contextPath=/
|
||||
@@ -11,7 +11,7 @@ jetty.page.500=/error/500.html
|
||||
#结合ftp使用,或用nginx代理ftp路径
|
||||
jetty.staticPath=D://files
|
||||
#开发模式静态资源
|
||||
jetty.staticPathLocal=G:/zhgh/zhgh_zufe/src/main/resources/static
|
||||
jetty.staticPathLocal=G:/zhgh/zhgh_hmc/src/main/resources/static
|
||||
nutz.mvc.ignore=^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg)$
|
||||
nutz.mvc.exclusions=/favicon/*,/assets/*,/druid/*,/upload/*
|
||||
ftp.enabled=true
|
||||
@@ -34,7 +34,7 @@ redis.pool.minIdle=10
|
||||
#redis.mode=cluster
|
||||
redis.mode=normal
|
||||
#redis.nodes=192.168.6.31:6377,192.168.6.31:6378,192.168.6.28:6377,192.168.6.28:6378,192.168.6.34:6377,192.168.6.34:6378
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/zhgh_zufe?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
jdbc.url=jdbc:mysql://127.0.0.1:3306/zhgh_hmc?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
#jdbc.driver=dm.jdbc.driver.DmDriver
|
||||
#jdbc.url=jdbc:dm://127.0.0.1:5236?databaseProductName=dm mysql&compatibleMode=mysql
|
||||
jdbc.username=root
|
||||
@@ -75,7 +75,8 @@ shiro.url.login=/platform
|
||||
shiro.url.logout_redirect=/platform
|
||||
shiro.url.unauth=/platform
|
||||
#开发时设置本地路径,便于调试
|
||||
beetl.RESOURCE.rootLocal=G:/zhgh/zhgh_zufe/src/main/resources/views/
|
||||
beetl.RESOURCE.rootLocal=G:/zhgh/zhgh_hmc/src/main/resources/views/
|
||||
beetl.RESOURCE_LOADER=io.v.nutz.web.commons.ext.beetl.BeetlCustomResourceLoader
|
||||
beetl.RESOURCE.root=views/
|
||||
beetl.DELIMITER_STATEMENT_START=<!--#
|
||||
beetl.DELIMITER_STATEMENT_END=#-->
|
||||
|
||||
@@ -1,143 +1,316 @@
|
||||
<template>
|
||||
<div class="activity-bx-info">
|
||||
<el-tabs tab-position="top" v-model="activeName">
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="申请信息" name="1">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="申请人姓名">{{ viewData.user_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ viewData.apply_time }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动主体类型">{{ viewData.activityTypeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动项目类型" :span="2">{{ viewData.projectTypeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动名称" :span="3">{{viewData.activity_name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编号" :span="3">{{viewData.projectCode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申报(承办)单位" :span="3">{{viewData.fundsUnitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动计划时间" :span="3">
|
||||
{{viewData.startPlannedDate}}至{{viewData.endPlannedDate}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地址" :span="3">{{viewData.address}}</el-descriptions-item>
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>申请人</th>
|
||||
<td>{{ viewData.user_name }}( {{ viewData.mobile }})</td>
|
||||
<th>申请时间</th>
|
||||
<td>{{ viewData.apply_time }}</td>
|
||||
<th>申请类型</th>
|
||||
<td>{{ viewData.apply_type == 1 ? "经费申请" : "报销申请" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动时间</th>
|
||||
<td>
|
||||
<span v-if="viewData.startTime">{{ viewData.startTime }}——{{ viewData.endTime }}</span>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
<th>活动计划时间</th>
|
||||
<td>{{ viewData.startPlannedDate }}——{{ viewData.endPlannedDate }}</td>
|
||||
<th>项目编号</th>
|
||||
<td>{{ viewData.projectCode }}</td>
|
||||
</tr>
|
||||
|
||||
<el-descriptions-item label="活动方案及简介" :span="3">
|
||||
<div v-html="viewData.activity_content"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动费用预算表" :span="3">
|
||||
<el-table :data="viewData.budgets" border size="mini" style="width: 100%">
|
||||
<el-table-column type="index" width="100" label="序号"></el-table-column>
|
||||
<el-table-column prop="name" label="费用项目名称"></el-table-column>
|
||||
<el-table-column prop="unitPrice" label="单价(元)"></el-table-column>
|
||||
<el-table-column prop="num" label="数量"></el-table-column>
|
||||
<el-table-column prop="total" label="合计(元)">
|
||||
<template slot-scope="{row}">
|
||||
{{ (row.unitPrice * row.num).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image v-if="viewData.us_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.us_s"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<tr>
|
||||
<th>活动经费类型</th>
|
||||
<td>{{ viewData.projectJfName }}</td>
|
||||
<th>申请(承办)单位/协会</th>
|
||||
<td>{{ viewData.fundsUnitName }}</td>
|
||||
<th>活动人数</th>
|
||||
<td>{{ viewData.activity_number || "暂无" }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>预算费用</th>
|
||||
<td>{{ viewData.funds_money || "暂无" }}</td>
|
||||
<th>实际费用</th>
|
||||
<td>{{ viewData.activity_money || "暂无" }}</td>
|
||||
<th>活动地点</th>
|
||||
<td>{{ viewData.address }}</td>
|
||||
</tr>
|
||||
|
||||
<!-- <tr>
|
||||
<th>收款人</th>
|
||||
<td>{{ viewData.payee_username || "暂无" }}({{ viewData.payee_loginname }})</td>
|
||||
<th>支行名称</th>
|
||||
<td>{{ viewData.activity_card_name || "暂无" }}</td>
|
||||
<th>报销卡号</th>
|
||||
<td>{{ viewData.activity_card_number || "暂无" }}</td>
|
||||
</tr>-->
|
||||
|
||||
<tr>
|
||||
<th>{{ viewData.apply_type == 1 ? '活动方案及简介' : '活动内容' }}</th>
|
||||
<td colspan="5">
|
||||
<div v-html="viewData.activity_content"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>附件</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length" :files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>签字</th>
|
||||
<td colspan="5">
|
||||
<el-image v-if="viewData.us_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.us_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="分工会审核信息" name="2" v-if="viewData.division_chairman_name">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="审核人">{{ viewData.dc_username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.division_chairman_time }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动申请费用" :span="2">{{ viewData.funds_money }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="2">{{ viewData.division_chairman_idea }}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-tab-pane label="费用及报销信息" name="2">
|
||||
<el-divider content-position="left" style="margin-top: 0 !important;"><span style="color: #3ea1ec;">活动预算费用</span></el-divider>
|
||||
<el-table :data="viewData.budgets" border size="mini" style="width: 100%">
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="费用项目名称" align="center"
|
||||
header-align="center">
|
||||
<!-- <template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="费用项目名称" readonly v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="budgetPrice" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<!-- <template slot-scope="{row}">
|
||||
<el-input-number placeholder="预算费用" disabled
|
||||
:precision="2" v-model="row.budgetPrice"></el-input-number>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<template v-if="viewData.reimbursement_state_id">
|
||||
<el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center">
|
||||
<!-- <template slot-scope="{row}">
|
||||
<el-input-number disabled placeholder="实际费用" :precision="2" v-model="row.actualprice"></el-input-number>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="payeeId" label="收款人" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ row.username }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bankName" label="支行名称" align="center"
|
||||
header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="bankCardNum" label="报销卡号" align="center"
|
||||
header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center"
|
||||
header-align="center">
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<div v-if="viewData.reimbursement_state_id != null && viewData.reimbursement_state_id !== ''">
|
||||
<el-divider content-position="left" class="dia"><span
|
||||
style="color: #3ea1ec;margin-top: 20px">其他报销附件</span></el-divider>
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>发票:</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.billFiles&&viewData.billFiles.length" :files="viewData.billFiles"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动报道照片/总结/链接:</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.photoFiles&&viewData.photoFiles.length" :files="viewData.photoFiles"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>奖品/纪念品/服装/道具等活动人员名单:</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.otherFiles&&viewData.otherFiles.length" :files="viewData.otherFiles"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
<!-- <el-divider content-position="left" class="dia"><span style="color: #3ea1ec;margin-top: 20px">新闻信息</span></el-divider>
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>新闻稿件说明:</th>
|
||||
<td colspan="5">
|
||||
{{ viewData.newsRemark }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>新闻图片:</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.picFiles&&viewData.picFiles.length" :files="viewData.picFiles"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>新闻附件:</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.newsFiles&&viewData.newsFiles.length" :files="viewData.newsFiles"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</border-table>-->
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="基层工会审核信息(申请)" name="3" v-if="viewData.division_chairman_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.dc_username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.division_chairman_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{
|
||||
viewData.division_chairman_idea ? viewData.division_chairman_idea : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.dc_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.dc_s"
|
||||
:src="CREATE_PREVIEW_URL(viewData.dc_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="校工会负责人审核信息(申请)" name="4" v-if="viewData.accounting_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
<el-tab-pane label="协会审核信息" name="2" v-if="viewData.association_principal_id">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="审核人">{{ viewData.ap_username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.association_principal_time }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动申请费用" :span="2">{{ viewData.funds_money }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="2">{{ viewData.association_principal_idea }}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-image v-if="viewData.ap_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.ap_s"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<!--<el-form-item label="核批信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>-->
|
||||
|
||||
<el-tab-pane label="校工会副主席审核信息" name="3" v-if="viewData.accounting_name">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="审核人">{{ viewData.a_username }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.accounting_time }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="2">{{ viewData.accounting_idea }}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.a_username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.accounting_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.accounting_idea ? viewData.accounting_idea : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.a_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.a_s"
|
||||
:src="CREATE_PREVIEW_URL(viewData.a_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="校工会副主席审核信息" name="4" v-if="hasPane(4)&&viewData.confirm_trade_name">-->
|
||||
<!-- <el-descriptions :column="2" border>-->
|
||||
<!-- <el-descriptions-item label="审核人">{{ viewData.ct_username }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="审核时间">{{ viewData.confirm_trade_time }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="审核意见" :span="2">{{ viewData.confirm_trade_idea }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="签字" :span="2">-->
|
||||
<!-- <el-image v-if="viewData.ct_s"-->
|
||||
<!-- style="width: 300px; height: 100px"-->
|
||||
<!-- :src="viewData.ct_s"-->
|
||||
<!-- fit="contain"></el-image>-->
|
||||
<!-- <span v-else>暂无</span>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- </el-descriptions>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="校工会主席审核信息" name="5" v-if="hasPane(5)&&viewData.union_chairman_name">-->
|
||||
<!-- <el-form label-width="130px" style="padding: 20px 0">-->
|
||||
<!-- <el-row gutter="20">-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="审核人员:">-->
|
||||
<!-- {{ viewData.ucc_username }}-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="审核时间:">-->
|
||||
<!-- {{ viewData.union_chairman_time }}-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-form-item label="审核意见:">-->
|
||||
<!-- <div class="textarea-div">-->
|
||||
<!-- {{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="签  字:">-->
|
||||
<!-- <el-image v-if="viewData.ucc_s"-->
|
||||
<!-- style="width: 300px; height: 100px"-->
|
||||
<!-- :src="viewData.ucc_s"-->
|
||||
<!-- fit="contain"></el-image>-->
|
||||
<!-- <span v-else>暂无</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<el-tab-pane label="财务扣款信息" name="6" v-if="viewData.union_cashier_name">
|
||||
<el-tab-pane label="校工会副主席审核信息" name="5" v-if="viewData.confirm_trade_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
<!-- <el-form-item label="核批信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>-->
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.ct_username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.confirm_trade_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ct_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.ct_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="校工会主席审核信息(申请)" name="6" v-if="viewData.union_chairman_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.ucc_username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.union_chairman_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ucc_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.ucc_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="校工会出纳审核信息(申请)" name="6" v-if="viewData.union_cashier_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
<!-- <el-form-item label="核批信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>-->
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
@@ -151,19 +324,144 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">
|
||||
{{ viewData.union_cashier_idea ? viewData.union_cashier_idea : '暂无' }}
|
||||
</div>
|
||||
<div class="textarea-div">{{ viewData.union_cashier_idea ? viewData.union_cashier_idea : '暂无' }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.uc_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.uc_s"
|
||||
:src="CREATE_PREVIEW_URL(viewData.uc_s)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label="协会负责人审核信息(报销)" name="7"
|
||||
v-if="viewData.reimbursement_club_audit">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.reimbursement_club_audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.reimbursement_club_audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{
|
||||
viewData.reimbursement_club_audit.auditOpinion ? viewData.reimbursement_club_audit.auditOpinion : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.reimbursement_club_audit.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.reimbursement_club_audit.auditSign)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="基层工会主席审核信息(报销)" name="8"
|
||||
v-if="viewData.reimbursement_union_audit">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.reimbursement_union_audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.reimbursement_union_audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{
|
||||
viewData.reimbursement_union_audit.auditOpinion ? viewData.reimbursement_union_audit.auditOpinion : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.reimbursement_union_audit.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.reimbursement_union_audit.auditSign)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
<el-tab-pane label="校工会负责人审核信息(报销)" name="9"
|
||||
v-if="viewData.reimbursement_school_director">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.reimbursement_school_director.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.reimbursement_school_director.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{
|
||||
viewData.reimbursement_school_director.auditOpinion ? viewData.reimbursement_school_director.auditOpinion : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.reimbursement_school_director.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.reimbursement_school_director.auditSign)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="校工会主席审核信息(报销)" name="10"
|
||||
v-if="viewData.reimbursement_school_chairman">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.reimbursement_school_chairman.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.reimbursement_school_chairman.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{
|
||||
viewData.reimbursement_school_chairman.auditOpinion ? viewData.reimbursement_school_chairman.auditOpinion : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.reimbursement_school_chairman.auditSign"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="CREATE_PREVIEW_URL(viewData.reimbursement_school_chairman.auditSign)"
|
||||
fit="contain"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="handle" :label="label" name="999">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
@@ -192,7 +490,8 @@ module.exports = {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {
|
||||
goods: []
|
||||
goods: [],
|
||||
budgets: []
|
||||
},
|
||||
loading: true,
|
||||
}
|
||||
@@ -208,27 +507,40 @@ module.exports = {
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async getActInfo(id) {
|
||||
this.loading = true
|
||||
const {data, code, msg} = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
if (code === 0) {
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.viewData.billFiles = []
|
||||
this.viewData.photoFiles = []
|
||||
this.viewData.otherFiles = []
|
||||
this.viewData.picFiles = []
|
||||
this.viewData.newsFiles = []
|
||||
this.viewData.files = []
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
if (data && data.budgets) {
|
||||
data.budgets = JSON.parse(data.budgets)
|
||||
}
|
||||
if (data && data.files) {
|
||||
data.files = JSON.parse(data.files)
|
||||
}
|
||||
this.viewData = data
|
||||
if (data.files && data.files.length > 0) this.viewData.files = JSON.parse(data.files)
|
||||
if (data.billFiles && data.billFiles.length > 0) this.viewData.billFiles = JSON.parse(data.billFiles)
|
||||
if (data.photoFiles && data.photoFiles.length > 0) this.viewData.photoFiles = JSON.parse(data.photoFiles)
|
||||
if (data.otherFiles && data.otherFiles.length > 0) this.viewData.otherFiles = JSON.parse(data.otherFiles)
|
||||
if (data.picFiles && data.picFiles.length > 0) this.viewData.picFiles = JSON.parse(data.picFiles)
|
||||
if (data.newsFiles && data.newsFiles.length > 0) this.viewData.newsFiles = JSON.parse(data.newsFiles)
|
||||
if (data.budgets && data.budgets.length > 0) this.viewData.budgets = JSON.parse(data.budgets)
|
||||
// this.viewData.goods = data.Goods
|
||||
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$message.error(msg)
|
||||
this.$message({
|
||||
message: "获取信息失败",
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
<style>
|
||||
.activity-bx-info .el-timeline {
|
||||
padding-left: 0;
|
||||
}
|
||||
@@ -238,9 +550,9 @@ module.exports = {
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.el-descriptions table {
|
||||
table-layout: fixed;
|
||||
.el-divider--horizontal {
|
||||
margin-top: 30px !important;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,405 @@
|
||||
<template>
|
||||
<div>
|
||||
<template name="活动申报及报销信息">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
活动申报及报销信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-collapse v-model="activeNames" :border="false" accordion>
|
||||
<van-collapse-item title="活动基本信息" name="1">
|
||||
<van-form readonly input-align="right">
|
||||
<van-field readonly :value="viewData.user_name" label="申请人姓名"></van-field>
|
||||
<van-field readonly :value="viewData.apply_time" label="申请时间"></van-field>
|
||||
<van-field readonly :value="viewData.mobile" label="联系方式"></van-field>
|
||||
<!-- <van-field readonly :value="viewData.activityTypeName" label="活动主体类型"></van-field>-->
|
||||
<van-field readonly :value="viewData.projectJfName" label="活动经费类型"></van-field>
|
||||
<van-field readonly :value="viewData.activity_name" label="活动名称"></van-field>
|
||||
<van-field readonly :value="viewData.projectCode" label="项目编号"></van-field>
|
||||
<van-field readonly :value="viewData.fundsUnitName" label="申报(承办)单位"></van-field>
|
||||
<van-field readonly :value="viewData.startPlannedDate" label="活动计划开始时间"></van-field>
|
||||
<van-field readonly :value="viewData.endPlannedDate" label="活动计划结束时间"></van-field>
|
||||
<van-field readonly :value="viewData.funds_money" label="预算费用"></van-field>
|
||||
<van-field readonly :value="viewData.activity_money" label="实际费用"></van-field>
|
||||
<van-field readonly :value="viewData.address" label="活动地址"></van-field>
|
||||
<van-field readonly :value="viewData.payee_username + '(' + viewData.payee_loginname + ')'"
|
||||
label="收款人"></van-field>
|
||||
<van-field readonly :value="viewData.activity_card_name" label="支行名称"></van-field>
|
||||
<van-field readonly :value="viewData.activity_card_number" label="报销卡号"></van-field>
|
||||
<van-field readonly label="活动方案及简介">
|
||||
<template #input>
|
||||
<div v-html="viewData.activity_content"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field class="flex-direction-column">
|
||||
<template #label>
|
||||
<div class="mb10">活动费用预算表</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>费用项目名称</th>
|
||||
<th>预算费用</th>
|
||||
<template v-if="viewData.reimbursement_state_id">
|
||||
<th>实际费用</th>
|
||||
<th>收款人</th>
|
||||
<th>支行名称</th>
|
||||
<th>报销卡号</th>
|
||||
<th>备注</th>
|
||||
</template>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in viewData.budgets" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.budgetPrice }}</td>
|
||||
<template v-if="viewData.reimbursement_state_id">
|
||||
<td>{{ item.actualPrice }}</td>
|
||||
<td>{{row.username + '(' + row.loginName + ')'}}</td>
|
||||
<td>{{ item.bankName }}</td>
|
||||
<td>{{ item.bankCardNum }}</td>
|
||||
<td>{{ item.remark }}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-panel>
|
||||
<template #header>
|
||||
<div class="van-cell van-panel__header">
|
||||
<div class="van-cell__title">
|
||||
附件
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div style="padding: 5px 16px">
|
||||
<vant-file-upload v-if="viewData.files&&viewData.files.length>0" :del="false"
|
||||
:files.sync="viewData.files"
|
||||
view></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</div>
|
||||
</van-panel>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200"
|
||||
height="100"
|
||||
:src="viewData.us_s"
|
||||
v-if="viewData.us_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-collapse-item>
|
||||
|
||||
<template v-if="show">
|
||||
<van-collapse-item title="报销附件" name="2"
|
||||
v-if="viewData.reimbursement_state_id != null && viewData.reimbursement_state_id !== ''">
|
||||
<van-field label="发票"
|
||||
style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">发票</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="viewData.billFiles" view :del="false"
|
||||
v-if="viewData.billFiles&&viewData.billFiles.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="活动报道照片/总结/链接"
|
||||
style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">活动报道照片/总结/链接</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="viewData.photoFiles" view :del="false"
|
||||
v-if="viewData.photoFiles&&viewData.photoFiles.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="奖品/纪念品/服装/道具等活动人员名单"
|
||||
style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">奖品/纪念品/服装/道具等活动人员名单</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="viewData.otherFiles" view :del="false"
|
||||
v-if="viewData.otherFiles&&viewData.otherFiles.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-collapse-item>
|
||||
|
||||
<van-collapse-item title="申报审核信息" name="3"
|
||||
v-if="viewData.division_chairman_name || viewData.accounting_name || viewData.union_chairman_name">
|
||||
<!-- 申报,基层工会主席审核 -->
|
||||
<template v-if="viewData.division_chairman_name">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基层工会审核信息(申报)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.dc_username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.division_chairman_time" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.division_chairman_idea ? viewData.division_chairman_idea : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.dc_s"
|
||||
v-if="viewData.dc_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<!-- 申报,校工会负责人审核 -->
|
||||
<template v-if="viewData.accounting_name">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会负责人审核信息(申报)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.a_username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.accounting_time" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.accounting_idea ? viewData.accounting_idea : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.a_s"
|
||||
v-if="viewData.a_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<!-- 申报,校工会主席审核 -->
|
||||
<template v-if="viewData.union_cashier_name">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会出纳审核信息(申报)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.uc_username" left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.union_cashier_time" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.union_cashier_idea ? viewData.union_cashier_idea : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.uc_s"
|
||||
v-if="viewData.uc_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</van-collapse-item>
|
||||
|
||||
<van-collapse-item title="报销审核信息" name="4"
|
||||
v-if="viewData.division_chairman_name || viewData.accounting_name || viewData.union_chairman_name">
|
||||
<!-- 报销,协会负责人审核 -->
|
||||
<template v-if="viewData.reimbursement_club_audit">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
协会负责人审核信息(报销)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.reimbursement_club_audit.username" left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.reimbursement_club_audit.auditTime" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.reimbursement_club_audit.auditOpinion ? viewData.reimbursement_club_audit.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.reimbursement_club_audit.auditSign"
|
||||
v-if="viewData.reimbursement_club_audit.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<!-- 报销,基层工会主席审核 -->
|
||||
<template v-if="viewData.reimbursement_union_audit">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基层工会主席审核信息(报销)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.reimbursement_union_audit.username" left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.reimbursement_union_audit.auditTime" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.reimbursement_union_audit.auditOpinion ? viewData.reimbursement_union_audit.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.reimbursement_union_audit.auditSign"
|
||||
v-if="viewData.reimbursement_union_audit.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<!-- 报销,校工会负责人审核 -->
|
||||
<template v-if="viewData.reimbursement_school_director">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会负责人审核信息(报销)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.reimbursement_school_director.username"
|
||||
left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.reimbursement_school_director.auditTime"
|
||||
left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.reimbursement_school_director.auditOpinion ? viewData.reimbursement_school_director.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.reimbursement_school_director.auditSign"
|
||||
v-if="viewData.reimbursement_school_director.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<!-- 报销,校工会主席审核 -->
|
||||
<template v-if="viewData.reimbursement_school_chairman">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核信息(报销)
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group class="mt10">
|
||||
<div style="padding-left: 16px">
|
||||
<van-field label="审核人员" :value="viewData.reimbursement_school_chairman.username"
|
||||
left-icon="contact" readonly></van-field>
|
||||
<van-field label="审核时间" :value="viewData.reimbursement_school_chairman.auditTime"
|
||||
left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
<van-field label="审核意见" left-icon="chat-o"
|
||||
:value="viewData.reimbursement_school_chairman.auditOpinion ? viewData.reimbursement_school_chairman.auditOpinion : '暂无'"
|
||||
readonly></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.reimbursement_school_chairman.auditSign"
|
||||
v-if="viewData.reimbursement_school_chairman.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</van-collapse-item>
|
||||
</template>
|
||||
</van-collapse>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<template v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "info",
|
||||
props: {
|
||||
handle: { type: Boolean, default: false },
|
||||
title: { type: String, default: '审核' },
|
||||
show: { type: Boolean, default: true }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeNames: "1",
|
||||
viewData: {
|
||||
goods: []
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
async getActInfo(id) {
|
||||
this.loading = true
|
||||
const {data, code, msg} = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.viewData.billFiles = []
|
||||
this.viewData.photoFiles = []
|
||||
this.viewData.otherFiles = []
|
||||
this.viewData.picFiles = []
|
||||
this.viewData.newsFiles = []
|
||||
this.viewData.files = []
|
||||
this.viewData = data
|
||||
if (data.files && data.files.length > 0) this.viewData.files = JSON.parse(data.files)
|
||||
if (data.billFiles && data.billFiles.length > 0) this.viewData.billFiles = JSON.parse(data.billFiles)
|
||||
if (data.photoFiles && data.photoFiles.length > 0) this.viewData.photoFiles = JSON.parse(data.photoFiles)
|
||||
if (data.otherFiles && data.otherFiles.length > 0) this.viewData.otherFiles = JSON.parse(data.otherFiles)
|
||||
if (data.picFiles && data.picFiles.length > 0) this.viewData.picFiles = JSON.parse(data.picFiles)
|
||||
if (data.newsFiles && data.newsFiles.length > 0) this.viewData.newsFiles = JSON.parse(data.newsFiles)
|
||||
this.viewData.goods = data.Goods
|
||||
|
||||
} else {
|
||||
this.viewData = {
|
||||
goods: []
|
||||
}
|
||||
this.$message({
|
||||
message: "获取信息失败",
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.van-cell-group__title .van-sidebar-item {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.flex-direction-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-direction-column .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,564 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写申报信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right" @submit="onSubmit">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly v-model="formData.user_name" name="user_name" label="申请人姓名"></van-field>
|
||||
<van-field readonly v-model="formData.apply_time" name="apply_time" label="申请时间"></van-field>
|
||||
<van-field readonly v-model="formData.mobile" name="mobile" label="联系方式"></van-field>
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="activity_type"
|
||||
:value="formData.activity_type_name"
|
||||
required
|
||||
label="活动主体类型"
|
||||
@click="showActivityTypePicker = true"
|
||||
placeholder="点击选择活动主体类型"
|
||||
:rules="[{ required:true, message: '请选择活动主体类型'}]"></van-field>
|
||||
<van-popup v-model:show="showActivityTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="activityTypeColumns"
|
||||
@confirm="onActivityTypeConfirm"
|
||||
@cancel="showActivityTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--<van-field readonly
|
||||
clickable
|
||||
name="projectTypeCode"
|
||||
:value="formData.projectTypeCodeName"
|
||||
required
|
||||
label="活动项目类型"
|
||||
@click="showActivityProjectTypePicker = true"
|
||||
placeholder="点击选择活动项目类型"
|
||||
:rules="[{ required:true, message: '请选择活动项目类型'}]"></van-field>
|
||||
<van-popup v-model:show="showActivityProjectTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="activityProjectTypeColumns"
|
||||
@confirm="onActivityProjectTypeConfirm"
|
||||
@cancel="showActivityProjectTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>-->
|
||||
<van-field readonly
|
||||
v-model="formData.projectJfCodeName"
|
||||
name="projectJfCodeName"
|
||||
label="活动经费类型"
|
||||
placeholder="请选择活动主体类型后自动展示"
|
||||
required></van-field>
|
||||
|
||||
<van-field v-model="formData.activity_name"
|
||||
name="activity_name"
|
||||
label="活动名称"
|
||||
placeholder="请输入活动名称"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入活动名称' }]"></van-field>
|
||||
<van-field readonly
|
||||
v-model="formData.projectCode"
|
||||
name="projectCode"
|
||||
label="项目编号"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="选择活动类型自动生成"></van-field>
|
||||
|
||||
<template v-if="formData.activity_type!=40003">
|
||||
<van-field v-model="formData.fundsUnitName"
|
||||
name="fundsUnitName"
|
||||
label="申报(承办)单位"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="请输入申报(承办)单位"></van-field>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="fundsUnitName"
|
||||
:value="formData.fundsUnitName"
|
||||
required
|
||||
label="申报协会"
|
||||
@click="showFundsUnitNamePicker = true"
|
||||
placeholder="请选择申报协会"
|
||||
:rules="[{ required:true, message: '请选择申报协会'}]"></van-field>
|
||||
<van-popup v-model:show="showFundsUnitNamePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="fundsUnitNameColumns"
|
||||
@confirm="onFundsUnitNameConfirm"
|
||||
@cancel="showFundsUnitNamePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写活动计划开始时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="startPlannedDate"
|
||||
:value="formData.startPlannedDate"
|
||||
label="活动计划开始时间"
|
||||
placeholder="点击选择活动计划开始时间"
|
||||
@click="showStartPlannedDatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showStartPlannedDatePicker" position="bottom" round>
|
||||
<van-datetime-picker
|
||||
v-model="formData.startPlannedDate"
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onStartPlannedDateConfirm"
|
||||
@cancel="showStartPlannedDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写活动计划结束时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="endPlannedDate"
|
||||
:value="formData.endPlannedDate"
|
||||
label="活动计划结束时间"
|
||||
placeholder="点击选择活动计划结束时间"
|
||||
@click="showEndPlannedDatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showEndPlannedDatePicker" position="bottom" round>
|
||||
<van-datetime-picker
|
||||
v-model="formData.endPlannedDate"
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onEndPlannedDateConfirm"
|
||||
@cancel="showEndPlannedDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.address"
|
||||
name="address"
|
||||
label="活动地址"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写活动地址' }]"
|
||||
placeholder="请输入活动地址"></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.funds_money"
|
||||
readonly
|
||||
name="funds_money"
|
||||
label="预算费用"
|
||||
placeholder="填写活动费用表后自动计算"></van-field>
|
||||
<van-field v-model="formData.activity_money"
|
||||
readonly
|
||||
name="activity_money"
|
||||
label="实际费用"
|
||||
placeholder="填写活动费用表后自动计算"></van-field>
|
||||
|
||||
<!-- 收款人 -->
|
||||
<van-field @input="userRemoteMethod" name="payeeName"
|
||||
required
|
||||
v-model="formData.payeeName" label="收款人" placeholder="请选择收款人"
|
||||
:rules="[{ required: true, message: '请选择收款人' }]"></van-field>
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field v-model="formData.activity_card_name"
|
||||
name="activity_card_name"
|
||||
label="支行名称"
|
||||
placeholder="请输入支行名称"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入支行名称' }]"></van-field>
|
||||
<van-field v-model="formData.activity_card_number"
|
||||
name="activity_card_number"
|
||||
label="报销卡号"
|
||||
placeholder="请输入报销卡号"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入报销卡号' }]"></van-field>
|
||||
|
||||
|
||||
<van-field v-model="formData.activity_content"
|
||||
rows="2"
|
||||
autosize
|
||||
type="textarea"
|
||||
name="activity_content"
|
||||
label="活动方案及简介"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入活动方案及简介' }]"
|
||||
placeholder="请输入活动方案及简介"></van-field>
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">活动费用预算表</span>
|
||||
<div>
|
||||
<van-tag @click="delBudgets" size="large" type="primary" color="lightgrey">删除费用</van-tag>
|
||||
<van-tag @click="addBudgets" size="large" type="primary" color="#1867b0">添加费用</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.budgets.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.budgets" :title="'费用' + (index + 1)">
|
||||
<van-field label="物品名称" name="name" placeholder="请填写物品名称" v-model="item.name"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field label="预算费用" name="budgetPrice" placeholder="请填写预算费用" v-model="item.budgetPrice"
|
||||
@input="blur1" type="digit" :rules="[{ required: true }]"></van-field>
|
||||
<!--<van-field label="实际费用" name="actualPrice" placeholder="请填写实际费用" v-model="item.actualPrice"
|
||||
@input="blur2" type="digit" :rules="[{ required: true }]"></van-field>-->
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-cell-group inset style="margin: 0">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
minDate: new Date(new Date().getFullYear(), 0, 1),
|
||||
maxDate: new Date(2050, 10, 1),
|
||||
currentDate: new Date(),
|
||||
|
||||
showActivityTypePicker: false,
|
||||
activityTypeColumns: [],
|
||||
|
||||
showActivityProjectTypePicker: false,
|
||||
activityProjectTypeColumns: [],
|
||||
|
||||
showFundsUnitNamePicker: false,
|
||||
fundsUnitNameColumns: [],
|
||||
|
||||
showStartPlannedDatePicker: false,
|
||||
|
||||
showEndPlannedDatePicker: false,
|
||||
|
||||
formData: {
|
||||
goods:[{name: '', price: '', actualPrice: ''},],
|
||||
activity_card_name: '',
|
||||
activity_card_number: '',
|
||||
},
|
||||
|
||||
id: null,
|
||||
projectJfType: [],
|
||||
active: '',
|
||||
userList: [],
|
||||
sheetShow: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
blur1() {
|
||||
let num = 0
|
||||
this.formData.budgets.forEach(v => {
|
||||
num += parseFloat(v.budgetPrice)
|
||||
})
|
||||
this.$set(this.formData, "funds_money", num)
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'payeeId', u.id)
|
||||
this.$set(this.formData, 'payeeName', u.name)
|
||||
this.getCardNumberByPayeeId()
|
||||
this.sheetShow = false
|
||||
},
|
||||
async queryUser(query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
return data
|
||||
},
|
||||
async getCardNumberByPayeeId() {
|
||||
const resp = await $.get('/platform/jf/Funds/apply/getCardNumberByPayeeId', {payeeId: this.formData.payeeId})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data) {
|
||||
this.$set(this.formData, 'activity_card_number', resp.data[0].activity_card_number)
|
||||
this.$set(this.formData, 'activity_card_name', resp.data[0].activity_card_name)
|
||||
// this.formData.activity_card_number = resp.data[0].activity_card_number
|
||||
// this.formData.activity_card_name = resp.data[0].activity_card_name
|
||||
}
|
||||
}
|
||||
},
|
||||
addBudgets() {
|
||||
this.formData.budgets.push({name: '', price: '', actualPrice: ''})
|
||||
},
|
||||
delBudgets() {
|
||||
this.formData.budgets.splice(this.active, 1)
|
||||
},
|
||||
onActivityTypeConfirm(val) {
|
||||
this.showActivityTypePicker = false
|
||||
this.formData.activity_type = val.value
|
||||
this.formData.activity_type_name = val.text
|
||||
this.getProjectCodeChange()
|
||||
},
|
||||
onActivityProjectTypeConfirm(val) {
|
||||
this.showActivityProjectTypePicker = false
|
||||
this.formData.projectTypeCode = val.value
|
||||
this.formData.projectTypeCodeName = val.text
|
||||
},
|
||||
onFundsUnitNameConfirm(val) {
|
||||
this.formData.fundsUnitName = val.text
|
||||
this.formData.clubId = val.value
|
||||
this.showFundsUnitNamePicker = false
|
||||
},
|
||||
onStartPlannedDateConfirm(val) {
|
||||
console.log(val)
|
||||
this.formData.startPlannedDate = moment(val).format("YYYY-MM-DD")
|
||||
this.showStartPlannedDatePicker = false
|
||||
},
|
||||
onEndPlannedDateConfirm(val) {
|
||||
console.log(val)
|
||||
this.formData.endPlannedDate = moment(val).format("YYYY-MM-DD")
|
||||
this.showEndPlannedDatePicker = false
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
if (!this.formData.sign) {
|
||||
this.$toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定提交吗?'
|
||||
}).then(async () => {
|
||||
const formData = clone(this.formData)
|
||||
if (formData.budgets) {
|
||||
formData.budgets.forEach(v => {
|
||||
v.total = (v.unitPrice * v.num).toFixed(2)
|
||||
})
|
||||
}
|
||||
|
||||
const url = this.formData.id ? '/platform/jf/activity_bx/apply/doEdit' : '/platform/jf/activity_bx/apply/doAdd'
|
||||
|
||||
const resp = await $.post(url, {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/jf/declare/info')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async init() {
|
||||
this.formData = {
|
||||
apply_type: 1,
|
||||
goods: [
|
||||
{}
|
||||
],
|
||||
files: [],
|
||||
time: [],
|
||||
activity_type: null,
|
||||
activity_money: null,
|
||||
user_name: '${@shiro.getPrincipalProperty("username")}',
|
||||
mobile: '${@shiro.getPrincipalProperty("mobile")}',
|
||||
apply_time: moment().format('YYYY-MM-DD'),
|
||||
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
|
||||
}
|
||||
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('club01')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
if (this.formData.activity_type) {
|
||||
await this.getProjectCodeChange()
|
||||
}
|
||||
},
|
||||
|
||||
async activityChange(val) {
|
||||
if (!this.formData.activity_type) {
|
||||
const activity = this.activity.find(v => v.v_name == val)
|
||||
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
|
||||
this.$set(this.formData, 'projectTypeCode', activity ? activity.projectTypeCode : null)
|
||||
if (!activity) await this.generateProjectCode(this.formData.activity_type)
|
||||
}
|
||||
},
|
||||
async generateProjectCode(val) {
|
||||
const {data} = await $.get('/platform/jf/Funds/apply/generateProjectCode', {activity_type: val})
|
||||
this.$set(this.formData, 'projectCode', data)
|
||||
},
|
||||
async getProjectCodeChange(val) {
|
||||
this.$set(this.formData, "fundsUnitName", null)
|
||||
await this.generateProjectCode(this.formData.activity_type)
|
||||
if (this.formData.activity_type == 40001) {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70001")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
this.$set(this.formData, "projectJfCodeName", jfType ? jfType.name : null)
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
} else if (this.formData.activity_type == 40002) {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70002")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
this.$set(this.formData, "projectJfCodeName", jfType ? jfType.name : null)
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if (this.formData.activity_type == 40003) {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70003")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
this.$set(this.formData, "projectJfCodeName", jfType ? jfType.name : null)
|
||||
|
||||
const allClubs = await getClubs()
|
||||
$.get('/platform/jf/Funds/apply/getUserClub').then(resp => {
|
||||
if (resp.code === 0) {
|
||||
const userClubIds = resp.data.map(v => v.clubid)
|
||||
this.fundsUnitNameColumns = allClubs.filter(v => {
|
||||
return userClubIds.includes(v.id)
|
||||
}).map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/jf/Funds/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async openEdit(id) {
|
||||
const data = await this.findOne(id)
|
||||
data.activity_type = data.activity_type.toString()
|
||||
if (data.files && data.files.length > 0) data.files = JSON.parse(data.files)
|
||||
data.plannedDate = [data.startPlannedDate, data.endPlannedDate]
|
||||
|
||||
if (data.budgets) {
|
||||
data.budgets = JSON.parse(data.budgets)
|
||||
} else {
|
||||
data.budgets = []
|
||||
}
|
||||
|
||||
if (data.us_s) {
|
||||
data.sign = data.us_s
|
||||
}
|
||||
|
||||
this.formData = data
|
||||
|
||||
const activity_type_name = this.activityTypeColumns.find(v => v.value === this.formData.activity_type)?.text
|
||||
this.$set(this.formData, 'activity_type_name', activity_type_name)
|
||||
|
||||
const projectTypeCodeName = this.activityProjectTypeColumns.find(v => v.value === this.formData.projectTypeCode)?.text
|
||||
this.$set(this.formData, 'projectTypeCodeName', projectTypeCodeName)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
getActivityTwoLevelType("40000").then(data => {
|
||||
this.activityTypeColumns = data.map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.code
|
||||
}
|
||||
})
|
||||
})
|
||||
getActivityTwoLevelType("50000").then(data => {
|
||||
this.activityProjectTypeColumns = data.map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.code
|
||||
}
|
||||
})
|
||||
})
|
||||
this.projectJfType = await getActivityTwoLevelType("70000")
|
||||
let id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.openEdit(id)
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,221 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动申报协会负责人审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="doSearch"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
|
||||
:options="unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="doSearch"
|
||||
:options="unitList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button size="small" :color="themeColor" @click.stop="openInfo(o.id)">查看详情</van-button>
|
||||
<van-button size="small" :color="themeColor" v-if="[1000].includes(o.state_id)" @click.stop="openHandle(o.id)">审核</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
<van-popup v-model="clubChairmanShow" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动申报协会负责人审核" left-arrow placeholder fixed @click-left="clubChairmanShow = false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<activity-info ref="auditRef">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
协会负责人审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</activity-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
apply_type: 1
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
clubChairmanShow: false,
|
||||
pageDataUrl: '/platform/jf/activity_bx/association/pageData'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openHandle(id) {
|
||||
this.clubChairmanShow = true
|
||||
this.handle = true
|
||||
this.formData.time = moment().format('YYYY-MM-DD')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo()
|
||||
})
|
||||
},
|
||||
openInfo(id) {
|
||||
this.clubChairmanShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
doAudit(flag) {
|
||||
if (!this.formData.idea) {
|
||||
this.$toast.fail('请输入审核意见')
|
||||
return
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
this.$toast.fail('请签名')
|
||||
return
|
||||
}
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/jf/activity_bx/division/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.pageData()
|
||||
this.unionChairmanShow = false
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
async getUnionList(){
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionList = data
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitList = data
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.getUnionList()
|
||||
this.getUnitList()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,170 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动申报列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="doSearch"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
|
||||
:options="unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="doSearch"
|
||||
:options="unitList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button size="small" :color="themeColor" @click.stop="openInfo(o.id)">查看详情</van-button>
|
||||
<van-button size="small" :color="themeColor" v-if="[1010,1000].includes(o.state_id)" @click.stop="openEdit(o.id)">编辑</van-button>
|
||||
<van-button size="small" type="danger" @click.stop="doDelete(o.id)"
|
||||
v-if="[1010,1000].includes(o.state_id) || ${@shiro.hasRole('sysadmin')}">删除
|
||||
</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
<van-popup v-model="activityDeclareOrReimbursementShow" position="right" :style="{ height: '100%',width: '100%'}"
|
||||
safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="activityDeclareOrReimbursementShow=false" left-arrow
|
||||
title="活动申报及报销信息"></van-nav-bar>
|
||||
<activity-info ref="activityInfoRef"></activity-info>
|
||||
</van-sticky>
|
||||
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
apply_type: 1
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
activityDeclareOrReimbursementShow: false,
|
||||
pageDataUrl: '/platform/jf/activity_bx/reimbursement/pageData'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openInfo(id) {
|
||||
this.activityDeclareOrReimbursementShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.activityInfoRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.error(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(id){
|
||||
window.location.href = '/platform/jf/Funds/apply/mobile?id='+id
|
||||
},
|
||||
async getUnionList(){
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionList = data
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitList = data
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.getUnionList()
|
||||
this.getUnitList()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动申报校工会主席审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="doSearch"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
|
||||
:options="unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="doSearch" :options="unitList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button size="small" :color="themeColor" @click.stop="openInfo(o.id)">查看详情</van-button>
|
||||
<van-button size="small" :color="themeColor" v-if="[1020].includes(o.state_id)"
|
||||
@click.stop="openHandle(o.id)">审核
|
||||
</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="schoolChairmanShow" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动申报校工会主席审核" left-arrow placeholder fixed
|
||||
@click-left="schoolChairmanShow = false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<activity-info ref="auditRef" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.sign" :is_value_base64="false" prefix="activityDeclare"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</activity-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
isAudit: 3,
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
auditOption: [],
|
||||
schoolChairmanShow: false,
|
||||
pageDataUrl: '/platform/jf/activity_bx/union/pageData'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openHandle(id) {
|
||||
this.schoolChairmanShow = true
|
||||
this.handle = true
|
||||
this.formData.time = moment().format('YYYY-MM-DD')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
async doAudit(flag) {
|
||||
if (!this.formData.idea) {
|
||||
this.$toast.fail('请输入审核意见')
|
||||
return
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
this.$toast.fail('请签名')
|
||||
return
|
||||
}
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/jf/activity_bx/union/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.pageData()
|
||||
this.schoolChairmanShow = false
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
openInfo(id) {
|
||||
this.schoolChairmanShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
async getUnionList() {
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionList = data
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitList = data
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.getUnionList()
|
||||
this.getUnitList()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动申报校工会负责人审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="doSearch"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
|
||||
:options="unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="doSearch" :options="unitList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button size="small" :color="themeColor" @click.stop="openInfo(o.id)">查看详情</van-button>
|
||||
<van-button size="small" :color="themeColor" v-if="[1020].includes(o.state_id)"
|
||||
@click.stop="openHandle(o.id)">审核
|
||||
</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="schoolDirectorShow" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动申报校工会负责人审核" left-arrow placeholder fixed
|
||||
@click-left="schoolDirectorShow = false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<activity-info ref="auditRef" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会负责人审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.sign" :is_value_base64="false" prefix="activityDeclare"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</activity-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
isAudit: 3,
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
auditOption: [],
|
||||
schoolDirectorShow: false,
|
||||
pageDataUrl: '/platform/jf/activity_bx/accounting/pageData'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openHandle(id) {
|
||||
this.schoolDirectorShow = true
|
||||
this.handle = true
|
||||
this.formData.time = moment().format('YYYY-MM-DD')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
async doAudit(flag) {
|
||||
if (!this.formData.idea) {
|
||||
this.$toast.fail('请输入审核意见')
|
||||
return
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
this.$toast.fail('请签名')
|
||||
return
|
||||
}
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/jf/activity_bx/accounting/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.pageData()
|
||||
this.schoolDirectorShow = false
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
openInfo(id) {
|
||||
this.schoolDirectorShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
async getUnionList() {
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionList = data
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitList = data
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.getUnionList()
|
||||
this.getUnitList()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动申报分工会主席审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="doSearch"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H10')}"
|
||||
:options="unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="doSearch" :options="unitList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button size="small" :color="themeColor" @click.stop="openInfo(o.id)">查看详情</van-button>
|
||||
<van-button size="small" :color="themeColor" v-if="[1010].includes(o.state_id)"
|
||||
@click.stop="openHandle(o.id)">审核
|
||||
</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="unionChairmanShow" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动申报分工会主席审核" left-arrow placeholder fixed
|
||||
@click-left="unionChairmanShow = false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<activity-info ref="auditRef" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
<van-field v-model="formData.time" label="审核时间" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.idea"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.sign" :is_value_base64="false" prefix="activityDeclare"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-form>
|
||||
</template>
|
||||
</activity-info>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
isAudit: 3,
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
auditOption: [],
|
||||
unionChairmanShow: false,
|
||||
pageDataUrl: '/platform/jf/activity_bx/division/pageData'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openHandle(id) {
|
||||
this.unionChairmanShow = true
|
||||
this.handle = true
|
||||
this.formData.time = moment().format('YYYY-MM-DD')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
async doAudit(flag) {
|
||||
if (!this.formData.idea) {
|
||||
this.$toast.fail('请输入审核意见')
|
||||
return
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
this.$toast.fail('请签名')
|
||||
return
|
||||
}
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/jf/activity_bx/division/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.pageData()
|
||||
this.unionChairmanShow = false
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
openInfo(id) {
|
||||
this.unionChairmanShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.auditRef.getActInfo(id)
|
||||
})
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
async getUnionList() {
|
||||
const {data} = await $.get("/platform/vi/common/unions")
|
||||
data.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部工会", value: ''})
|
||||
this.unionList = data
|
||||
},
|
||||
async getUnitList(unionId) {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
data.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
data.unshift({text: "全部单位", value: ''})
|
||||
this.unitList = data
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.getUnionList()
|
||||
this.getUnitList()
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,71 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动报销信息填写" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.activityId" :options="activityOptions" @change="activityChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<template v-if="formData.activityId">
|
||||
<activity-info ref="activityRef" :show="false"></activity-info>
|
||||
</template>
|
||||
<van-form :model="formData" :show-error-message="false" input-align="right" @submit="submit">
|
||||
<van-cell-group inset class="mt10" v-if="formData.activityId" >
|
||||
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return{
|
||||
formData: {},
|
||||
activityOptions: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'activity-info': httpVueLoader('/components/mobile/jf/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods:{
|
||||
activityChange() {
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,14 +1,32 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-divider--horizontal {
|
||||
margin-top: 50px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF !important;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #409EFF !important;
|
||||
}
|
||||
|
||||
.w-e-text-container, .w-e-toolbar {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card class="box-card" v-loading="formLoading" shadow="never">
|
||||
<div class="clearfix" slot="header">
|
||||
<h3 style="color: rgb(24, 103, 176);">填写申报信息</h3>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="color: #409EFF;"><h3>活动申请</h3></span>
|
||||
</div>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
|
||||
@@ -24,14 +42,9 @@ layout("/layouts/platform.html"){
|
||||
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动主体类型" prop="activity_type">
|
||||
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
|
||||
<el-select @change="getProjectCodeChange();checkActivity()" placeholder="请选择活动主体类型"
|
||||
style="width: 100%"
|
||||
v-model="formData.activity_type">
|
||||
<el-option
|
||||
@@ -40,55 +53,92 @@ layout("/layouts/platform.html"){
|
||||
:value="item.code"
|
||||
v-for="item in activityType">
|
||||
</el-option>
|
||||
<!-- <span>
|
||||
|
||||
<!–#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#–>
|
||||
<el-option label="基层工会活动" value="1"></el-option>
|
||||
<!–#}#–> <!–#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#–>
|
||||
<el-option label="协会(社团)活动" value="2"></el-option>
|
||||
<!–#}#–>
|
||||
<!–#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#–>
|
||||
<el-option label="校工会活动" value="3"></el-option>
|
||||
<!–#}#–>
|
||||
|
||||
</span>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动项目类型" prop="projectTypeCode">
|
||||
<el-select placeholder="请选择活动类型" style="width: 100%;"
|
||||
v-model="formData.projectTypeCode">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code"
|
||||
v-for="item in projectType">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动名称" prop="activity_name">
|
||||
<el-input v-model="formData.activity_name" max="50" placeholder="请输入活动名称"></el-input>
|
||||
<el-input @blur="checkActivity"
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="formData.activity_name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
<el-input disabled placeholder="选择活动主体类型自动生成"
|
||||
v-model="formData.projectCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||
v-show="formData.activity_type!=40003">
|
||||
<el-input placeholder="请输入申报(承办)单位" type="text"
|
||||
<!-- <el-form-item prop="projectTypeCode" label="活动项目类型">
|
||||
<el-select v-model="formData.projectTypeCode" placeholder="请选择活动类型"
|
||||
style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in projectType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="活动经费类型" prop="projectJfCode">
|
||||
<el-select placeholder="选择活动主体类型自动选择" style="width: 100%;"
|
||||
v-model="formData.projectJfCode">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code"
|
||||
disabled
|
||||
v-for="item in projectJfType">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请(承办)单位" prop="fundsUnitName"
|
||||
v-if="formData.activity_type!=40003">
|
||||
<el-input placeholder="请输入申请(承办)单位" type="text"
|
||||
v-model="formData.fundsUnitName"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||
v-show="formData.activity_type==40003">
|
||||
<el-select placeholder="请选择申报(承办)单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.fundsUnitName">
|
||||
<el-form-item label="申请协会" prop="clubId"
|
||||
v-else-if="formData.activity_type==40003">
|
||||
<el-select @change="fundsUnitChange"
|
||||
placeholder="请选择申请协会"
|
||||
style="width: 100%;" v-model="formData.clubId">
|
||||
<el-option
|
||||
:key="item.name"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in fundsUnitNameOption">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动计划时间" prop="plannedDate">
|
||||
<el-date-picker
|
||||
@@ -102,17 +152,22 @@ layout("/layouts/platform.html"){
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动地址" prop="address">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.address"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="活动方案及简介" prop="activity_content">
|
||||
<text-editor v-model="formData.activity_content"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预算总费用" prop="funds_money">
|
||||
<el-input-number disabled placeholder="输入物品单价自动计算" :precision="2"
|
||||
style="width: 100%" v-model="formData.funds_money"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="活动费用预算">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
|
||||
@@ -127,32 +182,16 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(元)" prop="unitPrice">
|
||||
<el-table-column label="预算费用" prop="budgetPrice">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.unitPrice'"
|
||||
:prop="'budgets.'+$index+'.budgetPrice'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="单价(元)" v-model="row.unitPrice" :precision="2"
|
||||
:min="1"></el-input-number>
|
||||
<el-input-number placeholder="预算费用" v-model="row.budgetPrice" :precision="2"
|
||||
style="width: 100%" :min="1" @input="blur1"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="num">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'budgets.'+$index+'.num'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="数量" v-model="row.num" :precision="0"
|
||||
:min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计(元)" prop="total">
|
||||
<template slot-scope="{row}">
|
||||
{{isNaN(row.unitPrice * row.num) ? '输入单价和数量自动计算' : (row.unitPrice *
|
||||
row.num).toFixed(2)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
|
||||
@@ -170,23 +209,36 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="附件" prop="attachments">
|
||||
<file-upload :files.sync="formData.attachments" card></file-upload>
|
||||
<el-form-item label="活动方案及简介" prop="activity_content">
|
||||
<text-editor v-model="formData.activity_content"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="签字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="files">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="formData.id?doEdit():doAdd()" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doSave()" type="primary">保 存</el-button>
|
||||
<el-button @click="doAdd()" type="primary">提 交</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
let acEditor = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -195,7 +247,9 @@ layout("/layouts/platform.html"){
|
||||
selectLoading: false,
|
||||
fundsUnitNameOption: [],
|
||||
userList: [],
|
||||
delNotesList: [],
|
||||
projectType: [],
|
||||
projectJfType: [],
|
||||
activityType: [],
|
||||
activity: [],
|
||||
formRules: {
|
||||
@@ -205,20 +259,75 @@ layout("/layouts/platform.html"){
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}]
|
||||
activity_card_name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_card_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
clubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {
|
||||
budgets: []
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
async checkActivity() {
|
||||
if (this.formData.id) {
|
||||
return
|
||||
}
|
||||
if (!this.formData.activity_type) {
|
||||
this.$message.warning('请事先选择活动主体类型哦')
|
||||
return
|
||||
}
|
||||
if (!this.formData.activity_type || !this.formData.activity_name) {
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/jf/activity_bx/apply/checkActivity', {
|
||||
activityName: this.formData.activity_name,
|
||||
activityType: this.formData.activity_type
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
// 检测到您有相同名称的活动正在申请流程中,是否需要自动填充该活动的申请记录
|
||||
this.$confirm('检测到您有相同名称的活动正在申请流程中,是否需要自动填充该活动的申请信息', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.findOne(resp.data.id)
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
fundsUnitChange(val) {
|
||||
const club = this.fundsUnitNameOption.find(f => f.id === val)
|
||||
this.$set(this.formData, "fundsUnitName", club ? club.name : null)
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true;
|
||||
const data = await searchUser(query, '${@shiro.getPrincipalProperty("union").getId()}', null, null, null)
|
||||
this.userList = data
|
||||
this.selectLoading = false;
|
||||
}
|
||||
},
|
||||
blur1() {
|
||||
let num = 0
|
||||
this.formData.budgets.forEach(v => {
|
||||
num += parseFloat(v.budgetPrice)
|
||||
})
|
||||
this.$set(this.formData, "funds_money", num)
|
||||
},
|
||||
async querySearchAsync(queryString, cb) {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await $.post(loc() + "/getActivity", {activity_type: this.formData.activity_type})
|
||||
if (code === 0) {
|
||||
if (code == 0) {
|
||||
const arr = data.map(v => {
|
||||
v.v_name = v.name + moment(v.be_time).format(" YYYY-MM-DD")
|
||||
return {value: v.v_name, ...v}
|
||||
@@ -234,96 +343,71 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'activity_id', item.id)
|
||||
this.$set(this.formData, 'projectCode', item.activityCode)
|
||||
this.$set(this.formData, 'address', item.address)
|
||||
this.$set(this.formData, 'venue', item.address)
|
||||
this.$set(this.formData, 'plannedDate', [item.startPlannedDate, item.endPlannedDate])
|
||||
} else {
|
||||
this.$set(this.formData, 'activity_id', null)
|
||||
}
|
||||
},
|
||||
async activityChange(val) {
|
||||
if (!this.formData.activity_type) {
|
||||
const activity = this.activity.find(v => v.v_name == val)
|
||||
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
|
||||
this.$set(this.formData, 'projectTypeCode', activity ? activity.projectTypeCode : null)
|
||||
if (!activity) await this.generateProjectCode(this.formData.activity_type)
|
||||
}
|
||||
console.log(val)
|
||||
/*const activity = this.activity.find(v => v.v_name == val)
|
||||
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
|
||||
this.$set(this.formData, 'projectTypeCode', activity ? activity.projectTypeCode : null)
|
||||
if (!activity) await this.generateProjectCode(this.formData.activity_type)*/
|
||||
},
|
||||
delNotesItem(scope) {
|
||||
this.delNotesList.push(scope.row.id)
|
||||
this.formData.goods.splice(scope.$index, 1)
|
||||
},
|
||||
async generateProjectCode(val) {
|
||||
const {data} = await $.get(loc() + '/generateProjectCode', {activity_type: val})
|
||||
this.$set(this.formData, 'projectCode', data)
|
||||
if (!this.formData.id) {
|
||||
this.$set(this.formData, 'projectCode', data)
|
||||
}
|
||||
},
|
||||
async getProjectCodeChange(val) {
|
||||
this.$set(this.formData, "fundsUnitName", null)
|
||||
await this.generateProjectCode(this.formData.activity_type)
|
||||
if (this.formData.activity_type == 40001) {
|
||||
if (this.formData.activity_type == "40001") {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70001")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
} else if (this.formData.activity_type == 40002) {
|
||||
} else if (this.formData.activity_type == "40002") {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70002")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if (this.formData.activity_type == 40003) {
|
||||
} else if (this.formData.activity_type == "40003") {
|
||||
const jfType = this.projectJfType.find(p => p.code == "70003")
|
||||
this.$set(this.formData, "projectJfCode", jfType ? jfType.code : null)
|
||||
const {data} = await $.get('/platform/jf/Funds/apply/getUserClub')
|
||||
const a = await getClubs()
|
||||
const aa = a.filter(v => {
|
||||
const clubList = await getClubs()
|
||||
const aa = clubList.filter(v => {
|
||||
return data.map(x => x.clubid).includes(v.id)
|
||||
})
|
||||
this.fundsUnitNameOption = aa
|
||||
this.$set(this.formData, "clubId", aa[0].id)
|
||||
|
||||
}
|
||||
},
|
||||
async doEdit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
this.$confirm('您确定提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formLoading = true
|
||||
const formData = clone(this.formData)
|
||||
const {plannedDate} = formData
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.startTime = formData.plannedDate[0]
|
||||
formData.endTime = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
}
|
||||
if (formData.budgets) {
|
||||
formData.budgets.forEach(v => {
|
||||
v.total = (v.unitPrice * v.num).toFixed(2)
|
||||
})
|
||||
}
|
||||
|
||||
if(formData.activity_type==40003){
|
||||
const fundsUnitId = this.fundsUnitNameOption.find(v=>v.name===formData.fundsUnitName)?.id
|
||||
formData.fundsUnitId = fundsUnitId
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + "/doEdit", {
|
||||
activityBx: JSON.stringify(this.formData),
|
||||
sign: this.formData.sign,
|
||||
})
|
||||
this.formLoading = false
|
||||
if (resp.code === 0) {
|
||||
window.location.href = '/platform/jf/funds/reimbursement'
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async doAdd() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
this.$confirm('您确定提交吗?', '提示', {
|
||||
// 提交后将进入审核流程,无法修改申请内容,确定提交吗?
|
||||
this.$confirm('提交后将进入审核流程,无法修改申请内容,确定提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formLoading = true
|
||||
const formData = clone(this.formData)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
if (this.activity_type == 40003 && this.formData.clubId) {
|
||||
this.formData.fundsUnitName = this.fundsUnitNameOption.find(f => f.id === this.formData.clubId).name
|
||||
}
|
||||
const {plannedDate} = formData
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
@@ -332,85 +416,152 @@ layout("/layouts/platform.html"){
|
||||
formData.endTime = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
}
|
||||
if (formData.budgets) {
|
||||
formData.budgets.forEach(v => {
|
||||
v.total = (v.unitPrice * v.num).toFixed(2)
|
||||
})
|
||||
}
|
||||
|
||||
if(formData.activity_type==40003){
|
||||
const fundsUnitId = this.fundsUnitNameOption.find(v=>v.name===formData.fundsUnitName)?.id
|
||||
formData.fundsUnitId = fundsUnitId
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + "/doAdd", {
|
||||
let url = "/platform/jf/activity_bx/apply"
|
||||
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
})
|
||||
this.formLoading = false
|
||||
loading.close();
|
||||
if (resp.code === 0) {
|
||||
sublime.jumpPagePjax('/platform/jf/funds/reimbursement')
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$message.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.location.href = '/platform/jf/activity_bx/reimbursement'
|
||||
},500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
// 添加成功 跳转到申请记录页面
|
||||
}
|
||||
})
|
||||
},
|
||||
doSave() {
|
||||
// 确定要保存吗?保存后可在【我的申请】页面选中设置按钮的【重新编辑】按钮进行修改或提交
|
||||
this.$confirm('确定要保存吗?保存后可在【我的申请】页面选中设置按钮的【重新编辑】按钮进行修改或提交', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
if (this.activity_type == 40003 && this.formData.clubId) {
|
||||
this.formData.fundsUnitName = this.fundsUnitNameOption.find(f => f.id === this.formData.clubId).name
|
||||
}
|
||||
const {plannedDate} = formData
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.startTime = formData.plannedDate[0]
|
||||
formData.endTime = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
}
|
||||
const resp = await $.post("/platform/jf/activity_bx/apply/doSave", {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
})
|
||||
loading.close();
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.location.href = '/platform/jf/activity_bx/reimbursement'
|
||||
},500)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
this.delNotesList = []
|
||||
this.formData = {
|
||||
apply_type: 1,
|
||||
apply_type: 2,
|
||||
budgets: [
|
||||
{}
|
||||
],
|
||||
goods: [],
|
||||
files: [],
|
||||
time: [],
|
||||
activity_type: null,
|
||||
projectJfCode: '',
|
||||
activity_money: null,
|
||||
user_name: '${@shiro.getPrincipalProperty("username")}',
|
||||
mobile: '${@shiro.getPrincipalProperty("mobile")}',
|
||||
apply_time: moment().format('YYYY-MM-DD'),
|
||||
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
|
||||
activity_card_name: '',
|
||||
activity_card_number: ''
|
||||
}
|
||||
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('club01')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
})
|
||||
|
||||
if (this.formData.activity_type) {
|
||||
await this.getProjectCodeChange()
|
||||
}
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/jf/Funds/apply/findOne', {id})
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据加载中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.budgets) {
|
||||
resp.data.budgets = JSON.parse(resp.data.budgets)
|
||||
await this.remoteMethod(resp.data.payee_loginname)
|
||||
resp.data.files = JSON.parse(resp.data.files)
|
||||
resp.data.sign = resp.data.us_s
|
||||
resp.data.activity_type = resp.data.activity_type.toString()
|
||||
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
|
||||
this.formData = resp.data
|
||||
this.formData.budgets = JSON.parse(resp.data.budgets)
|
||||
await this.getProjectCodeChange()
|
||||
if (resp.data.clubId) {
|
||||
this.fundsUnitChange(resp.data.clubId)
|
||||
}
|
||||
return resp.data
|
||||
}
|
||||
loading.close()
|
||||
},
|
||||
async openEdit(id) {
|
||||
const data = await this.findOne(id)
|
||||
data.activity_type = data.activity_type.toString()
|
||||
if (data.files && data.files.length > 0) data.files = JSON.parse(data.files)
|
||||
data.plannedDate = [data.startPlannedDate, data.endPlannedDate]
|
||||
this.formData = data
|
||||
async getCardNumberByPayeeId() {
|
||||
// this.formData.activity_card_number = ''
|
||||
// this.formData.activity_card_name = ''
|
||||
const resp = await $.get(loc() + '/getCardNumberByPayeeId', {payeeId: this.formData.payeeId})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data) {
|
||||
// this.$set(this.formData,"activity_card_number",resp.data[0].activity_card_number)
|
||||
// this.$set(this.formData,"activity_card_name",resp.data[0].activity_card_name)
|
||||
this.formData.activity_card_number = resp.data[0].activity_card_number
|
||||
this.formData.activity_card_name = resp.data[0].activity_card_name
|
||||
}
|
||||
// this.formData.activity_card_number = resp.data[0].activity_card_number
|
||||
// this.formData.activity_card_name = resp.data[0].activity_card_name
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", 40002)
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", 40003)
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", 40001)
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
this.projectType = await getActivityTwoLevelType("50000")
|
||||
let id = GetQueryString("id")
|
||||
this.projectJfType = await getActivityTwoLevelType("70000")
|
||||
await this.getProjectCodeChange()
|
||||
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.openEdit(id)
|
||||
this.findOne(id)
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!--
|
||||
校工会副主席审核
|
||||
工会会计审核
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -13,4 +13,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
@@ -1,314 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!--
|
||||
财务扣款
|
||||
-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :has_sh="false" :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" 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>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</search>
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<el-button @click="openReview(row)" size="mini" type="primary"
|
||||
v-if="!row.isDeduction">扣款
|
||||
</el-button>
|
||||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||||
v-if="row.isDeduction">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info :handle="true" label="财务扣款" ref="act_info2">
|
||||
<template #handle>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="剩余经费余额" prop="balance">
|
||||
<el-input readonly type="text"
|
||||
v-model="formData.balance"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签  字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :loading="formLoading" @click="doReview"
|
||||
type="primary">确 定
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</activity-bx-info>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<activity-bx-info ref="act_info"></activity-bx-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
deductionInt: 3,
|
||||
searchName: "u.username",
|
||||
year: moment().format('YYYY')
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue?v=' + new Date().getTime()),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async getBalance(unionId) {
|
||||
const {data} = await $.get("/platform/jf/funds/finance/getBalance", {unionId: unionId})
|
||||
return data
|
||||
},
|
||||
async getClubBudget(clubId) {
|
||||
const {data} = await $.get("/platform/jf/funds/finance/getClubBudget", {clubId: clubId})
|
||||
return data
|
||||
},
|
||||
async getSchoolBudget() {
|
||||
const {data} = await $.get("/platform/jf/funds/finance/getSchoolBudget")
|
||||
return data
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.post(loc() + "/doRecall", {
|
||||
id: row.id
|
||||
});
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async doReview() {
|
||||
if (this.formData.balance < this.formData.money) {
|
||||
this.notifyWarning("余额不足,请联系校工会")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.post(loc() + "/doSubmit", {
|
||||
id: this.formData.id,
|
||||
idea: this.formData.idea,
|
||||
sign: this.formData.sign
|
||||
});
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async openReview(row) {
|
||||
const {id, funds_money, fundsUnitId} = row
|
||||
let balance = 0
|
||||
if (row.activity_type === 40002) {
|
||||
balance = await this.getBalance(fundsUnitId)
|
||||
} else if (row.activity_type === 40003) {
|
||||
balance = await this.getClubBudget(fundsUnitId)
|
||||
} else {
|
||||
balance = await this.getSchoolBudget()
|
||||
}
|
||||
this.formData = {
|
||||
id,
|
||||
balance: balance,
|
||||
funds_money: funds_money,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
sign: '',
|
||||
}
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.act_info.getActInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -105,14 +105,14 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="fundsUnitName" label="申报(承办)单位" v-show="formData.activity_type!=40003">
|
||||
<el-form-item prop="fundsUnitName" label="申请(承办)单位" v-show="formData.activity_type!=40003">
|
||||
<el-input v-model="formData.fundsUnitName" type="text"
|
||||
placeholder="请输入申报(承办)单位"></el-input>
|
||||
placeholder="请输入申请(承办)单位"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item prop="fundsUnitName" label="申报(承办)单位" v-show="formData.activity_type==40003">
|
||||
<el-form-item prop="fundsUnitName" label="申请(承办)单位" v-show="formData.activity_type==40003">
|
||||
<el-select v-model="formData.fundsUnitName"
|
||||
placeholder="请选择申报(承办)单位"
|
||||
placeholder="请选择申请(承办)单位"
|
||||
style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in fundsUnitNameOption"
|
||||
@@ -336,7 +336,7 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -522,4 +522,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -16,7 +16,7 @@ layout("/layouts/platform.html"){
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
@@ -81,7 +81,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "经费申请" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -207,7 +207,7 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -258,7 +258,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
|
||||
@@ -16,7 +16,7 @@ layout("/layouts/platform.html"){
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
@@ -82,7 +82,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "经费申请" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -205,7 +205,7 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -256,7 +256,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
|
||||
@@ -2,28 +2,25 @@
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
|
||||
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" 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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
@@ -31,9 +28,8 @@
|
||||
</template>
|
||||
</search>
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -41,70 +37,60 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
{{ row.activity_type == 40002 ? "基层工会活动" : row.activity_type == 40003 ? "协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<el-table-column label="活动经费类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
{{row.absName}}({{row.projectJfCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -116,70 +102,69 @@
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1030].includes(row.state_id)">
|
||||
<el-dropdown-item v-if="[1020].includes(row.state_id)"
|
||||
:command="{type:'primary',data:row}">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'exportApply',data:row,apply_type:1}">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info :handle="true" :panes="[2,3]" label="校工会副主席审核" ref="act_info2">
|
||||
<activity-bx-info ref="act_info2" :handle="true" label="校工会负责人审核" :panes="[2,3]">
|
||||
|
||||
<template #handle>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签  字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.time" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="sign" label="签  字">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :disabled="subDis" :loading="subLoading1"
|
||||
@click="doReview(false)"
|
||||
type="danger">
|
||||
退回
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
|
||||
type="success">通
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</activity-bx-info>
|
||||
</template>
|
||||
|
||||
@@ -205,20 +190,22 @@
|
||||
subLoading1: false,
|
||||
subLoading2: false,
|
||||
pageForm: {
|
||||
deductionInt: 1,
|
||||
isAudit: 3,
|
||||
searchName: "u.username",
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear() + "",
|
||||
apply_type: apply_type
|
||||
},
|
||||
formRules: {
|
||||
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue?v=' + new Date().getTime()),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
//下拉菜单操作
|
||||
@@ -228,20 +215,8 @@
|
||||
this.openView(data)
|
||||
} else if (type == 'primary') {
|
||||
this.openReview(data)
|
||||
} else if (type === 'exportApply') {
|
||||
this.exportApply(data, apply_type)
|
||||
}
|
||||
},
|
||||
|
||||
//导出申请表
|
||||
exportApply(row) {
|
||||
if (row.state_id !== 1060) {
|
||||
this.$message.warning('审核通过之后才能导出申请表')
|
||||
return
|
||||
}
|
||||
window.open('/platform/jf/activity_bx/reimbursement/exportApply?id=' + row.id)
|
||||
},
|
||||
|
||||
blur() {
|
||||
let num = 0
|
||||
this.formData.goods.forEach(v => {
|
||||
@@ -253,8 +228,8 @@
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
this.$confirm('您确定要提交审核吗?', '提示', {
|
||||
// 确定要拒绝/通过吗?
|
||||
this.$confirm('确定要' + (flag ? '通过' : '拒绝') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -262,27 +237,24 @@
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post(loc() + "/doReview", {
|
||||
id: this.formData.id,
|
||||
idea: this.formData.idea,
|
||||
sign: this.formData.sign,
|
||||
flag: this.formData.flag,
|
||||
activity_money: this.formData.activity_money
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
const resp = await $.post("/platform/jf/activity_bx/accounting/doReview", {data: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0){
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
this.pageData()
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async openReview(row) {
|
||||
const {id, activity_id, apply_type} = row
|
||||
|
||||
const {id} = row
|
||||
this.$set(row, "reviewLoading", true)
|
||||
this.formData = {
|
||||
id,
|
||||
@@ -293,6 +265,7 @@
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
this.$refs.guava.edit()
|
||||
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
@@ -301,15 +274,36 @@
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}
|
||||
},
|
||||
pageData1() {
|
||||
this.pageData("/platform/jf/activity_bx/accounting/pageData")
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData1()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData1();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData1();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData1();
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.pageData1();
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
@@ -57,18 +57,16 @@
|
||||
align="center"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center"
|
||||
sortable>
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(协会)活动"
|
||||
:
|
||||
{{ row.activity_type == 40002 ? "基层工会活动" : row.activity_type == 40003 ? "协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
<el-table-column label="活动经费类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
{{row.absName}}({{row.projectJfCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -76,7 +74,7 @@
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -90,13 +88,6 @@
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
@@ -137,6 +128,9 @@
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人">
|
||||
@@ -150,17 +144,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="funds_money" label="活动申请费用">
|
||||
<el-input-number placeholder="活动申请费用"
|
||||
style="width: 100%"
|
||||
v-model="formData.funds_money"
|
||||
:precision="2"
|
||||
:min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
@@ -173,11 +157,11 @@
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">
|
||||
拒绝
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">
|
||||
通过
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -207,21 +191,22 @@
|
||||
subLoading1: false,
|
||||
subLoading2: false,
|
||||
pageForm: {
|
||||
deductionInt: 1,
|
||||
isAudit: 3,
|
||||
searchName: "u.username",
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear() + "",
|
||||
apply_type: apply_type
|
||||
},
|
||||
formRules: {
|
||||
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
|
||||
funds_money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue?v=' + new Date().getTime()),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
//下拉菜单操作
|
||||
@@ -237,11 +222,7 @@
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (flag && (!this.formData.funds_money || this.formData.funds_money === 0)) {
|
||||
this.$message.warning('请填写活动申请费用!')
|
||||
return
|
||||
}
|
||||
this.$confirm('请仔细核对活动申请费用,您确定要提交吗??', '提示', {
|
||||
this.$confirm('确定要' + (flag ? '通过' : '拒绝') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -249,14 +230,16 @@
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
const resp = await $.post("/platform/jf/activity_bx/association/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
this.pageData()
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -265,23 +248,11 @@
|
||||
async openReview(row) {
|
||||
const {id} = row
|
||||
this.$set(row, "reviewLoading", true)
|
||||
|
||||
let funds_money = 0
|
||||
if (row.budgets) {
|
||||
try {
|
||||
const budgets = JSON.parse(row.budgets)
|
||||
funds_money = budgets.reduce((pre, cur) => pre.total + cur.total)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
sign: '',
|
||||
funds_money: funds_money
|
||||
}
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
@@ -294,15 +265,36 @@
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}
|
||||
},
|
||||
pageData1() {
|
||||
this.pageData("/platform/jf/activity_bx/association/pageData")
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData1()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData1();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData1();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData1();
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.pageData1();
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
}
|
||||
|
||||
@@ -4,35 +4,37 @@
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
|
||||
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" 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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</search>
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -40,70 +42,59 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type"
|
||||
sortable>
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(协会)活动"
|
||||
:
|
||||
{{ row.activity_type == 40002 ? "基层工会活动" : row.activity_type == 40003 ? "协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<el-table-column label="活动经费类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
{{row.absName}}({{row.projectJfCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!--下拉菜单操作-->
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -115,18 +106,11 @@
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1010].includes(row.state_id)">
|
||||
<el-dropdown-item v-if="[1010].includes(row.state_id)"
|
||||
:command="{type:'primary',data:row}">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1035].includes(row.state_id)">
|
||||
重新审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'exportApply',data:row,apply_type:1}">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -134,57 +118,50 @@
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info :handle="true" :panes="[2]" label="分工会审核" ref="act_info2">
|
||||
<activity-bx-info ref="act_info2" :handle="true" label="院级工会审核" :panes="[2]">
|
||||
<template #handle>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-row :gutter="20">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动申请费用" prop="funds_money">
|
||||
<el-input-number :min="1"
|
||||
:precision="2"
|
||||
placeholder="活动申请费用"
|
||||
style="width: 100%"
|
||||
v-model="formData.funds_money"></el-input-number>
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.time" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="签字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
|
||||
<el-form-item prop="sign" label="签  字">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)"
|
||||
type="danger">
|
||||
拒绝
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
|
||||
type="success">
|
||||
通过
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -214,26 +191,22 @@
|
||||
subLoading1: false,
|
||||
subLoading2: false,
|
||||
pageForm: {
|
||||
deductionInt: 1,
|
||||
isAudit: 3,
|
||||
searchName: "u.username",
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear() + "",
|
||||
apply_type: apply_type
|
||||
},
|
||||
formRules: {
|
||||
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
|
||||
funds_money: [{
|
||||
required: true,
|
||||
message: '请填写活动申请费用',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
sign: [{required: true, message: '请扫描二维码签字', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue?v=' + new Date().getTime()),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
//下拉菜单操作
|
||||
@@ -243,28 +216,14 @@
|
||||
this.openView(data)
|
||||
} else if (type == 'primary') {
|
||||
this.openReview(data)
|
||||
} else if (type === 'exportApply') {
|
||||
this.exportApply(data, apply_type)
|
||||
}
|
||||
},
|
||||
|
||||
//导出申请表
|
||||
exportApply(row) {
|
||||
if (row.state_id !== 1060) {
|
||||
this.$message.warning('审核通过之后才能导出申请表')
|
||||
return
|
||||
}
|
||||
window.open('/platform/jf/activity_bx/reimbursement/exportApply?id=' + row.id)
|
||||
},
|
||||
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (flag && (!this.formData.funds_money || this.formData.funds_money === 0)) {
|
||||
this.$message.warning('请填写活动申请费用!')
|
||||
return
|
||||
}
|
||||
this.$confirm('请仔细核对活动申请费用,您确定要提交吗?', '提示', {
|
||||
// 确定要拒绝/通过吗?
|
||||
this.$confirm('确定要' + (flag ? '通过' : '拒绝') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -272,13 +231,12 @@
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
const resp = await $.post("/platform/jf/activity_bx/division/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
this.pageData()
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
@@ -288,23 +246,11 @@
|
||||
async openReview(row) {
|
||||
const {id} = row
|
||||
this.$set(row, "reviewLoading", true)
|
||||
|
||||
let funds_money = 0
|
||||
if (row.budgets) {
|
||||
try {
|
||||
const budgets = JSON.parse(row.budgets)
|
||||
funds_money = budgets.reduce((pre, cur) => pre.total + cur.total)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
sign: '',
|
||||
funds_money: funds_money
|
||||
}
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
@@ -317,15 +263,36 @@
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
}
|
||||
},
|
||||
pageData1() {
|
||||
this.pageData("/platform/jf/activity_bx/division/pageData")
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData1()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData1();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData1();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData1();
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.pageData1();
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
}
|
||||
|
||||
@@ -15,34 +15,37 @@
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template name="el-zoom-in-center">
|
||||
|
||||
<template >
|
||||
|
||||
<search :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" 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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</search>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
|
||||
<!--申请记录展示-->
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -50,53 +53,51 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name">
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<el-table-column label="活动经费类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
{{row.absName}}({{row.projectJfCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="审核人" prop="shrname" header-align="center"
|
||||
align="center">
|
||||
@@ -105,21 +106,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -131,30 +124,36 @@
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="[1005,1015,1035].includes(row.state_id)">
|
||||
编辑
|
||||
<el-dropdown-item v-if="[999,1010,1000,1005,1025,1045].includes(row.state_id)"
|
||||
:command="{type:'edit',data:row}">
|
||||
重新编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',data:row}"
|
||||
v-if="${@shiro.hasRole('sysadmin')}">
|
||||
v-if="${@shiro.hasRole('sysadmin')}"
|
||||
:command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',data:row}"
|
||||
v-if="[1010,1000].includes(row.state_id)&&${!@shiro.hasRole('sysadmin')}">
|
||||
v-if="[1010,1000].includes(row.state_id)&&${!@shiro.hasRole('sysadmin')}"
|
||||
:command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!-- v-if="row.state_id==1060&&row.apply_type!=2"-->
|
||||
<el-dropdown-item
|
||||
:command="{type:'exportApply',data:row,apply_type:1}">
|
||||
|
||||
<el-dropdown-item :command="{type:'addFiles',data:row}">编辑附件</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
|
||||
:command="{type:'exportWwj',data:row,apply_type:1}">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item-->
|
||||
<!-- :command="{type:'exportWwj',data:row,apply_type:2}"-->
|
||||
<!-- v-if="[1060].includes(row.state_id)">-->
|
||||
<!-- 导出报销表-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<el-dropdown-item v-if="[1060].includes(row.state_id)"
|
||||
:command="{type:'exportWwj',data:row,apply_type:2}">
|
||||
导出报销表
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item v-if="[1060].includes(row.state_id)"
|
||||
:command="{type:'toHrefActivity',data:row}">
|
||||
跳转至活动信息页
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -162,44 +161,48 @@
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit>
|
||||
|
||||
<el-form label-width="100px">
|
||||
<el-form-item class="view-header" label="填写申请信息 " label-position="top"
|
||||
label-width="135px">
|
||||
<el-form-item label="填写申请信息 " label-width="135px" class="view-header" label-position="top">
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请人姓名" prop="user_name">
|
||||
<el-input disabled type="text" v-model="formData.user_name"></el-input>
|
||||
<el-form-item prop="user_name" label="申请人姓名">
|
||||
<el-input disabled v-model="formData.user_name" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input type="text" v-model="formData.mobile"></el-input>
|
||||
<el-form-item prop="mobile" label="联系方式">
|
||||
<el-input v-model="formData.mobile" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动名称" prop="activity_name">
|
||||
<el-input disabled v-model="formData.activity_name"></el-input>
|
||||
<el-form-item prop="activity_name" label="活动名称">
|
||||
<el-input v-model="formData.activity_name" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动类型" prop="activity_type">
|
||||
<el-select placeholder="请选择活动主体类型" style="width: 100%"
|
||||
v-model="formData.activity_type">
|
||||
<el-form-item prop="activity_type" label="活动类型">
|
||||
<el-select v-model="formData.activity_type" placeholder="请选择活动主体类型" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activityType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code"
|
||||
v-for="item in activityType">
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -208,40 +211,35 @@
|
||||
|
||||
<el-row gutter="20" v-if="formData.apply_type==2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动人数" prop="venue">
|
||||
<el-input placeholder="请输入活动人数" type="number"
|
||||
v-model="formData.activity_number"></el-input>
|
||||
<el-form-item prop="venue" label="活动人数">
|
||||
<el-input v-model="formData.activity_number" placeholder="请输入活动人数" type="number"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动地点" prop="venue">
|
||||
<el-input placeholder="请输入活动地点" type="text"
|
||||
v-model="formData.venue"></el-input>
|
||||
<el-form-item prop="venue" label="活动地点">
|
||||
<el-input v-model="formData.venue" placeholder="请输入活动地点" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销金额" prop="activity_money">
|
||||
<el-input disabled placeholder="输入物品单价自动计算"
|
||||
type="number"
|
||||
v-model="formData.activity_money"></el-input>
|
||||
<el-form-item prop="activity_money" label="报销金额">
|
||||
<el-input disabled v-model="formData.activity_money" placeholder="输入物品单价自动计算"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销卡号" prop="activity_card_number">
|
||||
<el-input type="number"
|
||||
v-model="formData.activity_card_number"></el-input>
|
||||
<el-form-item prop="activity_card_number" label="报销卡号">
|
||||
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间" prop="activity_time">
|
||||
<el-date-picker disabled
|
||||
placeholder="活动时间"
|
||||
style="width: 100%" type="date"
|
||||
<el-form-item prop="activity_time" label="活动时间">
|
||||
<el-date-picker style="width: 100%"
|
||||
v-model="formData.activity_time"
|
||||
value-format="yyyy-MM-dd">
|
||||
type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="活动时间" disabled>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -249,23 +247,21 @@
|
||||
|
||||
<el-row gutter="20" v-if="formData.apply_type==1">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
v-model="formData.projectCode"></el-input>
|
||||
<el-form-item prop="projectCode" label="项目编号">
|
||||
<el-input disabled v-model="formData.projectCode" placeholder="选择活动类型自动生成"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName">
|
||||
<el-input placeholder="请输入申报(承办)单位" type="text"
|
||||
v-model="formData.fundsUnitName"></el-input>
|
||||
<el-form-item prop="fundsUnitName" label="申请(承办)单位">
|
||||
<el-input v-model="formData.fundsUnitName" type="text" placeholder="请输入申请(承办)单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
|
||||
<el-form-item label="活动计划时间" prop="plannedDate">
|
||||
<el-form-item prop="plannedDate" label="活动计划时间">
|
||||
<el-input disabled v-model="formData.plannedDate"></el-input>
|
||||
<!-- <el-date-picker style="width: 100%"
|
||||
v-model="formData.plannedDate"
|
||||
@@ -276,10 +272,9 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申报金额" prop="funds_money">
|
||||
<el-input disabled placeholder="输入物品单价自动计算"
|
||||
type="number"
|
||||
v-model="formData.funds_money"></el-input>
|
||||
<el-form-item prop="funds_money" label="申请金额">
|
||||
<el-input disabled v-model="formData.funds_money" placeholder="输入物品单价自动计算"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -289,68 +284,72 @@
|
||||
<el-divider content-position="left">购置物品及价格</el-divider>
|
||||
|
||||
<div style="padding-left: 10px;padding-top:60px">
|
||||
<el-tooltip class="item" content="点击添加购置物品及价格" effect="dark"
|
||||
placement="top">
|
||||
<el-button @click="formData.goods.push({})" circle icon="el-icon-plus"
|
||||
<el-tooltip class="item" effect="dark" content="点击添加购置物品及价格" placement="top">
|
||||
<el-button icon="el-icon-plus" circle @click="formData.goods.push({})"
|
||||
type="primary"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form-item label-width="0">
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%">
|
||||
<el-table-column align="center" header-align="center" label="序号" sortable
|
||||
type="index" width="100">
|
||||
|
||||
|
||||
<el-table :data="formData.goods" show-summary="true" border size="mini" style="width: 100%">
|
||||
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="物品名称"
|
||||
prop="name">
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" type="text"
|
||||
v-model="row.name"></el-input>
|
||||
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="预算费用"
|
||||
prop="price">
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input @input="blur" maxlength="50" placeholder="预算费用"
|
||||
type="number" v-model="row.price"></el-input>
|
||||
<el-input maxlength="50" placeholder="预算费用" v-model="row.price"
|
||||
type="number" @input="blur"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" fixed="right"
|
||||
header-align="center"
|
||||
label="操作"
|
||||
width="80px">
|
||||
<el-table-column label="操作" fixed="right" align="center" header-align="center"
|
||||
width="80px"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)" circle
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
:disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">{{formData.apply_type==1?'活动方案及简介':'活动内容'}}</span>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">{{formData.apply_type==1?'活动方案及简介':'活动内容'}}</span>
|
||||
</el-divider>
|
||||
<el-form-item class="is-required" label-width="auto" prop="activity_content">
|
||||
<el-form-item prop="activity_content" class="is-required" label-width="auto">
|
||||
<div id="acEditor"></div>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附  件</span>
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">附  件</span>
|
||||
</el-divider>
|
||||
<el-form-item label-width="auto" prop="files">
|
||||
<el-form-item prop="files" label-width="auto">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签  字</span>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span style="color: #3ea1ec;">签  字</span>
|
||||
</el-divider>
|
||||
<el-form-item label-width="auto" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
<el-form-item prop="sign" label-width="auto">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="formData.id?doEdit():doAdd()" type="primary">确 定</el-button>
|
||||
<el-button type="primary" @click="formData.id?doEdit():doAdd()">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -359,9 +358,16 @@
|
||||
<activity-bx-info ref="act_info"></activity-bx-info>
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog title="编辑附件" :visible.sync="fileDialog" :close-on-click-modal="false">
|
||||
<file-upload :files.sync="modifyFilesData.files" card></file-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="fileDialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -388,8 +394,7 @@
|
||||
formData: {},
|
||||
formSign: {},
|
||||
pageForm: {
|
||||
deductionInt:1,
|
||||
searchName: "u.username",
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear() + "",
|
||||
activity_name: "activity_name",
|
||||
apply_type: apply_type
|
||||
@@ -402,14 +407,18 @@
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}]
|
||||
},
|
||||
activity: []
|
||||
activity: [],
|
||||
|
||||
fileDialog:false,
|
||||
modifyFilesData:{},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -423,22 +432,49 @@
|
||||
this.doDelete(data)
|
||||
} else if (type == 'exportWwj') {
|
||||
this.exportWwj(data, apply_type)
|
||||
} else if (type === 'exportApply') {
|
||||
this.exportApply(data, apply_type)
|
||||
} else if (type == 'toHrefActivity') {
|
||||
this.toHrefActivity(data,apply_type)
|
||||
} else if (type == 'addFiles') {
|
||||
this.openAddFiles(data)
|
||||
}
|
||||
},
|
||||
//导出申请表
|
||||
exportApply(row) {
|
||||
if(row.state_id!==1060){
|
||||
this.$message.warning('审核通过之后才能导出申请表')
|
||||
return
|
||||
openAddFiles(row){
|
||||
this.modifyFilesData = {...row}
|
||||
this.fileDialog = true
|
||||
this.modifyFilesData.files = JSON.parse(this.modifyFilesData.files)
|
||||
},
|
||||
async doSubmit(){
|
||||
const resp = await $.post('/platform/jf/activity_bx/reimbursement/doEdit',{activityBx:JSON.stringify(this.modifyFilesData)})
|
||||
if (resp.code === 0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.fileDialog = false
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
window.open('/platform/jf/activity_bx/reimbursement/exportApply?id=' + row.id)
|
||||
},
|
||||
toHrefActivity(row){
|
||||
// const {activity_id, activity_type} = row
|
||||
// let activityType = ""
|
||||
// if (activity_type == 40001) activityType = "/school?id="
|
||||
// if (activity_type == 40002) activityType = "/union?id="
|
||||
// if (activity_type == 40003) activityType = "/club?id="
|
||||
// window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
const {activity_id, activity_type} = row
|
||||
let activityType = ""
|
||||
if (activity_type == 40001) activityType = "/school"
|
||||
if (activity_type == 40002) activityType = "/union"
|
||||
if (activity_type == 40003) activityType = "/club"
|
||||
window.location.href = "/platform/activity/info/mange" + activityType
|
||||
},
|
||||
|
||||
|
||||
exportWwj(row, apply_type) {
|
||||
const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
|
||||
if (apply_type == 2) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + row.id
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + row.id
|
||||
}
|
||||
/* const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
@@ -462,7 +498,7 @@
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}
|
||||
}*/
|
||||
},
|
||||
blur() {
|
||||
let num = 0
|
||||
@@ -473,6 +509,7 @@
|
||||
this.$set(this.formData, "activity_money", num)
|
||||
} else {
|
||||
this.$set(this.formData, "funds_money", num)
|
||||
|
||||
}
|
||||
},
|
||||
delNotesItem(scope) {
|
||||
@@ -522,12 +559,12 @@
|
||||
activityBx: JSON.stringify(this.formData),
|
||||
sign: this.formData.sign
|
||||
})
|
||||
closeLoadingFunc(loading, resp, async () => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
}, (data, msg) => {
|
||||
this.$message.error(msg);
|
||||
})
|
||||
} else {
|
||||
this.$message.error(resp.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -546,12 +583,12 @@
|
||||
delNotesList: JSON.stringify(this.delNotesList)
|
||||
})
|
||||
|
||||
closeLoadingFunc(loading, resp, async () => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
}, (data, msg) => {
|
||||
this.$message.error(msg);
|
||||
})
|
||||
} else {
|
||||
this.$message.error(resp.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -585,59 +622,53 @@
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(row) {
|
||||
const {id} = row
|
||||
if (this.pageForm.apply_type === 1) {
|
||||
window.location.href = "/platform/jf/Funds/apply?id=" + id
|
||||
} else {
|
||||
this.formData = {
|
||||
goods: [],
|
||||
plannedDate: []
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
if (resp.code === 0) {
|
||||
let v = resp.data
|
||||
v.activity_type = v.activity_type.toString()
|
||||
v.goods = v.Goods
|
||||
if (v.files && v.files.length > 0) v.files = JSON.parse(v.files)
|
||||
v.plannedDate = (v.startPlannedDate + "——" + v.endPlannedDate)
|
||||
this.formData = v
|
||||
|
||||
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
acEditor.txt.html(v.activity_content)
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
sublime.jumpPagePjax('/platform/jf/Funds/apply?id=' + row.id)
|
||||
/*const {id} = row
|
||||
this.formData = {
|
||||
goods: [],
|
||||
plannedDate: []
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
if (resp.code === 0) {
|
||||
const v=resp.data
|
||||
v.activity_type = v.activity_type.toString()
|
||||
v.goods = v.Goods
|
||||
if (v.files && v.files.length > 0) v.files = JSON.parse(v.files)
|
||||
v.plannedDate = (v.startPlannedDate + "——" + v.endPlannedDate)
|
||||
this.formData = v
|
||||
|
||||
|
||||
this.$nextTick(() => {
|
||||
$("#acEditor").html("")
|
||||
acEditor = new E("#acEditor")
|
||||
acEditor.config.onchange = (html) => {
|
||||
this.formData.activity_content = html
|
||||
}
|
||||
acEditor.create()
|
||||
acEditor.txt.html(v.activity_content)
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
}*/
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async ()=> {
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id})
|
||||
if(resp.code===0){
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData1()
|
||||
}else{
|
||||
this.$message.error(resp.msg)
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
this.$set(row, "delLoading", true)
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id});
|
||||
this.pageData1()
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
|
||||
@@ -5,38 +5,38 @@
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 150px"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 150px"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<!--分工会查询-->
|
||||
<div class="btn-group tool-button">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" 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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="$emit('search')">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
<el-option label="活动名称" value="activity_name"></el-option>
|
||||
@@ -44,26 +44,18 @@
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-radio-group @change="doSearch" v-model="pageForm.deductionInt">
|
||||
<el-radio-button :label="1">全部</el-radio-button>
|
||||
<el-radio-button :label="2">已扣款</el-radio-button>
|
||||
<el-radio-button :label="3">未扣款</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button @click="download" icon="el-icon-download" type="primary">导出名单</i>
|
||||
</el-button>
|
||||
<!-- <el-button icon="el-icon-download" @click="download">导出名单</i>
|
||||
</el-button>-->
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -71,73 +63,59 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
{{ row.activity_type == 40002 ? "基层工会活动" : row.activity_type == 40003 ? "协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<el-table-column label="活动经费类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
{{row.absName}}({{row.projectJfCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="是否扣款"
|
||||
prop="isDeduction" sortable>
|
||||
<template slot-scope="{row}">
|
||||
<el-tag type="success" v-if="row.isDeduction">已扣款</el-tag>
|
||||
<el-tag type="danger" v-else>未扣款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -149,14 +127,18 @@
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'export',data:row}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
|
||||
:command="{type:'export',data:row}">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'exportWwj',data:row}"
|
||||
v-if="1060==row.state_id">
|
||||
<el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
导出报销表
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportZip',data:row}">
|
||||
导出申请、报销压缩包
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -186,7 +168,6 @@
|
||||
tableData: [],
|
||||
formData: {},
|
||||
pageForm: {
|
||||
deductionInt: 1,
|
||||
apply_type: apply_type,
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear() + ""
|
||||
@@ -195,11 +176,7 @@
|
||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
@@ -209,7 +186,7 @@
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
@@ -221,21 +198,15 @@
|
||||
this.exportWwj(data)
|
||||
} else if (type == 'export') {
|
||||
this.export(data)
|
||||
} else if (type === 'exportZip') {
|
||||
this.exportZip(data.id)
|
||||
}
|
||||
},
|
||||
export(row) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + row.id
|
||||
},
|
||||
async exportWwj(row) {
|
||||
const {
|
||||
id,
|
||||
activity_id,
|
||||
apply_type,
|
||||
activity_type,
|
||||
otherFiles,
|
||||
photoFiles,
|
||||
billFiles
|
||||
} = row
|
||||
/* const {id, activity_id, apply_type, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
@@ -249,9 +220,11 @@
|
||||
window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
||||
|
||||
}*/
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + row.id
|
||||
},
|
||||
exportZip(id){
|
||||
window.location.href = '/platform/jf/activity_bx/reimbursementview/doExportZip?id=' + id
|
||||
},
|
||||
download() {
|
||||
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
||||
@@ -274,7 +247,7 @@
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
|
||||
@@ -2,25 +2,28 @@
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
|
||||
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" 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>
|
||||
</div>
|
||||
|
||||
@@ -28,8 +31,9 @@
|
||||
</template>
|
||||
</search>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -37,52 +41,56 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name">
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(协会)活动" :
|
||||
{{ row.activity_type == 40002 ? "基层工会活动" : row.activity_type == 40003 ?
|
||||
"协会活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动经费类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
{{ row.apply_type == 1 ? "报销申请" : "活动申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
@@ -90,7 +98,7 @@
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -102,8 +110,8 @@
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[1040].includes(row.state_id)"
|
||||
:command="{type:'primary',data:row}">
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1040].includes(row.state_id)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
@@ -122,48 +130,97 @@
|
||||
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info ref="act_info2" :handle="true" label="校工会主席审核" :panes="[2,3,4,5]">
|
||||
<activity-bx-info :handle="true" :panes="[2,3,4,5]" label="校工会主席审核" ref="act_info2">
|
||||
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-form-item class="view-header" label="审核信息 " label-width="135px">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.time" disabled></el-input>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="实际总费用" prop="time">
|
||||
<el-input disabled placeholder="根据实际物品费用自动计算"
|
||||
v-model="formData.activity_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<!--<el-col :span="24">
|
||||
<el-form-item label="活动费用预算表">
|
||||
<el-table :data="formData.budgets" border size="mini"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
sortable
|
||||
type="index" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="费用项目名称"
|
||||
prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="预算费用"
|
||||
prop="budgetPrice">
|
||||
</el-table-column>
|
||||
<!–<el-table-column align="center" header-align="center"
|
||||
label="实际费用"
|
||||
prop="actualPrice">
|
||||
<template slot-scope="{row}">
|
||||
<el-input :disabled="formData.apply_type==2" @input="blur"
|
||||
maxlength="50"
|
||||
placeholder="实际费用"
|
||||
type="number" v-model="row.actualPrice"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="说明"
|
||||
prop="notes">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="说明"
|
||||
v-model="row.notes"></el-input>
|
||||
</template>
|
||||
</el-table-column>–>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签  字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="sign" label="签  字">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
<el-button :disabled="subDis" :loading="subLoading1" @click="doReview(false)"
|
||||
type="danger">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
|
||||
type="success">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</activity-bx-info>
|
||||
</template>
|
||||
|
||||
@@ -185,7 +242,9 @@
|
||||
units: [],
|
||||
tabLoading: false,
|
||||
tableData: [],
|
||||
formData: {},
|
||||
formData: {
|
||||
budgets: [],
|
||||
},
|
||||
subDis: false,
|
||||
subLoading1: false,
|
||||
subLoading2: false,
|
||||
@@ -197,13 +256,14 @@
|
||||
},
|
||||
formRules: {
|
||||
idea: [{required: true, message: '请填写意见', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -220,22 +280,35 @@
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post("/platform/jf/activity_bx/union/doReview", this.formData)
|
||||
if (resp.code === 0){
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
// 确定要拒绝/通过吗?
|
||||
this.$confirm('确定要' + (flag ? '通过' : '拒绝') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post("/platform/jf/activity_bx/union/doReview", {data: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
this.pageData1()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async openReview(row) {
|
||||
const {id} = row
|
||||
const {id, activity_id, apply_type} = row
|
||||
this.formData = {
|
||||
goods: []
|
||||
}
|
||||
this.$set(row, "reviewLoading", true)
|
||||
this.formData = {
|
||||
id,
|
||||
@@ -245,6 +318,16 @@
|
||||
}
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
/*const goods = await $.get("/platform/jf/activity_bx/accounting/getGoods", {activity_id: id})
|
||||
if (apply_type == 2) {
|
||||
let a = 0
|
||||
goods.data.forEach(v => {
|
||||
a += v.actualPrice
|
||||
})
|
||||
this.$set(this.formData, "activity_money", a)
|
||||
}
|
||||
this.$set(this.formData, "goods", goods.data)*/
|
||||
// this.formData.budgets = JSON.parse(row.budgets)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
openView(row) {
|
||||
@@ -254,7 +337,7 @@
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
|
||||
@@ -80,7 +80,7 @@ layout("/layouts/platform.html"){
|
||||
<script src="${base!}/assets/platform/plugins/umeditor/umeditor.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable="true" v-model="pageForm.searchKeyword">
|
||||
@@ -98,7 +98,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button size="medium" @click="openAdd"><i class="ti-plus"></i>发起报销申请</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" size="small">
|
||||
@@ -175,7 +175,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="活动类型" prop="activity_type">
|
||||
<el-select style="width: 90%" v-model="addFormData.activity_type">
|
||||
<el-option label="校工会活动" value="校工会活动"></el-option>
|
||||
<el-option label="分工会活动(费用由分工会承担)" value="分工会活动"></el-option>
|
||||
<el-option label="院级工会活动(费用由院级工会承担)" value="院级工会活动"></el-option>
|
||||
<el-option label="协会活动" value="协会活动"></el-option>
|
||||
<el-option label="其它" value="其它"></el-option>
|
||||
</el-select>
|
||||
@@ -242,7 +242,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="活动类型" prop="activity_type">
|
||||
<el-select style="width: 90%" v-model="editFormData.activity_type">
|
||||
<el-option label="校工会活动" value="校工会活动"></el-option>
|
||||
<el-option label="分工会活动(费用由分工会承担)" value="分工会活动"></el-option>
|
||||
<el-option label="院级工会活动(费用由院级工会承担)" value="院级工会活动"></el-option>
|
||||
<el-option label="协会活动" value="协会活动"></el-option>
|
||||
<el-option label="其它" value="其它"></el-option>
|
||||
</el-select>
|
||||
|
||||
@@ -26,7 +26,7 @@ layout("/layouts/platform.html"){
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
<!--按分工会-->
|
||||
<!--按院级工会-->
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.club_id" filterable
|
||||
@change="doSearch"
|
||||
|
||||
@@ -27,7 +27,7 @@ layout("/layouts/platform.html"){
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<h3 style="color: rgb(24, 103, 176);">经费报销导入</h3>
|
||||
<h3 style="color: rgb(24, 103, 176);">财务数据导入</h3>
|
||||
</template>
|
||||
<el-row justify="center" style="position: relative" type="flex">
|
||||
<div class="downLoadTemplate">
|
||||
|
||||
@@ -16,9 +16,9 @@ layout("/layouts/platform.html"){
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
<!--按分工会-->
|
||||
<!--按院级工会-->
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.union_id" filterable placeholder="按分工会" clearable>
|
||||
<el-select v-model="pageForm.union_id" filterable placeholder="按院级工会" clearable>
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
@@ -61,12 +61,12 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="分工会名称" prop="unionname" show-overflow-tooltip
|
||||
<el-table-column label="院级工会名称" prop="unionname" show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="分工会编码" prop="unioncode" sortable show-overflow-tooltip
|
||||
<el-table-column label="院级工会编码" prop="unioncode" sortable show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
|
||||
@@ -28,7 +28,7 @@ layout("/layouts/platform.html"){
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.unionId" filterable placeholder="按分工会"
|
||||
<el-select v-model="pageForm.unionId" filterable placeholder="按院级工会"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
@@ -63,7 +63,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="分工会名称" prop="unionname" show-overflow-tooltip
|
||||
<el-table-column label="院级工会名称" prop="unionname" show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -71,7 +71,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="分工会编码" prop="unioncode" sortable
|
||||
<el-table-column label="院级工会编码" prop="unioncode" sortable
|
||||
show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
|
||||
Reference in New Issue
Block a user