慰问申请板块,1.“校工会审核”改名“校工会办公室审核”并且审核角色也改成新增的“校工会办公室审核员”来审核。2.在审批意见时不需要手写同意、不同意,改成勾选项。
This commit is contained in:
@@ -190,6 +190,11 @@ public interface Roles {
|
|||||||
*/
|
*/
|
||||||
String XGHKJ = "4f72d9259837486a8092c19897fa9dd6";
|
String XGHKJ = "4f72d9259837486a8092c19897fa9dd6";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校工会办公室审核员
|
||||||
|
*/
|
||||||
|
String CONDOLENCE_OFFICE = "c8d7e6f5a4b34c2291d0e8f7a6b5c4d3";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校工会管理员
|
* 校工会管理员
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class CondolenceAuditControll {
|
|||||||
.and("sqr.unionid", "=", Vi.getUnionId()));
|
.and("sqr.unionid", "=", Vi.getUnionId()));
|
||||||
hasAuditRole = true;
|
hasAuditRole = true;
|
||||||
}
|
}
|
||||||
if (ShiroUtil.hasAnyRoles("A06,sysadmin")) {
|
if (ShiroUtil.hasAnyRoles("A06,condolence_office,sysadmin")) {
|
||||||
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2020));
|
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2020));
|
||||||
hasAuditRole = true;
|
hasAuditRole = true;
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@ public class CondolenceAuditControll {
|
|||||||
return "beetl:/mobile/condolence/union_Audit.html";
|
return "beetl:/mobile/condolence/union_Audit.html";
|
||||||
} else if (state_id == 2012 && (superadmin || ShiroUtil.hasAnyRoles("gh03,xghkj,sysadmin"))) {
|
} else if (state_id == 2012 && (superadmin || ShiroUtil.hasAnyRoles("gh03,xghkj,sysadmin"))) {
|
||||||
return "beetl:/mobile/condolence/fr_Audit.html";
|
return "beetl:/mobile/condolence/fr_Audit.html";
|
||||||
} else if (state_id == 2020 && (superadmin || ShiroUtil.hasAnyRoles("A06,sysadmin"))) {
|
} else if (state_id == 2020 && (superadmin || ShiroUtil.hasAnyRoles("A06,condolence_office,sysadmin"))) {
|
||||||
return "beetl:/mobile/condolence/school_Audit.html";
|
return "beetl:/mobile/condolence/school_Audit.html";
|
||||||
}
|
}
|
||||||
return "beetl:/mobile/condolence/apply_info.html";
|
return "beetl:/mobile/condolence/apply_info.html";
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class CondolenceAgentController {
|
|||||||
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待院级工会审核").setv("number", getUcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待院级工会审核").setv("number", getUcrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", FR).setv("iconClass", vi.getIconByPath(FR)).setv("label", "待二级党组织审核").setv("number", getFrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", FR).setv("iconClass", vi.getIconByPath(FR)).setv("label", "待二级党组织审核").setv("number", getFrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", VCR).setv("iconClass", vi.getIconByPath(VCR)).setv("label", "待校工会审核").setv("number", getVcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", VCR).setv("iconClass", vi.getIconByPath(VCR)).setv("label", "待校工会办公室审核").setv("number", getVcrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", ECR).setv("iconClass", vi.getIconByPath(ECR)).setv("label", "待工会常务副主席审核").setv("number", getEcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", ECR).setv("iconClass", vi.getIconByPath(ECR)).setv("label", "待工会常务副主席审核").setv("number", getEcrCount()));
|
||||||
Sys_user user = (Sys_user) ShiroUtil.getPrincipal();
|
Sys_user user = (Sys_user) ShiroUtil.getPrincipal();
|
||||||
List<Sys_menu> menus = Optional.ofNullable(user).orElse(new Sys_user()).getMenus();
|
List<Sys_menu> menus = Optional.ofNullable(user).orElse(new Sys_user()).getMenus();
|
||||||
@@ -92,7 +92,7 @@ public class CondolenceAgentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 待校工会主席审核
|
* 待校工会办公室审核
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.v.nutz.zgfw.controller.condolence;
|
package io.v.nutz.zgfw.controller.condolence;
|
||||||
|
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
import io.v.nutz.base.utils.DateUtil;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
@@ -25,7 +26,7 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
/**
|
/**
|
||||||
* @Author: 1V
|
* @Author: 1V
|
||||||
* @DateTime: 2020/11/20 11:49
|
* @DateTime: 2020/11/20 11:49
|
||||||
* @Description: 校工会审核
|
* @Description: 校工会办公室审核
|
||||||
*/
|
*/
|
||||||
@At({"/platform/fw/condolence/vcr","/platform/fw/condolence/vcr/school"})
|
@At({"/platform/fw/condolence/vcr","/platform/fw/condolence/vcr/school"})
|
||||||
@IocBean
|
@IocBean
|
||||||
@@ -112,9 +113,15 @@ public class CondolenceVcrCon {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("fw.condolence.vcr")
|
@RequiresPermissions("fw.condolence.vcr")
|
||||||
public Object doReview(String id, Integer pass, Review review) {
|
public Object doReview(String id, Integer pass, Review review) {
|
||||||
|
if (!Integer.valueOf(1).equals(pass) && !Integer.valueOf(2).equals(pass)
|
||||||
|
&& !Integer.valueOf(3).equals(pass)) {
|
||||||
|
return Result.error("请选择审批意见!");
|
||||||
|
}
|
||||||
review.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
review.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||||
review.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
review.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||||
review.setTime(DateUtil.getDate());
|
review.setTime(DateUtil.getDate());
|
||||||
|
review.setOpinion(Integer.valueOf(3).equals(pass) ? "同意"
|
||||||
|
: Integer.valueOf(1).equals(pass) ? "不同意" : "返回修改");
|
||||||
review = reviewService.insert(review);
|
review = reviewService.insert(review);
|
||||||
Condolence condolence = condolenceService.fetch(id);
|
Condolence condolence = condolenceService.fetch(id);
|
||||||
condolence.setVice_chairman_review(review.getId());
|
condolence.setVice_chairman_review(review.getId());
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package io.v.nutz.zgfw.handler.condolence;
|
package io.v.nutz.zgfw.handler.condolence;
|
||||||
|
|
||||||
import io.v.nutz.base.utils.MsgApi;
|
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.base.utils.Vi;
|
||||||
import io.v.nutz.util.ViResource;
|
import io.v.nutz.util.ViResource;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
@@ -11,7 +12,6 @@ import lombok.Getter;
|
|||||||
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.lang.Lang;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -32,7 +32,7 @@ public enum CondolenceMsgHandler {
|
|||||||
u.username,
|
u.username,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.loginname,
|
u.loginname,
|
||||||
type.`name` as typeName
|
type.`name` as typename
|
||||||
FROM
|
FROM
|
||||||
condolence c
|
condolence c
|
||||||
LEFT JOIN `user` u ON u.id = c.manager
|
LEFT JOIN `user` u ON u.id = c.manager
|
||||||
@@ -42,9 +42,8 @@ public enum CondolenceMsgHandler {
|
|||||||
sql.setParam("id", id);
|
sql.setParam("id", id);
|
||||||
NutMap nutMap = condolenceService.fetch(sql);
|
NutMap nutMap = condolenceService.fetch(sql);
|
||||||
String msg = "您好!" + nutMap.getString("unionname") + "的" + nutMap.getString("username") + "申请的"
|
String msg = "您好!" + nutMap.getString("unionname") + "的" + nutMap.getString("username") + "申请的"
|
||||||
+ nutMap.getString("typeName") + "慰问已经提交,请您登录到智慧工会系统职工服务>职工慰问下进行审核。";
|
+ nutMap.getString("typename") + "慰问已经提交,请您登录到智慧工会系统职工服务>职工慰问下进行审核。";
|
||||||
List<String> schoolLoginNames = Lang.list("1996070092", "1987010012");
|
for (String loginname : getRoleLoginNames(Roles.CONDOLENCE_OFFICE)) {
|
||||||
for (String loginname : schoolLoginNames) {
|
|
||||||
msgApi.sendMsg(loginname, msg);
|
msgApi.sendMsg(loginname, msg);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -83,7 +82,7 @@ public enum CondolenceMsgHandler {
|
|||||||
u.username,
|
u.username,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.loginname,
|
u.loginname,
|
||||||
type.`name` as typeName
|
type.`name` as typename
|
||||||
FROM
|
FROM
|
||||||
condolence c
|
condolence c
|
||||||
LEFT JOIN `user` u ON u.id = c.manager
|
LEFT JOIN `user` u ON u.id = c.manager
|
||||||
@@ -93,9 +92,8 @@ public enum CondolenceMsgHandler {
|
|||||||
sql.setParam("id", id);
|
sql.setParam("id", id);
|
||||||
NutMap nutMap = condolenceService.fetch(sql);
|
NutMap nutMap = condolenceService.fetch(sql);
|
||||||
String msg = "您好!" + nutMap.getString("unionname") + "的" + nutMap.getString("username") + "申请的"
|
String msg = "您好!" + nutMap.getString("unionname") + "的" + nutMap.getString("username") + "申请的"
|
||||||
+ nutMap.getString("typeName") + "慰问分工会主席已经审批通过,请您登录到智慧工会系统职工服务>职工慰问下进行审核。";
|
+ nutMap.getString("typename") + "慰问分工会主席已经审批通过,请您登录到智慧工会系统职工服务>职工慰问下进行审核。";
|
||||||
List<String> schoolLoginNames = Lang.list("1986110082", "1996070092", "1987010012");
|
for (String loginname : getRoleLoginNames(Roles.CONDOLENCE_OFFICE)) {
|
||||||
for (String loginname : schoolLoginNames) {
|
|
||||||
msgApi.sendMsg(loginname, msg);
|
msgApi.sendMsg(loginname, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +110,7 @@ public enum CondolenceMsgHandler {
|
|||||||
u.username,
|
u.username,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.loginname,
|
u.loginname,
|
||||||
type.`name` as typeName
|
type.`name` as typename
|
||||||
FROM
|
FROM
|
||||||
condolence c
|
condolence c
|
||||||
LEFT JOIN `user` u ON u.id = c.manager
|
LEFT JOIN `user` u ON u.id = c.manager
|
||||||
@@ -126,7 +124,7 @@ public enum CondolenceMsgHandler {
|
|||||||
if (opinion == null) {
|
if (opinion == null) {
|
||||||
opinion = "";
|
opinion = "";
|
||||||
}
|
}
|
||||||
String msg = "您好!您申请的" + nutMap.getString("typeName") + "慰问分工会主席拒绝了您的申请,拒绝理由:" +
|
String msg = "您好!您申请的" + nutMap.getString("typename") + "慰问分工会主席拒绝了您的申请,拒绝理由:" +
|
||||||
opinion + "请您登录到智慧工会系统重新修改提交!";
|
opinion + "请您登录到智慧工会系统重新修改提交!";
|
||||||
msgApi.sendMsg(nutMap.getString("loginname"), msg);
|
msgApi.sendMsg(nutMap.getString("loginname"), msg);
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
@@ -144,7 +142,7 @@ public enum CondolenceMsgHandler {
|
|||||||
u.username,
|
u.username,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.loginname,
|
u.loginname,
|
||||||
type.`name` as typeName,
|
type.`name` as typename,
|
||||||
c.way
|
c.way
|
||||||
FROM
|
FROM
|
||||||
condolence c
|
condolence c
|
||||||
@@ -154,7 +152,7 @@ public enum CondolenceMsgHandler {
|
|||||||
""");
|
""");
|
||||||
sql.setParam("id", id);
|
sql.setParam("id", id);
|
||||||
NutMap nutMap = condolenceService.fetch(sql);
|
NutMap nutMap = condolenceService.fetch(sql);
|
||||||
String msg = "您好!您申请的" + nutMap.getString("typeName") + "的慰问校工会已经审批通过!";
|
String msg = "您好!您申请的" + nutMap.getString("typename") + "的慰问校工会办公室已经审批通过!";
|
||||||
// 慰问品审核通过后,提醒申请人等待礼品备好并按短信通知领取。
|
// 慰问品审核通过后,提醒申请人等待礼品备好并按短信通知领取。
|
||||||
if ("慰问品 (C)".equals(nutMap.getString("way"))) {
|
if ("慰问品 (C)".equals(nutMap.getString("way"))) {
|
||||||
msg += "礼品备好后会发短信通知您前来领取。";
|
msg += "礼品备好后会发短信通知您前来领取。";
|
||||||
@@ -175,7 +173,7 @@ public enum CondolenceMsgHandler {
|
|||||||
u.username,
|
u.username,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.loginname,
|
u.loginname,
|
||||||
type.`name` as typeName
|
type.`name` as typename
|
||||||
FROM
|
FROM
|
||||||
condolence c
|
condolence c
|
||||||
LEFT JOIN `user` u ON u.id = c.manager
|
LEFT JOIN `user` u ON u.id = c.manager
|
||||||
@@ -184,7 +182,7 @@ public enum CondolenceMsgHandler {
|
|||||||
""");
|
""");
|
||||||
sql.setParam("id", id);
|
sql.setParam("id", id);
|
||||||
NutMap nutMap = condolenceService.fetch(sql);
|
NutMap nutMap = condolenceService.fetch(sql);
|
||||||
String msg = "您好!您申请的" + nutMap.getString("typeName") + "的慰问校工会审批拒绝了,请您登录智慧工会系统查看详情!";
|
String msg = "您好!您申请的" + nutMap.getString("typename") + "的慰问校工会办公室审批拒绝了,请您登录智慧工会系统查看详情!";
|
||||||
String loginname = nutMap.getString("loginname");
|
String loginname = nutMap.getString("loginname");
|
||||||
msgApi.sendMsg(loginname, msg);
|
msgApi.sendMsg(loginname, msg);
|
||||||
}
|
}
|
||||||
@@ -192,6 +190,26 @@ public enum CondolenceMsgHandler {
|
|||||||
|
|
||||||
public abstract void exec(String id, NutMap extra);
|
public abstract void exec(String id, NutMap extra);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定角色下的用户工号。
|
||||||
|
*/
|
||||||
|
public List<String> getRoleLoginNames(String roleId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.loginname
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
LEFT JOIN `user` u ON u.id = sur.userid
|
||||||
|
WHERE
|
||||||
|
sur.roleId = @roleId
|
||||||
|
GROUP BY
|
||||||
|
sur.userId
|
||||||
|
""").setParam("roleId", roleId);
|
||||||
|
sql.setCallback(Sqls.callback.strs());
|
||||||
|
dao.execute(sql);
|
||||||
|
return sql.getList(String.class);
|
||||||
|
}
|
||||||
|
|
||||||
public Dao dao = ViResource.dao;
|
public Dao dao = ViResource.dao;
|
||||||
public MsgApi msgApi = ViResource.ioc.get(MsgApi.class);
|
public MsgApi msgApi = ViResource.ioc.get(MsgApi.class);
|
||||||
public CondolenceService condolenceService = ViResource.ioc.get(CondolenceServiceImpl.class);
|
public CondolenceService condolenceService = ViResource.ioc.get(CondolenceServiceImpl.class);
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.nutz.dao.Dao;
|
|||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.entity.Record;
|
import org.nutz.dao.entity.Record;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.lang.Lang;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -135,16 +134,29 @@ public enum CondolenceToDoHandler {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建校工会任务
|
* 创建校工会办公室审核任务
|
||||||
*/
|
*/
|
||||||
CREATE_SCHOOL_TASK() {
|
CREATE_SCHOOL_TASK() {
|
||||||
@Override
|
@Override
|
||||||
public void exec(Condolence condolence, String option) {
|
public void exec(Condolence condolence, String option) {
|
||||||
List<String> schoolLoginNames = Lang.list("1996070092", "1987010012");
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
u.loginname
|
||||||
|
FROM
|
||||||
|
sys_user_role sur
|
||||||
|
LEFT JOIN `user` u ON u.id = sur.userid
|
||||||
|
WHERE
|
||||||
|
sur.roleId = @roleId
|
||||||
|
GROUP BY
|
||||||
|
sur.userId
|
||||||
|
""").setParam("roleId", Roles.CONDOLENCE_OFFICE);
|
||||||
|
sql.setCallback(Sqls.callback.strs());
|
||||||
|
dao.execute(sql);
|
||||||
|
List<String> schoolLoginNames = sql.getList(String.class);
|
||||||
localProcessService.createTask(
|
localProcessService.createTask(
|
||||||
"condolence@" + condolence.getId(),
|
"condolence@" + condolence.getId(),
|
||||||
"vice_chairman_review",
|
"vice_chairman_review",
|
||||||
"校工会审核",
|
"校工会办公室审核",
|
||||||
(String) ShiroUtil.getPrincipalProperty("id"),
|
(String) ShiroUtil.getPrincipalProperty("id"),
|
||||||
schoolLoginNames,
|
schoolLoginNames,
|
||||||
"/platform/fw/condolence/vcr/school",
|
"/platform/fw/condolence/vcr/school",
|
||||||
@@ -153,12 +165,12 @@ public enum CondolenceToDoHandler {
|
|||||||
"/platform/fw/condolence/vcr/school"
|
"/platform/fw/condolence/vcr/school"
|
||||||
);
|
);
|
||||||
|
|
||||||
localProcessService.updateProcessNodeName("condolence@" + condolence.getId(), "校工会审核");
|
localProcessService.updateProcessNodeName("condolence@" + condolence.getId(), "校工会办公室审核");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校工会完成
|
* 校工会办公室审核完成
|
||||||
*/
|
*/
|
||||||
COMPLETE_SCHOOL_TASK() {
|
COMPLETE_SCHOOL_TASK() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
-- 慰问申请:将原校工会审核改名为校工会办公室审核,并创建独立审核角色
|
||||||
|
-- 执行环境:MySQL
|
||||||
|
|
||||||
|
SET @condolence_office_role_fixed_id := 'c8d7e6f5a4b34c2291d0e8f7a6b5c4d3';
|
||||||
|
|
||||||
|
-- 创建校工会办公室审核员角色。
|
||||||
|
INSERT INTO `sys_role`
|
||||||
|
(`id`, `name`, `code`, `aliasName`, `disabled`, `unitid`, `system_name`, `note`, `serialNumber`,
|
||||||
|
`createdBy`, `createdAt`, `updatedBy`, `updatedAt`, `delFlag`)
|
||||||
|
SELECT
|
||||||
|
@condolence_office_role_fixed_id,
|
||||||
|
'校工会办公室审核员',
|
||||||
|
'condolence_office',
|
||||||
|
'CondolenceOfficeReviewer',
|
||||||
|
0,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'负责慰问申请的校工会办公室审核',
|
||||||
|
(SELECT IFNULL(MAX(r.`serialNumber`), 0) + 1 FROM (SELECT `serialNumber` FROM `sys_role`) r),
|
||||||
|
'',
|
||||||
|
UNIX_TIMESTAMP() * 1000,
|
||||||
|
'',
|
||||||
|
UNIX_TIMESTAMP() * 1000,
|
||||||
|
0
|
||||||
|
WHERE NOT EXISTS (
|
||||||
|
SELECT 1 FROM `sys_role` WHERE `code` = 'condolence_office'
|
||||||
|
);
|
||||||
|
|
||||||
|
SET @condolence_office_role_id := (
|
||||||
|
SELECT `id` FROM `sys_role` WHERE `code` = 'condolence_office' LIMIT 1
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 复用原校工会审核菜单,不增加新的流程菜单。
|
||||||
|
SET @condolence_office_menu_id := (
|
||||||
|
SELECT `id`
|
||||||
|
FROM `sys_menu`
|
||||||
|
WHERE `permission` = 'fw.condolence.vcr'
|
||||||
|
OR `href` IN ('/platform/fw/condolence/vcr', '/platform/fw/condolence/vcr/school')
|
||||||
|
ORDER BY CASE WHEN `permission` = 'fw.condolence.vcr' THEN 1 ELSE 2 END
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
|
|
||||||
|
UPDATE `sys_menu`
|
||||||
|
SET `name` = '校工会办公室审核',
|
||||||
|
`aliasName` = 'CondolenceOfficeReview',
|
||||||
|
`note` = '慰问申请校工会办公室审核',
|
||||||
|
`showit` = 1,
|
||||||
|
`disabled` = 0,
|
||||||
|
`updatedAt` = UNIX_TIMESTAMP() * 1000,
|
||||||
|
`delFlag` = 0
|
||||||
|
WHERE `id` = @condolence_office_menu_id;
|
||||||
|
|
||||||
|
-- 同步原审核节点的状态名称,不新增状态。
|
||||||
|
UPDATE `state`
|
||||||
|
SET `state_name` = CASE `state_id`
|
||||||
|
WHEN 1995 THEN '校工会办公室返回修改'
|
||||||
|
WHEN 2020 THEN '待校工会办公室审核'
|
||||||
|
WHEN 2030 THEN '校工会办公室审核不通过'
|
||||||
|
WHEN 2040 THEN '校工会办公室审核通过'
|
||||||
|
ELSE `state_name`
|
||||||
|
END
|
||||||
|
WHERE `state_id` IN (1995, 2020, 2030, 2040);
|
||||||
|
|
||||||
|
-- 给新角色授权原审核菜单及其全部上级菜单,保证菜单树正常显示。
|
||||||
|
INSERT INTO `sys_role_menu` (`roleId`, `menuId`)
|
||||||
|
SELECT @condolence_office_role_id, ancestor.`id`
|
||||||
|
FROM `sys_menu` target
|
||||||
|
JOIN `sys_menu` ancestor ON target.`path` LIKE CONCAT(ancestor.`path`, '%')
|
||||||
|
WHERE target.`id` = @condolence_office_menu_id
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM `sys_role_menu` rm
|
||||||
|
WHERE rm.`roleId` = @condolence_office_role_id
|
||||||
|
AND rm.`menuId` = ancestor.`id`
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 将工号为1986110082、姓名为路海松的人员分配为校工会办公室审核员。
|
||||||
|
INSERT INTO `sys_user_role` (`userId`, `roleId`)
|
||||||
|
SELECT u.`id`, @condolence_office_role_id
|
||||||
|
FROM `sys_user` u
|
||||||
|
WHERE u.`loginname` = '1986110082'
|
||||||
|
AND u.`username` = '路海松'
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM `sys_user_role` ur
|
||||||
|
WHERE ur.`userId` = u.`id`
|
||||||
|
AND ur.`roleId` = @condolence_office_role_id
|
||||||
|
);
|
||||||
|
|
||||||
|
SELECT @condolence_office_role_id AS `roleId`,
|
||||||
|
@condolence_office_menu_id AS `menuId`;
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="校工会主席审核信息" name="5" v-if="viewData.vcr">
|
<el-tab-pane label="校工会办公室审核信息" name="5" v-if="viewData.vcr">
|
||||||
<el-form label-width="130px" label-suffix=":" style="padding: 20px 0">
|
<el-form label-width="130px" label-suffix=":" style="padding: 20px 0">
|
||||||
<vi-title title="审核信息"></vi-title>
|
<vi-title title="审核信息"></vi-title>
|
||||||
<el-row gutter="20">
|
<el-row gutter="20">
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
<template v-if="viewData.vcr">
|
<template v-if="viewData.vcr">
|
||||||
<div class="van-cell-group__title mt20">
|
<div class="van-cell-group__title mt20">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
校工会审核信息
|
校工会办公室审核信息
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ layout("/mobile/platform.html"){
|
|||||||
@click-left="history.back()"></van-nav-bar>
|
@click-left="history.back()"></van-nav-bar>
|
||||||
|
|
||||||
|
|
||||||
<condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
<condolence-info ref="info" :id.sync="id" title="校工会办公室审核" :handle="handle">
|
||||||
<template #handle>
|
<template #handle>
|
||||||
<div class="van-cell-group__title mt10">
|
<div class="van-cell-group__title mt10">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
校工会审核
|
校工会办公室审核
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-form>
|
<van-form>
|
||||||
@@ -26,15 +26,14 @@ layout("/mobile/platform.html"){
|
|||||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o"
|
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o"
|
||||||
readonly></van-field>
|
readonly></van-field>
|
||||||
|
|
||||||
<van-field v-model="formData.opinion"
|
<van-field label="审批意见" required>
|
||||||
rows="1"
|
<template #input>
|
||||||
required
|
<van-radio-group v-model="formData.pass" direction="horizontal">
|
||||||
left-icon="chat-o"
|
<van-radio :name="3" shape="square">同意</van-radio>
|
||||||
autosize
|
<van-radio :name="1" shape="square">不同意</van-radio>
|
||||||
label="审核意见"
|
</van-radio-group>
|
||||||
type="textarea"
|
</template>
|
||||||
placeholder="请输入审核意见"
|
</van-field>
|
||||||
></van-field>
|
|
||||||
|
|
||||||
<van-field label="签字" required style="flex-flow: column">
|
<van-field label="签字" required style="flex-flow: column">
|
||||||
<template #label>
|
<template #label>
|
||||||
@@ -47,17 +46,12 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
|
|
||||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||||
<van-col span="8">
|
<van-col span="12">
|
||||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
|
||||||
</van-button>
|
|
||||||
</van-col>
|
|
||||||
|
|
||||||
<van-col span="8">
|
|
||||||
<van-button color="red" block plain @click="doAudit(2)">返回修改
|
<van-button color="red" block plain @click="doAudit(2)">返回修改
|
||||||
</van-button>
|
</van-button>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="8">
|
<van-col span="12">
|
||||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
<van-button :color="themeColor" block @click="doAudit">提交
|
||||||
</van-button>
|
</van-button>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
@@ -89,8 +83,11 @@ layout("/mobile/platform.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async doAudit(pass) {
|
async doAudit(pass) {
|
||||||
if (!this.formData.opinion) {
|
if (pass === 2) {
|
||||||
this.$toast.fail('请填写审核意见');
|
this.formData.pass = pass
|
||||||
|
}
|
||||||
|
if (this.formData.pass === null) {
|
||||||
|
this.$toast.fail('请选择审批意见');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 审核签字由独立画布维护,不能只依赖 van-field 的 required 属性。
|
// 审核签字由独立画布维护,不能只依赖 van-field 的 required 属性。
|
||||||
@@ -104,7 +101,6 @@ layout("/mobile/platform.html"){
|
|||||||
return
|
return
|
||||||
}*/
|
}*/
|
||||||
await this.$refs.signature.updateSign()
|
await this.$refs.signature.updateSign()
|
||||||
this.formData.pass = pass
|
|
||||||
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
|
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$toast.success('审核成功');
|
this.$toast.success('审核成功');
|
||||||
@@ -122,7 +118,7 @@ layout("/mobile/platform.html"){
|
|||||||
id: this.id,
|
id: this.id,
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
time: moment().format('YYYY-MM-DD'),
|
time: moment().format('YYYY-MM-DD'),
|
||||||
opinion: null,
|
pass: null,
|
||||||
sign: ""
|
sign: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
|
|||||||
<span slot="label">
|
<span slot="label">
|
||||||
校工会直接慰问
|
校工会直接慰问
|
||||||
<el-tooltip class="item" effect="dark"
|
<el-tooltip class="item" effect="dark"
|
||||||
content="直接慰问,由校工会直接慰问,无需经过分工会审核,直接由校工会主席审核。"
|
content="直接慰问,由校工会直接慰问,无需经过分工会审核,直接由校工会办公室审核。"
|
||||||
placement="top-start">
|
placement="top-start">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #edit>
|
<template #edit>
|
||||||
<info ref="info2" handle label="校工会审核">
|
<info ref="info2" handle label="校工会办公室审核">
|
||||||
<template #handle>
|
<template #handle>
|
||||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||||
style="padding: 20px 0"
|
style="padding: 20px 0"
|
||||||
@@ -171,10 +171,11 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item prop="opinion" label="审核意见">
|
<el-form-item prop="pass" label="审批意见">
|
||||||
<el-input type="textarea" v-model="formData.opinion" rows="4"
|
<el-radio-group v-model="formData.pass">
|
||||||
maxlength="500"
|
<el-radio :label="3">同意</el-radio>
|
||||||
placeholder="请填写您的审核意见"></el-input>
|
<el-radio :label="1">不同意</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="sign" label="签  字">
|
<el-form-item prop="sign" label="签  字">
|
||||||
@@ -184,15 +185,11 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div style="float: right;margin: 20px 0">
|
<div style="float: right;margin: 20px 0">
|
||||||
<el-button @click="doReview(1)" :disabled="subDis" :loading="subLoading1">拒
|
|
||||||
绝
|
|
||||||
</el-button>
|
|
||||||
<el-button type="danger" @click="doReview(2)" :disabled="subDis"
|
<el-button type="danger" @click="doReview(2)" :disabled="subDis"
|
||||||
:loading="subLoading2">返回修改
|
:loading="subLoading2">返回修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="doReview(3)" :disabled="subDis"
|
<el-button type="primary" @click="doReview" :disabled="subDis"
|
||||||
:loading="subLoading3">通
|
:loading="subLoading3">提交
|
||||||
过
|
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -223,7 +220,7 @@ layout("/layouts/platform.html"){
|
|||||||
year: new Date().getFullYear() + ""
|
year: new Date().getFullYear() + ""
|
||||||
},
|
},
|
||||||
formRules: {
|
formRules: {
|
||||||
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
pass: [{required: true, message: '请选择审批意见', trigger: 'change'}],
|
||||||
sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}],
|
sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}],
|
||||||
},
|
},
|
||||||
subDis: false,
|
subDis: false,
|
||||||
@@ -255,6 +252,7 @@ layout("/layouts/platform.html"){
|
|||||||
id,
|
id,
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
time: moment().format('YYYY-MM-DD'),
|
time: moment().format('YYYY-MM-DD'),
|
||||||
|
pass: null,
|
||||||
}
|
}
|
||||||
this.subLoading1 = false
|
this.subLoading1 = false
|
||||||
this.subLoading2 = false
|
this.subLoading2 = false
|
||||||
@@ -265,7 +263,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async doReview(flag) {
|
async doReview(pass) {
|
||||||
|
if (pass === 2) {
|
||||||
|
this.formData.pass = pass
|
||||||
|
}
|
||||||
// 签字由自定义组件回写,审核提交前单独判断,避免 Element 表单漏过空签字。
|
// 签字由自定义组件回写,审核提交前单独判断,避免 Element 表单漏过空签字。
|
||||||
if (!this.formData.sign) {
|
if (!this.formData.sign) {
|
||||||
this.$message.warning('请签字')
|
this.$message.warning('请签字')
|
||||||
@@ -273,21 +274,14 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
this.$refs["form"].validate(async (valid) => {
|
this.$refs["form"].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.formData.pass = flag
|
|
||||||
|
|
||||||
this.subDis = true
|
this.subDis = true
|
||||||
if (flag == 1) {
|
pass === 2 ? this.subLoading2 = true : this.subLoading3 = true
|
||||||
this.subLoading1 = true
|
|
||||||
} else if (flag == 2) {
|
|
||||||
this.subLoading2 = true
|
|
||||||
} else {
|
|
||||||
this.subLoading3 = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||||
this.subDis = false
|
this.subDis = false
|
||||||
this.subLoading1 = false
|
this.subLoading1 = false
|
||||||
this.subLoading2 = false
|
this.subLoading2 = false
|
||||||
|
this.subLoading3 = false
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.pageData()
|
this.pageData()
|
||||||
this.$refs.guava.index()
|
this.$refs.guava.index()
|
||||||
|
|||||||
Reference in New Issue
Block a user