diff --git a/src/main/java/com/budwk/app/sys/models/Sys_user.java b/src/main/java/com/budwk/app/sys/models/Sys_user.java index 4302b913..85a8349c 100644 --- a/src/main/java/com/budwk/app/sys/models/Sys_user.java +++ b/src/main/java/com/budwk/app/sys/models/Sys_user.java @@ -266,6 +266,11 @@ public class Sys_user extends BaseModel implements Serializable { @DataCenterColumn(name = "单位", key = "SZDWH") private String unitId; + @Column + @Comment("三级单位ID") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String threeUnitId; + @Column @ColDefine(type = ColType.VARCHAR, width = 100) private String unitPath; diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/honor/controller/HonorManageController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/honor/controller/HonorManageController.java index 02e647da..77f9a2da 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/honor/controller/HonorManageController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/honor/controller/HonorManageController.java @@ -262,7 +262,7 @@ public class HonorManageController { excelExportEntity.add(new ExcelExportEntity("分工会", "unionName", 20)); excelExportEntity.add(new ExcelExportEntity("单位", "unitName", 20)); excelExportEntity.add(new ExcelExportEntity("奖项", "prize", 20)); - excelExportEntity.add(new ExcelExportEntity("荣誉级别", "honorLevel", 20)); + excelExportEntity.add(new ExcelExportEntity("荣誉类别", "honorLevel", 20)); excelExportEntity.add(new ExcelExportEntity("授予单位", "grantUnit", 20)); excelExportEntity.add(new ExcelExportEntity("授予时间", "grantDate", 20)); excelExportEntity.add(new ExcelExportEntity("奖项介质", "awardType", 20)); @@ -276,7 +276,7 @@ public class HonorManageController { excelExportEntity.add(new ExcelExportEntity("会员人数", "memberNumber", 10)); excelExportEntity.add(new ExcelExportEntity("工会小组数", "unionGroupNumber", 10)); excelExportEntity.add(new ExcelExportEntity("奖项", "prize", 20)); - excelExportEntity.add(new ExcelExportEntity("荣誉级别", "honorLevel", 20)); + excelExportEntity.add(new ExcelExportEntity("荣誉类别", "honorLevel", 20)); excelExportEntity.add(new ExcelExportEntity("授予单位", "grantUnit", 20)); excelExportEntity.add(new ExcelExportEntity("参加比赛名称", "gameName", 20)); excelExportEntity.add(new ExcelExportEntity("授予时间", "grantDate", 20)); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java index ae499ab4..deeea605 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java @@ -124,6 +124,13 @@ public class UnionReimburseCollectController { return unionReimburseService.updateActuallyAmount(id, realMoney); } + @At + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR) + public Result updateReimburseProject(String id, String reimburseProject) { + return unionReimburseService.updateReimburseProject(id, reimburseProject); + } + @At @Ok("void") @SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR) diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburseDesc.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburseDesc.java index 86117039..c9c2998e 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburseDesc.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburseDesc.java @@ -45,6 +45,11 @@ public class UnionReimburseDesc extends BaseModel { @ColDefine(type = ColType.VARCHAR, width = 200) private String fileDesc; + @Column + @Comment("报销项目提示") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String projectTip; + @Column @Comment("排序字段") @Prev({ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/UnionReimburseService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/UnionReimburseService.java index 6fef206a..7bac1561 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/UnionReimburseService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/UnionReimburseService.java @@ -69,6 +69,11 @@ public interface UnionReimburseService extends BaseService { */ Result updateActuallyAmount(String id, Double realMoney); + /** + * 修改非慰问报销记录的活动项目。 + */ + Result updateReimburseProject(String id, String reimburseProject); + /** * 批量审核选中的待审核报销申请。 * diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java index dfa08007..775df28a 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java @@ -66,6 +66,13 @@ import java.util.stream.Collectors; @Slf4j @IocBean(args = {"refer:dao"}) public class UnionReimburseServiceImpl extends BaseServiceImpl implements UnionReimburseService { + /** 非慰问报销项目允许在三个活动项目之间切换。 */ + private static final Set ACTIVITY_REIMBURSE_PROJECTS = Set.of( + "UNION_REIMBURSE_PROJECT_2", + "UNION_REIMBURSE_PROJECT_3", + "UNION_REIMBURSE_PROJECT_4" + ); + @Inject private SysFileService sysFileService; @Inject @@ -424,6 +431,11 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i if (dbRecord == null) { return Result.error("未找到对应的报销记录"); } + // 实际报销金额不得超过申请金额,避免绕过前端校验直接修改数据。 + BigDecimal declaredMoney = getDeclaredApplyMoney(dbRecord); + if (newMoney.compareTo(declaredMoney) > 0) { + return Result.error("实际报销金额不能超过申请金额:" + declaredMoney.toPlainString()); + } if (Integer.valueOf(3).equals(dbRecord.getStateId()) && !skipBudgetDeduct(dbRecord)) { OutlayUseDetail oldDetail = dao().fetch(OutlayUseDetail.class, Cnd.where("outlayReimburseId", "=", dbRecord.getId())); BigDecimal oldMoney = oldDetail != null && oldDetail.getAdjustMoney() != null @@ -439,6 +451,28 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i return Result.success(); } + @Override + public Result updateReimburseProject(String id, String reimburseProject) { + if (!isAdmin()) { + return Result.error("无权修改报销项目"); + } + if (StrUtil.hasBlank(id, reimburseProject)) { + return Result.error("报销记录ID和报销项目不能为空"); + } + UnionReimburse dbRecord = this.fetch(id); + if (dbRecord == null) { + return Result.error("未找到对应的报销记录"); + } + // 慰问记录与活动项目字段不同,只允许活动项目之间切换。 + if (!ACTIVITY_REIMBURSE_PROJECTS.contains(dbRecord.getReimburseProject()) + || !ACTIVITY_REIMBURSE_PROJECTS.contains(reimburseProject)) { + return Result.error("慰问记录不可修改,报销项目只能在三个活动项目之间切换"); + } + dbRecord.setReimburseProject(reimburseProject); + this.updateIgnoreNull(dbRecord); + return Result.success(); + } + private void normalizeInvoiceDetails(UnionReimburse unionReimburse) { if (unionReimburse.getInvoiceDetails() == null) { unionReimburse.setInvoiceDetails(new ArrayList<>()); diff --git a/src/main/java/com/budwk/app/zhgh/welfare/param/WelfareFilterUserPageForm.java b/src/main/java/com/budwk/app/zhgh/welfare/param/WelfareFilterUserPageForm.java index 1bd27b0f..1346694a 100644 --- a/src/main/java/com/budwk/app/zhgh/welfare/param/WelfareFilterUserPageForm.java +++ b/src/main/java/com/budwk/app/zhgh/welfare/param/WelfareFilterUserPageForm.java @@ -46,6 +46,9 @@ public class WelfareFilterUserPageForm extends PageForm { @ApiModelProperty("人员类型") private String[] personTypes; + @ApiModelProperty("人员属性") + private String[] userAttributes; + @ApiModelProperty("聘用方式") private String[] preparedBys; diff --git a/src/main/java/com/budwk/app/zhgh/welfare/service/impl/WelfareListServiceImpl.java b/src/main/java/com/budwk/app/zhgh/welfare/service/impl/WelfareListServiceImpl.java index 95f04c04..189ce5b8 100644 --- a/src/main/java/com/budwk/app/zhgh/welfare/service/impl/WelfareListServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/welfare/service/impl/WelfareListServiceImpl.java @@ -444,11 +444,13 @@ public class WelfareListServiceImpl extends BaseServiceImpl impleme u.userState, u.unitId, u.unitName, + threeUnit.name AS threeUnitName, u.unionId, u.unionName, u.member FROM vw_user u + LEFT JOIN sys_unit threeUnit ON threeUnit.id = u.threeUnitId LEFT JOIN welfare_list w ON u.id = w.userId AND w.projectId = @projectId $condition """); @@ -471,6 +473,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl impleme cnd.andEX("u.unionId", "=", pageForm.getUnionId()); cnd.andEX("u.unitId", "in", pageForm.getUnitIds()); cnd.andEX("u.personType", "in", pageForm.getPersonTypes()); + cnd.andEX("u.userAttribute", "in", pageForm.getUserAttributes()); cnd.andEX("u.preparedBy", "in", pageForm.getPreparedBys()); cnd.andEX("u.userState", "in", pageForm.getUserStates()); cnd.andEX("u.member","=",pageForm.getIsMember()); @@ -523,6 +526,7 @@ public class WelfareListServiceImpl extends BaseServiceImpl impleme cnd.andEX("unionId", "=", pageForm.getUnionId()); cnd.andEX("unitId", "in", pageForm.getUnitIds()); cnd.andEX("personType", "in", pageForm.getPersonTypes()); + cnd.andEX("userAttribute", "in", pageForm.getUserAttributes()); cnd.andEX("preparedBy", "in", pageForm.getPreparedBys()); cnd.andEX("userState", "in", pageForm.getUserStates()); cnd.andEX("member","=",pageForm.getIsMember()); diff --git a/src/main/resources/views/platform/zhgh/dayofficework/honor/manage/index.html b/src/main/resources/views/platform/zhgh/dayofficework/honor/manage/index.html index 62f4c6b5..f275b503 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/honor/manage/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/honor/manage/index.html @@ -27,8 +27,8 @@ layout("/layouts/platform.html"){ :value="o.id"> - - + + @@ -77,7 +77,7 @@ layout("/layouts/platform.html"){ sortable> - @@ -185,7 +185,7 @@ layout("/layouts/platform.html"){ --> - {{ viewData.levelName }} + {{ viewData.levelName }} {{ viewData.grantUnit }} @@ -303,9 +303,9 @@ layout("/layouts/platform.html"){ prize + "&honorLevel=" + honorLevel + - "&userName" + + "&userName=" + userName + - "&unitName" + + "&unitName=" + unitName }, openEdit(row) { diff --git a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html index 8f78dde1..356c420f 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html @@ -96,6 +96,9 @@ layout("/layouts/platform.html"){ {{item.name}} + + {{getProjectTipByProject(formData.reimburseProject)}} + {{formData.userName}}({{formData.loginName}}) @@ -400,145 +403,6 @@ layout("/layouts/platform.html"){ - -
- 新增支付信息 -
- - - - - - - - - - - - - - - - - - - - - - - -
@@ -563,7 +427,8 @@ layout("/layouts/platform.html"){ - + @@ -619,6 +484,148 @@ layout("/layouts/platform.html"){ type="textarea" :autosize="{ minRows: 4, maxRows: 8}">
+ +
支付信息
+
+
+ 新增支付信息 +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
@@ -819,7 +826,21 @@ layout("/layouts/platform.html"){ {required: true, message: "请填写联系方式", trigger: ["change", "blur"]}, {pattern: /^(1[3-9]\d{9}|0\d{2,3}-?\d{7,8})$/, message: "请输入正确的联系方式", trigger: "blur"} ], - files: [{required: true, message: "请上传附件", trigger: ["change", "blur"]}], + files: [{ + validator: (rule, value, callback) => { + // 慰问项目不展示附件上传,提交时无需校验附件。 + if (this.formData.reimburseProject === "UNION_REIMBURSE_PROJECT_1") { + callback() + return + } + if (!value || value.length === 0) { + callback(new Error("请上传附件")) + return + } + callback() + }, + trigger: ["change", "blur"] + }], userSign: [{required: true, message: "请签名", trigger: ["change", "blur"]}], // certifierUserId: [{required: true, message: "请填写认证人", trigger: ["change", "blur"]}], @@ -1205,6 +1226,11 @@ layout("/layouts/platform.html"){ this.rebuildInvoiceSummary() this.normalizeFundBalance() } + this.$nextTick(() => { + if (this.$refs.formRef) { + this.$refs.formRef.clearValidate("files") + } + }) }, openInvoiceDialog(mode, row, index) { this.invoiceDialogMode = mode @@ -1561,10 +1587,10 @@ layout("/layouts/platform.html"){ return new Promise((resolve) => { this.rebuildInvoiceSummary() const paymentDetails = this.preparePaymentDetailsForSubmit() - this.$refs.formRef.validate((valid) => { + this.$refs.formRef.validate((valid, invalidFields) => { if (valid) { if (!this.validatePaymentDetailsBeforeSubmit(paymentDetails)) { - this.$set(this, "activeTabName", "basic") + this.$set(this, "activeTabName", "invoice") resolve(false) return } @@ -1581,6 +1607,12 @@ layout("/layouts/platform.html"){ this.normalizeFundBalance() resolve(true) } else { + // 支付信息已移至发票信息页,支付明细校验失败时跳转到对应页签。 + const paymentDetailInvalid = Object.keys(invalidFields || {}) + .some((field) => field.indexOf("paymentDetails.") === 0) + if (paymentDetailInvalid) { + this.$set(this, "activeTabName", "invoice") + } this.$message.warning("请完善必填信息") resolve(false) } @@ -1592,7 +1624,7 @@ layout("/layouts/platform.html"){ const isValid = await this.validateBeforeSubmit() if (!isValid) return - this.$confirm("您确定要提交吗?", "提示", { + this.$confirm("您确定要提交吗?审核通过后可前往我的报销打印!", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" @@ -1612,7 +1644,7 @@ layout("/layouts/platform.html"){ const isValid = await this.validateBeforeSubmit() if (!isValid) return - this.$confirm("您确定要提交吗?", "提示", { + this.$confirm("您确定要提交吗?审核通过后可前往我的报销打印!", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" @@ -1650,6 +1682,14 @@ layout("/layouts/platform.html"){ const project = this.descOptions.find(item => item.reimburseProject === projectCode); return project ? project.fileDesc : ''; }, + // 根据当前选择的报销项目获取管理端配置的提示内容。 + getProjectTipByProject(projectCode) { + if (!this.descOptions || !Array.isArray(this.descOptions)) { + return ''; + } + const project = this.descOptions.find(item => item.reimburseProject === projectCode); + return project ? project.projectTip : ''; + }, // 新建申请默认优先选择分工会经费;若当前用户没有对应权限,则按页面可见权限回退到其它经费来源。 getDefaultFundSource() { if (this.$auth.hasPermission("unionReimburse.fgh")) { diff --git a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/collect/index.html b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/collect/index.html index 5160160d..1f396bd3 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/collect/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/collect/index.html @@ -62,11 +62,17 @@ layout("/layouts/platform.html"){ @@ -106,6 +112,7 @@ layout("/layouts/platform.html"){ +
申请金额:{{ editFormData.maxMoney }}