This commit is contained in:
2025-09-25 18:47:49 +08:00
12 changed files with 508 additions and 240 deletions
@@ -105,7 +105,7 @@ public class Sys_local_process_instance_task extends BaseModel {
@Column @Column
@Comment("处理意见") @Comment("处理意见")
@ColDefine(type = ColType.VARCHAR, width = 1000) @ColDefine(type = ColType.TEXT)
private String taskComment; private String taskComment;
@Column @Column
@@ -3,6 +3,7 @@ package io.v.nutz.zhgh.proposal.constants;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import io.v.nutz.base.utils.DateUtil; import io.v.nutz.base.utils.DateUtil;
import io.v.nutz.base.utils.ViResource; import io.v.nutz.base.utils.ViResource;
import io.v.nutz.sys.controllers.platform.sys.handler.ClubEvaluateToDoHandler;
import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.services.SysLocalProcessService; import io.v.nutz.sys.services.SysLocalProcessService;
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl; import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
@@ -355,6 +356,28 @@ public enum ProposalToDoHandler {
} }
}, },
CREATE_UNDERTAKE_PROXY_TASK {
@Override
public void exec(String proposalId, NutMap extra) {
ProposalReplyForward replyForward = extra.getAs("reply_forward", ProposalReplyForward.class);
Sys_user user = dao.fetch(Sys_user.class, replyForward.getProxyReplyUserId());
localProcessService.createTask("proposal_info@" + proposalId, "proposal_reply_proxy@" + replyForward.getId(), "承办单位转交办理", ShiroUtil.getUserId(), List.of(user.getLoginname()), "/platform/proposal/transact/reply", "/platform/proposal/transact/reply", null, null);
}
},
COMPLETE_UNDERTAKE_PROXY_TASK {
@Override
public void exec(String proposalId, NutMap extra) {
ProposalReplyForward replyForward = extra.getAs("reply_forward", ProposalReplyForward.class);
localProcessService.completeTask(
"proposal_reply_proxy@" + replyForward.getId(),
"proposal_info@" + proposalId,
ShiroUtil.getUserId(),
null
);
}
},
CREATE_FEEDBACK_TASK() { CREATE_FEEDBACK_TASK() {
@Override @Override
@@ -447,14 +470,6 @@ public enum ProposalToDoHandler {
} }
}; };
/**
* @param proposalId 提案id
* @param secondedId 附议表id
* @param schoolLeaderPrefixId 校领导批示id
* @param replyId 答复id
* @param schoolLeaderSuffixId 校领导批示id
*/
public abstract void exec(String proposalId, NutMap extra); public abstract void exec(String proposalId, NutMap extra);
@@ -6,8 +6,14 @@ import cn.wizzer.framework.base.Result;
import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.annontation.ViReturn;
import io.v.nutz.base.utils.*; import io.v.nutz.base.utils.*;
import io.v.nutz.base.query.PageForm; import io.v.nutz.base.query.PageForm;
import io.v.nutz.sys.models.Sys_local_process_instance_task;
import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.models.Sys_user_role;
import io.v.nutz.sys.services.SysRoleService;
import io.v.nutz.sys.services.SysUserService;
import io.v.nutz.web.commons.slog.annotation.SLog; import io.v.nutz.web.commons.slog.annotation.SLog;
import io.v.nutz.zhgh.proposal.constants.ProposalState; import io.v.nutz.zhgh.proposal.constants.ProposalState;
import io.v.nutz.zhgh.proposal.constants.ProposalToDoHandler;
import io.v.nutz.zhgh.proposal.models.*; import io.v.nutz.zhgh.proposal.models.*;
import io.v.nutz.zhgh.proposal.services.ProposalCommonService; import io.v.nutz.zhgh.proposal.services.ProposalCommonService;
import io.v.nutz.zhgh.proposal.services.ProposalInfoService; import io.v.nutz.zhgh.proposal.services.ProposalInfoService;
@@ -16,14 +22,17 @@ import io.v.nutz.zhgh.proposal.services.ProposalReplyService;
import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.web.commons.utils.ShiroUtil;
import io.v.nutz.web.commons.base.Globals; import io.v.nutz.web.commons.base.Globals;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain; import org.nutz.dao.Chain;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
import org.nutz.dao.Dao; import org.nutz.dao.Dao;
import org.nutz.dao.Sqls; import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql; 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.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json; import org.nutz.json.Json;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
@@ -65,6 +74,12 @@ public class ProposalReplyController {
@Inject @Inject
private MsgApi msgApi; private MsgApi msgApi;
@Inject
private SysUserService sysUserService;
@Inject
private SysRoleService sysRoleService;
@At("") @At("")
@Ok("beetl:/platform/proposal/transact/reply.html") @Ok("beetl:/platform/proposal/transact/reply.html")
@RequiresPermissions("proposal.transact.reply") @RequiresPermissions("proposal.transact.reply")
@@ -168,10 +183,10 @@ public class ProposalReplyController {
return proposalCommonService.conJoinInfoList(proposalId); return proposalCommonService.conJoinInfoList(proposalId);
} }
@At("/findSameUnitUser/?") @At("/findSameUnitUser")
@ViReturn @ViReturn
@RequiresPermissions("proposal.transact.reply") @RequiresPermissions("proposal.transact.reply")
public Object findSameUnitUser(String val) { public Object findSameUnitUser(@Param("key") String val) {
if (StrUtil.isBlank(val)) { if (StrUtil.isBlank(val)) {
return Collections.emptyList(); return Collections.emptyList();
} }
@@ -239,4 +254,53 @@ public class ProposalReplyController {
} }
} }
@At
@ViReturn
@Aop(TransAop.READ_COMMITTED)
@RequiresPermissions("proposal.transact.reply")
public Result setProxyUser(@Param(value = "proposalId") String proposalId,
@Param(value = "proxyUserId") String proxyUserId,
@Param(value = "replyId") String replyId) {
ProposalReplyForward sourceReplyForward = dao.fetch(ProposalReplyForward.class, Cnd.where("proposalId", "=", proposalId).and("replyId", "=", replyId));
if (Lang.isNotEmpty(sourceReplyForward)) {
// 删除之前答复人的角色
dao.update(Sys_local_process_instance_task.class, Chain.make("taskDeleteFlag", true).add("delFlag", true),
Cnd.where("processUniqueId", "=", "proposal_info@" + proposalId)
.and("taskUniqueId", "=", "proposal_reply_proxy@" + sourceReplyForward.getId()));
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", sourceReplyForward.getProxyReplyUserId()).and("roleId", "=", Roles.CONTRACTOR_PROXY_PERSON));
}
// 删除之前的代答复人
dao.clear(ProposalReplyForward.class, Cnd.where("proposalId", "=", proposalId).and("replyId", "=", replyId));
// 修改代答复人
ProposalReplyForward replyForward = new ProposalReplyForward();
replyForward.setProposalId(proposalId);
replyForward.setReplyId(replyId);
replyForward.setProxyReplyUserId(proxyUserId);
dao.insert(replyForward);
// 添加代答复人角色
int count = dao.count(Sys_user_role.class, Cnd.where("userId", "=", proxyUserId).and("roleId", "=", Roles.CONTRACTOR_PROXY_PERSON));
if (count == 0) {
Sys_user_role userRole = new Sys_user_role();
userRole.setRoleId(Roles.CONTRACTOR_PROXY_PERSON);
userRole.setUserId(proxyUserId);
dao.insert(userRole);
}
// 发送消息提醒
Sys_user proxyUser = dao.fetch(Sys_user.class, proxyUserId);
String msgContent = "{}您好!您有一条转交的提案待办理,请点击消息办理。";
msgApi.sendMsg(List.of("DingTalk"), proxyUser.getLoginname(), 2, "提案转交办理", StrUtil.format(msgContent, proxyUser.getUsername()), "", Globals.AppDomain + "/platform/proposal/transact/reply");
ProposalToDoHandler.CREATE_UNDERTAKE_PROXY_TASK.exec(proposalId, NutMap.NEW().addv("reply_forward", replyForward));
// 清缓存
sysUserService.clearCache();
sysRoleService.clearCache();
return Result.success();
}
} }
@@ -75,6 +75,12 @@ public class ProposalReply extends BaseModel {
@ColDefine(type = ColType.BOOLEAN) @ColDefine(type = ColType.BOOLEAN)
private Boolean isReply; private Boolean isReply;
@Column
@Comment("是否代理答复")
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
private Boolean isProxyReply;
@Column @Column
@Comment("附件") @Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON) @ColDefine(type = ColType.MYSQL_JSON)
@@ -114,6 +120,4 @@ public class ProposalReply extends BaseModel {
@Comment("是否批示") @Comment("是否批示")
@ColDefine(type = ColType.BOOLEAN) @ColDefine(type = ColType.BOOLEAN)
private Boolean isLeaderAudit; private Boolean isLeaderAudit;
} }
@@ -41,6 +41,7 @@ public interface ProposalReplyService extends ViService<ProposalReply> {
pr.replyNumber, pr.replyNumber,
pr.replyPersonId, pr.replyPersonId,
pr.isReply, pr.isReply,
pr.isProxyReply,
pr.leaderId, pr.leaderId,
pr.replyContent, pr.replyContent,
pr.implementState, pr.implementState,
@@ -55,6 +56,7 @@ public interface ProposalReplyService extends ViService<ProposalReply> {
where JSON_CONTAINS (proposalIds,JSON_QUOTE(info.id)) where JSON_CONTAINS (proposalIds,JSON_QUOTE(info.id))
) AS isConjoin, ) AS isConjoin,
(count(prf.id) > 0) isForward, (count(prf.id) > 0) isForward,
GROUP_CONCAT(proxyReplyUser.id) proxyReplyUserId,
GROUP_CONCAT(proxyReplyUser.username) proxyReplyUserName GROUP_CONCAT(proxyReplyUser.username) proxyReplyUserName
FROM FROM
proposal_reply pr proposal_reply pr
@@ -97,9 +99,11 @@ public interface ProposalReplyService extends ViService<ProposalReply> {
pr.replyNumber, pr.replyNumber,
pr.replyPersonId, pr.replyPersonId,
pr.isReply, pr.isReply,
pr.isProxyReply,
pr.leaderId, pr.leaderId,
pr.replyContent, pr.replyContent,
pr.replyFiles, pr.replyFiles,
pr.implementState,
IF(pr.underTakeType=1,'主办','协办') AS undertakeType, IF(pr.underTakeType=1,'主办','协办') AS undertakeType,
pu.unitName as underTakeName, pu.unitName as underTakeName,
max(pr.replyNumber), max(pr.replyNumber),
@@ -111,6 +115,7 @@ public interface ProposalReplyService extends ViService<ProposalReply> {
where JSON_CONTAINS (proposalIds,JSON_QUOTE(info.id)) where JSON_CONTAINS (proposalIds,JSON_QUOTE(info.id))
) AS isConjoin, ) AS isConjoin,
(count(prf.id) > 0) isForward, (count(prf.id) > 0) isForward,
GROUP_CONCAT(proxyReplyUser.id) proxyReplyUserId,
GROUP_CONCAT(proxyReplyUser.username) proxyReplyUserName GROUP_CONCAT(proxyReplyUser.username) proxyReplyUserName
FROM FROM
proposal_reply pr proposal_reply pr
@@ -105,6 +105,8 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
nutMap.setv("brief", nutMap.getString("brief")); nutMap.setv("brief", nutMap.getString("brief"));
nutMap.setv("measures", nutMap.getString("measures")); nutMap.setv("measures", nutMap.getString("measures"));
nutMap.setv("hostUnitName", nutMap.getString("under1Unit"));
nutMap.setv("helpUnitName", nutMap.getString("under2Unit", "暂无协办"));
String createUserSignData = nutMap.getString("createUserSignData"); String createUserSignData = nutMap.getString("createUserSignData");
// nutMap.setv("createUserSign", StrUtil.isNotBlank(createUserSignData) ? getImg(createUserSignData) : null); // nutMap.setv("createUserSign", StrUtil.isNotBlank(createUserSignData) ? getImg(createUserSignData) : null);
@@ -238,9 +240,9 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (nutMap.getString("resultCode").equals("determine")) { if ("determine".equals(nutMap.getString("resultCode"))) {
v.setv("resultAudit", "经提案工作委员会研究,符合提案立案条件,予以立案,此提案建议由%s办理,%s协办。".formatted(nutMap.getString("under1Unit"), (Strings.isNotBlank(nutMap.getString("under2Unit")) ? nutMap.getString("under2Unit") : "暂无"))); v.setv("resultAudit", "经提案工作委员会研究,符合提案立案条件,予以立案,此提案建议由%s办理,%s协办。".formatted(nutMap.getString("under1Unit"), (Strings.isNotBlank(nutMap.getString("under2Unit")) ? nutMap.getString("under2Unit") : "暂无")));
} else if (nutMap.getString("resultCode").equals("opinion")) { } else if ("opinion".equals(nutMap.getString("resultCode"))) {
v.setv("resultAudit", "作为意见建议转送参考"); v.setv("resultAudit", "作为意见建议转送参考");
} else { } else {
v.setv("resultAudit", "该提案不予立项,不予立案原因属于以下提案内容"); v.setv("resultAudit", "该提案不予立项,不予立案原因属于以下提案内容");
@@ -403,7 +405,10 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
map.put("helpundertakeReplyList", helpundertakeReplyList); map.put("helpundertakeReplyList", helpundertakeReplyList);
map.put("leaderList", leaderList); map.put("leaderList", leaderList);
map.put("feedbackList", feedbackList); map.put("feedbackList", feedbackList);
XWPFTemplate.compile(officeTemplateUtil.getPath("proposal_info"), config).render(map).writeAndClose(outputStream); String templateUrl = StrUtil.isBlank(nutMap.getString("hostUnitName")) ?
officeTemplateUtil.getPath("proposal_info") :
officeTemplateUtil.getPath("proposal_host_help_unit");
XWPFTemplate.compile(templateUrl, config).render(map).writeAndClose(outputStream);
} }
private PictureRenderData getImg(String base64) throws IOException { private PictureRenderData getImg(String base64) throws IOException {
@@ -4,9 +4,12 @@ import cn.hutool.core.util.StrUtil;
import cn.wizzer.framework.base.Result; import cn.wizzer.framework.base.Result;
import cn.wizzer.framework.page.Pagination; import cn.wizzer.framework.page.Pagination;
import io.v.nutz.base.utils.DateUtil; 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.Roles;
import io.v.nutz.base.dao.CndPlus; import io.v.nutz.base.dao.CndPlus;
import io.v.nutz.base.query.PageForm; import io.v.nutz.base.query.PageForm;
import io.v.nutz.base.utils.Vi;
import io.v.nutz.sys.models.Sys_local_process_instance_task;
import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.services.SysLocalProcessService; import io.v.nutz.sys.services.SysLocalProcessService;
import io.v.nutz.web.commons.base.Globals; import io.v.nutz.web.commons.base.Globals;
@@ -24,6 +27,7 @@ import io.v.nutz.sys.models.Sys_user_role;
import io.v.nutz.sys.services.SysRoleService; import io.v.nutz.sys.services.SysRoleService;
import io.v.nutz.sys.services.SysUserService; import io.v.nutz.sys.services.SysUserService;
import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.web.commons.utils.ShiroUtil;
import lombok.val;
import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain; import org.nutz.dao.Chain;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
@@ -34,6 +38,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop; import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings; import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
@@ -68,6 +73,9 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
@Inject @Inject
private SysLocalProcessService sysLocalProcessService; private SysLocalProcessService sysLocalProcessService;
@Inject
private MsgApi msgApi;
/** /**
* 系统管理员查询记录 * 系统管理员查询记录
* *
@@ -137,8 +145,14 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
// cnd.and("pr.replyUnitId", "in", manageUnderTakeIds); // cnd.and("pr.replyUnitId", "in", manageUnderTakeIds);
if (Strings.isNotBlank(search.getIsAudit())) { if (Strings.isNotBlank(search.getIsAudit())) {
cnd.and("pr.isReply", "=", "true".equals(search.getIsAudit()) ? 1 : 0);
cnd.and("info.stateCode", "true".equals(search.getIsAudit()) ? ">=" : "=", ProposalState.UNITREPLY); if(ShiroUtil.hasRole("proxyT01")){
cnd.and("pr.isProxyReply", "=", "true".equals(search.getIsAudit()) ? 1 : 0);
cnd.and("info.stateCode", "true".equals(search.getIsAudit()) ? ">=" : "=", ProposalState.UNITREPLY);
}else{
cnd.and("pr.isReply", "=", "true".equals(search.getIsAudit()) ? 1 : 0);
cnd.and("info.stateCode", "true".equals(search.getIsAudit()) ? ">=" : "=", ProposalState.UNITREPLY);
}
} else { } else {
cnd.and("info.stateCode", ">=", ProposalState.UNITREPLY); cnd.and("info.stateCode", ">=", ProposalState.UNITREPLY);
} }
@@ -304,7 +318,11 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
chain.add("replyPersonId", auditUserId); chain.add("replyPersonId", auditUserId);
chain.add("replyTime", auditTime); chain.add("replyTime", auditTime);
chain.add("replySignId", signId); chain.add("replySignId", signId);
chain.add("isReply", isSave ? 0 : 1); if (ShiroUtil.hasRole("proxyT01")) {
chain.add("isProxyReply", isSave ? 0 : 1);
} else {
chain.add("isReply", isSave ? 0 : 1);
}
chain.add("replyFiles", reply.getReplyFiles()); chain.add("replyFiles", reply.getReplyFiles());
List<String> conjoin = proposalCommonService.findConjoin(proposalId); List<String> conjoin = proposalCommonService.findConjoin(proposalId);
@@ -315,13 +333,36 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
dao().update(ProposalReply.class, chain, cnd); dao().update(ProposalReply.class, chain, cnd);
if (!isSave) { if (!isSave) {
//完成自己待办 if (ShiroUtil.hasRole("proxyT01")) {
ProposalToDoHandler.COMPLETE_UNDERTAKE_TASK.exec(proposalId, NutMap.NEW().addv("reply", reply)); //完成自己待办
ProposalReplyForward replyForward = dao().fetch(ProposalReplyForward.class, Cnd.where("replyId", "=", reply.getId()));
ProposalToDoHandler.COMPLETE_UNDERTAKE_PROXY_TASK.exec(proposalId, NutMap.NEW().addv("reply_forward", replyForward));
// 提醒一把手
List<String> underTakeLeader = proposalCommonService.getUnderTakeLeader(reply.getReplyUnitId());
String msgContent = "您转交的提案已由转交人办理完成,请您及时提交提案办理内容!";
msgApi.sendMsg(List.of("DingTalk"),underTakeLeader, 2, "转交答复完成", msgContent, "", Globals.AppDomain + "/platform/proposal/transact/reply");
return;
} else {
//完成自己待办
ProposalToDoHandler.COMPLETE_UNDERTAKE_TASK.exec(proposalId, NutMap.NEW().addv("reply", reply));
ProposalReply proposalReply = dao().fetch(ProposalReply.class, reply.getId());
ProposalReplyForward proposalReplyForward = dao().fetch(ProposalReplyForward.class, Cnd.where("replyId", "=", reply.getId()).and("proposalId", "=", proposalId));
if (Lang.isNotEmpty(proposalReplyForward)) {
dao().update(Sys_local_process_instance_task.class, Chain.make("status", 2),
Cnd.where("processUniqueId", "=", "proposal_info@" + proposalId)
.and("taskUniqueId", "=", "proposal_reply_proxy@" + proposalReplyForward.getId()));
proposalReply.setIsProxyReply(true);
dao().update(proposalReply, "isProxyReply");
}
}
//全部答复完 //全部答复完
if (checkAllReply(proposalId)) { if (checkAllReply(proposalId)) {
ProposalInfo proposalInfo = dao().fetch(ProposalInfo.class, proposalId); ProposalInfo proposalInfo = dao().fetch(ProposalInfo.class, proposalId);
if (proposalInfo.getResultCode().equals(ProposalConstant.DETERMINE)) { if (proposalInfo.getResultCode().equals(ProposalConstant.DETERMINE) || proposalInfo.getResultCode().equals(ProposalConstant.OPINION)) {
int stateCode = proposalProcessService.getStateCode(proposalId, ProposalStateDirectionEnum.NEXT, false); int stateCode = proposalProcessService.getStateCode(proposalId, ProposalStateDirectionEnum.NEXT, false);
proposalInfo.setStateCode(stateCode); proposalInfo.setStateCode(stateCode);
//插入领导审批记录 //插入领导审批记录
@@ -333,6 +374,11 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
dao().insert(leaderSuffixAudit); dao().insert(leaderSuffixAudit);
ProposalToDoHandler.CREATE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalId, NutMap.NEW().addv("leaderSuffixAudit", leaderSuffixAudit)); ProposalToDoHandler.CREATE_BRANCH_LEADER_SUFFIX_AUDIT_TASK.exec(proposalId, NutMap.NEW().addv("leaderSuffixAudit", leaderSuffixAudit));
// 发送短信
List<String> underTakeSchoolLeader = proposalCommonService.getUnderTakeSchoolLeader(leaderSuffixAudit.getUnderTakeId());
String msgContent = "校领导,您分管部门承办的提案(建议)已提交办理结果,请您审核!";
msgApi.sendMsg(List.of("DingTalk"), underTakeSchoolLeader, 2, "提案校领导审批", msgContent, "", Globals.AppDomain + "/platform/proposal/transact/branchLeaderSuffixAudit");
} else { } else {
proposalInfo.setStateCode(ProposalState.FINISH); proposalInfo.setStateCode(ProposalState.FINISH);
//流程完结 //流程完结
@@ -358,14 +404,28 @@ public class ProposalReplyServiceImpl extends ViServiceImpl<ProposalReply> imple
@Override @Override
public List<NutMap> findSameUnitUser(String val) { public List<NutMap> findSameUnitUser(String val) {
String unitId = ShiroUtil.getUnitId(); // String unitId = ShiroUtil.getUnitId();
String userId = (String) ShiroUtil.getPrincipalProperty("id"); String unionId = Vi.getUnionId();
Sql sql = Sqls.create(""" String userId = ShiroUtil.getUserId();
select id,username,loginname from `user` Sql sql = Sqls.create("select id,loginname,username from `user` $condition");
where unitid = @unitid and id != @me Cnd cnd = Cnd.NEW();
and (username like @keyWord or loginname like @keyWord) if (!ShiroUtil.hasAnyRoles("sysadmin")) {
""").setParam("unitid", unitId).setParam("me", userId); // cnd.and("unitId", "=", unitId);
sql.setParam("keyWord", "%" + val + "%"); cnd.and("unionId", "=", unionId);
}
cnd.and("id", "!=", userId);
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("username", "like", val);
seg.or("loginname", "like", val);
cnd.and(seg);
sql.setCondition(cnd);
//
// Sql sql = Sqls.create("""
// select id,username,loginname from `user`
// where unitid = @unitid and id != @me
// and (username like @keyWord or loginname like @keyWord)
// """).setParam("unitid", unitId).setParam("me", userId);
// sql.setParam("keyWord", "%" + val + "%");
return listPage(1, 10, sql).getList(); return listPage(1, 10, sql).getList();
} }
@@ -365,7 +365,7 @@ module.exports = {
} }
return this.panes.includes(name) return this.panes.includes(name)
}, },
async openView(id) { async openView(id, activeName = "1") {
this.loading = true this.loading = true
this.viewData = await proposal.getProposalInfo(id) this.viewData = await proposal.getProposalInfo(id)
@@ -404,7 +404,7 @@ module.exports = {
}) })
} }
this.activeName = this.handle ? "999" : "1" this.activeName = this.handle ? "999" : activeName
this.loading = false this.loading = false
} }
}, },
+11 -10
View File
@@ -617,7 +617,7 @@ layout("/mobile/platform.html"){
await this.getWelfareCheckSelfAgenda() await this.getWelfareCheckSelfAgenda()
await this.getCompletes(); await this.getCompletes();
await this.getMsg() await this.getMsg()
this.listActivity(); await this.listActivity();
this.needCount = this.needItems.length this.needCount = this.needItems.length
}, },
async setNeedItems() { async setNeedItems() {
@@ -705,12 +705,11 @@ layout("/mobile/platform.html"){
this.perfectPersonInfo = resp.data this.perfectPersonInfo = resp.data
} }
}, },
listActivity() { async listActivity() {
$.get("/platform/sys/homeActivity/listHomeActivity").then((resp) => { const resp = await $.get("/platform/sys/homeActivity/listHomeActivity")
if (resp.code === 0) { if (resp.code === 0) {
this.activityList = resp.data this.activityList = resp.data
} }
})
}, },
}, },
beforeMount() { beforeMount() {
@@ -720,12 +719,14 @@ layout("/mobile/platform.html"){
await this.getMenus(); await this.getMenus();
this.getAllMonth(); this.getAllMonth();
this.createYearList(); this.createYearList();
this.initData(); await this.initData();
const active = sessionStorage.getItem("zhgh-mobile-home-active") const active = sessionStorage.getItem("zhgh-mobile-home-active")
this.active = active ? parseInt(active) : 0 this.active = active ? parseInt(active) : 0
this.clickIndex = 2 if (!this.activityList || !this.activityList.length > 0) {
this.clickMenu = this.moduleMenus.find(o => o.moduleName === '职工权益') this.clickIndex = 2
this.clickMenu = this.moduleMenus.find(o => o.moduleName === '职工权益')
}
} }
}) })
@@ -72,66 +72,63 @@ layout("/layouts/platform.html"){
</template> </template>
<template #edit> <template #edit>
<proposal-info ref="audit" label="分管校领导审批" handle> <proposal-info ref="audit"></proposal-info>
<template #handle>
<el-form :model="formData" ref="auditForm" :rules="formRules" label-width="120px"> <el-form style="margin-top: 20px" :model="formData" ref="auditForm" :rules="formRules" label-width="120px">
<!-- <vi-title :title="proTableData.length > 1 ? '并案信息' : '提案信息'"></vi-title>--> <!-- <vi-title :title="proTableData.length > 1 ? '并案信息' : '提案信息'"></vi-title>-->
<!-- <el-form-item>--> <!-- <el-form-item>-->
<!-- <el-table :data="proTableData" tooltip-effect="dark"--> <!-- <el-table :data="proTableData" tooltip-effect="dark"-->
<!-- style="width: 100%">--> <!-- style="width: 100%">-->
<!-- <el-table-column align="left" header-align="left" prop="proposalCode"--> <!-- <el-table-column align="left" header-align="left" prop="proposalCode"-->
<!-- label="提案编号"></el-table-column>--> <!-- label="提案编号"></el-table-column>-->
<!-- <el-table-column align="left" header-align="left" prop="username"--> <!-- <el-table-column align="left" header-align="left" prop="username"-->
<!-- label="提案人"--> <!-- label="提案人"-->
<!-- show-overflow-tooltip></el-table-column>--> <!-- show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column align="left" header-align="left" prop="proposalName" label="提案名称"--> <!-- <el-table-column align="left" header-align="left" prop="proposalName" label="提案名称"-->
<!-- show-overflow-tooltip>--> <!-- show-overflow-tooltip>-->
<!-- <template slot-scope="{row}">--> <!-- <template slot-scope="{row}">-->
<!-- <span @click="openView(row)"--> <!-- <span @click="openView(row)"-->
<!-- style="color: #236eb4; cursor: pointer; text-decoration: underline">{{row.proposalName}}</span>--> <!-- style="color: #236eb4; cursor: pointer; text-decoration: underline">{{row.proposalName}}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<!-- </el-table>--> <!-- </el-table>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<vi-title title="审核信息"></vi-title> <vi-title title="分管校领导审批信息"></vi-title>
<div style="text-align: center;margin-top: -40px;" <div style="text-align: center;margin-top: -40px;"
v-if="formData.auditUnderTakeList && formData.auditUnderTakeList.length>1"> v-if="formData.auditUnderTakeList && formData.auditUnderTakeList.length>1">
<span class="text-danger">温馨提醒:该提案的承办单位【{{formData.auditUnderTakeName}}】是由您来分管的,只需要审批一次即可。</span> <span class="text-danger">温馨提醒:该提案的承办单位【{{formData.auditUnderTakeName}}】是由您来分管的,只需要审批一次即可。</span>
</div> </div>
<el-row gutter="20"> <el-row gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="username" label="审核人"> <el-form-item prop="username" label="审核人">
<el-input v-model="formData.username" readonly></el-input> <el-input v-model="formData.username" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="opinion">
<el-input type="textarea" v-model="formData.opinion" rows="4" maxlength="1000"
placeholder="请填写您的审批意见"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="isSign()" prop="sign" label="签&emsp;&emsp;字"> </el-col>
<sign prefix="proposal" :qz.sync="formData.sign"></sign> <el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" readonly></el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="opinion">
<el-input type="textarea" v-model="formData.opinion" rows="4" maxlength="1000"
placeholder="请填写您的审批意见"></el-input>
</el-form-item>
<el-form-item v-if="isSign()" prop="sign" label="签&emsp;&emsp;字">
<sign prefix="proposal" :qz.sync="formData.sign"></sign>
</el-form-item>
<el-row style="margin: 40px 0;text-align: right"> <el-row style="margin: 40px 0;text-align: right">
<el-button @click="$refs.guava.index()"> <el-button @click="$refs.guava.index()">
取消 取消
</el-button> </el-button>
<el-button type="primary" :disabled="submitDisabled" @click="doAudit(true)"> <el-button type="primary" :disabled="submitDisabled" @click="doAudit(true)">
提交 提交
</el-button> </el-button>
</el-row> </el-row>
</el-form> </el-form>
</template>
</proposal-info>
</template> </template>
<template #view> <template #view>
@@ -244,7 +241,7 @@ layout("/layouts/platform.html"){
this.$refs['auditForm'].resetFields() this.$refs['auditForm'].resetFields()
} }
this.$refs.guava.edit() this.$refs.guava.edit()
this.$refs.audit.openView(row.id) this.$refs.audit.openView(row.id, "11")
this.formData.pblsaId = row.pblsaId this.formData.pblsaId = row.pblsaId
this.formData.underTakeId = row.underTakeId this.formData.underTakeId = row.underTakeId
@@ -279,8 +276,16 @@ layout("/layouts/platform.html"){
} }
}, },
async created() { async created() {
this.isNode = await proposal.getProposalIsNodeState(600) if (window.innerWidth < 768 && location.pathname === "/platform/proposal/transact/branchLeaderSuffixAudit") {
await proposal.initData(this) this.$confirm("请您使用电脑端访问此界面,以获取更好的体验!", "提示", {
confirmButtonText: "确定",
cancelButtonTest: "取消",
type: "warning"
})
} else {
this.isNode = await proposal.getProposalIsNodeState(600)
await proposal.initData(this)
}
} }
}) })
</script> </script>
@@ -16,8 +16,14 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10"> <el-card shadow="never" class="mt10">
<table-tool label="提案列表" :app="this"> <table-tool label="提案列表" :app="this">
<template #func> <template #func>
<el-button v-if="pageForm.listButtonTypeAdmin" type="primary" @click="openSendMsg" size="small">一键提醒</el-button> <el-button v-if="pageForm.listButtonTypeAdmin && $auth.hasRole('sysadmin')" type="primary"
<el-button type="warning" @click="changeListType" size="small">切换成“{{pageForm.listButtonTypeAdmin ? '承办单位' : '管理员'}}”列表</el-button> @click="openSendMsg" size="small">
一键提醒
</el-button>
<el-button type="warning" @click="changeListType" size="small"
v-if="$auth.hasRoleOr('sysadmin')">
切换成“{{pageForm.listButtonTypeAdmin ? '承办单位' : '管理员'}}”列表
</el-button>
</template> </template>
</table-tool> </table-tool>
<el-table ref="proTable" <el-table ref="proTable"
@@ -29,59 +35,79 @@ layout("/layouts/platform.html"){
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
:size="tableSize" :size="tableSize"
@sort-change="pageOrder"> @sort-change="pageOrder">
<el-table-column <!-- <el-table-column-->
v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}" <!-- v-if="${@shiro.hasRole('T01') || @shiro.hasRole('sysadmin')}"-->
:selectable="(row)=>{return !row.isReply}" <!-- :selectable="(row)=>{return !row.isReply}"-->
reserve-selection <!-- reserve-selection-->
type="selection" <!-- type="selection"-->
width="55"> <!-- width="55">-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="center" header-align="center" label="序号" type="index" width="80"> <el-table-column align="center" header-align="center" label="序号" type="index" width="60">
<template scope="scope"> <template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span> <span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:align="column.align?column.align:'center'" :align="column.align?column.align:'center'"
header-align="center" header-align="center"
v-for="column in tableColumns" v-for="column in tableColumns"
show-overflow-tooltip show-overflow-tooltip
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:key="column.prop" :key="column.prop"
:width="column.width" :width="column.width"
:sortable="column.sortable" :sortable="column.sortable"
> >
<template v-if="column.prop=='proposalName'" scope="{row}"> <template v-if="column.prop=='proposalName'" scope="{row}">
<el-link type="primary" @click="openView(row)">{{ row.proposalName }}</el-link> <el-link type="primary" @click="openView(row)">{{ row.proposalName }}</el-link>
</template> </template>
<template v-else-if="column.prop=='isReply'" scope="{row}"> <template v-else-if="column.prop=='isReply'" scope="{row}">
<span v-if="row.isReply" class="text-success">已办理</span> <template v-if="$auth.hasRole('proxyT01')">
<span v-else class="text-danger">办理</span> <span v-if="row.isProxyReply" class="text-success">办理</span>
<span v-else class="text-danger">未办理</span>
</template>
<template v-else>
<span v-if="row.isReply" class="text-success">已办理</span>
<span v-else-if="row.isProxyReply" class="text-warning">转交已办理,待提交</span>
<span v-else class="text-danger">未办理</span>
</template>
</template>
<!-- <template v-else-if="column.prop=='determineTypeCode'" scope="{row}">-->
<!-- {{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?-->
<!-- '普通':'否'}}-->
<!-- </template>-->
<!-- <template v-else-if="column.prop=='isConjoin'" scope="{row}">-->
<!-- {{row.isConjoin?'是':'否'}}-->
<!-- </template>-->
<template v-else-if="column.prop==='isForward'" scope="{row}">
<span v-if="row.isForward" class="text-primary">是({{row.proxyReplyUserName}}</span>
<span v-else></span>
</template> </template>
<!-- <template v-else-if="column.prop=='determineTypeCode'" scope="{row}">-->
<!-- {{row.determineTypeCode === 'emphasis' ? '重点' :row.determineTypeCode === 'ordinary'?-->
<!-- '普通':'否'}}-->
<!-- </template>-->
<!-- <template v-else-if="column.prop=='isConjoin'" scope="{row}">-->
<!-- {{row.isConjoin?'是':'否'}}-->
<!-- </template>-->
<!-- <template v-else-if="column.prop==='isForward'" scope="{row}">-->
<!-- <span v-if="row.isForward" class="text-primary">是({{row.proxyReplyUserName}}</span>-->
<!-- <span v-else>否</span>-->
<!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column :width="250" align="center" fixed="right" <el-table-column :width="300" align="center" fixed="right"
header-align="center" header-align="center"
label="操作"> label="操作">
<template scope="{row}"> <template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="!row.isReply && $auth.hasRoleOr('sysadmin, A06, tamange, jdh10')" <el-button v-if="!row.isReply && $auth.hasRoleOr('sysadmin, A06, tamange, jdh10')"
type="warning" @click="openSendMsg(row)" size="mini">催办</el-button> type="warning" @click="openSendMsg(row)" size="mini">催办
<el-button v-if="!row.isReply" type="primary" @click="openAudit(row)" size="mini">办理
</el-button> </el-button>
<el-button v-if="!row.isReply && $auth.hasRoleOr('sysadmin,T01') && !row.isProxyReply" type="primary"
@click="openProxy(row)" size="mini">
转交
</el-button>
<template v-if="row.isForward">
<el-button v-if="!row.isProxyReply && $auth.hasRoleOr('proxyT01')" type="primary" @click="openAudit(row)" size="mini">办理
</el-button>
<el-button v-else-if="!row.isReply && !$auth.hasRoleOr('proxyT01')" type="primary" @click="openAudit(row)" size="mini">办理
</el-button>
</template>
<template v-else>
<el-button v-if="!row.isReply" type="primary" @click="openAudit(row)" size="mini">办理
</el-button>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -126,7 +152,7 @@ layout("/layouts/platform.html"){
<el-form-item prop="replyContent" label="办理内容" class="is-required"> <el-form-item prop="replyContent" label="办理内容" class="is-required">
<text-editor v-model="formData.replyContent"></text-editor> <text-editor v-model="formData.replyContent"></text-editor>
<!-- <div id="replyContentEditor"></div>--> <!-- <div id="replyContentEditor"></div>-->
</el-form-item> </el-form-item>
<el-form-item prop="files" label="附件上传"> <el-form-item prop="files" label="附件上传">
@@ -143,7 +169,6 @@ layout("/layouts/platform.html"){
<el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提交 <el-button :disabled="submitDisabled" @click="doReply(false)" type="primary">提交
</el-button> </el-button>
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
</proposal-info> </proposal-info>
@@ -171,19 +196,19 @@ layout("/layouts/platform.html"){
<vi-title title="转交用户" class="mt10"></vi-title> <vi-title title="转交用户" class="mt10"></vi-title>
<el-select <el-select
v-model="forwardUserSelection" v-model="forwardUserSelection"
clearable clearable
filterable filterable
remote remote
reserve-keyword reserve-keyword
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="findSameUnitUser" :remote-method="findSameUnitUser"
> >
<el-option <el-option
v-for="item in forwardUserList" v-for="item in proxyUserList"
:key="item.id" :key="item.id"
:label="item.username+'('+item.loginname+')'" :label="item.username+'('+item.loginname+')'"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-row type="flex" justify="end" class="mt10"> <el-row type="flex" justify="end" class="mt10">
@@ -208,7 +233,6 @@ layout("/layouts/platform.html"){
</el-row> </el-row>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="sendMsgDialogVisible" :visible.sync="sendMsgDialogVisible"
@@ -246,6 +270,38 @@ layout("/layouts/platform.html"){
<el-button @click="sendMsg" type="primary">确 定</el-button> <el-button @click="sendMsg" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="proxyDialog" title="转交答复" width="30%">
<el-form :model="proxyFormData" label-width="80px" ref="proxyForm">
<el-form-item
:rules="[{required: true, message: '请选择转交用户', trigger: ['blur', 'change']}]"
label="转交用户"
prop="proxyUserId">
<el-select
v-model="proxyFormData.proxyUserId"
clearable
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="findSameUnitUser"
>
<el-option
v-for="item in proxyUserList"
:key="item.id"
:value="item.id"
:label="item.username+'('+item.loginname+')'"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span class="dialog-footer" slot="footer">
<el-button @click="proxyDialog = false">取 消</el-button>
<el-button @click="confirmProxyReply" type="primary">确 定</el-button>
</span>
</el-dialog>
</div> </div>
<script> <script>
@@ -255,22 +311,22 @@ layout("/layouts/platform.html"){
// let replyContentEditor = null // let replyContentEditor = null
const vue = new Vue({ const vue = new Vue({
el: '#app', el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
components: { components: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'), "file-upload": httpVueLoader("/components/plugins/FileUpload.vue"),
'proposal-info': httpVueLoader('/components/proposal/ProposalInfo.vue?v=1.0.1'), "proposal-info": httpVueLoader("/components/proposal/ProposalInfo.vue?v=1.0.1"),
'proposal-search': httpVueLoader('/components/proposal/ProposalSearch.vue'), "proposal-search": httpVueLoader("/components/proposal/ProposalSearch.vue"),
'proposal-table': httpVueLoader('/components/proposal/ProposalTable.vue') "proposal-table": httpVueLoader("/components/proposal/ProposalTable.vue")
}, },
data() { data() {
let replyContentBrief = (rule, value, callback) => { let replyContentBrief = (rule, value, callback) => {
if (!this.formData.replyContent || !dd3s.html2txt(this.formData.replyContent)) { if (!this.formData.replyContent || !dd3s.html2txt(this.formData.replyContent)) {
callback(new Error('请填写办理内容')); callback(new Error("请填写办理内容"))
} else { } else {
callback(); callback()
} }
}; }
return { return {
proTableData: [], proTableData: [],
isSign: () => { isSign: () => {
@@ -279,46 +335,50 @@ layout("/layouts/platform.html"){
conJoinProposalName: "", conJoinProposalName: "",
conJoinProposal: [], conJoinProposal: [],
tableColumns: [ tableColumns: [
{prop: 'proposalCode', label: '提案编号', width: "120", sortable: true, disabled: true}, { prop: "proposalCode", label: "提案编号", width: "100", sortable: true, disabled: true },
{prop: 'proposalName', label: '提案名称', width: "300", disabled: true}, { prop: "proposalName", label: "提案名称", width: "300", disabled: true },
{prop: 'username', label: '提案人', disabled: true}, { prop: "username", label: "提案人", disabled: true },
{prop: 'typeCode', label: '提案类型编码', sortable: true, checked: 0}, { prop: "typeCode", label: "提案类型编码", sortable: true, checked: 0 },
{prop: 'typeName', label: '提案类型', sortable: true, checked: 0}, { prop: "typeName", label: "提案类型", sortable: true, checked: 0 },
{prop: 'mannerCode', label: '提案方式编码', sortable: true, checked: 0}, { prop: "mannerCode", label: "提案方式编码", sortable: true, checked: 0 },
{prop: 'mannerName', label: '提案方式', sortable: true, checked: 0}, { prop: "mannerName", label: "提案方式", sortable: true, checked: 0 },
{prop: 'meetingName', label: '届次', sortable: true, checked: 0}, { prop: "meetingName", label: "届次", sortable: true, checked: 0 },
{prop: 'delegationCode', label: '代表团编码', sortable: true, checked: 0}, { prop: "delegationCode", label: "代表团编码", sortable: true, checked: 0 },
{prop: 'delegationName', label: '代表团', sortable: true, checked: 0}, { prop: "delegationName", label: "代表团", sortable: true, checked: 0 },
{prop: 'resultName', label: '立案结果', sortable: true}, { prop: "resultName", label: "立案结果", sortable: true },
// {prop: 'isConjoin', label: '是否并案'}, // {prop: 'isConjoin', label: '是否并案'},
// {prop: 'determineTypeCode', label: '是否重点'}, // {prop: 'determineTypeCode', label: '是否重点'},
{prop: 'underTakeName', label: '承办单位', sortable: false}, { prop: "underTakeName", label: "承办单位", sortable: false },
{prop: 'undertakeType', label: '承办类型', sortable: false}, { prop: "undertakeType", label: "承办类型", sortable: false },
{prop: 'replyNumber', label: '办理次数', width: "80", sortable: false}, { prop: "replyNumber", label: "办理次数", width: "80", sortable: false },
{prop: 'stateName', label: '提案状态', sortable: true}, { prop: "stateName", label: "提案状态", sortable: true },
// {prop: 'isForward', label: '转交办理', sortable: true}, { prop: "isForward", label: "转交办理", sortable: true },
// {prop: 'proxyReplyUserName', label: '转交办理人', sortable: true}, // {prop: 'proxyReplyUserName', label: '转交办理人', sortable: true},
{prop: 'isReply', label: '办理状态', sortable: false}, { prop: "isReply", label: "办理状态", sortable: false }
], ],
submitDisabled: false, submitDisabled: false,
pageForm: { pageForm: {
searchName: 'proposalName', searchName: "proposalName",
isAudit: false, isAudit: false,
listButtonTypeAdmin: true listButtonTypeAdmin: true
}, },
formData: { formData: {
username: "${@shiro.getPrincipalProperty('username')}", username: "${@shiro.getPrincipalProperty('username')}",
replyTime: moment().format('YYYY-MM-DD'), replyTime: moment().format("YYYY-MM-DD"),
implementState: '', implementState: "",
replySign: '', replySign: "",
proposalName: '', proposalName: "",
proposalCode: '', proposalCode: "",
createUser: '' createUser: ""
}, },
formRules: { formRules: {
replyContent: [{validator: replyContentBrief, trigger: ['blur', 'change']}], replyContent: [{ validator: replyContentBrief, trigger: ["blur", "change"] }],
implementState: [{required: true, message: '请选择落实情况', trigger: ['blur', 'change']}], implementState: [{ required: true, message: "请选择落实情况", trigger: ["blur", "change"] }],
sign: [{required: true, message: '请使用【手机钉钉】扫描二维码进行签字', trigger: ['blur', 'change']}] sign: [{
required: true,
message: "请使用【手机钉钉】扫描二维码进行签字",
trigger: ["blur", "change"]
}]
}, },
proTableSelection: [], proTableSelection: [],
forwardDialog: false, forwardDialog: false,
@@ -333,12 +393,16 @@ layout("/layouts/platform.html"){
*/ */
sendMsgDialogVisible: false, sendMsgDialogVisible: false,
sendFormData: { sendFormData: {
sessionId: '', sessionId: "",
proposalId: '', proposalId: "",
proposalName: '', proposalName: "",
title: '提案承办通知', title: "提案承办通知",
content: '您部门有新交办的提案,请及时查收处理,并按规定于收到此信息之日起2个月内办结。' content: "您部门有新交办的提案,请及时查收处理,并按规定于收到此信息之日起2个月内办结。"
}, },
proxyDialog: false,
proxyFormData: {},
proxyUserList: []
} }
}, },
methods: { methods: {
@@ -348,23 +412,23 @@ layout("/layouts/platform.html"){
this.sendMsgDialogVisible = true this.sendMsgDialogVisible = true
}, },
async sendMsg() { async sendMsg() {
const valid = await this.$refs['sendForm'].validate() const valid = await this.$refs["sendForm"].validate()
if (!valid) return if (!valid) return
const confirm = await this.$confirm('您确定要向发送信息吗?', '提示', { const confirm = await this.$confirm("您确定要向发送信息吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonTest: '取消', cancelButtonTest: "取消",
type: 'warning' type: "warning"
}) })
if (confirm === "confirm") { if (confirm === "confirm") {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: '加载中,请稍后...', text: "加载中,请稍后...",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)"
}); })
const resp = await $.post('/platform/proposal/transact/reply/sendNotify', { const resp = await $.post("/platform/proposal/transact/reply/sendNotify", {
sessionId: this.pageForm.meetingId, sessionId: this.pageForm.meetingId,
proposalId: this.sendFormData.proposalId, proposalId: this.sendFormData.proposalId,
title: this.sendFormData.title, title: this.sendFormData.title,
@@ -381,17 +445,17 @@ layout("/layouts/platform.html"){
}, },
// 列表类型切换 // 列表类型切换
changeListType(){ changeListType() {
this.pageForm.listButtonTypeAdmin = !this.pageForm.listButtonTypeAdmin this.pageForm.listButtonTypeAdmin = !this.pageForm.listButtonTypeAdmin
this.pageData() this.pageData()
}, },
async oneKeyRemind() { async oneKeyRemind() {
const {meetingId} = this.pageForm const { meetingId } = this.pageForm
if (!meetingId) { if (!meetingId) {
this.$message.warning('请先选择教代会届次') this.$message.warning("请先选择教代会届次")
return return
} }
const resp = await $.get(loc() + '/selectReadySendMsgUsers', {meetingId}) const resp = await $.get(loc() + "/selectReadySendMsgUsers", { meetingId })
if (resp.code === 0) { if (resp.code === 0) {
this.oneKeyRemindDialogVisible = true this.oneKeyRemindDialogVisible = true
this.oneKeyTableData = resp.data this.oneKeyTableData = resp.data
@@ -403,22 +467,22 @@ layout("/layouts/platform.html"){
async confirmOneKeyRemind() { async confirmOneKeyRemind() {
const selection = this.$refs.oneKeyRemindTable.selection const selection = this.$refs.oneKeyRemindTable.selection
if (selection.length === 0) { if (selection.length === 0) {
this.$message.warning('请选择需要提醒的提案') this.$message.warning("请选择需要提醒的提案")
return return
} }
// if (this.oneKeyTableData.length === 0) { // if (this.oneKeyTableData.length === 0) {
// this.$message.warning('没有可提醒的记录') // this.$message.warning('没有可提醒的记录')
// return // return
// } // }
const {meetingId} = this.pageForm const { meetingId } = this.pageForm
const confirm = await this.$confirm('确认要一键提醒未答复的承办单位负责人吗?', '提示', { const confirm = await this.$confirm("确认要一键提醒未答复的承办单位负责人吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}) })
if (!confirm) return if (!confirm) return
const proposalIds = selection.map(v => v.id) const proposalIds = selection.map(v => v.id)
const resp = await $.post(loc() + '/oneKeyRemind', {proposalIds: JSON.stringify(proposalIds)}) const resp = await $.post(loc() + "/oneKeyRemind", { proposalIds: JSON.stringify(proposalIds) })
if (resp.code === 0) { if (resp.code === 0) {
this.oneKeyRemindDialogVisible = false this.oneKeyRemindDialogVisible = false
this.oneKeyTableData = [] this.oneKeyTableData = []
@@ -431,9 +495,10 @@ layout("/layouts/platform.html"){
this.proTableSelection = val this.proTableSelection = val
}, },
async findSameUnitUser(val) { async findSameUnitUser(val) {
const resp = await $.get(loc() + '/findSameUnitUser/' + val) const resp = await $.get(loc() + "/findSameUnitUser", { key: val })
if (resp.code === 0) { if (resp.code === 0) {
this.forwardUserList = resp.data this.forwardUserList = resp.data
this.proxyUserList = resp.data
// const d = resp.data.filter(x => { // const d = resp.data.filter(x => {
// return !this.forwardUserList.map(v => v.id).includes(x.id) // return !this.forwardUserList.map(v => v.id).includes(x.id)
// }) // })
@@ -445,12 +510,12 @@ layout("/layouts/platform.html"){
}, },
async confirmForwardReply() { async confirmForwardReply() {
const params = this.proTableSelection.map(v => { const params = this.proTableSelection.map(v => {
return {replyId: v.replyId, proposalId: v.id, proxyReplyUserId: this.forwardUserSelection} return { replyId: v.replyId, proposalId: v.id, proxyUserId: this.forwardUserSelection }
}) })
const resp = await $.post(loc() + '/doForwardReply', {data: JSON.stringify(params)}) const resp = await $.post(loc() + "/doForwardReply", { data: JSON.stringify(params) })
if (resp.code === 0) { if (resp.code === 0) {
this.$message.success(resp.msg) this.$message.success(resp.msg)
this.$refs['proTable'].clearSelection() this.$refs["proTable"].clearSelection()
this.doSearch() this.doSearch()
this.forwardDialog = false this.forwardDialog = false
} else { } else {
@@ -463,13 +528,16 @@ layout("/layouts/platform.html"){
} }
}, },
async doRollBack(row) { async doRollBack(row) {
const confirm = await this.$confirm('正在撤回该提案的办理信息,请确认?', '提示', { const confirm = await this.$confirm("正在撤回该提案的办理信息,请确认?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}) })
if (confirm) { if (confirm) {
const resp = await $.post(loc() + "/doRollBack", {proposalId: row.id, replyUnitId: row.replyUnitId}) const resp = await $.post(loc() + "/doRollBack", {
proposalId: row.id,
replyUnitId: row.replyUnitId
})
if (resp.code === 0) { if (resp.code === 0) {
this.$message.success(resp.msg) this.$message.success(resp.msg)
this.doSearch() this.doSearch()
@@ -481,14 +549,14 @@ layout("/layouts/platform.html"){
this.$refs.info.openView(row.id) this.$refs.info.openView(row.id)
}, },
async checkCanReply(proposalId, underTakeId) { async checkCanReply(proposalId, underTakeId) {
return await $.get(loc() + '/checkCanReply', {proposalId, underTakeId}) return await $.get(loc() + "/checkCanReply", { proposalId, underTakeId })
}, },
async openAudit(row) { async openAudit(row) {
this.$refs.guava.edit() this.$refs.guava.edit()
this.$refs.audit.openView(row.id) this.$refs.audit.openView(row.id)
if (this.$refs['auditForm']) { if (this.$refs["auditForm"]) {
this.$refs['auditForm'].resetFields() this.$refs["auditForm"].resetFields()
} }
const { const {
@@ -552,25 +620,25 @@ layout("/layouts/platform.html"){
} }
if (!isSave && dd3s.html2txt(this.formData.replyContent).length < 200) { if (!isSave && dd3s.html2txt(this.formData.replyContent).length < 200) {
this.$notify.warning({title: '警告', message: '办理内容不能少于200字'}); this.$notify.warning({ title: "警告", message: "办理内容不能少于200字" })
return return
} }
const msg = this.conJoinProposal.length > 1 ? '提案' + this.conJoinProposalName + '已并案您只需办理一次,请确认?' : '您是否' + (isSave ? '保存' : '提交') + '该提案的办理内容,请确认?' const msg = this.conJoinProposal.length > 1 ? "提案" + this.conJoinProposalName + "已并案您只需办理一次,请确认?" : "您是否" + (isSave ? "保存" : "提交") + "该提案的办理内容,请确认?"
const confirm = await this.$confirm(msg, '提示', { const confirm = await this.$confirm(msg, "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning"
}) })
if ('confirm' !== confirm) { if ("confirm" !== confirm) {
return return
} }
this.submitDisabled = true this.submitDisabled = true
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: '正在提交...', text: "正在提交...",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: COVER_LAYER_COLOR background: COVER_LAYER_COLOR
}) })
@@ -583,11 +651,11 @@ layout("/layouts/platform.html"){
replySign: this.formData.replySign replySign: this.formData.replySign
}) })
if (resp.code === 0) { if (resp.code === 0) {
this.$notify.success({title: '成功', message: resp.msg}); this.$notify.success({ title: "成功", message: resp.msg })
this.pageData() this.pageData()
this.$refs.guava.index() this.$refs.guava.index()
} else { } else {
this.$notify.error({title: '失败', message: resp.msg}); this.$notify.error({ title: "失败", message: resp.msg })
} }
loading.close() loading.close()
this.submitDisabled = false this.submitDisabled = false
@@ -596,18 +664,57 @@ layout("/layouts/platform.html"){
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
},
// 转交答复
openProxy(row) {
this.proxyDialog = true
this.proxyFormData = {
proposalId: row.id,
replyId: row.replyId,
proxyUserId: row.proxyReplyUserId
}
if (row.proxyReplyUserId) {
this.findSameUnitUser(row.proxyReplyUserName)
}
},
// 确认转交
confirmProxyReply() {
this.$confirm("您是否确认转交该提案,请确认?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const loading = this.$loading({
lock: true,
text: "正在转交...",
spinner: "el-icon-loading",
background: COVER_LAYER_COLOR
})
$.post(loc() + "/setProxyUser", this.proxyFormData).then(res => {
loading.close()
if (res.code === 0) {
this.proxyDialog = false
this.$message.success(res.msg)
this.pageData()
} else {
this.$message.error(res.msg)
}
})
})
} }
}, },
async created() { async created() {
if (window.innerWidth < 768 && location.pathname === '/platform/proposal/transact/reply') { if (window.innerWidth < 768 && location.pathname === "/platform/proposal/transact/reply") {
this.$confirm('请您使用电脑端访问此界面,以获取更好的体验!', '提示', { this.$confirm("请您使用电脑端访问此界面,以获取更好的体验!", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonTest: '取消', cancelButtonTest: "取消",
type: 'warning' type: "warning"
}) })
} else { } else {
await proposal.initData(this) await proposal.initData(this)
this.implementStateOptions = await getDictByCode('proposal_reply_result') this.implementStateOptions = await getDictByCode("proposal_reply_result")
} }
} }
}) })
@@ -295,8 +295,10 @@ layout("/layouts/platform.html"){
<template v-else> <template v-else>
<el-button v-if="row.courseList && row.courseList.length == 1" type="text" <el-button v-if="row.courseList && row.courseList.length == 1" type="text"
style="padding: 0"> style="padding: 0">
{{moment(row.courseList[0].courseStartTime).format('MM-DD HH:mm')}} <label>{{moment(row.courseList[0].courseStartTime).format('MM/DD')}}</label>
{{moment(row.courseList[0].courseStartTime).format('MM-DD HH:mm')}} <label>{{moment(row.courseList[0].courseStartTime).format('HH:mm')}}</label>
<label>~</label>
<label>{{moment(row.courseList[0].courseEndTime).format('HH:mm')}}</label>
</el-button> </el-button>
<el-button v-else style="padding: 0" @click="openViewCourseTime(row)" type="text"> <el-button v-else style="padding: 0" @click="openViewCourseTime(row)" type="text">
点击查看{{trainType}}时间 点击查看{{trainType}}时间