diff --git a/src/main/java/com/budwk/app/sys/controller/SysUnionGroupController.java b/src/main/java/com/budwk/app/sys/controller/SysUnionGroupController.java index 304467db..4230bbc0 100644 --- a/src/main/java/com/budwk/app/sys/controller/SysUnionGroupController.java +++ b/src/main/java/com/budwk/app/sys/controller/SysUnionGroupController.java @@ -21,8 +21,10 @@ import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.lang.util.NutMap; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; import javax.validation.Valid; +import java.util.Arrays; import java.util.List; @IocBean @@ -82,8 +84,11 @@ public class SysUnionGroupController { @At @SaCheckPermission("sys.manager.union") @ApiOperation("获取非工会小组组长人员") - public Result listUser(@Valid String unionId, String keyword) { - List list = sysUnionGroupService.listNotLeader(unionId, keyword); + public Result listUser(@Valid @Param("unionId") String unionId, + @Param("keyword") String keyword, + @Param("userIds") String[] userIds) { + System.out.println(Arrays.toString(userIds)); + List list = sysUnionGroupService.listNotLeader(unionId, keyword, Arrays.asList(userIds)); return Result.success(list); } diff --git a/src/main/java/com/budwk/app/sys/services/SysUnionGroupService.java b/src/main/java/com/budwk/app/sys/services/SysUnionGroupService.java index f542a603..8f063474 100644 --- a/src/main/java/com/budwk/app/sys/services/SysUnionGroupService.java +++ b/src/main/java/com/budwk/app/sys/services/SysUnionGroupService.java @@ -22,8 +22,9 @@ public interface SysUnionGroupService extends BaseService { * 查询非组长的成员 * @param unionId 分工会id * @param keyword 关键字 + * @param userIds 用户Id */ - List listNotLeader(String unionId, String keyword); + List listNotLeader(String unionId, String keyword, List userIds); /** * 分页查询 diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysUnionGroupServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysUnionGroupServiceImpl.java index b5331d64..a7188e06 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysUnionGroupServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysUnionGroupServiceImpl.java @@ -22,6 +22,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.ioc.aop.Aop; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.Lang; import org.nutz.lang.util.NutMap; import java.util.List; @@ -72,14 +73,19 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl i } @Override - public List listNotLeader(String unionId, String keyword) { + public List listNotLeader(String unionId, String keyword, List userIds) { Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition limit 0,10"); Cnd cnd = Cnd.NEW(); cnd.and("unionId", "=", unionId); - SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.orLike("username", keyword); - seg.orLike("loginname", keyword); - cnd.and(seg); + if (StrUtil.isNotBlank(keyword)) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("username", keyword); + seg.orLike("loginname", keyword); + cnd.and(seg); + } else { + cnd.and("id", "in", userIds); + } + sql.setCondition(cnd); return listMap(sql); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeAgencyController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeAgencyController.java index 6fa33812..ed814cdb 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeAgencyController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeAgencyController.java @@ -194,7 +194,7 @@ public class BuildHomeAgencyController { @SaCheckPermission("buildHome.agency") @ApiOperation("获取非工会小组组长人员") public Result listUser(@Valid String keyword) { - List list = sysUnionGroupService.listNotLeader(SecurityUtil.getUnionId(), keyword); + List list = sysUnionGroupService.listNotLeader(SecurityUtil.getUnionId(), keyword, null); return Result.success(list); } diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/member/controller/apply/MemberApplyUnionGroupApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffmanage/member/controller/apply/MemberApplyUnionGroupApprovalController.java index 80570208..4e5d3902 100644 --- a/src/main/java/com/budwk/app/zhgh/staffmanage/member/controller/apply/MemberApplyUnionGroupApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffmanage/member/controller/apply/MemberApplyUnionGroupApprovalController.java @@ -45,6 +45,11 @@ public class MemberApplyUnionGroupApprovalController { @SaCheckPermission("member.apply.unionGroupApproval") public void index() {} + @At + @Ok("beetl:/platform/zhghh5/staffmanage/member/apply/uniongroupapproval/index.html") + @SaCheckPermission("h5.member.apply.uniongroupapproval") + public void h5() { + } @At @ApiOperation("会员入会申请工会小组审核列表") diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/member/interceptor/MemberApplySchoolApprovalInterceptor.java b/src/main/java/com/budwk/app/zhgh/staffmanage/member/interceptor/MemberApplySchoolApprovalInterceptor.java index a8081588..38644777 100644 --- a/src/main/java/com/budwk/app/zhgh/staffmanage/member/interceptor/MemberApplySchoolApprovalInterceptor.java +++ b/src/main/java/com/budwk/app/zhgh/staffmanage/member/interceptor/MemberApplySchoolApprovalInterceptor.java @@ -2,12 +2,15 @@ package com.budwk.app.zhgh.staffmanage.member.interceptor; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.flow.constant.FlowConst; import com.budwk.app.flow.engine.FlowInterceptor; import com.budwk.app.flow.engine.core.Execution; import com.budwk.app.flow.engine.core.ServiceContext; import com.budwk.app.flow.enums.ProcessSubmitTypeEnum; +import com.budwk.app.sys.models.Sys_role; import com.budwk.app.sys.models.Sys_user; +import com.budwk.app.sys.models.Sys_user_role; import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord; import org.nutz.dao.Chain; import org.nutz.dao.Cnd; @@ -44,7 +47,21 @@ public class MemberApplySchoolApprovalInterceptor implements FlowInterceptor { Sys_user sysUser = new Sys_user(); BeanUtil.copyProperties(record, sysUser); sysUser.setId(record.getUserId()); + sysUser.setMember(true); + sysUser.setWelfareMember(true); dao.updateIgnoreNull(sysUser); + + // 还要设置会员角色 + Sys_role role = dao.fetch(Sys_role.class, Cnd.where(Sys_role::getCode, "=", RoleConstant.MEMBER.name())); + + int count = dao.count(Sys_user_role.class, Cnd.where("userId", "=", record.getUserId()).and("roleId", "=", role.getId())); + if (count == 0) { + Sys_user_role userRole = new Sys_user_role(); + userRole.setUserId(record.getUserId()); + userRole.setRoleId(role.getId()); + dao.insert(userRole); + } + // 正常的发送短信,审核通过 } else { // 发TMD短信 HMC,流程在流转到分工会接收环节 diff --git a/src/main/resources/views/platform/sys/union/branchUnionGroupManage.js b/src/main/resources/views/platform/sys/union/branchUnionGroupManage.js index ffbada52..52b19956 100644 --- a/src/main/resources/views/platform/sys/union/branchUnionGroupManage.js +++ b/src/main/resources/views/platform/sys/union/branchUnionGroupManage.js @@ -113,8 +113,10 @@ const branchUnionGroupManage = { async onEdit(row) { this.formData = { ...row } + this.formData.unitIds = JSON.parse(row.unitIds) + this.formData.leaders = JSON.parse(row.leaders) await this.getUnits(row.id) - this.getUserOptions(row.leaderUserName) + this.getUserOptions(null, this.formData.leaders) this.dialogFormVisible = true this.$nextTick(() => { this.$refs.formRef.clearValidate() @@ -166,8 +168,12 @@ const branchUnionGroupManage = { }) }, - getUserOptions(keyword) { - $.get("/platform/sys/unionGroup/listUser", { keyword, unionId: this.union_id }).then((res) => { + getUserOptions(keyword, userIds = null) { + $.get("/platform/sys/unionGroup/listUser", { + keyword, + unionId: this.union_id, + userIds: JSON.stringify(userIds) + }).then((res) => { if (res.code === 0) { this.userOptions = res.data } diff --git a/src/main/resources/views/platform/zhgh/staffmanage/member/apply/submit/index.html b/src/main/resources/views/platform/zhgh/staffmanage/member/apply/submit/index.html index bf8d1fa1..00ddb345 100644 --- a/src/main/resources/views/platform/zhgh/staffmanage/member/apply/submit/index.html +++ b/src/main/resources/views/platform/zhgh/staffmanage/member/apply/submit/index.html @@ -101,7 +101,12 @@ layout("/layouts/platform.html"){ disabled style="width: 100%"> - + + + + + diff --git a/src/main/resources/views/platform/zhgh/staffmanage/member/change/common/memberChange.js b/src/main/resources/views/platform/zhgh/staffmanage/member/change/common/memberChange.js index b59e0013..364a00ad 100644 --- a/src/main/resources/views/platform/zhgh/staffmanage/member/change/common/memberChange.js +++ b/src/main/resources/views/platform/zhgh/staffmanage/member/change/common/memberChange.js @@ -157,7 +157,7 @@ const MEMBER_CHANGE = { diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/branchunionapproval/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/branchunionapproval/index.html index 27e9d474..aec6692a 100644 --- a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/branchunionapproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/branchunionapproval/index.html @@ -128,30 +128,32 @@ layout("/layouts/platform_h5.html"){ }, async handleTaskAction(val) { - try { - await this.$refs.formRef.validate(); - this.$dialog.confirm({ - title: "提示", - message: "您确定要提交吗?" - }).then(() => { - this.$axios.post("/flow/common/executeTask", { - data: JSON.stringify({ - ...this.formData, - submitType: val - }) - }).then((res) => { - if (res.code === 0) { - this.$refs.infoRef.onClose() - this.$toast.success(res.msg) - this.doSearch() - } - }) - }).catch(() => { - + await this.$refs.formRef.validate(); + this.$dialog.confirm({ + title: "提示", + message: "您确定要提交吗?" + }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 }) - } catch (error) { - - } + this.$axios.post("/flow/common/executeTask", { + data: JSON.stringify({ + ...this.formData, + submitType: val + }) + }).then((res) => { + if (res.code === 0) { + this.$refs.infoRef.onClose() + this.$toast.success(res.msg) + this.doSearch() + } + }).finally(() => { + loading.close() + }) + }) }, // 撤回 @@ -160,11 +162,19 @@ layout("/layouts/platform_h5.html"){ title: '提示', message: '您确定要撤回吗?', }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => { if (res.code === 0) { this.$toast.success('撤回成功'); this.doSearch(); } + }).finally(() => { + loading.close() }) }) }, diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/mine/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/mine/index.html index 66ea324f..0968b39b 100644 --- a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/mine/index.html @@ -98,9 +98,17 @@ layout("/layouts/platform_h5.html"){ confirmButtonText: "确定", cancelButtonText: "取消" }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => { this.$toast.success(resp.msg) this.doSearch() + }).finally(() => { + loading.close() }) }) }, @@ -112,6 +120,12 @@ layout("/layouts/platform_h5.html"){ confirmButtonText: "确定", cancelButtonText: "取消" }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => { if (res.code === 0) { this.doSearch() @@ -119,6 +133,8 @@ layout("/layouts/platform_h5.html"){ } else { this.$toast.fail(res.msg) } + }).finally(() => { + loading.close() }) }) }, diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/schoolunionapproval/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/schoolunionapproval/index.html index 4a249c99..9c6df876 100644 --- a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/schoolunionapproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/schoolunionapproval/index.html @@ -128,30 +128,32 @@ layout("/layouts/platform_h5.html"){ }, async handleTaskAction(val) { - try { - await this.$refs.formRef.validate(); - this.$dialog.confirm({ - title: "提示", - message: "您确定要提交吗?" - }).then(() => { - this.$axios.post("/flow/common/executeTask", { - data: JSON.stringify({ - ...this.formData, - submitType: val - }) - }).then((res) => { - if (res.code === 0) { - this.$refs.infoRef.onClose() - this.$toast.success(res.msg) - this.doSearch() - } - }) - }).catch(() => { - + await this.$refs.formRef.validate(); + this.$dialog.confirm({ + title: "提示", + message: "您确定要提交吗?" + }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 }) - } catch (error) { - - } + this.$axios.post("/flow/common/executeTask", { + data: JSON.stringify({ + ...this.formData, + submitType: val + }) + }).then((res) => { + if (res.code === 0) { + this.$refs.infoRef.onClose() + this.$toast.success(res.msg) + this.doSearch() + } + }).finally(() => { + loading.close() + }) + }) }, // 撤回 @@ -160,14 +162,21 @@ layout("/layouts/platform_h5.html"){ title: '提示', message: '您确定要撤回吗?', }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => { if (res.code === 0) { this.$toast.success('撤回成功'); this.doSearch(); } + }).finally(() => { + loading.close() }) - }).catch(() => { - }); + }) }, initUnion() { diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/submit/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/submit/index.html index f61027c0..9a5b5886 100644 --- a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/submit/index.html +++ b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/submit/index.html @@ -143,6 +143,14 @@ layout("/layouts/platform_h5.html"){ placeholder="请填写人员类型" clickable > + { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => { if (res.code === 0) { this.$toast.success(res.msg) @@ -286,6 +300,8 @@ layout("/layouts/platform_h5.html"){ this.$toast.fail('操作失败') console.log(res.msg) } + }).finally(() => { + loading.close() }) }) }, @@ -296,6 +312,12 @@ layout("/layouts/platform_h5.html"){ title: "提示", message: "您确定要提交吗?" }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post('/platform/member/apply/submit/submit', { data: JSON.stringify(this.formData) }).then(res => { @@ -306,7 +328,9 @@ layout("/layouts/platform_h5.html"){ this.$toast.fail('操作失败') console.log(res.msg) } - }) + }).finally(() => { + loading.close() + }) }) }) }, @@ -317,6 +341,12 @@ layout("/layouts/platform_h5.html"){ title: "提示", message: "您确定要提交吗?" }).then(() => { + const loading = this.$toast.loading({ + message: "加载中...", + forbidClick: true, + overlay: true, + duration: 0 + }) this.$axios.post('/platform/member/apply/submit/submitAgain', { data: JSON.stringify(this.formData), taskId: this.taskId, @@ -328,7 +358,9 @@ layout("/layouts/platform_h5.html"){ this.$toast.fail('操作失败') console.log(res.msg) } - }) + }).finally(() => { + loading.close() + }) }) }) }, @@ -465,27 +497,28 @@ layout("/layouts/platform_h5.html"){ } }, computed: { + nationColumns(){ if(this.dict && this.dict.type && this.dict.type.USER_NATION){ - return this.dict.type.USER_NATION.map(v=>v.value) + return this.dict.type.USER_NATION.map(v=>v.name) } return [] }, politicalColumns(){ if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){ - return this.dict.type.USER_POLITICAL.map(v=>v.value) + return this.dict.type.USER_POLITICAL.map(v=>v.name) } return [] }, educationColumns(){ if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){ - return this.dict.type.USER_EDUCATION.map(v=>v.value) + return this.dict.type.USER_EDUCATION.map(v=>v.name) } 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 this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.name) } return [] }, diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/uniongroupapproval/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/uniongroupapproval/index.html new file mode 100644 index 00000000..2f200026 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffmanage/member/apply/uniongroupapproval/index.html @@ -0,0 +1,224 @@ + +
+ + + + + + + + + + + + + + + + + +
+
{{formData.taskName}}
+ + + +
+ 退回 + 拒绝 + 同意 +
+
+
+
+ +