Compare commits
10
Commits
3f6228b493
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d584b66f7 | ||
|
|
a20c632093 | ||
|
|
443e76e7a1 | ||
|
|
d24fba03da | ||
|
|
16ea56524e | ||
|
|
3b5cde7bb1 | ||
|
|
f0cd566d31 | ||
|
|
b2ffc17032 | ||
|
|
2b72da43f4 | ||
|
|
2e83b7b90c |
@@ -190,6 +190,11 @@ public interface Roles {
|
|||||||
*/
|
*/
|
||||||
String XGHKJ = "4f72d9259837486a8092c19897fa9dd6";
|
String XGHKJ = "4f72d9259837486a8092c19897fa9dd6";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校工会办公室审核员
|
||||||
|
*/
|
||||||
|
String CONDOLENCE_OFFICE = "c8d7e6f5a4b34c2291d0e8f7a6b5c4d3";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校工会管理员
|
* 校工会管理员
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -186,14 +186,24 @@ public class MainPageNeedItemsController {
|
|||||||
//查询数据库中的待办事项
|
//查询数据库中的待办事项
|
||||||
List<NeedItems> needItemsList = dao.queryByJoin(NeedItems.class, "^needItemsSource$", Cnd.NEW());
|
List<NeedItems> needItemsList = dao.queryByJoin(NeedItems.class, "^needItemsSource$", Cnd.NEW());
|
||||||
|
|
||||||
|
// 普通系统管理员不参与校工会办公室审核,超级管理员账号保留兜底权限。
|
||||||
|
boolean superadmin = "superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"));
|
||||||
|
if (!superadmin && ShiroUtil.hasRole("sysadmin") && !ShiroUtil.hasRole("condolence_office")) {
|
||||||
|
needItemsList.removeIf(item -> ("condolence".equals(item.getQueryTable())
|
||||||
|
&& "state_id".equals(item.getQueryColumn())
|
||||||
|
&& Integer.valueOf(2020).equals(item.getStateId()))
|
||||||
|
|| "/platform/fw/condolence/vcr".equals(item.getHref())
|
||||||
|
|| "/platform/fw/condolence/vcr/school".equals(item.getHref()));
|
||||||
|
}
|
||||||
|
|
||||||
//根据当前登录用户的角色查询可以看到哪些菜单
|
//根据当前登录用户的角色查询可以看到哪些菜单
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
if (!superadmin && !ShiroUtil.hasRole("sysadmin")) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
select menuId from sys_role_menu where roleId in (select roleId from sys_user_role where userId = @userId)
|
select menuId from sys_role_menu where roleId in (select roleId from sys_user_role where userId = @userId)
|
||||||
""").setParam("userId", ShiroUtil.getPlatformUid());
|
""").setParam("userId", ShiroUtil.getPlatformUid());
|
||||||
List<NutMap> menuIds = baseService.listMap(sql);
|
List<NutMap> menuIds = baseService.listMap(sql);
|
||||||
List<String> menuId = menuIds.stream().map(o -> o.getString("menuId")).collect(Collectors.toList());
|
List<String> menuId = menuIds.stream().map(o -> o.getString("menuid")).collect(Collectors.toList());
|
||||||
cnd.and("id", "in", menuId);
|
cnd.and("id", "in", menuId);
|
||||||
}
|
}
|
||||||
List<Sys_menu> menus = dao.query(Sys_menu.class, cnd);
|
List<Sys_menu> menus = dao.query(Sys_menu.class, cnd);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.v.nutz.mobile.condolence;
|
package io.v.nutz.mobile.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.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
@@ -44,6 +45,9 @@ public class CondolenceAuditControll {
|
|||||||
@Param(value = "searchKeyword", required = false) String searchKeyword, int pageNumber, int pageSize,
|
@Param(value = "searchKeyword", required = false) String searchKeyword, int pageNumber, int pageSize,
|
||||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||||
|
if (!hasAuditPermission()) {
|
||||||
|
return Result.error("您没有慰问审核权限!");
|
||||||
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
con.*,
|
con.*,
|
||||||
@@ -65,20 +69,28 @@ public class CondolenceAuditControll {
|
|||||||
|
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
if (!"superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"))) {
|
||||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
if (ShiroUtil.hasAnyRoles("A06")) {
|
boolean hasAuditRole = false;
|
||||||
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2020).or("con.state_id", isAudit ? ">" : "=", 2000));
|
if (ShiroUtil.hasAnyRoles("gh01,sp01")) {
|
||||||
// cnd.and("con.state_id", isAudit ? ">" : "=", 2020);
|
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2000)
|
||||||
|
.and("sqr.unionid", "=", Vi.getUnionId()));
|
||||||
|
hasAuditRole = true;
|
||||||
}
|
}
|
||||||
if (ShiroUtil.hasAnyRoles("H04")) {
|
if (ShiroUtil.hasAnyRoles("condolence_office")) {
|
||||||
group.and("con.state_id", isAudit ? ">" : "=", 2000);
|
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2020));
|
||||||
group.and("be.unionid", "=", Vi.getUnionId());
|
hasAuditRole = true;
|
||||||
}
|
}
|
||||||
if (ShiroUtil.hasAnyRoles("xghkj")) {
|
if (ShiroUtil.hasAnyRoles("xghkj")) {
|
||||||
group.and("con.state_id", isAudit ? ">" : "=", 2012);
|
group.or(Cnd.exps("con.state_id", isAudit ? ">" : "=", 2012));
|
||||||
|
hasAuditRole = true;
|
||||||
|
}
|
||||||
|
if (hasAuditRole) {
|
||||||
|
cnd.and(group);
|
||||||
|
} else {
|
||||||
|
// 非慰问审核角色不允许查看手机端慰问审核数据。
|
||||||
|
cnd.and("1", "=", 0);
|
||||||
}
|
}
|
||||||
cnd.and(group);
|
|
||||||
} else {
|
} else {
|
||||||
cnd.and("con.state_id", "in", isAudit ? "1990,2010,2014,2030,2040" : "2000,2012,2020");
|
cnd.and("con.state_id", "in", isAudit ? "1990,2010,2014,2030,2040" : "2000,2012,2020");
|
||||||
}
|
}
|
||||||
@@ -104,15 +116,24 @@ public class CondolenceAuditControll {
|
|||||||
return condolenceService.listPage(pageNumber, pageSize, sql);
|
return condolenceService.listPage(pageNumber, pageSize, sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验手机端慰问审核权限,超级管理员账号保留兜底权限。
|
||||||
|
*/
|
||||||
|
private boolean hasAuditPermission() {
|
||||||
|
return "superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"))
|
||||||
|
|| ShiroUtil.hasAnyRoles("gh01,sp01,condolence_office,xghkj");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@At("/auditHtml")
|
@At("/auditHtml")
|
||||||
@Ok("re")
|
@Ok("re")
|
||||||
public String auditHtml(Integer state_id) {
|
public String auditHtml(Integer state_id) {
|
||||||
if (state_id == 2000 && ShiroUtil.hasAnyRoles("H04,A06,sysadmin")) {
|
boolean superadmin = "superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"));
|
||||||
|
if (state_id == 2000 && (superadmin || ShiroUtil.hasAnyRoles("gh01,sp01"))) {
|
||||||
return "beetl:/mobile/condolence/union_Audit.html";
|
return "beetl:/mobile/condolence/union_Audit.html";
|
||||||
} else if (state_id == 2012 && ShiroUtil.hasAnyRoles("gh03,xghkj,sysadmin")) {
|
} else if (state_id == 2012 && (superadmin || ShiroUtil.hasAnyRoles("gh03,xghkj"))) {
|
||||||
return "beetl:/mobile/condolence/fr_Audit.html";
|
return "beetl:/mobile/condolence/fr_Audit.html";
|
||||||
} else if (state_id == 2020 && ShiroUtil.hasAnyRoles("A06,sysadmin")) {
|
} else if (state_id == 2020 && (superadmin || ShiroUtil.hasAnyRoles("condolence_office"))) {
|
||||||
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";
|
||||||
|
|||||||
+6
-4
@@ -92,10 +92,12 @@ public class WelfareMemberEscalationController {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("unionId", "=", Vi.getUnionId());
|
cnd.and("unionId", "=", Vi.getUnionId());
|
||||||
|
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.and("member","=",1);
|
// seg.and("member","=",1);
|
||||||
seg.or(Cnd.exps("userState","=","退休").and(Cnd.exps("retiredTime",">=","2024-06-01").and("retiredTime","<","2024-12-30")));
|
// seg.or(Cnd.exps("userState","=","退休").and(Cnd.exps("retiredTime",">=","2024-06-01").and("retiredTime","<","2024-12-30")));
|
||||||
cnd.and(seg);
|
// cnd.and(seg);
|
||||||
|
|
||||||
|
cnd.and("member", "=", 1);
|
||||||
|
|
||||||
cnd.asc("userState").asc("unitname").asc("unionname");
|
cnd.asc("userState").asc("unitname").asc("unionname");
|
||||||
// cnd.and("userState", "=", "在职");
|
// cnd.and("userState", "=", "在职");
|
||||||
|
|||||||
@@ -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.MsgApi;
|
import io.v.nutz.base.utils.MsgApi;
|
||||||
@@ -89,8 +90,13 @@ public class CondolenceUcrCon {
|
|||||||
|
|
||||||
cnd.and("con.state_id", isAudit ? ">" : "=", 2000);
|
cnd.and("con.state_id", isAudit ? ">" : "=", 2000);
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
if (!"superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"))) {
|
||||||
cnd.and("sqr.unionid", "=", vi.getUnionId());
|
if (ShiroUtil.hasAnyRoles("gh01,sp01")) {
|
||||||
|
cnd.and("sqr.unionid", "=", vi.getUnionId());
|
||||||
|
} else {
|
||||||
|
// 非分工会主席、职工慰问审批员角色(包括sysadmin)不允许查看分工会审核数据。
|
||||||
|
cnd.and("1", "=", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vi.cndPlus(cnd, "YEAR(con.apply_time)", "=", year);
|
Vi.cndPlus(cnd, "YEAR(con.apply_time)", "=", year);
|
||||||
@@ -125,6 +131,10 @@ public class CondolenceUcrCon {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("fw.condolence.ucr")
|
@RequiresPermissions("fw.condolence.ucr")
|
||||||
public Object doEdit(String id) {
|
public Object doEdit(String id) {
|
||||||
|
Condolence condolence = condolenceService.fetch(id);
|
||||||
|
if (!hasReviewPermission(condolence)) {
|
||||||
|
return Result.error("您没有分工会审核权限!");
|
||||||
|
}
|
||||||
condolenceService.update(Chain.make("state_id", 2000), Cnd.where("id", "=", id));
|
condolenceService.update(Chain.make("state_id", 2000), Cnd.where("id", "=", id));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -133,11 +143,14 @@ public class CondolenceUcrCon {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("fw.condolence.ucr")
|
@RequiresPermissions("fw.condolence.ucr")
|
||||||
public Object doReview(String id, Integer pass, Review review) {
|
public Object doReview(String id, Integer pass, Review review) {
|
||||||
|
Condolence condolence = condolenceService.fetch(id);
|
||||||
|
if (!hasReviewPermission(condolence)) {
|
||||||
|
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 = reviewService.insert(review);
|
review = reviewService.insert(review);
|
||||||
Condolence condolence = condolenceService.fetch(id);
|
|
||||||
condolence.setUnion_chairman_review(review.getId());
|
condolence.setUnion_chairman_review(review.getId());
|
||||||
if (pass == 1) {
|
if (pass == 1) {
|
||||||
condolence.setState_id("2010");
|
condolence.setState_id("2010");
|
||||||
@@ -167,5 +180,21 @@ public class CondolenceUcrCon {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验分工会审核权限:superadmin可审核全部,分工会主席和职工慰问审批员只能审核本分工会数据。
|
||||||
|
*/
|
||||||
|
private boolean hasReviewPermission(Condolence condolence) {
|
||||||
|
if ("superadmin".equals(ShiroUtil.getPrincipalProperty("loginname"))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (condolence == null || !ShiroUtil.hasAnyRoles("gh01,sp01")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Sql sql = Sqls.fetchString(Sqls.create("select unionid from `user` where id = @id")
|
||||||
|
.setParam("id", condolence.getManager()).toString());
|
||||||
|
condolenceService.dao().execute(sql);
|
||||||
|
return vi.getUnionId().equals(sql.getString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -17,6 +18,7 @@ import org.nutz.dao.Sqls;
|
|||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
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.Strings;
|
||||||
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;
|
||||||
@@ -25,7 +27,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 +114,19 @@ 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("请选择审批意见!");
|
||||||
|
}
|
||||||
|
String sign = review == null ? null : review.getSign();
|
||||||
|
if (Strings.isBlank(sign) || !sign.startsWith("data:image/") || !sign.contains(";base64,")) {
|
||||||
|
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;
|
||||||
@@ -100,7 +99,7 @@ public enum CondolenceToDoHandler {
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
sur.userId
|
sur.userId
|
||||||
""").setParam("roleId", Roles.UNION_MANGER).setParam("userId", condolence.getManager());
|
""").setParam("roleId", Roles.UNION_MANGER).setParam("userId", condolence.getManager());
|
||||||
Sqls.queryString(sql.toString());
|
sql.setCallback(Sqls.callback.strs());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
List<String> loginNames = sql.getList(String.class);
|
List<String> loginNames = sql.getList(String.class);
|
||||||
localProcessService.createTask(
|
localProcessService.createTask(
|
||||||
@@ -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,143 @@
|
|||||||
|
-- 慰问申请:将原校工会审核改名为校工会办公室审核,并创建独立审核角色
|
||||||
|
-- 执行环境: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` = '慰问申请校工会办公室审核',
|
||||||
|
`href` = '/platform/fw/condolence/vcr/school',
|
||||||
|
`showit` = 1,
|
||||||
|
`disabled` = 0,
|
||||||
|
`updatedAt` = UNIX_TIMESTAMP() * 1000,
|
||||||
|
`delFlag` = 0
|
||||||
|
WHERE `id` = @condolence_office_menu_id;
|
||||||
|
|
||||||
|
-- 首页待办按菜单地址精确匹配,同步原待办配置并补充手机端入口。
|
||||||
|
SET @condolence_office_need_item_id := (
|
||||||
|
SELECT `id`
|
||||||
|
FROM `need_items`
|
||||||
|
WHERE `menuId` = @condolence_office_menu_id
|
||||||
|
OR `href` IN ('/platform/fw/condolence/vcr', '/platform/fw/condolence/vcr/school')
|
||||||
|
OR (`queryTable` = 'condolence' AND `queryColumn` = 'state_id' AND `stateId` = 2020)
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
|
SET @condolence_office_need_item_new_id := REPLACE(UUID(), '-', '');
|
||||||
|
|
||||||
|
INSERT INTO `need_items`
|
||||||
|
(`id`, `menuId`, `title`, `name`, `code`, `href`, `mobileHref`, `iconClass`, `color`,
|
||||||
|
`creatUser`, `creatTime`, `queryTable`, `queryColumn`, `stateId`, `userIdColumn`, `queryType`)
|
||||||
|
SELECT
|
||||||
|
@condolence_office_need_item_new_id,
|
||||||
|
@condolence_office_menu_id,
|
||||||
|
'【职工慰问】',
|
||||||
|
'待校工会办公室审核',
|
||||||
|
'condolence_office',
|
||||||
|
'/platform/fw/condolence/vcr/school',
|
||||||
|
'/mobile/condolence/audit',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s'),
|
||||||
|
'condolence',
|
||||||
|
'state_id',
|
||||||
|
2020,
|
||||||
|
'',
|
||||||
|
''
|
||||||
|
WHERE @condolence_office_need_item_id IS NULL
|
||||||
|
AND @condolence_office_menu_id IS NOT NULL;
|
||||||
|
|
||||||
|
SET @condolence_office_need_item_id := COALESCE(
|
||||||
|
@condolence_office_need_item_id,
|
||||||
|
@condolence_office_need_item_new_id
|
||||||
|
);
|
||||||
|
|
||||||
|
UPDATE `need_items`
|
||||||
|
SET `menuId` = @condolence_office_menu_id,
|
||||||
|
`name` = '待校工会办公室审核',
|
||||||
|
`href` = '/platform/fw/condolence/vcr/school',
|
||||||
|
`mobileHref` = '/mobile/condolence/audit',
|
||||||
|
`queryTable` = 'condolence',
|
||||||
|
`queryColumn` = 'state_id',
|
||||||
|
`stateId` = 2020,
|
||||||
|
`userIdColumn` = '',
|
||||||
|
`queryType` = ''
|
||||||
|
WHERE `id` = @condolence_office_need_item_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>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||||
image="/none.svg"
|
image="/none.svg"
|
||||||
description="暂无数据">
|
:description="permissionDenied ? '您没有慰问审核权限' : '暂无数据'">
|
||||||
</van-empty>
|
</van-empty>
|
||||||
|
|
||||||
|
|
||||||
@@ -72,6 +72,7 @@ layout("/mobile/platform.html"){
|
|||||||
{text: '已审核', value: true},
|
{text: '已审核', value: true},
|
||||||
],
|
],
|
||||||
handle: true,
|
handle: true,
|
||||||
|
permissionDenied: false,
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
isAudit: false,
|
isAudit: false,
|
||||||
@@ -90,6 +91,11 @@ layout("/mobile/platform.html"){
|
|||||||
this.flushUnits()
|
this.flushUnits()
|
||||||
},
|
},
|
||||||
pageData() {
|
pageData() {
|
||||||
|
if (this.permissionDenied) {
|
||||||
|
this.finished = true
|
||||||
|
this.mLoading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
this.mLoading = true
|
this.mLoading = true
|
||||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -99,14 +105,18 @@ layout("/mobile/platform.html"){
|
|||||||
} else {
|
} else {
|
||||||
this.pageForm.pageNumber++
|
this.pageForm.pageNumber++
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.permissionDenied = true
|
||||||
|
this.finished = true
|
||||||
|
vant.Toast(res.msg || '您没有慰问审核权限!')
|
||||||
}
|
}
|
||||||
|
this.mLoading = false
|
||||||
})
|
})
|
||||||
this.mLoading = false
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async flushUnits() {
|
async flushUnits() {
|
||||||
//this.$set(this.pageForm, "unitId", "")
|
//this.$set(this.pageForm, "unitId", "")
|
||||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
if ("${@shiro.getPrincipalProperty('loginname')}" === 'superadmin' ||
|
||||||
|
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||||
await mCommon.getUnitList(this.pageForm.unionId)
|
await mCommon.getUnitList(this.pageForm.unionId)
|
||||||
} else {
|
} else {
|
||||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||||
|
|||||||
@@ -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,9 +101,9 @@ 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) {
|
||||||
|
await doCompletes();
|
||||||
this.$toast.success('审核成功');
|
this.$toast.success('审核成功');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
history.back()
|
history.back()
|
||||||
@@ -122,7 +119,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>
|
||||||
@@ -405,7 +405,7 @@ layout("/layouts/platform.html"){
|
|||||||
occur_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
occur_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
jtzz: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
jtzz: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
poszdw: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
poszdw: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
goods_desc: [{required: true, message: '请输入慰问品名称、编号、规格等', trigger: ['blur', 'change']}],
|
goods_desc: [{required: true, message: '请输入慰问品名称、编号、规格等', trigger: ['blur', 'change']}],
|
||||||
mobile: [
|
mobile: [
|
||||||
{required: true, message: '请输入慰问对象联系电话', trigger: ['blur', 'change']},
|
{required: true, message: '请输入慰问对象联系电话', trigger: ['blur', 'change']},
|
||||||
@@ -414,7 +414,7 @@ layout("/layouts/platform.html"){
|
|||||||
birthday: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
birthday: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
// job_title: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// job_title: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
birth_child_num: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
birth_child_num: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
sign: [{required: true, message: '请扫码签字', trigger: ['blur', 'change']}],
|
// sign: [{required: true, message: '请扫码签字', trigger: ['blur', 'change']}],
|
||||||
payee: [{required: true, message: '请选择收款人', trigger: ['blur', 'change']}],
|
payee: [{required: true, message: '请选择收款人', trigger: ['blur', 'change']}],
|
||||||
payee_bank_number: [{required: true, message: '请填写收款人银行卡', trigger: ['blur', 'change']}],
|
payee_bank_number: [{required: true, message: '请填写收款人银行卡', trigger: ['blur', 'change']}],
|
||||||
payee_bank_name: [{required: true, message: '请填写收款人开户行', trigger: ['blur', 'change']}],
|
payee_bank_name: [{required: true, message: '请填写收款人开户行', trigger: ['blur', 'change']}],
|
||||||
@@ -557,10 +557,10 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async doAdd() {
|
async doAdd() {
|
||||||
// 签字由自定义组件回写,提交前单独判断,避免 Element 表单漏过空签字。
|
// 签字由自定义组件回写,提交前单独判断,避免 Element 表单漏过空签字。
|
||||||
if (!this.formData.sign) {
|
/*if (!this.formData.sign) {
|
||||||
this.$message.warning('请扫码签字')
|
this.$message.warning('请扫码签字')
|
||||||
return
|
return
|
||||||
}
|
}*/
|
||||||
this.$refs["form"].validate(async (valid) => {
|
this.$refs["form"].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||||
|
|||||||
@@ -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,
|
||||||
@@ -240,6 +237,9 @@ layout("/layouts/platform.html"){
|
|||||||
'info': httpVueLoader('/components/condolence/Info.vue?v=1.0.2'),
|
'info': httpVueLoader('/components/condolence/Info.vue?v=1.0.2'),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isValidSign(sign) {
|
||||||
|
return typeof sign === 'string' && /^data:image\/(png|jpeg|jpg);base64,/i.test(sign)
|
||||||
|
},
|
||||||
dropdownCommand(command) {
|
dropdownCommand(command) {
|
||||||
const {type, data} = command
|
const {type, data} = command
|
||||||
if (type == 'view') {
|
if (type == 'view') {
|
||||||
@@ -250,11 +250,18 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async openReview(row) {
|
async openReview(row) {
|
||||||
const {id} = row
|
const {id} = row
|
||||||
|
const cachedSign = localStorage.getItem('signature')
|
||||||
|
if (cachedSign && !this.isValidSign(cachedSign)) {
|
||||||
|
// 仅清理当前浏览器中的异常签字缓存,避免 [object Object] 再次提交。
|
||||||
|
localStorage.removeItem('signature')
|
||||||
|
}
|
||||||
|
|
||||||
this.formData = {
|
this.formData = {
|
||||||
id,
|
id,
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
time: moment().format('YYYY-MM-DD'),
|
time: moment().format('YYYY-MM-DD'),
|
||||||
|
pass: null,
|
||||||
|
sign: '',
|
||||||
}
|
}
|
||||||
this.subLoading1 = false
|
this.subLoading1 = false
|
||||||
this.subLoading2 = false
|
this.subLoading2 = false
|
||||||
@@ -265,29 +272,27 @@ 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.isValidSign(this.formData.sign)) {
|
||||||
this.$message.warning('请签字')
|
localStorage.removeItem('signature')
|
||||||
|
this.$set(this.formData, 'sign', '')
|
||||||
|
this.$message.warning('签字数据异常,请重新签字')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
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