diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApprovalController.java index d82575b..534d36d 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApprovalController.java @@ -43,9 +43,9 @@ public class DifficultHelpApprovalController { } ProcessTask task = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY)); if (task == null) throw new BaseException("审批任务不存在"); - boolean amountApproval = "36ebafda-44c2-4bd3-bd7f-10839a575a0d".equals(task.getTaskName()) - || "715ece82-4ae3-433c-ad18-ed875f45d1e3".equals(task.getTaskName()); - if (!amountApproval && !"e405f96c-5fc0-4f63-b323-e69dfe853253".equals(task.getTaskName())) { + boolean amountApproval = "715ece82-4ae3-433c-ad18-ed875f45d1e3".equals(task.getTaskName()); + if (!amountApproval && !"36ebafda-44c2-4bd3-bd7f-10839a575a0d".equals(task.getTaskName()) + && !"e405f96c-5fc0-4f63-b323-e69dfe853253".equals(task.getTaskName())) { throw new BaseException("当前任务不是困难帮扶审批任务"); } ProcessInstance instance = dao.fetch(ProcessInstance.class, task.getProcessInstanceId()); @@ -54,24 +54,23 @@ public class DifficultHelpApprovalController { if (StrUtil.isBlank(args.getStr("tf_sign"))) throw new BaseException("请完成审批签字"); if (StrUtil.isBlank(args.getStr("tf_opinion"))) throw new BaseException("请填写审批意见"); - String level = args.getStr("level"); - Integer submitType = args.getInt(FlowConst.SUBMIT_TYPE); - boolean skipAmount = "36ebafda-44c2-4bd3-bd7f-10839a575a0d".equals(task.getTaskName()) - && (ProcessSubmitTypeEnum.REJECT.getCode().equals(submitType) - || ProcessSubmitTypeEnum.ROLLBACK_TO_OPERATOR.getCode().equals(submitType)); - Double money = amountApproval && !skipAmount ? args.getDouble("money") : null; - if (amountApproval && !skipAmount) { - if (StrUtil.isBlank(level) || money == null || !Double.isFinite(money) || money < 0) { - throw new BaseException("请填写完整的级别和帮扶金额"); + args.remove("level"); + args.remove("tf_level"); + Double money = amountApproval ? args.getDouble("money") : null; + if (amountApproval) { + if (money == null || !Double.isFinite(money) || money < 0) { + throw new BaseException("请填写有效的帮扶金额"); } - args.put("tf_level", level); args.put("tf_money", money); + } else { + args.remove("money"); + args.remove("tf_money"); } // 参与者权限由流程引擎校验,业务入口不接受客户端指定管理员代办。 args.remove(FlowConst.EXT_ENABLE_OPERATOR); flowCommonService.executeTask(args); if (amountApproval && Integer.valueOf(ProcessSubmitTypeEnum.AGREE.getCode()).equals(args.getInt(FlowConst.SUBMIT_TYPE))) { - dao.update(DifficultHelpInfo.class, Chain.make("level", level).add("money", money), Cnd.where("id", "=", info.getId())); + dao.update(DifficultHelpInfo.class, Chain.make("money", money), Cnd.where("id", "=", info.getId())); } return Result.success(); } 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 bda842b..232aa15 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; @@ -137,7 +138,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/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java index 16c666a..c2dae5d 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java @@ -154,7 +154,7 @@ public class DifficultHelpReadingController { """); Cnd cnd = Cnd.NEW(); cnd.and("ins.state", "=", 20); - pageParam.buildSearch(cnd, "info."); + pageParam.buildSearch(cnd, "info.", false); cnd.groupBy("info.id"); sql.setCondition(cnd); Pagination pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql); @@ -238,6 +238,7 @@ public class DifficultHelpReadingController { @At @Ok("void") + @SaCheckPermission("difficultHelp.reading") public void doExportAllApply(DifficultHelpPageParam pageParam, HttpServletResponse response) throws Exception { Sql sql = Sqls.create(""" SELECT @@ -268,7 +269,7 @@ public class DifficultHelpReadingController { $condition """); Cnd cnd = Cnd.NEW(); - pageParam.buildSearch(cnd, "info."); + pageParam.buildSearch(cnd, "info.", false); cnd.groupBy("info.id"); sql.setCondition(cnd); List list = difficultHelpCommonService.listMap(sql); @@ -469,6 +470,7 @@ public class DifficultHelpReadingController { @At @Ok("void") + @SaCheckPermission("difficultHelp.reading") public void exportSummary(DifficultHelpPageParam pageParam,String flag, HttpServletResponse response) throws Exception { NutMap result = new NutMap(); @@ -498,7 +500,7 @@ public class DifficultHelpReadingController { $condition """); Cnd cnd = Cnd.NEW(); - pageParam.buildSearch(cnd, "info."); + pageParam.buildSearch(cnd, "info.", false); cnd.groupBy("info.id"); sql.setCondition(cnd); List list = difficultHelpCommonService.listMap(sql); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceMineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceMineController.java index 34d5316..f9f10e7 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceMineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceMineController.java @@ -90,6 +90,7 @@ public class SpecialCondolenceMineController { Sql sql = Sqls.create(""" SELECT info.*, + COALESCE(recipientTotals.recipientCount, 0) AS recipientCount, type.name as typeName, ins.id AS instanceId, ins.businessNo, @@ -109,6 +110,12 @@ public class SpecialCondolenceMineController { (select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId FROM special_condolence info + LEFT JOIN ( + SELECT applyId, COUNT(*) AS recipientCount + FROM special_condolence_recipient + WHERE delFlag = false + GROUP BY applyId + ) recipientTotals ON recipientTotals.applyId = info.id LEFT JOIN special_condolence_type type ON info.type = type.id LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id LEFT JOIN ( diff --git a/src/main/resources/static/components/plugins/sysUserSelect/h5Index.vue b/src/main/resources/static/components/plugins/sysUserSelect/h5Index.vue new file mode 100644 index 0000000..737b4c6 --- /dev/null +++ b/src/main/resources/static/components/plugins/sysUserSelect/h5Index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/main/resources/static/components/plugins/sysUserSelect/index.vue b/src/main/resources/static/components/plugins/sysUserSelect/index.vue index f04ca49..f045206 100644 --- a/src/main/resources/static/components/plugins/sysUserSelect/index.vue +++ b/src/main/resources/static/components/plugins/sysUserSelect/index.vue @@ -106,7 +106,9 @@ module.exports = { } }, onChange(val) { + const selected = this.options.find(item => String(item[this.option_value]) === String(val)) || null this.$emit("change", val) + this.$emit("selected", selected, val) }, clearOptions() { @@ -114,7 +116,7 @@ module.exports = { } }, created() { - this.clearOptions() + this.options = this.option_list || [] console.log(this.placeholder) } } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/mine/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/mine/index.html index 83f0cd1..b7e451c 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/mine/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/mine/index.html @@ -62,13 +62,7 @@ layout("/layouts/platform.html"){ 查看 编辑 撤回 - - 导出 - - 导出 PDF - 导出 Word - - + 导出 删除 @@ -109,8 +103,8 @@ layout("/layouts/platform.html"){ } }, methods: { - doExportApply(row, format) { - this.$downLoad('/platform/condolence/mine/doExportApply?id=' + row.id + '&print=' + (format === 'pdf')) + doExportApply(row) { + this.$downLoad('/platform/condolence/mine/doExportApply?id=' + row.id + '&print=false') }, onAdd() { commonUtil.pjaxPush('/platform/condolence/apply') diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/form.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/form.html index cf7b24f..f13c481 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/form.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/form.html @@ -1,17 +1,5 @@
- - - - - - - - - - - - @@ -29,8 +17,6 @@ return { businessId: GetQueryString("businessId"), formData: { - level: "", - money: undefined, tf_sign: "", tf_opinion: "" }, } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/index.html index f061f61..00ae094 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/branchunionapproval/index.html @@ -84,18 +84,6 @@ layout("/layouts/platform.html"){ - - - - - - - - - - - - @@ -113,18 +101,6 @@ layout("/layouts/platform.html"){ {{formData.taskName}}
- - - - - - - - - - - - @@ -178,7 +154,7 @@ layout("/layouts/platform.html"){ formData: {}, batchVisible: false, - batchForm: {level: "", money: undefined, tf_sign: "", tf_opinion: ""}, + batchForm: {tf_sign: "", tf_opinion: ""}, showApprovalForm: false, selectData: [] } @@ -208,7 +184,7 @@ layout("/layouts/platform.html"){ return; } - this.batchForm = {level: "", money: undefined, tf_sign: "", tf_opinion: ""} + this.batchForm = {tf_sign: "", tf_opinion: ""} this.batchVisible = true }, async submitBatch() { @@ -295,8 +271,6 @@ layout("/layouts/platform.html"){ this.formData = { processTaskId: row.taskId, taskName: row.curTaskName, - level: "", - money: undefined, tf_sign: "", tf_opinion: "" } this.$refs.infoRef.onOpen(row) @@ -305,16 +279,7 @@ layout("/layouts/platform.html"){ async handleTaskAction(val) { try { - let valid - if (val === 2 || val === 6) { - this.$refs.formRef.clearValidate(['level', 'money']) - const results = await Promise.all(['tf_opinion', 'tf_sign'].map(prop => new Promise(resolve => { - this.$refs.formRef.validateField(prop, error => resolve(!error)) - }))) - valid = results.every(result => result) - } else { - valid = await this.$refs.formRef.validate() - } + const valid = await this.$refs.formRef.validate() if (!valid) return } catch (error) { return diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/mine/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/mine/index.html index 4f39ebd..55e5ee4 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/mine/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/mine/index.html @@ -72,13 +72,7 @@ layout("/layouts/platform.html"){ 撤回 - - 导出 - - 导出 PDF - 导出 Word - - + 导出 删除 @@ -187,8 +181,8 @@ layout("/layouts/platform.html"){ this.units = await this.$businessTool.listUnit((this.$store.state.user.union || {}).id || this.pageForm.unionId) } }, - doExportApply(row, format) { - this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=' + (format === 'pdf')) + doExportApply(row) { + this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=false') } }, async created() { diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/reading/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/reading/index.html index c6ee67d..fbe105e 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/reading/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/reading/index.html @@ -178,11 +178,7 @@ layout("/layouts/platform.html"){ }, async flushUnits(){ this.$set(this.pageForm, "unitId", null) - if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { - this.units = await this.$businessTool.listUnit(this.pageForm.unionId) - } else { - this.units = await this.$businessTool.listUnit((this.$store.state.user.union || {}).id || this.pageForm.unionId) - } + this.units = await this.$businessTool.listUnit(this.pageForm.unionId) }, exportYearPayRecord(){ this.$downLoad('/platform/difficultHelp/reading/exportYearPayRecord', this.pageForm) @@ -204,11 +200,7 @@ layout("/layouts/platform.html"){ }, async created() { this.pageData() - if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { - this.unions = await this.$businessTool.listUnion() - } else { - this.unions = await this.$businessTool.listUnion((this.$store.state.user.union || {}).id) - } + this.unions = await this.$businessTool.listUnion() } }) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html index cf7b24f..9de106e 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html @@ -1,11 +1,6 @@
- - - - - @@ -29,7 +24,6 @@ return { businessId: GetQueryString("businessId"), formData: { - level: "", money: undefined, tf_sign: "", tf_opinion: "" }, diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html index 182cebe..b38787f 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html @@ -84,11 +84,6 @@ layout("/layouts/platform.html"){ - - - - - @@ -113,11 +108,6 @@ layout("/layouts/platform.html"){
- - - - - @@ -177,7 +167,7 @@ layout("/layouts/platform.html"){ formData: {}, batchVisible: false, - batchForm: {level: "", money: undefined, tf_sign: "", tf_opinion: ""}, + batchForm: {money: undefined, tf_sign: "", tf_opinion: ""}, showApprovalForm: false, selectData: [], } @@ -201,7 +191,7 @@ layout("/layouts/platform.html"){ this.$message.warning('请勾选待审核数据!'); return; } - this.batchForm = {level: "", money: undefined, tf_sign: "", tf_opinion: ""} + this.batchForm = {money: undefined, tf_sign: "", tf_opinion: ""} this.batchVisible = true }, async submitBatch() { @@ -288,7 +278,6 @@ layout("/layouts/platform.html"){ this.formData = { processTaskId: row.taskId, taskName: row.curTaskName, - level: "", money: undefined, tf_sign: "", tf_opinion: "" } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html index e0021af..eb60836 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html @@ -207,7 +207,7 @@ layout("/layouts/platform.html"){ this.$axios.post("/platform/special_condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => { if (res.code === 0) { this.$message.success(res.msg) - commonUtil.pjaxPush("/platform/special_condolence/mine") + window.location.replace("/platform/special_condolence/mine") } }) }) @@ -226,7 +226,7 @@ layout("/layouts/platform.html"){ }).then(res => { if (res.code === 0) { this.$message.success(res.msg) - commonUtil.pjaxPush("/platform/special_condolence/mine") + window.location.replace("/platform/special_condolence/mine") } }) }) @@ -247,7 +247,7 @@ layout("/layouts/platform.html"){ }).then(res => { if (res.code === 0) { this.$message.success(res.msg) - commonUtil.pjaxPush("/platform/special_condolence/mine") + window.location.replace("/platform/special_condolence/mine") } }) }) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.css b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.css index 3fc7dba..a50036b 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.css +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.css @@ -61,3 +61,7 @@ .special-condolence-apply .special-condolence-table-item .el-table .el-form-item { margin: 8px 0 20px; } .special-condolence-apply .special-condolence-table-item .el-table .el-form-item__error { position: absolute; padding: 4px 0 0; font-size: 11px; line-height: 14px; white-space: normal; } + +.special-condolence-apply .flow-task-form .el-form-item__error { color: #f56c6c !important; } +.special-condolence-apply .el-form-item.is-error .el-input__inner, +.special-condolence-apply .el-form-item.is-error .el-textarea__inner { border-color: #f56c6c; } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.html b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.html index ad8c2f6..d5a46be 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.html @@ -32,7 +32,7 @@ - + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.js b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.js index 603b46b..ef5b1b1 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.js @@ -37,15 +37,9 @@ const specialCondolenceRecipients = { return '10X98765432'[weights.reduce((sum, weight, index) => sum + weight * Number(card[index]), 0) % 11] === card[17] }, recipientOptions(row) { - return row.helpUserId ? [{ id: row.helpUserId, userName: row.helpUserName, loginName: row.helpLoginName }] : [] + return row.helpUserId ? [{ id: row.helpUserId, userName: row.helpUserName, loginName: row.helpLoginName, personType: row.personType, idCard: row.idCard, bankOfDeposit: row.bankOfDeposit, bankUserName: row.bankUserName, bankCardNumber: row.bankCardNumber }] : [] }, - seedRecipientOptions(row, index) { - const component = this.$refs['recipientUser' + index] - if (component && row.helpUserId) component.options = this.recipientOptions(row) - }, - recipientUserChange(row, index, id) { - const component = this.$refs['recipientUser' + index] - const user = component && component.options.find(item => item.id === id) + recipientUserChange(row, index, id, user) { this.$set(row, 'helpUserId', user ? user.id : '') this.$set(row, 'helpUserName', user ? user.userName : '') this.$set(row, 'helpLoginName', user ? user.loginName : '') @@ -54,7 +48,13 @@ const specialCondolenceRecipients = { this.$set(row, 'bankOfDeposit', user ? user.bankOfDeposit || '' : '') this.$set(row, 'bankUserName', user ? user.bankUserName || user.userName : '') this.$set(row, 'bankCardNumber', user ? user.bankCardNumber || '' : '') - this.$nextTick(() => this.$refs.formRef.validateField('recipients.' + index + '.helpUserId')) + this.$nextTick(() => { + const fields = ['helpUserId', 'helpLoginName', 'idCard', 'bankOfDeposit', 'bankUserName', 'bankCardNumber'] + const names = fields.map(field => 'recipients.' + index + '.' + field) + const form = this.$refs.formRef + if (typeof form.validateField === 'function') form.validateField(names) + else if (typeof form.validate === 'function') form.validate(names).catch(() => {}) + }) }, newRecipient() { diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/mine/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/mine/index.html index 6aebbd1..c5ca723 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/mine/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/mine/index.html @@ -62,13 +62,7 @@ layout("/layouts/platform.html"){ 查看 编辑 撤回 - - 导出 - - 导出 PDF - 导出 Word - - + 导出 删除 @@ -96,21 +90,22 @@ layout("/layouts/platform.html"){ data() { return { typeOptions: [], + pageDataUrl: "/platform/special_condolence/mine/pageData", tableColumns: [ {prop: 'helpUserName', label: '慰问对象'}, - {prop: 'helpLoginName', label: '慰问对象工号'}, {prop: 'applyUserName', label: '申请人'}, {prop: 'applyUnionName', label: '所属工会'}, {prop: 'applyUnitName', label: '所属单位'}, {prop: 'typeName', label: '慰问类型'}, + {prop: 'recipientCount', label: '慰问人数', width: 100}, {prop: 'taskName', label: '当前节点'}, {prop: 'instanceState', label: '流程状态'}, ], } }, methods: { - doExportApply(row, format) { - this.$downLoad('/platform/special_condolence/mine/doExportApply?id=' + row.id + '&print=' + (format === 'pdf')) + doExportApply(row) { + this.$downLoad('/platform/special_condolence/mine/doExportApply?id=' + row.id + '&print=false') }, onAdd() { commonUtil.pjaxPush('/platform/special_condolence/apply') diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/branchunionapproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/branchunionapproval/index.html index b4a72ac..de8f3f8 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/branchunionapproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/branchunionapproval/index.html @@ -114,33 +114,6 @@ layout("/layouts/platform_h5.html"){ 审批意见* -
-

审核信息

-
- - -
-
- - - - { - const levelData = res && res.code === 0 ? res.data : [] - this.$set(this, "levelColumns", (levelData || []).map((item) => ({ - text: item.name, - value: item.code - }))) - }) - }, - - // 级别选择器作为详情上层弹框,打开时同步增加浏览器历史。 - openLevelPicker() { - if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-level-picker")) return - this.$set(this, "showLevelPicker", true) - }, - - closeLevelPicker(afterClose = null) { - if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("difficult-help-level-picker", afterClose)) return - this.$set(this, "showLevelPicker", false) - if (typeof afterClose === "function") afterClose() - }, - - onLevelConfirm(option) { - this.closeLevelPicker(() => { - this.$set(this.formData, "level", option.value) - }) - }, - // val 为流程提交类型:1 同意、2 拒绝、6 退回;校验通过后打开历史栈确认框。 handleTaskAction(val) { this.$refs.formRef.validate() @@ -427,14 +359,12 @@ layout("/layouts/platform_h5.html"){ }, }, created() { - // 先订阅弹框状态,工会加载异常也不能阻断等级选择器与确认框的打开、返回。 + // 先订阅弹框状态,工会加载异常也不能阻断确认框的打开、返回。 if (window.h5HistoryLayerManager) { this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => { this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm")) - this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker")) })) } - this.initLevelDict() // 缓存已就绪时立即加载,否则等待用户接口回填;只初始化一次,避免重置已选筛选条件。 // $watch 由当前 Vue 实例管理,页面销毁时自动注销。 let filtersInitialized = false diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html index d844353..a3c057f 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html @@ -113,18 +113,6 @@ layout("/layouts/platform_h5.html"){

审核信息

-
- - - - { - const levelData = res && res.code === 0 ? res.data : [] - this.$set(this, "levelColumns", (levelData || []).map((item) => ({ - text: item.name, - value: item.code - }))) - }) - }, - - // 级别选择器作为详情上层弹框,打开时同步增加浏览器历史。 - openLevelPicker() { - if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-level-picker")) return - this.$set(this, "showLevelPicker", true) - }, - - closeLevelPicker(afterClose = null) { - if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("difficult-help-level-picker", afterClose)) return - this.$set(this, "showLevelPicker", false) - if (typeof afterClose === "function") afterClose() - }, - - onLevelConfirm(option) { - this.closeLevelPicker(() => { - this.$set(this.formData, "level", option.value) - }) - }, - // val 为流程提交类型:1 同意、2 拒绝、6 退回;校验通过后打开历史栈确认框。 handleTaskAction(val) { this.$refs.formRef.validate() @@ -420,11 +368,9 @@ layout("/layouts/platform_h5.html"){ }, created() { this.initUnion().then(() => this.flushUnits()) - this.initLevelDict() if (!window.h5HistoryLayerManager) return this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => { this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm")) - this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker")) })) }, beforeDestroy() { diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/apply/index.html index a11456e..368ec7a 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/apply/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/apply/index.html @@ -162,6 +162,9 @@ layout("/layouts/platform_h5.html"){ #app .van-picker-column__item { font-size: 18px; } + .specialcondolence-apply-form .van-field__error-message, + .specialcondolence-apply-form .van-field--error .van-field__control { color: #ee0a24 !important; } + .specialcondolence-apply-form .van-field__error-message { font-size: 12px; line-height: 18px; padding-top: 4px; }
@@ -185,19 +188,22 @@ layout("/layouts/platform_h5.html"){ - - - + + + + +
删除 - - - - - - + + + + + +
- 增加一行 + + person.personType === '劳务派遣人员' || !!String(value || '').trim(), message: '普通人员工号不能为空' }] + if (field === 'helpUserId') return [{ validator: () => !!person.helpUserId, message: '请选择慰问对象' }] + const rules = [{ validator: value => !!String(value || '').trim(), message: '请填写' + names[field] }] + if (field === 'idCard') rules.push({ validator: value => this.validRecipientIdCard(value), message: '身份证号码不正确' }) + if (field === 'bankCardNumber') rules.push({ pattern: /^[0-9]{6,30}$/, message: '收款账户须为6至30位数字' }) + if (field === 'bankOfDeposit' || field === 'bankUserName') rules.push({ validator: value => String(value || '').length <= 100, message: names[field] + '最多100字' }) + return rules + }, + validateMoney(value) { return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000 }, @@ -316,13 +335,14 @@ layout("/layouts/platform_h5.html"){ }, // 选择慰问时间 showTimePickerClick() { - if (this.formData.occurTime) { - this.formData.occurDate = new Date(this.formData.occurTime) - }else{ - this.formData.occurDate = new Date() - } + this.$set(this.formData, 'occurDate', this.formData.occurTime ? this.$moment(this.formData.occurTime, 'YYYY-MM-DD').toDate() : new Date()) this.showTimePicker = true }, + confirmOccurTime(value) { + this.$set(this.formData, 'occurTime', this.$moment(value).format('YYYY-MM-DD')) + this.showTimePicker = false + this.$nextTick(() => this.$refs.formRef.validate('occurTime').catch(() => {})) + }, // 选择慰问类型 showTypePickerClick() { if (this.formData.type) { @@ -411,6 +431,7 @@ layout("/layouts/platform_h5.html"){ this.showTypePicker = false }, onSave() { + this.$refs.formRef.validate().then(() => { this.$dialog.confirm({ title: "提示", message: "您确定保存吗?" @@ -418,10 +439,11 @@ layout("/layouts/platform_h5.html"){ this.$axios.post("/platform/special_condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => { if (res.code === 0) { this.$toast(res.msg) - this.$pjaxReplace("/platform/special_condolence/mine/h5") + window.location.replace("/platform/special_condolence/mine/h5") } }) }) + }).catch(() => {}) }, async onSubmit() { this.$refs.formRef.validate().then(() => { @@ -436,7 +458,7 @@ layout("/layouts/platform_h5.html"){ this.$axios.post("/platform/special_condolence/apply/submit", { data: JSON.stringify(this.formData) }).then(res => { if (res.code === 0) { this.$toast(res.msg) - this.$pjaxReplace("/platform/special_condolence/mine/h5") + window.location.replace("/platform/special_condolence/mine/h5") } }) }) @@ -458,7 +480,7 @@ layout("/layouts/platform_h5.html"){ }).then(res => { if (res.code === 0) { this.$toast(res.msg) - this.$pjaxReplace("/platform/special_condolence/mine/h5") + window.location.replace("/platform/special_condolence/mine/h5") } }) }) @@ -470,9 +492,7 @@ layout("/layouts/platform_h5.html"){ if (res.code === 0) { this.formData = res.data this.initRecipients() - this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions) - this.selectQueryUser(this.formData.payLoginName, this.payUserOptions) - this.chooseType = this.typeOptions.find(o => o.id === this.formData.type) + this.chooseType = this.typeOptions.find(o => o.id === this.formData.type) || {} } }) } else { diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/mine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/mine/index.html index e18f98b..2dc3447 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/specialcondolence/mine/index.html @@ -328,7 +328,6 @@ layout("/layouts/platform_h5.html"){
{{row.helpUserName || '--'}}
-
工号:{{row.helpLoginName || '--'}}
@@ -336,11 +335,11 @@ layout("/layouts/platform_h5.html"){