diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java index fbe7e4f..00fb5fb 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java @@ -172,16 +172,16 @@ public class CondolenceReadController { } private void applyReadScope(Cnd cnd, String alias) { - if (AuthUtil.hasPermission("all_school")) { + if (AuthUtil.hasPermission("condolence_all_school")) { return; } - if (AuthUtil.hasPermission("branch_union")) { + if (AuthUtil.hasPermission("condolence_branch_union")) { String unionId = SecurityUtil.getUnionId(); if (StrUtil.isNotBlank(unionId)) { cnd.and(alias + ".applyUnionId", "=", unionId); return; } - } else if (AuthUtil.hasPermission("self")) { + } else if (AuthUtil.hasPermission("condolence_self")) { cnd.and(alias + ".createdBy", "=", SecurityUtil.getUserId()); return; } 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 c2dae5d..ccbce50 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.", false); + pageParam.buildReadingSearch(cnd, "info."); cnd.groupBy("info.id"); sql.setCondition(cnd); Pagination pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql); @@ -269,7 +269,7 @@ public class DifficultHelpReadingController { $condition """); Cnd cnd = Cnd.NEW(); - pageParam.buildSearch(cnd, "info.", false); + pageParam.buildReadingSearch(cnd, "info."); cnd.groupBy("info.id"); sql.setCondition(cnd); List list = difficultHelpCommonService.listMap(sql); @@ -500,7 +500,7 @@ public class DifficultHelpReadingController { $condition """); Cnd cnd = Cnd.NEW(); - pageParam.buildSearch(cnd, "info.", false); + pageParam.buildReadingSearch(cnd, "info."); cnd.groupBy("info.id"); sql.setCondition(cnd); List list = difficultHelpCommonService.listMap(sql); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/service/impl/DifficultHelpCommonServiceImpl.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/service/impl/DifficultHelpCommonServiceImpl.java index 33bdc89..5d8bb68 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/service/impl/DifficultHelpCommonServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/service/impl/DifficultHelpCommonServiceImpl.java @@ -129,6 +129,7 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl dateRange; + public void buildReadingSearch(Cnd cnd, String prefix) { + buildSearch(cnd, prefix, false); + applyReadingScope(cnd, prefix); + } + + public void applyReadingScope(Cnd cnd, String prefix) { + if (AuthUtil.hasPermission("difficult_all_school")) { + return; + } + if (AuthUtil.hasPermission("difficult_branch_union") && StrUtil.isNotBlank(SecurityUtil.getUnionId())) { + cnd.and(prefix + "unionId", "=", SecurityUtil.getUnionId()); + return; + } + if (AuthUtil.hasPermission("difficult_self") && StrUtil.isNotBlank(SecurityUtil.getUserId())) { + cnd.and(prefix + "userId", "=", SecurityUtil.getUserId()); + return; + } + cnd.and("1", "=", 0); + } + public void buildSearch(Cnd cnd, String prefix){ buildSearch(cnd, prefix, true); } diff --git a/src/main/resources/static/components/plugins/sysSignature/pc.vue b/src/main/resources/static/components/plugins/sysSignature/pc.vue index a34c061..a5313d0 100644 --- a/src/main/resources/static/components/plugins/sysSignature/pc.vue +++ b/src/main/resources/static/components/plugins/sysSignature/pc.vue @@ -25,10 +25,7 @@ module.exports = { watch: { value: { handler(val) { - if (val) { - this.signatureContent = val - this.$emit("input", this.signatureContent) - } + this.signatureContent = val || null }, immediate: true } @@ -62,8 +59,11 @@ module.exports = { if (res.code !== 0) { throw new Error("签字信息加载失败") } - this.signatureContent = res.data && res.data.signature - this.$emit("input", this.signatureContent) + // 已保存的业务签字或刚收到的扫码签字优先,默认签名仅补充空值。 + if (!this.value && !this.signatureContent && res.data && res.data.signature) { + this.signatureContent = res.data.signature + this.$emit("input", this.signatureContent) + } }) }, // 返回等待完成的 Promise;连接成功、等待30秒或组件销毁时结束等待。 diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html index 9738198..1769a71 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html @@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 confirmPendingAction() { diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/fourthApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/fourthApproval/index.html index 67d527e..5c633a6 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/fourthApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/fourthApproval/index.html @@ -264,7 +264,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 confirmPendingAction() { diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html index f6b95d5..622545b 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolPrincipalApproval/index.html @@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 confirmPendingAction() { diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolUnionApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolUnionApproval/index.html index 4995cdb..df728e6 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolUnionApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/schoolUnionApproval/index.html @@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 confirmPendingAction() { 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 de8f3f8..bfe8c1f 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 @@ -257,7 +257,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/mine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/mine/index.html index a3dd719..28e4c49 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/difficulthelp/mine/index.html @@ -318,7 +318,7 @@ layout("/layouts/platform_h5.html"){
- +
{}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 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 a3c057f..3271ab3 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 @@ -265,7 +265,13 @@ layout("/layouts/platform_h5.html"){ if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return this.$set(this, "confirmVisible", true) }) - .catch(() => {}) + .catch(errors => { + if (!Array.isArray(errors) || !errors.length) return + this.$toast(errors[0].message || '请完善审批信息') + this.$nextTick(() => { + this.$refs.formRef.scrollToField(errors[0].name) + }) + }) }, // 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。 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 fb71fd0..f731a14 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 @@ -328,7 +328,7 @@ layout("/layouts/platform_h5.html"){ methods: { showInvalidApplicationTab(errors) { if (!Array.isArray(errors) || !errors.length) return - const error = errors[0] + const error = errors.find(item => !String(item.name || '').startsWith('recipients')) || errors[0] const name = String(error.name || '') const recipient = name.match(/^recipients\.(\d+)\./) this.activeApplicationTab = name.startsWith('recipients') ? 'recipients' : 'form'