This commit is contained in:
Paidax
2025-02-25 10:54:05 +08:00
parent 3b9ca77374
commit f42c8c52d0
53 changed files with 2128 additions and 391 deletions
+40 -40
View File
@@ -58,46 +58,46 @@ public class MsgApi {
*/
public void sendMsg(List<String> channels, String loginNameStr, Integer mtype, String title, String content, String imageUrl,String link) {
try {
// if (!Globals.MyConfig.getBoolean("SendMsg")) {
// log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
// return;
// }
//
// if (Globals.isEnv(Env.dev)) {
// log.info("开发模式不允许发送短信!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
// return;
// }
//
// if (StrUtil.isBlank(title)||StrUtil.isBlank(content) ||Lang.isEmpty(channels) || Lang.isEmpty(loginNameStr)) {
// log.info("发送失败,缺少需要参数请检查!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
// return;
// }
//
// String msgToken = getMsgToken();
// NutMap map = new NutMap();
// map.put("channel", String.join(",", channels));
// //推送范围(1:普通模式;2:全体教师;3:全体学生;4:全体人员)
// map.put("objScope", 1);
// map.put("objIds", loginNameStr);
// map.put("mtype", mtype);
// map.put("sendStatus", 1);
// map.put("title", title);
// map.put("content", content);
// map.put("imageUrl", imageUrl);
// map.put("link", link);
//
// HttpRequest request = HttpUtil.createPost(MSG_API)
// .header("token", msgToken)
// .body(Json.toJson(map));
// JSONObject jsonObject = JSON.parseObject(request.execute().body());
// int status = jsonObject.getInteger("code");
//
// if (status == 200) {
// log.info("发送成功>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
// } else {
// log.info("发送失败>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
// throw new RuntimeException("Message sending failed with status code: " + status + ", Message: " + jsonObject.getString("message"));
// }
/*if (!Globals.MyConfig.getBoolean("SendMsg")) {
log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
return;
}
if (Globals.isEnv(Env.dev)) {
log.info("开发模式不允许发送短信!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
return;
}
if (StrUtil.isBlank(title)||StrUtil.isBlank(content) ||Lang.isEmpty(channels) || Lang.isEmpty(loginNameStr)) {
log.info("发送失败,缺少需要参数请检查!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
return;
}
String msgToken = getMsgToken();
NutMap map = new NutMap();
map.put("channel", String.join(",", channels));
//推送范围(1:普通模式;2:全体教师;3:全体学生;4:全体人员)
map.put("objScope", 1);
map.put("objIds", loginNameStr);
map.put("mtype", mtype);
map.put("sendStatus", 1);
map.put("title", title);
map.put("content", content);
map.put("imageUrl", imageUrl);
map.put("link", link);
HttpRequest request = HttpUtil.createPost(MSG_API)
.header("token", msgToken)
.body(Json.toJson(map));
JSONObject jsonObject = JSON.parseObject(request.execute().body());
int status = jsonObject.getInteger("code");
if (status == 200) {
log.info("发送成功>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
} else {
log.info("发送失败>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
throw new RuntimeException("Message sending failed with status code: " + status + ", Message: " + jsonObject.getString("message"));
}*/
} catch (Exception e) {
e.printStackTrace();
}
@@ -150,7 +150,8 @@ public class ClubApplyInController {
if(sysUser.getMember() != 1) {
return Result.error("您当前不是会员,无法申请");
}
int count = dao.count(Sys_club_user.class, Cnd.where("userid", "=", ShiroUtil.getUserId()).and("isNormal", "=", true));
int count = dao.count(Sys_club_user.class, Cnd.where("userid", "=", ShiroUtil.getUserId())
.and("isNormal", "=", true).and("`status`", "in", List.of(1, 3, 5)));
if(count >= 3) {
return Result.error("您已参与3个协会,无法申请");
}
@@ -76,9 +76,9 @@ public class ClubRegistApplyController {
@Param(value = "isSave", required = false) Boolean isSave,
@Param(value = "::managePerson", required = false) List<NutMap> managePerson,
@Param(value = "::clubUserList", required = false) List<NutMap> clubUserList) throws IOException {
if(!isSave && !sysClubService.getInviteAgree(club)) {
/*if(!isSave && !sysClubService.getInviteAgree(club)) {
return Result.error("您邀请的会员中确认人数暂未达到20人,<span style='color: red'>暂不能提交,只能保存</span>");
}
}*/
club.setIsjs(false);
if (ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
club.setFoundTime(DateUtil.getDateTime());
@@ -190,9 +190,9 @@ public class ClubRegistApplyController {
@Param(value = "::managePerson", required = false) List<NutMap> managePerson,
@Param(value = "::clubUserList", required = false) List<NutMap> clubUserList) throws IOException {
if(!isSave && Objects.equals(club.getState(), ClubRegistAuditState.NOT_SUBMIT) && !sysClubService.getInviteAgree(club)) {
/*if(!isSave && Objects.equals(club.getState(), ClubRegistAuditState.NOT_SUBMIT) && !sysClubService.getInviteAgree(club)) {
return Result.error("您邀请的会员中确认人数暂未达到20人,<span style='color: red'>暂不能提交,只能保存</span>");
}
}*/
//如果不是管理员,并且点的提交按钮
if (!isSave && Objects.equals(club.getUserid(), ShiroUtil.getUserId())) {
@@ -102,7 +102,7 @@ public enum ClubUserApplyToDoHandler {
sur.userId
""");
sqlStr.setCondition(Cnd.NEW().and("sur.roleId", "in", Lang.array(Roles.club01, Roles.club02, Roles.club03, Roles.club04))
.and("clubId", "=", clubUser.getClubid()));
.and("sur.stid", "=", clubUser.getClubid()));
Sql sql = Sqls.queryString(sqlStr.toString());
dao.execute(sql);
List<String> loginNames = sql.getList(String.class);
@@ -142,16 +142,21 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
@Override
public Sys_user fillUnitUnion(Sys_user user) {
if (user.getUnit() != null) {
if (Strings.isNotBlank(user.getUnit().getUnionid())) {
Sys_union union = dao().fetch(Sys_union.class, user.getUnit().getUnionid());
User fetch = dao().fetch(User.class, Cnd.where("id", "=", user.getId()));
if (StrUtil.isNotBlank(fetch.getUnionid())) {
Sys_union union = dao().fetch(Sys_union.class, fetch.getUnionid());
user.setUnion(union);
} else {
User fetch = dao().fetch(User.class, Cnd.where("id", "=", user.getId()));
if (StrUtil.isNotBlank(fetch.getUnionid())) {
Sys_union union = dao().fetch(Sys_union.class, fetch.getUnionid());
user.setUnion(union);
}
}
// if (Strings.isNotBlank(user.getUnit().getUnionid())) {
// Sys_union union = dao().fetch(Sys_union.class, user.getUnit().getUnionid());
// user.setUnion(union);
// } else {
// User fetch = dao().fetch(User.class, Cnd.where("id", "=", user.getId()));
// if (StrUtil.isNotBlank(fetch.getUnionid())) {
// Sys_union union = dao().fetch(Sys_union.class, fetch.getUnionid());
// user.setUnion(union);
// }
// }
}
return user;
}
@@ -284,6 +284,8 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
sysRoleService.clearCache();
} else {
List<String> loginNameList = middleTables.stream().map(SourceChangeMiddleTable::getLoginname).toList();
dao().clear(SourceChangeMiddleTable.class, Cnd.where("loginname", "in", loginNameList).and("isOperate", "=", false));
manyAddOrRenewUtil.asyncExecuteFastInsert(middleTables, 200);
}
} catch (Exception e) {
@@ -316,48 +318,39 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
boolean shouldAdd = false;
boolean shouldRemove = false;
// 提前检查 userState 条件如果存在
boolean userStateConditionMet = true;
if ("userState".equals(siftName)) {
userStateConditionMet = checkListCondition(siftValue, source, "userState");
}
switch (siftName) {
case "userState":
if (siftValue instanceof List<?> && source != null && source.getUserState() != null) {
List<String> userStateList = (List<String>) siftValue;
shouldAdd = userStateList.contains(source.getUserState());
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
// 如果 userState 不满足条件则直接设置 shouldRemove
shouldAdd = userStateConditionMet;
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
break;
case "personType":
if (siftValue instanceof List<?> && source != null && source.getPersonType() != null) {
List<String> personTypeList = (List<String>) siftValue;
shouldAdd = personTypeList.contains(source.getPersonType());
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
// 检查 personType 条件
// 必须同时满足 userState personType 条件
shouldAdd = checkListCondition(siftValue, source, "personType");
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
break;
case "loginNameStart":
if (siftValue instanceof String && source != null && source.getLoginname() != null) {
String loginNameStart = (String) siftValue;
shouldAdd = source.getLoginname().startsWith(loginNameStart);
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
break;
case "loginNameEnd":
if (siftValue instanceof String && source != null && source.getLoginname() != null) {
String loginNameEnd = (String) siftValue;
shouldAdd = source.getLoginname().endsWith(loginNameEnd);
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
shouldAdd = checkLoginNameCondition(siftValue, source, siftName);
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
break;
case "userQuery":
if (siftValue instanceof List<?> && user != null) {
List<String> userIds = (List<String>) siftValue;
shouldAdd = userIds.contains(user.getId()) && user.getMember() != 1;
}
shouldAdd = checkUserQueryCondition(siftValue, user);
break;
}
if (shouldAdd) {
if (user == null) {
addMemberUserIds.add(source.getId());
} else if (user.getMember() != 1) {
addMemberUserIds.add(user.getId());
}
addUserToMemberList(user, source, addMemberUserIds);
source.setMember(1);
} else if (shouldRemove) {
deleteMemberUserIds.add(user.getId());
@@ -365,13 +358,22 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
}
});
if (config.getWelfareMemberSiftList() == null) {
return;
}
config.getWelfareMemberSiftList().forEach(welfareMember -> {
String siftName = welfareMember.getSiftName();
Object siftValue = welfareMember.getSiftValue();
boolean shouldAdd = false;
boolean shouldRemove = false;
// 提前检查 userState 条件如果存在
boolean userStateConditionMet = true;
if ("userState".equals(siftName) && siftValue instanceof List<?>) {
List<String> userStateList = (List<String>) siftValue;
userStateConditionMet = source != null && source.getUserState() != null && userStateList.contains(source.getUserState());
}
switch (siftName) {
case "member":
if ((user != null && addMemberUserIds.contains(user.getId())) || addMemberUserIds.contains(source.getId())) {
@@ -380,34 +382,36 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
shouldRemove = true;
}
break;
case "userState":
if (siftValue instanceof List<?> && source != null && source.getUserState() != null) {
List<String> userStateList = (List<String>) siftValue;
shouldAdd = userStateList.contains(source.getUserState());
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
shouldAdd = userStateConditionMet;
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
break;
case "personType":
if (siftValue instanceof List<?> && source != null && source.getPersonType() != null) {
List<String> personTypeList = (List<String>) siftValue;
shouldAdd = personTypeList.contains(source.getPersonType());
boolean personTypeConditionMet = personTypeList.contains(source.getPersonType());
// 必须同时满足 userState personType 条件
shouldAdd = userStateConditionMet && personTypeConditionMet;
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
break;
case "loginNameStart":
if (siftValue instanceof String && source != null && source.getLoginname() != null) {
String loginNameStart = (String) siftValue;
if (siftValue instanceof String loginNameStart && source != null && source.getLoginname() != null) {
shouldAdd = source.getLoginname().startsWith(loginNameStart);
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
break;
case "loginNameEnd":
if (siftValue instanceof String && source != null && source.getLoginname() != null) {
String loginNameEnd = (String) siftValue;
if (siftValue instanceof String loginNameEnd && source != null && source.getLoginname() != null) {
shouldAdd = source.getLoginname().endsWith(loginNameEnd);
shouldRemove = !shouldAdd && user != null && user.getMember() == 1;
}
break;
case "userQuery":
if (siftValue instanceof List<?> && user != null) {
List<String> userIds = (List<String>) siftValue;
@@ -415,6 +419,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
}
break;
}
if (shouldAdd) {
if (user == null) {
addWelfareMemberUserIds.add(source.getId());
@@ -422,7 +427,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
addWelfareMemberUserIds.add(user.getId());
}
source.setWelfareMember(1);
} else if (shouldRemove) {
} else if (shouldRemove && user != null) {
deleteWelfareMemberUserIds.add(user.getId());
source.setWelfareMember(0);
}
@@ -430,6 +435,41 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
}
// 提取公共方法
private boolean checkListCondition(Object siftValue, UserSource source, String siftName) {
if (!(siftValue instanceof List) || source == null) {
return false;
}
List<String> list = (List<String>) siftValue;
return "userState".equals(siftName) ? list.contains(source.getUserState()) :
"personType".equals(siftName) && list.contains(source.getPersonType());
}
private boolean checkLoginNameCondition(Object siftValue, UserSource source, String siftName) {
if (!(siftValue instanceof String) || source == null || source.getLoginname() == null) {
return false;
}
String loginName = source.getLoginname();
String condition = (String) siftValue;
return "loginNameStart".equals(siftName) ? loginName.startsWith(condition) :
"loginNameEnd".equals(siftName) && loginName.endsWith(condition);
}
private boolean checkUserQueryCondition(Object siftValue, Sys_user user) {
if (!(siftValue instanceof List) || user == null) {
return false;
}
List<String> userIds = (List<String>) siftValue;
return userIds.contains(user.getId()) && user.getMember() != 1;
}
private void addUserToMemberList(Sys_user user, UserSource source, List<String> addMemberUserIds) {
if (user == null) {
addMemberUserIds.add(source.getId());
} else if (user.getMember() != 1) {
addMemberUserIds.add(user.getId());
}
}
/**
* 用于人工操作不自动更新不改变数据库数据
@@ -469,7 +509,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
return null;
}
String changeInfos = changeList.stream().map(v -> {
return "(变更字段:" + v.getString("fieldName") + ",变更前" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
return v.getString("fieldName") + "" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + "";
}).collect(Collectors.joining(""));
// 比较变更数据
@@ -515,7 +555,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
return null;
}
String changeInfos = changeList.stream().map(v -> {
return "(变更字段:" + v.getString("fieldName") + ",变更前" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
return v.getString("fieldName") + "" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + "";
}).collect(Collectors.joining(""));
// 比较变更数据
commonCompareChange(source, user, changeTypes);
@@ -29,6 +29,7 @@ import org.nutz.dao.sql.Sql;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -58,6 +59,11 @@ public class MemberApplyBranchUnionAuditController {
@RequiresPermissions("member.apply.branchUnion.audit")
public void index() {}
@At("/h5")
@Ok("beetl:/mobile/member/apply/branchUnionAudit/index.html")
@RequiresPermissions("member.apply.branchUnion.audit")
public void h5() {}
@At
@RequiresPermissions("member.apply.branchUnion.audit")
@@ -123,18 +129,26 @@ public class MemberApplyBranchUnionAuditController {
} else if (audit.getAuditType() == 1) {
MemberApplyToDoHandler.COMPLETE_PROCESS.exec(record, null);
// 判断是否改变了工会关系
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
if (!ObjectUtil.equals(user.getUnionid(), record.getAllocationUnionId())) {
Sys_union union = dao.fetch(Sys_union.class, Cnd.where("id", "=", record.getAllocationUnionId()));
SpecialStaff staff = new SpecialStaff();
staff.setUserId(record.getUserId());
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao.insert(staff);
if (dao.count(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId())) > 0) {
dao.clear(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId()));
user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
}
if (!ObjectUtil.equals(user.getUnionid(), record.getAllocationUnionId())) {
Sys_union union = dao.fetch(Sys_union.class, Cnd.where("id", "=", record.getAllocationUnionId()));
SpecialStaff staff = new SpecialStaff();
staff.setUserId(record.getUserId());
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao.insert(staff);
}
}
Sys_user sysUser = new Sys_user();
@@ -18,6 +18,7 @@ import org.nutz.dao.Dao;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -50,7 +51,7 @@ public class MemberApplyController {
}
@At("/h5")
@Ok("beetl:/platform/member/apply/submit/index.html")
@Ok("beetl:/mobile/member/apply/submit/index.html")
@RequiresPermissions("member.apply.submit")
public void h5() {
}
@@ -86,7 +87,9 @@ public class MemberApplyController {
record.setChangeType(MemberChangeType.RESTORE.name());
record.setChangeTypes(List.of(MemberChangeType.RESTORE.name()));
// 待提交
record.setApplyStateId(10);
if (record.getApplyStateId() == null) {
record.setApplyStateId(10);
}
dao.insertOrUpdate(record);
return null;
}
@@ -103,6 +106,10 @@ public class MemberApplyController {
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
record.setChangeType(MemberChangeType.RESTORE.name());
record.setChangeTypes(List.of(MemberChangeType.RESTORE.name()));
if (record.getApplyStateId() != null && List.of(30, 60).contains(record.getApplyStateId())) {
MemberApplyToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(record, NutMap.NEW().addv("nodeName", "重新修改申请"));
}
// 待校工会审核
record.setApplyStateId(20);
dao.insertOrUpdate(record);
@@ -111,11 +118,20 @@ public class MemberApplyController {
MemberApplyToDoHandler.START_PROCESS.exec(record, null);
MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
List<String> schoolLoginNameList = commonService.getSchoolOrBranchUnionMemberAdminLoginNames("school", null);
String schoolLoginNameListStr = schoolLoginNameList.stream().distinct().collect(Collectors.joining(","));
String content = "%s老师正申请加入工会,请您点击此条消息或前往智慧工会进行审核";
msgApi.sendMsg(List.of("DingTalk"), schoolLoginNameListStr, 2, "协会入会邀请", content, "", "");
// 短信通知
// List<String> schoolLoginNameList = commonService.getSchoolOrBranchUnionMemberAdminLoginNames("school", null);
// String schoolLoginNameListStr = schoolLoginNameList.stream().distinct().collect(Collectors.joining(","));
//
// String content = "%s老师正申请加入工会,请您点击此条消息或前往智慧工会进行审核";
// msgApi.sendMsg(List.of("DingTalk"), schoolLoginNameListStr, 2, "协会入会邀请", content, "", "");
return null;
}
@At
@ViReturn
@Aop(TransAop.READ_COMMITTED)
public Object validateApply(){
return dao.count(MemberApplyRecord.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("applyStateId", "in", List.of(10, 20, 30, 50, 60)));
}
}
@@ -53,6 +53,11 @@ public class MemberApplyMineController {
public void index() {
}
@At("/h5")
@Ok("beetl:/mobile/member/apply/mine/index.html")
@RequiresPermissions("member.apply.mine")
public void h5() {
}
@At
@RequiresPermissions("member.apply.mine")
@@ -53,6 +53,10 @@ public class MemberApplySchoolUnionAuditController {
@RequiresPermissions("member.apply.schoolUnion.audit")
public void index() {}
@At("/h5")
@Ok("beetl:/mobile/member/apply/schoolUnionAudit/index.html")
@RequiresPermissions("member.apply.schoolUnion.audit")
public void h5() {}
@At
@RequiresPermissions("member.apply.schoolUnion.audit")
@@ -112,7 +116,8 @@ public class MemberApplySchoolUnionAuditController {
if (audit.getAuditType() == 2) {
MemberApplyToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(record, null);
String content = "%s老师您好,您的入会申请被校工会退回,您可根据退回原因修改后再次提交,如有疑问请及时联系校工会".formatted(record.getUsername());
// 短信通知
// String content = "%s老师您好,您的入会申请被校工会退回,您可根据退回原因修改后再次提交,如有疑问请及时联系校工会".formatted(record.getUsername());
} else if (audit.getAuditType() == 1) {
Sql sql = Sqls.create("""
SELECT
@@ -131,13 +136,15 @@ public class MemberApplySchoolUnionAuditController {
List<String> unionLeaderLoginNames = list.stream().map(v -> v.getString("loginname")).toList();
MemberApplyToDoHandler.CREATE_UNION_TASK.exec(record, NutMap.NEW().addv("unionLeaderLoginNames", unionLeaderLoginNames));
for (NutMap map : list) {
String content = "%s老师您好,%s老师的入会申请校工会已通过,现将工会关系划入本工会,请您点击此消息或前往智慧工会进行接收"
.formatted(map.getString("username"), record.getUsername());
}
// 短信通知
// for (NutMap map : list) {
// String content = "%s老师您好,%s老师的入会申请校工会已通过,现将工会关系划入本工会,请您点击此消息或前往智慧工会进行接收"
// .formatted(map.getString("username"), record.getUsername());
// }
} else {
MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核拒绝"));
String content = "%s老师您好,您的入会申请被校工会拒绝,如有疑问请及时联系校工会".formatted(record.getUsername());
// 短信通知
// String content = "%s老师您好,您的入会申请被校工会拒绝,如有疑问请及时联系校工会".formatted(record.getUsername());
}
MemberApplyToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
return null;
@@ -1,19 +1,14 @@
package io.v.nutz.zhgh.staffmanage.member.controller.change;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.wizzer.framework.base.Result;
import io.v.nutz.base.annontation.ViReturn;
import io.v.nutz.base.utils.Roles;
import io.v.nutz.base.utils.Vi;
import io.v.nutz.sys.models.Sys_union;
import io.v.nutz.sys.models.Sys_unit;
import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.models.User;
import io.v.nutz.web.commons.slog.annotation.SLog;
import io.v.nutz.web.commons.utils.ShiroUtil;
import io.v.nutz.zhgh.staffmanage.member.constant.MemberChangeOrigin;
import io.v.nutz.zhgh.staffmanage.member.constant.MemberChangeType;
import io.v.nutz.zhgh.staffmanage.member.handle.MemberChangeToDoHandler;
import io.v.nutz.zhgh.staffmanage.member.model.MemberChangeRecord;
import io.v.nutz.zhgh.staffmanage.member.service.MemberCommonService;
@@ -22,18 +17,13 @@ import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@IocBean
@@ -85,7 +75,9 @@ public class MemberChangeApplyController {
// 变更来源 个人
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
// 待提交
record.setApplyStateId(10010);
if (record.getApplyStateId() == null) {
record.setApplyStateId(10010);
}
dao.insertOrUpdate(record);
return Result.success();
} catch (Exception e) {
@@ -115,6 +107,11 @@ public class MemberChangeApplyController {
record.setUserId(ShiroUtil.getUserId());
// 变更来源 个人
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
if (List.of(10030, 10060).contains(record.getApplyStateId())) {
MemberChangeToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(record, NutMap.NEW().addv("nodeName", "重新修改申请"));
}
// 待分工会审核
record.setApplyStateId(10020);
dao.insertOrUpdate(record);
@@ -154,9 +154,9 @@ public class MemberChangeManageController {
}
cnd.and("u.unionid", "=", Vi.getUnionId());
}
} else {
cnd.andEX("u.unionid", "=", unionId);
}
cnd.andEX("u.unionid", "=", unionId);
cnd.andEX("u.unitid", "=", unitId);
cnd.andEX("u.threeUnitId", "=", threeUnitId);
cnd.andEX("u.unionGroupId", "=", unionGroupId);
@@ -275,6 +275,7 @@ public class MemberChangeManageController {
}
@At
@ViReturn
@Aop(TransAop.READ_COMMITTED)
@RequiresPermissions("member.change.mange")
@SLog(tag = "会员高级管理-会员变更", msg = "分工会/校工会会员管理员提交变更")
@@ -288,54 +289,49 @@ public class MemberChangeManageController {
return Result.error("未校验到变更数据,请确认数据是否存在变更");
}
try {
// 变更就表明当前审核人审核通过
Audit audit = new Audit();
audit.setAuditor(ShiroUtil.getUserId());
audit.setLoginname(ShiroUtil.getPlatformLoginname());
audit.setUsername(ShiroUtil.getPlatformUsername());
audit.setAuditOpinion("通过");
audit.setAuditTime(DateUtil.date());
dao.insert(audit);
// 变更就表明当前审核人审核通过
Audit audit = new Audit();
audit.setAuditor(ShiroUtil.getUserId());
audit.setLoginname(ShiroUtil.getPlatformLoginname());
audit.setUsername(ShiroUtil.getPlatformUsername());
audit.setAuditOpinion("通过");
audit.setAuditTime(DateUtil.date());
dao.insert(audit);
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
// 比较有哪些变更类型
List<String> changeTypes = memberService.compareChangeType(record, user);
record.setChangeTypes(changeTypes);
if (!ShiroUtil.hasAnyRoles("sysadmin, SchoolUnionMemberAdmin")) {
// 分工会变更分工会审核通过转为校工会审核
record.setChangeOrigin(MemberChangeOrigin.BRANCH_UNION.name());
record.setApplyStateId(10050);
record.setBranchUnionAuditId(audit.getId());
dao.insert(record);
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
// 比较有哪些变更类型
List<String> changeTypes = memberService.compareChangeType(record, user);
record.setChangeTypes(changeTypes);
if (!ShiroUtil.hasAnyRoles("sysadmin, SchoolUnionMemberAdmin")) {
// 分工会变更分工会审核通过转为校工会审核
record.setChangeOrigin(MemberChangeOrigin.BRANCH_UNION.name());
record.setApplyStateId(10050);
record.setBranchUnionAuditId(audit.getId());
dao.insert(record);
// 创建流程任务
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
} else {
// 校工会变更变更直接完成
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
record.setApplyStateId(10080);
record.setBranchUnionAuditId(audit.getId());
record.setSchoolUnionAuditId(audit.getId());
dao.insert(record);
// 创建流程任务
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
} else {
// 校工会变更变更直接完成
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
record.setApplyStateId(10080);
record.setBranchUnionAuditId(audit.getId());
record.setSchoolUnionAuditId(audit.getId());
dao.insert(record);
// 创建流程任务
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
MemberChangeToDoHandler.COMPLETE_PROCESS.exec(record, null);
memberService.compareChangeInfoAndUpdateMember(record.getId());
}
return Result.success("操作成功");
} catch (Exception e) {
log.error("分工会/校工会会员管理员提交变更:", e);
return Result.error("操作失败");
// 创建流程任务
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
MemberChangeToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
MemberChangeToDoHandler.COMPLETE_PROCESS.exec(record, null);
memberService.compareChangeInfoAndUpdateMember(record.getId());
}
return null;
}
@@ -139,7 +139,7 @@ public class MemberDataBoardController {
sys_dict dict
LEFT JOIN sys_dict parent ON dict.parentId = parent.id
WHERE
parent.`code` = 'UserType'
parent.`code` = 'PERSON_TYPE'
ORDER BY
dict.location
""");
@@ -164,7 +164,7 @@ public class MemberDataBoardController {
sys_dict dict
LEFT JOIN sys_dict parent ON dict.parentId = parent.id
WHERE
parent.`code` = 'UserState'
parent.`code` = 'USER_STATE'
ORDER BY
dict.location
""");
@@ -41,8 +41,8 @@ public enum MemberApplyToDoHandler {
"MEMBER_APPLY@" + record.getId(),
"",
record.getUserId(),
"/platform/member/apply",
"/platform/member/apply/h5"
"/platform/member/apply/mine",
"/platform/member/apply/mine"
);
}
},
@@ -64,10 +64,10 @@ public enum MemberApplyToDoHandler {
"退回重新修改",
ShiroUtil.getUserId(),
List.of(loginname),
"/platform/member/apply",
"/platform/member/apply",
"/platform/member/apply",
"/platform/member/apply"
"/platform/member/apply/mine",
"/platform/member/apply/mine",
"/platform/member/apply/mine",
"/platform/member/apply/mine"
);
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "退回重新修改");
@@ -107,10 +107,10 @@ public enum MemberApplyToDoHandler {
"校工会审核",
ShiroUtil.getUserId(),
schoolLeaderLoginNames,
"/platform/member/apply/audit/school",
"/platform/member/apply/audit/school",
"/platform/member/apply/audit/school",
"/platform/member/apply/audit/school"
"/platform/member/apply/schoolUnion/audit",
"/platform/member/apply/schoolUnion/audit",
"/platform/member/apply/schoolUnion/audit",
"/platform/member/apply/schoolUnion/audit"
);
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "校工会审核");
@@ -149,10 +149,10 @@ public enum MemberApplyToDoHandler {
"分工会审核",
ShiroUtil.getUserId(),
unionLeaderLoginNames,
"/platform/member/apply/audit/union",
"/platform/member/apply/audit/union",
"/platform/member/apply/audit/union",
"/platform/member/apply/audit/union"
"/platform/member/apply/branchUnion/audit",
"/platform/member/apply/branchUnion/audit",
"/platform/member/apply/branchUnion/audit",
"/platform/member/apply/branchUnion/audit"
);
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "分工会审核");
}
@@ -34,8 +34,8 @@ public enum MemberChangeToDoHandler {
"MEMBER_CHANGE@" + record.getId(),
"",
record.getUserId(),
"/platform/member/change/apply",
"/platform/member/change/apply"
"/platform/member/change/mine",
"/platform/member/change/mine"
);
}
},
@@ -67,10 +67,10 @@ public enum MemberChangeToDoHandler {
nodeName,
ShiroUtil.getUserId(),
List.of(loginname),
"/platform/member/change/apply",
"/platform/member/change/apply",
"/platform/member/change/apply",
"/platform/member/change/apply"
"/platform/member/change/mine",
"/platform/member/change/mine",
"/platform/member/change/mine",
"/platform/member/change/mine"
);
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), nodeName);
@@ -108,10 +108,10 @@ public enum MemberChangeToDoHandler {
"分工会审核",
ShiroUtil.getUserId(),
branchLeaders,
"/platform/member/change/audit/union",
"/platform/member/change/audit/union",
"/platform/member/change/audit/union",
"/platform/member/change/audit/union"
"/platform/member/change/branchUnion/audit",
"/platform/member/change/branchUnion/audit",
"/platform/member/change/branchUnion/audit",
"/platform/member/change/branchUnion/audit"
);
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), "分工会审核");
@@ -150,10 +150,10 @@ public enum MemberChangeToDoHandler {
"校工会审核",
ShiroUtil.getUserId(),
schoolLeaders,
"/platform/member/change/audit/school",
"/platform/member/change/audit/school",
"/platform/member/change/audit/school",
"/platform/member/change/audit/school"
"/platform/member/change/schoolUnion/audit",
"/platform/member/change/schoolUnion/audit",
"/platform/member/change/schoolUnion/audit",
"/platform/member/change/schoolUnion/audit"
);
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), "校工会审核");
@@ -163,6 +163,11 @@ public class MemberChangeRecord {
@ColDefine(type = ColType.VARCHAR, width = 20)
private String campus;
@Column
@Comment("退休日期")
@ColDefine(type = ColType.DATE)
private Date retireDate;
@Column
@Comment("家庭主要成员及其工作单位")
@ColDefine(type = ColType.MYSQL_JSON)
@@ -251,11 +251,7 @@ public class MemberCommonServiceImpl extends ViServiceImpl<Sys_user> implements
history.setChangeTime(DateUtil.date());
history.setChangeTypes(record.getChangeTypes());
history.setChangeOrigin(record.getChangeOrigin());
history.setChangeInfos(changeList);
String changeInfos = changeList.stream().map(v -> {
return "(变更字段:" + v.getString("fieldName") + ",变更前:" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
}).collect(Collectors.joining(""));
history.setChangeInfosStr(changeInfos);
// 加入会员
if (record.getMember()) {
@@ -314,18 +310,39 @@ public class MemberCommonServiceImpl extends ViServiceImpl<Sys_user> implements
// 如果工会发生变更了就是工会关系变更记录到特殊人员表中
if (record.getChangeTypes().contains(MemberChangeType.UNION_CHANGE.getType())) {
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", record.getUnionId()));
SpecialStaff staff = new SpecialStaff();
staff.setUserId(userId);
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao().insert(staff);
if (dao().count(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId())) > 0) {
dao().clear(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId()));
user = dao().fetch(User.class, Cnd.where("id", "=", record.getUserId()));
}
if (!ObjectUtil.equals(user.getUnionid(), record.getUnionId())) {
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", record.getUnionId()));
// 记录工会关系变更的数据
NutMap map = NutMap.NEW();
map.put("field", "unionId");
map.put("fieldName", "工会");
map.put("sourceValue", record.getUnionName());
map.put("newValue", union.getUnionname());
changeList.add(map);
SpecialStaff staff = new SpecialStaff();
staff.setUserId(userId);
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao().insert(staff);
}
}
// 如果有工会关系变更也需要记录变更了什么工会
history.setChangeInfos(changeList);
String changeInfos = changeList.stream().map(v -> {
return v.getString("fieldName") + "" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + "";
}).collect(Collectors.joining(""));
history.setChangeInfosStr(changeInfos);
dao().updateIgnoreNull(info);
dao().insert(history);
@@ -79,6 +79,7 @@ public class SourceChangeManageController {
scmt.changeTypes,
scmt.changeOrigin,
scmt.isOperate,
scmt.changeInfosStr,
u.id AS userId
FROM
source_change_middle_table scmt
@@ -60,6 +60,8 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
@Aop(TransAop.READ_COMMITTED)
public void doSourceChange(SourceChangeMiddleTable middleTable) {
User user = dao().fetch(User.class, Cnd.where("loginname", "=", middleTable.getLoginname()));
// 当前工会用于记录记录是工会关系异动的上一个工会
String unionname = user.getUnionname();
//获取可变更字段
NutMap map = commonService.getDictAllowChangeFields();
@@ -104,11 +106,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
if (Lang.isNotEmpty(history)) {
history.setChangeTime(DateUtil.date());
history.setChangeOrigin(MemberChangeOrigin.HAND_MOVEMENT.name());
history.setChangeInfos(changeList);
String changeInfos = changeList.stream().map(v -> {
return "(变更字段:" + v.getString("fieldName") + ",变更前:" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
}).collect(Collectors.joining(""));
history.setChangeInfosStr(changeInfos);
// 加入会员
if (middleTable.getMember() == 1) {
@@ -116,7 +114,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
int memberCount = dao().count(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.MEMBER));
if (activityCount <= 0) {
// 取消或加入会员组别
if (middleTable.getIsJoinActivityMemberScope()) {
if (middleTable.getIsJoinActivityMemberScope() != null && middleTable.getIsJoinActivityMemberScope()) {
ActivityUserScope scope = new ActivityUserScope();
scope.setUserId(userId);
scope.setGroupId(1);
@@ -133,7 +131,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
// 杭医特有其他学校请删除
middleTable.setPreparedBy("会员");
} else {
if (middleTable.getIsExitActivityMemberScope()) {
if (middleTable.getIsExitActivityMemberScope() != null && middleTable.getIsExitActivityMemberScope()) {
dao().clear(ActivityUserScope.class, Cnd.where("userId", "=", userId).and("groupId", "=", 1));
}
dao().clear(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.MEMBER));
@@ -142,7 +140,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
}
// 加入福利会员 是否加入福利项目
if (middleTable.getWelfareMember() == 1 && middleTable.getIsJoinWelfareProject()) {
if (middleTable.getWelfareMember() == 1 && middleTable.getIsJoinWelfareProject() != null && middleTable.getIsJoinWelfareProject()) {
WelfareList welfareList = new WelfareList();
welfareList.setId(R.UU32());
welfareList.setProjectId(middleTable.getWelfareProjectId());
@@ -168,20 +166,42 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
// 如果工会发生变更了就是工会关系变更记录到特殊人员表中
if (!ObjectUtil.equals(user.getUnionid(), middleTable.getUnionid())) {
changeTypes.add(MemberChangeType.UNION_CHANGE.getType());
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", middleTable.getUnionid()));
SpecialStaff staff = new SpecialStaff();
staff.setUserId(userId);
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao().insert(staff);
if (dao().count(SpecialStaff.class, Cnd.where("userId", "=", userId)) > 0) {
dao().clear(SpecialStaff.class, Cnd.where("userId", "=", userId));
user = dao().fetch(User.class, Cnd.where("id", "=", userId));
}
if (!ObjectUtil.equals(user.getUnionid(), middleTable.getUnionid())) {
changeTypes.add(MemberChangeType.UNION_CHANGE.getType());
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", middleTable.getUnionid()));
// 记录工会关系变更的数据
NutMap changeMap = NutMap.NEW();
changeMap.put("field", "unionId");
changeMap.put("fieldName", "工会");
changeMap.put("sourceValue", unionname);
changeMap.put("newValue", union.getUnionname());
changeList.add(changeMap);
SpecialStaff staff = new SpecialStaff();
staff.setUserId(userId);
staff.setPersonnelRelationUnitId(user.getUnitid());
staff.setPersonnelRelationUnitName(user.getUnitname());
staff.setUnionRelationUnionId(union.getId());
staff.setUnionRelationUnionName(union.getUnionname());
staff.setIsManyUnit(false);
staff.setSpecialStaffType("HMC_RELATION");
dao().insert(staff);
}
}
dao().updateIgnoreNull(info);
history.setChangeInfos(changeList);
String changeInfos = changeList.stream().map(v -> {
return v.getString("fieldName") + "" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + "";
}).collect(Collectors.joining(""));
history.setChangeInfosStr(changeInfos);
history.setChangeTypes(changeTypes);
dao().insert(history);
@@ -148,7 +148,7 @@ public class SpecialStaffManageController {
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.where("id", "not in", "(select userId from special_staff)");
cnd.and("id", "not in", "(select userId from special_staff)");
if (StrUtil.isNotBlank(keyWord)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("username", keyWord);
@@ -1,7 +1,7 @@
<template>
<div>
<div ref="editorDom"></div>
<input type="file" style="display: none;">
<input type="file" style="display: none;" />
</div>
</template>
@@ -81,8 +81,8 @@ module.exports = {
clearInterval(signatureInterval)
const ts = new Date().getTime() + (Math.floor(Math.random() * (1000 - 1 + 1)) + 1).toString()
console.log(ts)
this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
// this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
// this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
this.showQrCode = true
@@ -507,6 +507,16 @@
});
},
async flushCache(){
const day = moment().format('YYYY-MM-DD')
if (window.localStorage.getItem('flushCache') !== day) {
const {code, msg} = await $.post('/platform/home/clearCache')
if (code === 0) {
location.reload()
}
window.localStorage.setItem('flushCache', day)
}
},
findParentNodes(data, targetHref, parents = []) {
for (const node of data) {
if (node && node.href === targetHref) {
@@ -545,6 +555,7 @@
created() {
this.matchMenu()
this.getUnReadMsgNum()
this.flushCache()
}
})
</script>
@@ -0,0 +1,312 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 15px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
font-size: 16px;
}
.van-col {
line-height: 35px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 18px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
p {
margin: 0 !important;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.process-title {
font-size: 15px;
color: #1867b0;
font-weight: 600;
margin: 10px 0 10px 7px !important;
padding:10px;
position: relative;
line-height: 1.1;
font-family: inherit;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="分工会入会接收" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
<van-col span="24"><span style="color: grey">分配工会:</span><span>{{item.allocationUnionName}}</span></van-col>
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</span></van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.stateName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)"
type="info" style="margin-right: 4px">查看
</van-button>
<van-button size="small" type="primary"
v-if="item.applyStateId === 50"
@click="openApproval(item)"
style="margin-right: 4px">审核
</van-button>
<van-button size="small" type="danger"
v-if="[70].includes(item.applyStateId)"
@click="openRevoke(item.id)"
style="margin-right: 4px">撤回
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow
title="申请详情"></van-nav-bar>
</van-sticky>
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
<div v-if="showApprovalForm">
<div class="process-title">{{ '分工会接收' }}</div>
<van-form>
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="default" block @click="infoShow=false">取消</van-button>
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
<van-button type="danger" block @click.submit="doApproval(0)">拒绝接收</van-button>
<van-button type="primary" block @click.submit="doApproval(1)">同意接收</van-button>
</div>
</div>
</van-popup>
</div>
<script>
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
new Vue({
el: '#app',
mixins: [mobileMixins],
data(){
return{
user: {},
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
auditList: [
{text: "已审核", value: true},
{text: "未审核", value: false},
],
unionList: [],
unitList: [],
tableLoading: false,
tableFinished: false,
id: '',
infoShow: false,
showApprovalForm: false
}
},
components: {
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
},
methods: {
openView(item) {
this.infoShow = true
this.showApprovalForm = false
this.$nextTick(() => {
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
})
},
openApproval(item) {
this.id = item.id
this.formData.username = this.user.username
this.formData.auditTime = moment().format('YYYY-MM-DD')
this.infoShow = true
this.showApprovalForm = true
this.$nextTick(() => {
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
})
},
openRevoke(id) {
this.$dialog.confirm({
title: '提示',
message: '确定要撤回该申请吗?'
}).then(() => {
$.post('/platform/member/apply/branchUnion/audit/doRevoke', { id }).then(resp => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
})
})
},
async doApproval(approvalType) {
if (!this.formData.auditOpinion) {
this.$toast.fail('请填写审核意见')
return
}
let msg = '确定要通过此条申请吗?'
if (approvalType === 0) {
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
} else if (approvalType === 2) {
msg = '确定要退回此条申请吗?'
}
this.$dialog.confirm({
title: '提示',
message: msg
}).then(async () => {
this.formData.auditType = approvalType
const resp = await $.post('/platform/member/apply/branchUnion/audit/approval', {
audit: JSON.stringify(this.formData),
id: this.id
})
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.infoShow = false
this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
$.post('/platform/member/apply/branchUnion/audit/pageData', this.pageForm)
.then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
async flushUnits(unionId) {
this.unitList = await getUnits(unionId)
this.unitList.forEach(v => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
async initData() {
this.user = JSON.parse(window.sessionStorage.getItem('user'))
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
await this.flushUnits()
} else {
await this.flushUnits(this.user.union.id)
}
this.doSearch()
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,155 @@
const MEMBER_APPLY_AUDIT_INFO = {
template: /*language=HTML*/ `
<div>
<van-tabs v-model="activeName">
<van-tab title="申请信息" name="basicInfo">
<van-cell-group>
<van-cell>
<div style="color: #1867b0;font-weight: bold;font-size: 16px;display: flex;align-items: center;justify-content: space-between">
<div>
<span>申请信息</span>
</div>
<div @click="clickUpOrDown=!clickUpOrDown">
<span>{{clickUpOrDown ? '点击收起' : '点击展开'}}</span>
<van-icon :name="clickUpOrDown?'arrow-up':'arrow-down'"></van-icon>
</div>
</div>
</van-cell>
<template v-if="clickUpOrDown">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>
<van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
</van-cell>
</template>
</van-cell-group>
</van-tab>
<van-tab title="校工会审核信息" name="school" v-if="viewData.schoolAudit">
<van-cell-group>
<van-cell title="审核人员">{{ viewData.schoolAudit.username }}</van-cell>
<van-cell title="审核时间">{{ viewData.schoolAudit.auditTime }}</van-cell>
<van-cell title="分配工会">{{ viewData.allocationUnionName }}</van-cell>
<van-cell title="审核意见">{{ viewData.schoolAudit.auditOpinion }}</van-cell>
</van-cell-group>
</van-tab>
<van-tab title="分工会接收信息" name="branch" v-if="viewData.branchAudit">
<van-cell-group>
<van-cell title="审核人员">{{ viewData.branchAudit.username }}</van-cell>
<van-cell title="审核时间">{{ viewData.branchAudit.auditTime }}</van-cell>
<van-cell title="审核意见">{{ viewData.branchAudit.auditOpinion }}</van-cell>
</van-cell-group>
</van-tab>
</van-tabs>
</div>
`,
data(){
return{
activeName: 'basicInfo',
viewData: {
schoolAudit: {},
branchAudit: {}
},
clickUpOrDown: true
}
},
methods:{
async onOpen(id){
const resp = await $.post('/platform/member/apply/mine/findMemberApplyRecord', {id})
if (resp.code === 0) {
this.viewData = resp.data
this.$emit('union-name', this.viewData.userUnionName)
if (this.viewData.families) {
this.viewData.families = JSON.parse(this.viewData.families)
} else {
this.viewData.families = []
}
}
}
},
style: /*language=CSS*/
`
.column-cell {
flex-direction: column;
}
.family-table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
table-layout: auto;
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
}
.table-header {
background-color: #1867b0;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 20px;
border: 1px solid #ddd;
text-align: center;
}
`
}
@@ -0,0 +1,231 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 15px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
font-size: 16px;
}
.van-col {
line-height: 35px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 18px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
p {
margin: 0 !important;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="我的入会申请" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu v-if="$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, BranchUnionMemberAdmin')" :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</span></van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.stateName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)"
type="info" style="margin-right: 4px">查看
</van-button>
<van-button size="small" @click="pjaxReplace('/platform/member/apply/submit/h5?id=' + item.id)"
v-if="[10,30,60].includes(item.applyStateId) && item.userId == user.id"
type="info" style="margin-right: 4px">编辑</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow
title="申请详情"></van-nav-bar>
</van-sticky>
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
</van-popup>
</div>
<script>
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
new Vue({
el: '#app',
mixins: [mobileMixins],
data(){
return{
user: {},
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
isAudit: false
},
unionList: [],
unitList: [],
tableLoading: false,
tableFinished: false,
infoShow: false,
}
},
components: {
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
},
methods: {
openView(item) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
$.post('/platform/member/apply/mine/pageData', this.pageForm)
.then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
async initUnion(unionId) {
this.unionList = await getUnionList(unionId)
this.unionList.forEach(v => {
v.text = v.unionname
v.value = v.id
})
if (this.unionList && this.unionList.length > 0) {
this.unionList.unshift({ text: "全部工会", value: null })
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits(unionId) {
this.unitList = await getUnits(unionId)
this.unitList.forEach(v => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
async initData() {
this.user = JSON.parse(window.sessionStorage.getItem('user'))
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
await this.initUnion()
await this.flushUnits()
} else {
await this.initUnion(this.user.union.id)
await this.flushUnits(this.user.union.id)
}
this.doSearch()
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -1,15 +0,0 @@
<!--#
layout("/mobile/platform.html"){
#-->
<div id="app" v-cloak>
</div>
<script>
new Vue({
el: '#app',
})
</script>
<!--#
}
#-->
@@ -0,0 +1,359 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 15px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0;
}
.van-button--small {
border-radius: 8px;
height: 26px;
font-size: 16px;
}
.van-col {
line-height: 35px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 18px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
color: #1867b0;
}
p {
margin: 0 !important;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.process-title {
font-size: 15px;
color: #1867b0;
font-weight: 600;
margin: 10px 0 10px 7px !important;
padding:10px;
position: relative;
line-height: 1.1;
font-family: inherit;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{item.username + '(' + item.loginname + ')'}}</span>
</div>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="24"><span style="color: grey">工作单位:</span>{{item.unitName}}</van-col>
<van-col span="24"><span style="color: grey">所属工会:</span><span>{{item.unionName}}</span></van-col>
<van-col span="24"><span style="color: grey">分配工会:</span><span>{{item.allocationUnionName}}</span></van-col>
<van-col span="24"><span style="color: grey">在职状态:</span>{{item.userState}}</van-col>
<van-col span="24"><span style="color: grey">人员类型:</span><span>{{item.personType}}</span></van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: space-between; align-items: center">
<div>
<span style="color: grey">当前状态:</span>
<span>{{item.stateName}}</span>
</div>
<div>
<van-button size="small" @click="openView(item)"
type="info" style="margin-right: 4px">查看
</van-button>
<van-button size="small" type="primary"
v-if="[20, 70].includes(item.applyStateId)"
@click="openApproval(item)"
style="margin-right: 4px">审核
</van-button>
<van-button size="small" type="danger"
v-if="[30, 50].includes(item.applyStateId)"
@click="openRevoke(item.id)"
style="margin-right: 4px">撤回
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
</div>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow
title="申请详情"></van-nav-bar>
</van-sticky>
<member-apply-audit-info ref="memberApplyAuditInfoRef" @union-name="getApplyUserUnion"></member-apply-audit-info>
<div v-if="showApprovalForm">
<div class="process-title">{{ '校工会审核' }}</div>
<van-form>
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
<van-field label="当前工会" readonly name="unionName" v-model="unionName" required></van-field>
<van-field label="分配工会" v-model="formData.unionName" readonly clickable required
@click="unionPicker = true" placeholder="请选择分配工会"
:rules="[{ required:true, message: '请选择分配工会' }]"></van-field>
<van-popup v-model="unionPicker" position="bottom">
<van-picker
show-toolbar
:columns="unions"
@confirm="doSetAllocationUnion"
@cancel="unionPicker = false"
></van-picker>
</van-popup>
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="default" block @click="infoShow=false">取消</van-button>
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
<van-button type="danger" block @click.submit="doApproval(0)">拒绝申请</van-button>
<van-button type="primary" block @click.submit="doApproval(1)">同意申请</van-button>
</div>
</div>
</van-popup>
</div>
<script>
<!--#include('../common/memberApplyAuditInfo.js'){}#-->
new Vue({
el: '#app',
mixins: [mobileMixins],
data(){
return{
user: {},
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
auditList: [
{text: "已审核", value: true},
{text: "未审核", value: false},
],
unions: [],
unionList: [],
unitList: [],
tableLoading: false,
tableFinished: false,
unionPicker: false,
id: '',
unionName: '',
infoShow: false,
showApprovalForm: false
}
},
components: {
'member-apply-audit-info': MEMBER_APPLY_AUDIT_INFO
},
methods: {
doSetAllocationUnion(val){
this.formData.unionId = val.id
this.formData.unionName = val.unionname
this.unionPicker = false
},
getApplyUserUnion(unionName){
this.unionName = unionName
},
openView(item) {
this.infoShow = true
this.showApprovalForm = false
this.$nextTick(() => {
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
})
},
openApproval(item) {
this.id = item.id
this.formData.username = this.user.username
this.formData.auditTime = moment().format('YYYY-MM-DD')
this.infoShow = true
this.showApprovalForm = true
this.$nextTick(() => {
this.$refs.memberApplyAuditInfoRef.onOpen(item.id)
})
},
openRevoke(id) {
this.$dialog.confirm({
title: '提示',
message: '确定要撤回该申请吗?'
}).then(() => {
$.post('/platform/member/apply/schoolUnion/audit/doRevoke', { id }).then(resp => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
})
})
},
async doApproval(approvalType) {
if (!this.formData.auditOpinion) {
this.$toast.fail('请填写审核意见')
return
}
if (!this.formData.unionId) {
this.$toast.fail('请选择分配工会')
return
}
let msg = '确定要通过此条申请吗?'
if (approvalType === 0) {
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
} else if (approvalType === 2) {
msg = '确定要退回此条申请吗?'
}
this.$dialog.confirm({
title: '提示',
message: msg
}).then(async () => {
this.formData.auditType = approvalType
const resp = await $.post('/platform/member/apply/schoolUnion/audit/approval', {
audit: JSON.stringify(this.formData),
id: this.id,
unionId: this.formData.unionId
})
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.infoShow = false
this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
$.post('/platform/member/apply/schoolUnion/audit/pageData', this.pageForm)
.then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
async initUnion(unionId) {
this.unionList = await getUnionList(unionId)
this.unionList.forEach(v => {
v.text = v.unionname
v.value = v.id
})
this.unions = this.unionList.concat()
if (this.unionList && this.unionList.length > 0) {
this.unionList.unshift({ text: "全部工会", value: null })
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits(unionId) {
this.unitList = await getUnits(unionId)
this.unitList.forEach(v => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
async initData() {
this.user = JSON.parse(window.sessionStorage.getItem('user'))
if (this.$auth.hasRoleOr("sysadmin, SchoolUnionMemberAdmin")) {
await this.initUnion()
await this.flushUnits()
} else {
await this.initUnion(this.user.union.id)
await this.flushUnits(this.user.union.id)
}
this.doSearch()
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,406 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.up_down > .van-cell {
flex-flow: column;
}
.up_down > .van-cell > .van-field__label {
width: 100%;
}
.van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px;
}
.van-divider {
margin: 10px 0;
}
.direction-column-field {
display: flex;
flex-direction: column;
row-gap: 10px;
}
.direction-column-field {
max-width: 100%;
padding-right: 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="会员入会申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
</van-sticky>
<van-cell-group>
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
class="mt5"
scroll-to-error
input-align="right"
:show-error-message="false">
<van-field label="工号" :value="formData.loginname" readonly></van-field>
<van-field label="姓名" :value="formData.username" readonly></van-field>
<van-field label="性别" v-model="formData.sex" readonly
@click="sexPicker = true"
placeholder="请选择性别"
clickable></van-field>
<van-popup v-model="sexPicker" position="bottom">
<van-picker
show-toolbar
:columns="['男','女']"
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
@cancel="sexPicker = false"
></van-picker>
</van-popup>
<van-field label="民族" v-model="formData.nation" readonly clickable
@click="nationPicker = true" placeholder="请选择民族"
:rules="[{ required:true, message: '请选择民族' }]"></van-field>
<van-popup v-model="nationPicker" position="bottom">
<van-picker
show-toolbar
:columns="nationColumns"
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
@cancel="nationPicker = false"
></van-picker>
</van-popup>
<van-field
v-model="formData.birthday"
label="出生年月"
is-link
@click="datePicker = true"
:rules="[{ required: true, message: '请填写出生年月' }]"
></van-field>
<van-popup v-model="datePicker" position="bottom">
<van-datetime-picker
type="date"
:min-date="new Date(1900, 0, 1)"
:max-date="new Date()"
@confirm="onDateConfirm"
@cancel="datePicker=false"
></van-datetime-picker>
</van-popup>
<van-field label="政治面貌" v-model="formData.political" readonly clickable
@click="politicalPicker = true" placeholder="请选择政治面貌"
:rules="[{ required:true, message: '请选择政治面貌' }]"></van-field>
<van-popup v-model="politicalPicker" position="bottom">
<van-picker
show-toolbar
:columns="politicalColumns"
@confirm="(v)=>{formData.political = v;politicalPicker = false}"
@cancel="politicalPicker = false"
></van-picker>
</van-popup>
<van-field label="学历" v-model="formData.education" readonly clickable
@click="educationPicker = true" placeholder="请选择学历"
:rules="[{ required:true, message: '请选择学历' }]"></van-field>
<van-popup v-model="educationPicker" position="bottom">
<van-picker
show-toolbar
:columns="educationColumns"
@confirm="(v)=>{formData.education = v;educationPicker = false}"
@cancel="educationPicker = false"
></van-picker>
</van-popup>
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
@click="academicDegreePicker = true" placeholder="请选择学位"
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
<van-popup v-model="academicDegreePicker" position="bottom">
<van-picker
show-toolbar
:columns="academicDegreeColumns"
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
@cancel="academicDegreePicker = false"
></van-picker>
</van-popup>
<van-field label="党政职务" v-model="formData.position"
placeholder="请填写党政职务"
:rules="[{ required:true, message: '请填写党政职务' }]"></van-field>
<van-field label="工作单位" :value="formData.unitName" readonly></van-field>
<van-field label="所属工会" :value="formData.unionName" readonly></van-field>
<van-field label="所属校区" v-model="formData.campus" readonly clickable
@click="campusPicker = true" placeholder="请选择所属校区"
:rules="[{ required:true, message: '请选择所属校区' }]"></van-field>
<van-popup v-model="campusPicker" position="bottom">
<van-picker
show-toolbar
:columns="campusColumns"
@confirm="(v)=>{formData.campus = v;campusPicker = false}"
@cancel="campusPicker = false"
></van-picker>
</van-popup>
<van-field label="在职状态" :value="formData.userState" readonly></van-field>
<van-field label="人员类型" :value="formData.personType" readonly></van-field>
<van-field label="身份证号码" v-model="formData.idCard" placeholder="请输入身份证号码"
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '身份证号码格式错误' }]"></van-field>
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请输入联系电话"
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '联系电话格式错误' }]"></van-field>
<van-field label="电子邮箱" v-model="formData.email" placeholder="请输入电子邮箱"
:rules="[{ pattern :/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: '邮箱格式错误' }]"></van-field>
<van-cell-group inset class="mt10 up_down">
<div class="van-cell">
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="width: 100%">
<span style="margin-left: -15px">家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="formData.families && formData.families.length>0 && formData.families.length<5" style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
<van-divider></van-divider>
<template v-if="formData.families && formData.families.length>0">
<div v-for="o,i in formData.families" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="cross" type="danger" round size="mini"
@click="formData.families.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="备注" v-model="o.remark" placeholder="请填写备注"
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</van-cell-group>
<van-field
label="个人简历"
name="vita"
v-model="formData.vita"
class="direction-column-field">
<template #input>
<text-editor style="z-index: 1" v-model="formData.vita"></text-editor>
</template>
</van-field>
</van-form>
<div v-if="!user.member" style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button block v-if="formData.id" type="default" @click.submit="pjaxReplace('/platform/member/apply/mine/h5')">返 回</van-button>
<van-button block type="info" @click="doSave">保存申请</van-button>
<van-button block type="info" @click="doSubmit">提交申请</van-button>
</div>
</van-cell-group>
</div>
<script>
new Vue({
el: '#app',
mixins: [mobileMixins],
dicts:['USER_NATION', 'USER_POLITICAL', 'USER_EDUCATION','USER_ACADEMIC_DEGREE', 'USER_CAMPUS'],
data() {
return{
id: GetQueryString('id'),
formData: {
families: [],
},
user: {},
sexPicker: false,
nationPicker: false,
datePicker: false,
politicalPicker: false,
educationPicker: false,
academicDegreePicker: false,
campusPicker: false,
}
},
methods: {
doSave(){
this.$dialog.confirm({
title: "保存",
message: "保存后可在我的申请里面再次编辑,您确定要保存吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(async () => {
const formData = this.formData
if (this.formData.families) {
formData.families = JSON.stringify(this.formData.families)
}
const resp = await $.post('/platform/member/apply/submit/doSave', formData)
if (resp.code === 0) {
this.$toast.success('操作成功')
this.user.member = true
pjaxReplace('/platform/member/apply/mine/h5')
} else {
this.$toast.fail(resp.msg)
}
})
},
doSubmit(){
this.$dialog.confirm({
title: "保存",
message: "提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(async () => {
const formData = this.formData
if (this.formData.families) {
formData.families = JSON.stringify(this.formData.families)
}
const resp = await $.post('/platform/member/apply/submit/doSubmit', formData)
if (resp.code === 0) {
this.$toast.success('操作成功')
this.user.member = true
pjaxReplace('/platform/member/apply/mine/h5')
} else {
this.$toast.fail(resp.msg)
}
})
},
onDateConfirm(value) {
this.formData.birthday = value;
this.showDatePicker = false;
},
async validateApply() {
if (this.id) {
return
}
const resp = await $.post('/platform/member/apply/submit/validateApply')
if (resp.code === 0 && resp.data > 0) {
vant.Dialog.confirm({
title: '提示',
message: '您有其他入会流程正在进行中,请勿重复申请,如需查看详情,可前往我的申请界面,是否前往?',
})
.then(() => {
this.user.member = true
pjaxReplace('/platform/member/apply/mine/h5')
})
.catch(() => {
this.user.member = true
})
}
},
init(){
this.user = JSON.parse(window.sessionStorage.getItem('user'))
if (this.user.member) {
vant.Dialog.alert({
title: '提示',
message: '您已是会员,请勿重复入会',
})
}
if (this.id) {
$.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
}
})
} else {
const {
id,
username,
loginname,
sex,
nation,
birthday,
political,
education,
academicDegree,
position,
unit,
union,
campus,
userState,
personType,
idCard,
mobile,
email,
families,
vita
} = this.user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "unitName", unit ? unit.name : null)
this.$set(this.formData, "unitId", unit ? unit.id : null)
this.$set(this.formData, "unionName", union ? union.unionname : null)
this.$set(this.formData, "unionId", union ? union.id : null)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "vita", vita)
}
},
},
computed:{
nationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_NATION){
return this.dict.type.USER_NATION.map(v=>v.value)
}
return []
},
politicalColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){
return this.dict.type.USER_POLITICAL.map(v=>v.value)
}
return []
},
educationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){
return this.dict.type.USER_EDUCATION.map(v=>v.value)
}
return []
},
academicDegreeColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE){
return this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.value)
}
return []
},
campusColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_CAMPUS){
return this.dict.type.USER_CAMPUS.map(v=>v.value)
}
return []
}
},
async created(){
this.init()
await this.validateApply()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,81 @@
const MEMBER_INFO_H5 = {
template: /*language=HTML*/ `
<div>
<van-cell-group>
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitname }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionname }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idcard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>
<van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>
<van-cell title="家庭成员收入" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.age }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.monthlyIncome }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
</van-cell>
</van-cell-group>
</div>
`,
data(){
return{
viewData: {}
}
},
methods: {
onOpen(userId){
$.post('/platform/member/common/fetchMemberUserById', {userId})
.then(resp => {
if (resp.code === 0) {
this.viewData = resp.data
} else {
this.$toast.fail(resp.msg)
}
})
}
},
created() {
}
}
@@ -53,8 +53,17 @@
<!--字典混入-->
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
<!--富文本编辑器-->
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
<script src="${base!}/assets/platform/plugins/wangeditor/wangEditor.js"></script>
<!-- 鉴权 -->
<script src="${base!}/assets/platform/js/util/commonUtil.js"></script>
<script>
Vue.component('mobile-sign', httpVueLoader('/components/sign/mobileSign.vue'))
Vue.component("text-editor", httpVueLoader("/components/plugins/TextEditor.vue?v=" + new Date().getTime()))
Vue.prototype.$auth = commonUtil.authService()
</script>
<script>
@@ -175,7 +175,7 @@ layout("/layouts/platform.html"){
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5;cursor: pointer" @click="openUserChangeInfo(row)">
{{getChangeTypes(row.changeTypes)}}
{{ getChangeTypes(row.changeTypes) }}
</span>
</template>
</el-table-column>
@@ -201,19 +201,11 @@ layout("/layouts/platform.html"){
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :source="source" :id="userId" view></member>
</el-tab-pane>
</el-tabs>
</template>
</guava>
@@ -321,11 +313,11 @@ layout("/layouts/platform.html"){
</guava>
</el-drawer>
<user-change-history ref="userChangeHistory"></user-change-history>
</div>
<script>
<!--#include("../common/memberAllChangeInfo.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
@@ -347,7 +339,6 @@ layout("/layouts/platform.html"){
latelyUpdateTimes: [],
dialogVisible: false,
sourceTime: "",
changeType: {},
source: 'sys_user',
sourceType: null,
@@ -362,19 +353,17 @@ layout("/layouts/platform.html"){
partGroupInfos: [],
isInvert:'',
changeTableInfo:{},
changeTypeData: [],
}
},
components: {
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'user-upset': httpVueLoader('/components/userpartupdate/UserPartUpdateSet.vue'),
'user-upset-data': httpVueLoader('/components/userpartupdate/UserDataPartUpSet.vue'),
'user-change-history': httpVueLoader('/components/userChangeHistory/userChangeHistory.vue?v=' + new Date().getTime()),
},
methods: {
async openUserChangeInfo({hisId}) {
this.$refs.userChangeHistory.openUserChangeInfo(hisId)
},
async getColumnInfo() {
const {data, msg, code} = await $.post('/platform/activity/basic/scope/getUserTableColumnInfo')
@@ -507,15 +496,6 @@ layout("/layouts/platform.html"){
this.latelyUpdateTimes = resp.data
}
},
async getChangeType() {
const changeType = {}
const changeTypeOptions = await getEnumOptions("UserChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.description
})
return changeType
},
exportChange() {
const {
searchName,
@@ -567,12 +547,18 @@ layout("/layouts/platform.html"){
this.userScopeDialog = false
this.getPartGroupInfos();
},
getChangeTypes(changeTypes) {
if (changeTypes) {
const c = JSON.parse(changeTypes)
return c.map(v => {
return this.changeType[v]
}).join(',')
getChangeTypes(changeTypes){
if (!changeTypes) {
return
}
const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.type === v).changeTypeName
})
.join(",")
}
return null
},
@@ -581,9 +567,9 @@ layout("/layouts/platform.html"){
this.pageData();
this.units = await getUnits()
await this.getLatelyUpdateTimes()
this.changeType = await this.getChangeType()
await this.getColumnInfo()
await this.getPartGroupInfos()
this.changeTypeData = await getEnumOptions("MemberChangeType")
}
})
</script>
@@ -462,9 +462,9 @@
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -51,7 +51,7 @@ layout("/layouts/platform.html"){
<template #view>
<member-apply-audit-info ref="memberApplyAuditInfoRef"></member-apply-audit-info>
<div v-if="showApprovalForm">
<div class="process-title" style="margin: 20px 0">分工会审核</div>
<div class="process-title" style="margin: 20px 0">分工会接收</div>
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
@@ -73,16 +73,16 @@ layout("/layouts/platform.html"){
placeholder="请填写审核意见" show-word-limit></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<!--<el-col :span="24">
<el-form-item label="审核签字" prop="auditSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<sign :is_value_base64="false" :qz.sync="formData.auditSign" prefix="member_apply_audit" ref="sign"></sign>
</el-form-item>
</el-col>
</el-col>-->
</el-row>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回重新申请</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<el-button type="danger" @click="doApproval(0)">拒绝接收</el-button>
<el-button type="primary" @click="doApproval(1)">同意接收</el-button>
</el-row>
@@ -68,11 +68,11 @@ const COMMON_QUERY = {
},
async initData(){
if (this.$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, SchoolUnionAdmin')) {
this.unions = await getUnions(this.pageForm.unionId)
this.unions = await getUnionList(this.pageForm.unionId)
this.units = await getUnits()
} else {
const user = JSON.parse(window.sessionStorage.getItem('user'))
this.unions = await getUnions(user.union.id)
this.unions = await getUnionList(user.union.id)
this.units = await getUnits(user.union.id)
}
},
@@ -29,7 +29,7 @@ layout("/layouts/platform.html"){
<el-table-column label="操作" width="220">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.applyStateId === 10"
<el-button v-if="[10, 30, 60].includes(row.applyStateId) && row.userId == user.id"
@click="sublime.jumpPagePjax('/platform/member/apply/submit?id=' + row.id)"
size="mini" type="primary">编辑</el-button>
<!-- <el-button v-if="row.applyStateId === 20" @click="doRevoke(row)" size="mini" type="warning">撤销</el-button>-->
@@ -54,6 +54,7 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data(){
return{
user: {},
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
@@ -117,6 +118,7 @@ layout("/layouts/platform.html"){
},
},
created(){
this.user = JSON.parse(window.sessionStorage.getItem('user'))
this.pageData()
}
})
@@ -68,7 +68,7 @@ layout("/layouts/platform.html"){
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="分配工会关系" prop="unionId" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-form-item label="分配工会关系" prop="unionId">
<el-select clearable filterable placeholder="请选择工会" style="width: 100%;"
v-model="formData.unionId">
<el-option :key="item.id" :label="item.unionname" :value="item.id"
@@ -90,16 +90,16 @@ layout("/layouts/platform.html"){
placeholder="请填写审核意见" show-word-limit></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<!--<el-col :span="24">
<el-form-item label="审核签字" prop="auditSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<sign :is_value_base64="false" :qz.sync="formData.auditSign" prefix="member_apply_audit" ref="sign"></sign>
</el-form-item>
</el-col>
</el-col>-->
</el-row>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回重新申请</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<el-button type="danger" @click="doApproval(0)">拒绝申请</el-button>
<el-button type="primary" @click="doApproval(1)">同意申请</el-button>
</el-row>
@@ -166,6 +166,11 @@ layout("/layouts/platform.html"){
})
},
doApproval(approvalType){
if (approvalType === 1 && !this.formData.unionId) {
this.$message.warning('请分配工会关系')
return
}
let msg = '确定要通过此条申请吗?'
if (approvalType === 0) {
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
@@ -228,7 +233,7 @@ layout("/layouts/platform.html"){
},
async created(){
this.pageData()
this.unions = await getUnions()
this.unions = await getUnionList()
}
})
</script>
@@ -93,13 +93,13 @@ layout("/layouts/platform.html"){
<el-descriptions-item label="在职状态">
<el-form-item prop="userState">
<dict-select v-model="formData.userState" code="USER_STATE"
style="width: 100%"></dict-select>
disabled style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="人员类型">
<el-form-item prop="personType">
<dict-select v-model="formData.personType" code="PERSON_TYPE"
style="width: 100%"></dict-select>
disabled style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
@@ -166,7 +166,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="个人简况(简历、获奖情况、有何特长)" :span="3">
<el-descriptions-item label="个人简" :span="3">
<el-form-item prop="vita">
<text-editor v-model="formData.vita"></text-editor>
</el-form-item>
@@ -194,16 +194,68 @@ layout("/layouts/platform.html"){
families: []
},
formRules: {
username: [{required: false, message: "必填", trigger: "change"}],
sex: [{required: false, message: "必填", trigger: "change"}],
idCard: [
{required: false, message: "身份证号不能为空", trigger: "blur"},
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
email: [
{
pattern: /(^\d{6}(18|19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}([0-9xX])$)/,
message: "身份证号格式不正确",
trigger: "blur"
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]
},
}
},
@@ -250,6 +302,22 @@ layout("/layouts/platform.html"){
}
})
},
async validateApply() {
if (this.formData.id) {
return
}
const resp = await $.post('/platform/member/apply/submit/validateApply')
if (resp.code === 0 && resp.data > 0) {
this.$confirm("您有其他入会流程正在进行中,请勿重复申请,如需查看详情,可前往我的申请界面,是否前往?", "提示", { type: "warning" })
.then(() => {
this.member = true
sublime.jumpPagePjax('/platform/member/apply/mine')
})
.catch(() => {
this.member = true
})
}
},
init(){
const user = JSON.parse(window.sessionStorage.getItem('user'))
this.member = user.member
@@ -257,11 +325,6 @@ layout("/layouts/platform.html"){
$.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
if (this.formData.families) {
this.formData.families = JSON.parse(this.formData.families)
} else {
this.formData.families = []
}
}
})
} else {
@@ -317,6 +380,7 @@ layout("/layouts/platform.html"){
async created(){
this.init()
this.units = await getUnits()
await this.validateApply()
}
})
</script>
@@ -925,9 +925,9 @@ layout("/layouts/platform.html"){
this.pageData();
this.getNumData()
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -345,9 +345,9 @@ layout("/layouts/platform.html"){
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -615,9 +615,9 @@
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -76,16 +76,16 @@ layout("/layouts/platform.html"){
placeholder="请填写审核意见" show-word-limit></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<!--<el-col :span="24">
<el-form-item label="审核签字" prop="auditSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<sign :is_value_base64="false" :qz.sync="formData.auditSign" prefix="member_apply_audit" ref="sign"></sign>
</el-form-item>
</el-col>
</el-col>-->
</el-row>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回重新申请</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<el-button type="danger" @click="doApproval(0)">拒绝申请</el-button>
<el-button type="primary" @click="doApproval(1)">同意申请</el-button>
</el-row>
@@ -68,11 +68,11 @@ const COMMON_QUERY = {
},
async initData(){
if (this.$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, SchoolUnionAdmin')) {
this.unions = await getUnions(this.pageForm.unionId)
this.unions = await getUnionList(this.pageForm.unionId)
this.units = await getUnits()
} else {
const user = JSON.parse(window.sessionStorage.getItem('user'))
this.unions = await getUnions(user.union.id)
this.unions = await getUnionList(user.union.id)
this.units = await getUnits(user.union.id)
}
},
@@ -134,17 +134,25 @@ const MEMBER_CHANGE = {
:disabled="allowFields('userState')" style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<template v-if="formData.userState == '退休'">
<el-descriptions-item label="退休日期">
<el-form-item prop="retireDate">
<el-date-picker v-model="formData.retireDate"
type="date"
placeholder="请选择出生日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item label="人员类型">
<el-form-item prop="personType">
<dict-select v-model="formData.personType" code="PERSON_TYPE"
:disabled="allowFields('personType')" style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="人员性质">
<el-form-item prop="preparedBy">
<el-input v-model="formData.preparedBy" disabled placeholder="暂无" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-if="formData.userState == null || formData.userState != '退休'"></el-descriptions-item>
<el-descriptions-item label="会员状态">
<el-form-item prop="member">
@@ -406,7 +414,7 @@ const MEMBER_CHANGE = {
this.allowChangeFields = await getDictOptions("ALLOW_CHANGE_FIELDS")
if (this.$auth.hasRoleOr('sysadmin, SchoolUnionMemberAdmin, SchoolUnionAdmin')) {
this.units = await getUnits()
this.unions = await getUnions()
this.unions = await getUnionList()
} else {
this.units = await getUnits(this.user.unionid)
}
@@ -26,7 +26,13 @@ const MEMBER_CHANGE_AUDIT_INFO = {
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item label="人员性质">{{ viewData.preparedBy }}</el-descriptions-item>
<template v-if="viewData.retireDate">
<el-descriptions-item label="退休日期">{{ viewData.retireDate }}</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
@@ -837,7 +837,7 @@ layout("/layouts/platform.html"){
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$refs.guava.index()
this.pageData()
this.doSearch()
} else {
this.$message.error(resp.msg)
}
@@ -869,7 +869,7 @@ layout("/layouts/platform.html"){
// }
},
getChangeTypes(changeTypes){
const changeTypesList = JSON.parse(changeTypes)
const changeTypesList = clone(changeTypes)
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
@@ -883,7 +883,7 @@ layout("/layouts/platform.html"){
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
const pageForm = {...this.pageForm}
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.changeTypes = JSON.stringify(pageForm.changeTypes)
@@ -916,9 +916,9 @@ layout("/layouts/platform.html"){
this.pageData();
this.getNumData()
if (this.$auth.hasRoleOr("sysadmin,SchoolUnionMemberAdmin,H03")) {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -336,9 +336,9 @@ layout("/layouts/platform.html"){
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
this.unions = await getUnionList(null, false)
} else {
this.unions = await getUnions(null, true)
this.unions = await getUnionList(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
@@ -76,16 +76,16 @@ layout("/layouts/platform.html"){
placeholder="请填写审核意见" show-word-limit></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<!--<el-col :span="24">
<el-form-item label="审核签字" prop="auditSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<sign :is_value_base64="false" :qz.sync="formData.auditSign" prefix="member_apply_audit" ref="sign"></sign>
</el-form-item>
</el-col>
</el-col>-->
</el-row>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回重新申请</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<el-button type="danger" @click="doApproval(0)">拒绝申请</el-button>
<el-button type="primary" @click="doApproval(1)">同意申请</el-button>
</el-row>
@@ -20,13 +20,18 @@ const MEMBER_INFO = {
<el-descriptions-item label="所属工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idcard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item label="人员性质">{{ viewData.preparedBy || '暂无' }}</el-descriptions-item>
<template v-if="viewData.retireDate">
<el-descriptions-item label="退休日期">{{ viewData.retireDate }}</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
@@ -66,6 +71,8 @@ const MEMBER_INFO = {
const resp = await $.post("/platform/member/common/fetchMemberUserById", {userId})
if (resp.code === 0) {
this.viewData = resp.data
} else {
this.$message.warning(resp.msg)
}
}
}
@@ -102,15 +102,27 @@ const COMMON_QUERY = {
unions: [],
units: [],
pageForm: {
pageNumber: 1,
pageSize: 5,
searchKeyword: '',
unionId: '',
unitId: '',
userState: '',
personType: ''
personType: '',
changeDateRange: []
}
}
},
methods: {
setDefaultDateRange() {
const end = new Date(); // 当前时间
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); // 当前时间往前推90天
this.$set(this.pageForm, "changeDateRange", [start, end])
this.pageForm.changeDateBefore = start
this.pageForm.changeDateEnd = end
this.doSearch()
},
changeDateRangeChange(val){
if (val && val.length > 0) {
this.pageForm.changeDateBefore = val[0]
@@ -144,5 +156,6 @@ const COMMON_QUERY = {
},
async created() {
this.initData()
this.setDefaultDateRange()
}
}
@@ -102,38 +102,8 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return{
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit("pick", [start, end])
}
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit("pick", [start, end])
}
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit("pick", [start, end])
}
}
]
},
pageForm: {
pageSize: 5,
searchKeyword: "",
unionId: "",
unitId: "",
@@ -146,11 +116,10 @@ layout("/layouts/platform.html"){
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true, width: "100px" },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionname", label: "所属工会", sortable: true },
{ prop: "unitname", label: "所属单位", sortable: true },
{ prop: "changeInfosStr", label: "变更详细信息", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: "160px" },
{ prop: "changeTime", label: "变更时间", sortable: true },
],
@@ -56,7 +56,7 @@ const USER_CHANGE_INFO = {
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="变更后用户信息" name="userChangInfo" v-if="!formData.isOperate">
<el-tab-pane label="数据更新后信息" name="userChangInfo" v-if="!formData.isOperate">
<el-form :model="formData" ref="formRef" label-width="0" :rules="formRules" size="small">
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="工号">
@@ -291,7 +291,7 @@ const USER_CHANGE_INFO = {
</el-row>
</el-tab-pane>
<el-tab-pane label="详细变更字段" name="changeInfo" v-if="formData.changeInfos">
<el-tab-pane label="数据更新变更字段" name="changeInfo" v-if="formData.changeInfos">
<el-table :data="formData.changeInfos" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
@@ -307,6 +307,10 @@ const USER_CHANGE_INFO = {
</template>
</el-table-column>
</el-table>
<el-row justify="end" v-if="!isView || !formData.isOperate" type="flex" class="mt10">
<el-button @click="$emit('do-back')" type="primary"> </el-button>
<el-button @click="doSubmit" type="primary"> </el-button>
</el-row>
</el-tab-pane>
</el-tabs>
</div>
@@ -317,7 +321,7 @@ const USER_CHANGE_INFO = {
mixins: [initTableMixins],
data() {
return{
activeName: "basicInfo",
activeName: "changeInfo",
viewData: {},
units: [],
unions: [],
@@ -285,7 +285,7 @@ layout("/layouts/platform.html"){
</div>
<div v-show="activeName === '4'">
<vi-title2 title="请选择协会成员(至少提交20人)"></vi-title2>
<vi-title2 title="请选择协会成员"></vi-title2>
<el-table :data="clubUserTableData">
<el-table-column label="序号" type="index" width="80"></el-table-column>
<el-table-column label="姓名" prop="userId">
@@ -670,8 +670,8 @@ layout("/layouts/platform.html"){
this.$message.warning('理事机构成员要求不少于3人')
return
}*/
if (!flag && this.clubUserTableData.length < 20) {
this.$message.warning('请至少选择20位协会成员')
if (!flag && this.clubUserTableData.length === 0) {
this.$message.warning('请您选择协会成员')
return
}
const loading = this.$loading({