From 3c3e64f2beb1ab99e5ba57af53561597af1e90f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=8C=E5=85=88=E8=88=9C?= <2499071264@qq.com> Date: Mon, 28 Sep 2026 14:27:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF-=E5=8D=8F?= =?UTF-8?q?=E4=BC=9A=E5=AE=A1=E6=A0=B8-=E9=80=80=E5=9B=9E-=E6=8B=92?= =?UTF-8?q?=E7=BB=9D-=E9=80=9A=E8=BF=87=E5=AE=8C=E6=95=B4=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apply/ClubUserJoinApplyController.java | 17 ++++++++++++- .../platform/zhghh5/club/apply/index.html | 24 +++++++++++++++++-- .../platform/zhghh5/club/audit/index.html | 23 ++++++++++++------ .../zhghh5/club/common/clubUserJoin.js | 18 ++++++++++++++ .../platform/zhghh5/club/mine/index.html | 3 +++ 5 files changed, 75 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinApplyController.java b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinApplyController.java index aa60855..8ef0582 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinApplyController.java @@ -12,6 +12,7 @@ import com.budwk.app.bpm.service.BpmService; import com.budwk.app.sys.models.Sys_user; import com.budwk.app.sys.models.Sys_user_role; import com.budwk.app.sys.services.SysMsgService; +import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.web.controllers.open.commons.service.CommonService; import com.budwk.app.zhgh.club.model.ClubUser; @@ -63,6 +64,7 @@ public class ClubUserJoinApplyController { Sql sql = Sqls.create(""" SELECT cua.*, + club.clubName, u.loginname AS loginName, u.username AS userName, u.sex, @@ -74,6 +76,7 @@ public class ClubUserJoinApplyController { FROM club_user_apply cua LEFT JOIN vw_user u ON u.id = cua.userId + LEFT JOIN sys_club club ON club.id = cua.clubId WHERE cua.id = @id """).setParam("id", id); sql.setCallback(Sqls.callback.map()); @@ -87,10 +90,22 @@ public class ClubUserJoinApplyController { @SaCheckPermission("club.join.apply") @Aop(TransAop.READ_COMMITTED) public Result submit(ClubUserApply clubUserApply) { + if (StrUtil.isNotBlank(clubUserApply.getId())) { + ClubUserApply existingApply = dao.fetch(ClubUserApply.class, clubUserApply.getId()); + if (existingApply == null || !StrUtil.equals(existingApply.getUserId(), clubUserApply.getUserId()) + || (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name()) && !StrUtil.equals(existingApply.getUserId(), SecurityUtil.getUserId()))) { + return Result.error("申请不存在或无权编辑!"); + } + BpmProcessInstance existingInstance = dao.fetch(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "=", existingApply.getId())); + if (existingInstance == null || existingInstance.getProcessInstanceNodeCode() == null + || !List.of(10, 40, 70).contains(existingInstance.getProcessInstanceNodeCode())) { + return Result.error("当前申请状态不允许编辑提交!"); + } + } Sys_user user = dao.fetch(Sys_user.class, Cnd.where("id", "=", clubUserApply.getUserId())); if (!user.getMember() && !("劳务派遣一类".equals(user.getPreparedBy()) || "劳务派遣二类".equals(user.getPreparedBy()))) return Result.error("暂无申请加入协会资格!"); - ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).desc(ClubUserApply::getApplyDate)); + ClubUserApply userApply = dao.fetch(ClubUserApply.class, Cnd.where("userId", "=", clubUserApply.getUserId()).and("clubId", "=", clubUserApply.getClubId()).and("mode", "=", 1).andEX("id", "!=", clubUserApply.getId()).desc(ClubUserApply::getApplyDate)); if (ObjectUtil.isNotEmpty(userApply) && StrUtil.isNotBlank(userApply.getId())) { BpmProcessInstance processInstance = dao.fetch(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "=", userApply.getId())); if (!processInstance.getProcessInstanceStatus().equals(BpmProcessInstanceStatusEnum.COMPLETED.name())) { diff --git a/src/main/resources/views/platform/zhghh5/club/apply/index.html b/src/main/resources/views/platform/zhghh5/club/apply/index.html index cc88864..0820467 100644 --- a/src/main/resources/views/platform/zhghh5/club/apply/index.html +++ b/src/main/resources/views/platform/zhghh5/club/apply/index.html @@ -203,7 +203,7 @@ layout("/layouts/platform_h5.html"){
- 提交申请 + 提交申请
@@ -227,6 +227,7 @@ layout("/layouts/platform_h5.html"){ data() { return { viewShow: false, + formLoading: false, formData: { clubId: "", clubName: "", @@ -284,6 +285,22 @@ layout("/layouts/platform_h5.html"){ }); }, init() { + const id = GetQueryString("id"); + if (id) { + this.formLoading = true; + this.$axios.post("/platform/club/join/apply/info", { id }).then(res => { + if (res.code === 0 && res.data) { + this.formData = { ...this.formData, ...res.data }; + this.isAgree = true; + this.formLoading = false; + } else { + this.$toast.fail(res.msg || "申请信息加载失败"); + } + }).catch(() => { + this.$toast.fail("申请信息加载失败"); + }); + return; + } const user = this.$store.state.user; this.formData.userId = user.id; this.formData.userName = user.username; @@ -298,6 +315,7 @@ layout("/layouts/platform_h5.html"){ this.formData.governmentPosition = user.governmentPosition; }, doSubmit() { + if (this.formLoading) return; if (!this.isAgree) { this.$toast.fail("请先阅读并同意协议"); return; @@ -309,7 +327,9 @@ layout("/layouts/platform_h5.html"){ this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => { if (res.code === 0) { this.$toast(res.msg); - this.$pjaxReplace("/platform/club/join/mine") + this.$pjaxReplace("/platform/h5/club/mine") + } else { + this.$toast.fail(res.msg); } }); }); diff --git a/src/main/resources/views/platform/zhghh5/club/audit/index.html b/src/main/resources/views/platform/zhghh5/club/audit/index.html index e2bebc1..01d32a8 100644 --- a/src/main/resources/views/platform/zhghh5/club/audit/index.html +++ b/src/main/resources/views/platform/zhghh5/club/audit/index.html @@ -50,8 +50,8 @@ layout("/layouts/platform_h5.html"){ - - + + @@ -64,6 +64,7 @@ layout("/layouts/platform_h5.html"){ return { auditShow: false, approvalOpinion: "", + approvalOpinionError: "", tableLoading: false, tableFinished: false, submitting: false, @@ -92,14 +93,22 @@ layout("/layouts/platform_h5.html"){ this.approvalType = approvalType this.approvalParam = row.approvalParam this.approvalOpinion = "" + this.approvalOpinionError = "" this.auditShow = true }, - async doAudit() { - if (!this.approvalOpinion.trim()) { - this.$toast.fail("请输入审核意见") - this.$nextTick(() => { this.auditShow = true }) + async beforeAuditClose(action, done) { + if (action !== 'confirm') { + done() return } + if (!this.approvalOpinion.trim()) { + this.approvalOpinionError = "请输入审核意见" + done(false) + return + } + done(await this.doAudit() === true) + }, + async doAudit() { if (this.submitting) return this.submitting = true try { @@ -112,8 +121,8 @@ layout("/layouts/platform_h5.html"){ }) if (resp.code === 0) { this.$toast.success(resp.msg) - this.auditShow = false this.doSearch() + return true } else { this.$toast(resp.msg) } diff --git a/src/main/resources/views/platform/zhghh5/club/common/clubUserJoin.js b/src/main/resources/views/platform/zhghh5/club/common/clubUserJoin.js index aac5346..e5bc5db 100644 --- a/src/main/resources/views/platform/zhghh5/club/common/clubUserJoin.js +++ b/src/main/resources/views/platform/zhghh5/club/common/clubUserJoin.js @@ -29,6 +29,24 @@ const clubUserJoin = { +
+ +
+ {{ task.actualOwnerLoginName }}-{{ task.actualOwnerUserName }} + {{ task.endOn }} + + + + +
{{ task.extVariable && task.extVariable.approvalOpinion }}
+
+
+
+
`, data() { diff --git a/src/main/resources/views/platform/zhghh5/club/mine/index.html b/src/main/resources/views/platform/zhghh5/club/mine/index.html index ce04da4..1363525 100644 --- a/src/main/resources/views/platform/zhghh5/club/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/club/mine/index.html @@ -81,6 +81,9 @@ layout("/layouts/platform_h5.html"){ } }, methods: { + openEdit(row) { + this.$pjaxReplace("/platform/h5/club/apply?id=" + encodeURIComponent(row.id)) + }, onOpen(row) { this.viewShow = true this.$nextTick(() => {