From 0f460e6b1a31062d9c3753242e7d0bcc07de1e85 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, 2 Nov 2026 11:22:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E5=92=8C=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E9=83=A8=E5=88=864?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CondolenceApplyController.java | 1 + .../DifficultHelpApplyController.java | 4 + .../DifficultHelpMineController.java | 11 +- .../staffbenefit/condolence/apply/index.html | 47 +++-- .../staffbenefit/condolence/common/info.js | 3 + .../staffbenefit/condolence/type/basicForm.js | 12 +- .../difficulthelp/apply/form.html | 13 +- .../difficulthelp/apply/index.html | 175 ++++++++++-------- .../staffbenefit/difficulthelp/common/info.js | 8 +- .../difficulthelp/mine/index.html | 28 ++- .../staffbenefit/condolence/apply/index.html | 36 ++-- .../staffbenefit/condolence/common/info.css | 41 +++- .../staffbenefit/condolence/common/info.js | 16 +- .../difficulthelp/apply/index.html | 32 +++- .../difficulthelp/common/info.css | 16 +- .../difficulthelp/mine/index.html | 8 +- 16 files changed, 296 insertions(+), 155 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceApplyController.java index c60e83f..7e28e70 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceApplyController.java @@ -127,6 +127,7 @@ public class CondolenceApplyController { username as userName, loginname as loginName, sex, + mobile, technicalTitle, IFNULL(unitname, '暂无') as unitName, unitid as unitId, diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java index c003d66..501ccf3 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java @@ -184,6 +184,10 @@ public class DifficultHelpApplyController { birthday, mobile, sex, + idCard, + position, + professionalTitle AS officialCapacity, + (SELECT u.homeAddress FROM sys_user u WHERE u.id = vw_user.id) AS homeAddress, unitName, unionName, unionId, diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java index e03fa15..8552845 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.page.Pagination; @@ -68,6 +69,7 @@ public class DifficultHelpMineController { Sql sql = Sqls.create(""" SELECT info.id, + info.createdBy, info.proxyUserName, info.proxyLoginName, info.userName, @@ -103,7 +105,8 @@ public class DifficultHelpMineController { """); Cnd cnd = Cnd.NEW(); pageParam.buildSearch(cnd, "info."); - cnd.and("info.createdBy", "=", SecurityUtil.getUserId()); + cnd.and(Cnd.exps("info.createdBy", "=", SecurityUtil.getUserId()) + .or("info.userId", "=", SecurityUtil.getUserId())); if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) { cnd.desc("info.applyTime"); } else { @@ -121,6 +124,10 @@ public class DifficultHelpMineController { @SaCheckPermission("difficultHelp.mine") @SLog(tag = "困难补助申请", msg = "删除困难补助申请,id: ${args[0]}") public Result onDelete(@Valid String id){ + DifficultHelpInfo helpInfo = dao.fetch(DifficultHelpInfo.class, id); + if (helpInfo == null || !SecurityUtil.getUserId().equals(helpInfo.getCreatedBy())) { + return Result.error("只能删除自己创建的申请记录"); + } dao.clear(DifficultHelpInfo.class, Cnd.where("id", "=", id)); // 删除流程相关操作 flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); @@ -130,7 +137,7 @@ public class DifficultHelpMineController { @At @ApiModelProperty("获取困难补助申请") - @SaCheckPermission("difficultHelp.mine") + @SaCheckPermission(value = {"difficultHelp.mine", "difficultHelp.reading"}, mode = SaMode.OR) public Result findOne(String id) { DifficultHelpInfo helpInfo = dao.fetch(DifficultHelpInfo.class, id); return Result.success().addData(helpInfo); diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html index 2867334..4ab1df2 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/apply/index.html @@ -55,7 +55,7 @@ layout("/layouts/platform.html"){ --> - + - + - - + - + + + + type="textarea" :rows="3" resize="none"> @@ -219,6 +221,15 @@ layout("/layouts/platform.html"){ new Vue({ el: "#app", store, + components: { + ElDatePicker: { + extends: ELEMENT.DatePicker, + mounted() { + // 手动输入触发 change 前初始化日期面板,避免 picker 尚未创建。 + if (!this.picker) this.mountPicker() + } + } + }, data() { return { bizId: GetQueryString("bizId"), @@ -229,7 +240,10 @@ layout("/layouts/platform.html"){ payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], type: [{ required: true, message: "必填", trigger: ["change", "blur"] }], way: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - money: [{ required: true, message: "必填", trigger: ["change", "blur"] }], + money: [ + { required: true, message: "请填写慰问金额", trigger: ["change", "blur"] }, + { validator: (rule, value, callback) => callback(this.validateMoney(value) ? undefined : new Error("慰问金额须大于0且不超过10000元,最多两位小数")), trigger: ["change", "blur"] } + ], occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }], child: [{ required: true, message: "必填", trigger: ["change", "blur"] }], hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }], @@ -238,14 +252,20 @@ layout("/layouts/platform.html"){ hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }], deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }], remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - files: [{ required: true, message: "必填", trigger: ["change", "blur"] }], + files: [{ required: true, type: "array", min: 1, max: 5, message: "请上传1至5个附件", trigger: ["change", "blur"] }], signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }], handlerUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - certifierUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - bankCardNumber: [{ required: true, message: "必填", trigger: ["change", "blur"] }], + // certifierUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }], + bankCardNumber: [ + { required: true, message: "请填写银行卡号或对公账户号", trigger: ["change", "blur"] }, + { pattern: /^[0-9]{6,30}$/, message: "收款账户须为6至30位数字(银行卡号或对公账户号)", trigger: ["change", "blur"] } + ], bankUserName: [{ required: true, message: "必填", trigger: ["change", "blur"] }], bankOfDeposit: [{ required: true, message: "必填", trigger: ["change", "blur"] }], - thisYearHospitalizationNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }], + thisYearHospitalizationNum: [ + { required: true, message: "必填", trigger: ["change", "blur"] }, + { type: "integer", min: 0, max: 10000, message: "住院次数须为0至10000的整数", trigger: ["change", "blur"] } + ], leaveHospitalTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }], hospitalizationTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }], }, @@ -259,6 +279,9 @@ layout("/layouts/platform.html"){ } }, methods: { + validateMoney(value) { + return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000 + }, createRemoteMethod(options) { return (keyword) => { this.selectQueryUser(keyword, options) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js index 79252bf..d2bb27d 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js @@ -65,6 +65,9 @@ const condolenceInfo = { + + + {{ task.taskFormData.opinion }} diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/type/basicForm.js b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/type/basicForm.js index ae1fe12..dad3941 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/type/basicForm.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/type/basicForm.js @@ -37,12 +37,12 @@ const basicForm = { 不上传 --> - - - - - - + + + 是 + 否 + + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/form.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/form.html index b504b0e..136ad30 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/form.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/form.html @@ -17,7 +17,7 @@ @change="modeChange" :disabled="formData.id" style="width: 100%"> - @@ -263,6 +263,9 @@ methods: { // 查询受助人 queryRecipients(key) { + if (String(this.formData.mode) !== "2" || !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) { + return + } this.$axios.get("/platform/difficultHelp/apply/queryRecipients", { key }).then(res => { @@ -417,10 +420,10 @@ this.$set(this.formData, 'proxyLoginName', user.loginname) this.$set(this.formData, 'mode', "1") this.$set(this.formData, 'sex', user.sex) - this.$set(this.formData, 'unitId', user.unit.id) - this.$set(this.formData, 'unitName', user.unit.name) - this.$set(this.formData, 'unionId', user.union.id) - this.$set(this.formData, 'unionName', user.union.name) + this.$set(this.formData, 'unitId', (user.unit || {}).id || user.unitId || null) + this.$set(this.formData, 'unitName', (user.unit || {}).name || '') + this.$set(this.formData, 'unionId', (user.union || {}).id || (user.unit || {}).unionId || null) + this.$set(this.formData, 'unionName', (user.union || {}).name || '') this.$set(this.formData, 'monthlyIncome', null) this.$set(this.formData, 'birthday', user.birthday) this.$set(this.formData, 'mobile', user.mobile) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html index e1191a6..88a399a 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html @@ -1,8 +1,9 @@ -
- +
+ + @@ -15,7 +16,7 @@ layout("/layouts/platform.html"){ - @@ -26,7 +27,7 @@ layout("/layouts/platform.html"){ - + @@ -202,8 +204,8 @@ layout("/layouts/platform.html"){ @@ -211,9 +213,9 @@ layout("/layouts/platform.html"){ @@ -221,8 +223,8 @@ layout("/layouts/platform.html"){ @@ -230,9 +232,9 @@ layout("/layouts/platform.html"){ @@ -240,8 +242,8 @@ layout("/layouts/platform.html"){ @@ -292,7 +294,7 @@ layout("/layouts/platform.html"){
- + - + @@ -87,6 +87,18 @@ layout("/layouts/platform.html"){
+ +