From 5665fcf44a5920b6bf14be6db096d2a697505f29 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Thu, 18 Sep 2025 18:48:55 +0800 Subject: [PATCH 1/3] commit --- ...ActivityWorksCollectionReadController.java | 18 +- ...tivityWorksCollectionUploadController.java | 21 +- .../H5ActivityWorksCollectionController.java | 42 ---- ...ActivityWorksMineCollectionController.java | 36 ++++ ...ActivityWorksReadCollectionController.java | 158 +++++++++++++++ ...tivityWorksUploadCollectionController.java | 79 ++++++++ ...vity_works_collection_upload_like_num.java | 72 +++++++ .../OutlayReimburseApplyController.java | 2 +- .../service/OutlayReimburseApplyService.java | 3 +- .../impl/OutlayReimburseApplyServiceImpl.java | 18 +- .../components/plugins/sysUpload/h5Index.vue | 7 +- .../activity/workscollection/read/index.html | 1 + .../workscollection/upload/index.html | 1 - .../zhghh5/activity/culture/applyUser.html | 20 +- .../zhghh5/activity/culture/signUp.html | 2 +- .../workscollection/activity/index.html | 7 - .../activity/workscollection/mine/index.html | 112 ++++++++++ .../activity/workscollection/mine/info.js | 67 ++++++ .../activity/workscollection/read/index.html | 159 +++++++++++++++ .../workscollection/upload/applyForm.js | 191 ++++++++++++++++++ .../workscollection/upload/index.html | 161 ++++++++++++++- .../activity/workscollection/upload/mine.html | 8 - .../dayofficework/asset/stocktaking/info.js | 2 +- 23 files changed, 1091 insertions(+), 96 deletions(-) delete mode 100644 src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksCollectionController.java create mode 100644 src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksMineCollectionController.java create mode 100644 src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksReadCollectionController.java create mode 100644 src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksUploadCollectionController.java create mode 100644 src/main/java/com/budwk/app/zhgh/activity/workscollection/models/Activity_works_collection_upload_like_num.java delete mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/activity/index.html create mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/mine/index.html create mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/mine/info.js create mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/read/index.html create mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/upload/applyForm.js delete mode 100644 src/main/resources/views/platform/zhghh5/activity/workscollection/upload/mine.html diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionReadController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionReadController.java index c8317917..ad3b69a7 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionReadController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionReadController.java @@ -75,7 +75,12 @@ public class ActivityWorksCollectionReadController { up.*, co.NAME AS activityName, su.typeName AS subjectName, - wo.worksTypeName AS worksName + wo.worksTypeName AS worksName, + ( + SELECT COUNT(*) + FROM activity_works_collection_upload_like_num likeNum + WHERE likeNum.uploadId = up.id + ) AS num from activity_works_collection_upload up LEFT JOIN activity_works_collection co ON up.activityId = co.id @@ -99,6 +104,7 @@ public class ActivityWorksCollectionReadController { if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { cnd.and("up.unionId", "=", SecurityUtil.getUnionId()); } + cnd.desc("up.createdAt"); sql.setCondition(cnd); Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); @@ -121,7 +127,12 @@ public class ActivityWorksCollectionReadController { co.NAME AS activityName, su.typeName AS subjectName, wo.worksTypeName AS worksName, - u.sex + u.sex, + ( + SELECT COUNT(*) + FROM activity_works_collection_upload_like_num likeNum + WHERE likeNum.uploadId = up.id + ) AS num from activity_works_collection_upload up LEFT JOIN activity_works_collection co ON up.activityId = co.id @@ -145,6 +156,7 @@ public class ActivityWorksCollectionReadController { if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { cnd.and("up.unionId", "=", SecurityUtil.getUnionId()); } + cnd.desc("num"); sql.setCondition(cnd); List listMap = baseService.listMap(sql); @@ -159,7 +171,7 @@ public class ActivityWorksCollectionReadController { exportEntities.add(new ExcelExportEntity("作品类型", "worksName", 20)); exportEntities.add(new ExcelExportEntity("作品名称", "name", 20)); exportEntities.add(new ExcelExportEntity("作品描述", "description", 20)); - //exportEntities.add(new ExcelExportEntity("点赞次数", "dz_num", 20)); + exportEntities.add(new ExcelExportEntity("点赞次数", "num", 20)); try { ExportParams exportParams = new ExportParams(); diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionUploadController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionUploadController.java index 11ee496d..795f076b 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionUploadController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/ActivityWorksCollectionUploadController.java @@ -1,12 +1,10 @@ package com.budwk.app.zhgh.activity.workscollection.controller; import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.date.DateUtil; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; import com.budwk.app.base.service.BaseService; -import com.budwk.app.sys.models.Sys_user; import com.budwk.app.sys.views.View_user; import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope; @@ -27,7 +25,6 @@ import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; import javax.validation.Valid; -import java.util.Date; import java.util.List; /** @@ -50,6 +47,8 @@ public class ActivityWorksCollectionUploadController { public void index() { } + + /** * @param pageForm 分页 * @param activityId 活动id @@ -63,6 +62,8 @@ public class ActivityWorksCollectionUploadController { select up.*, co.NAME AS activityName, + co.startDateTime AS activityStartDateTime, + co.endDateTime AS activityEndDateTime, su.typeName AS subjectName, wo.worksTypeName AS worksName from @@ -78,6 +79,7 @@ public class ActivityWorksCollectionUploadController { cnd.andEX("up.activityId", "=", activityId); cnd.andEX("up.subjectId", "=", subjectId); cnd.andEX("up.worksId", "=", worksId); + cnd.desc("up.createdAt"); sql.setCondition(cnd); Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); @@ -91,8 +93,12 @@ public class ActivityWorksCollectionUploadController { @At @SaCheckPermission("activity.workscollection.upload") public Result insert(@Param("data") @Valid Activity_works_collection_upload upload) { + String activityId = upload.getActivityId(); Activity_works_collection activity = dao.fetch(Activity_works_collection.class, activityId); + if (activity.getEndDateTime().getTime() < System.currentTimeMillis()){ + return Result.error("活动已结束!"); + } if (activity.getActivityGroupId() != null) { int count = dao.count(ActivityUserScope.class, Cnd.where(ActivityUserScope::getGroupId, "=", activity.getActivityGroupId()) .and(ActivityUserScope::getUserId, "=", SecurityUtil.getUserId())); @@ -119,6 +125,10 @@ public class ActivityWorksCollectionUploadController { @At @SaCheckPermission("activity.workscollection.upload") public Result update(@Param("data") @Valid Activity_works_collection_upload upload) { + Activity_works_collection activity = dao.fetch(Activity_works_collection.class, upload.getActivityId()); + if (activity.getEndDateTime().getTime() < System.currentTimeMillis()){ + return Result.error("活动已结束!"); + } dao.updateIgnoreNull(upload); return Result.success(); } @@ -133,6 +143,11 @@ public class ActivityWorksCollectionUploadController { @At @SaCheckPermission("activity.workscollection.upload") public Result delete(@Valid String id) { + Activity_works_collection_upload upload = dao.fetch(Activity_works_collection_upload.class, id); + Activity_works_collection activity = dao.fetch(Activity_works_collection.class, upload.getActivityId()); + if (activity.getEndDateTime().getTime() < System.currentTimeMillis()){ + return Result.error("活动已结束!"); + } dao.delete(Activity_works_collection_upload.class, id); return Result.success(); } diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksCollectionController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksCollectionController.java deleted file mode 100644 index 63ec2ba2..00000000 --- a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksCollectionController.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.budwk.app.zhgh.activity.workscollection.controller.h5; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; - -/** - * 手机端作品征集 - */ -@IocBean -@At("/platform/h5/activity/worksCollection") -@Ok("json:full") -public class H5ActivityWorksCollectionController { - - /** - * 活动列表页面 - */ - @At("/activity") - @Ok("beetl:/platform/zhghh5/activity/workscollection/activity/index.html") - @SaCheckPermission("activity.workscollection.upload") - public void activity() { - } - - /** - * 上传页面 - */ - @At("/upload") - @Ok("beetl:/platform/zhghh5/activity/workscollection/upload/index.html") - @SaCheckPermission("activity.workscollection.upload") - public void upload() { - } - - /** - * 我的上传页面 - */ - @At("/upload/mine") - @Ok("beetl:/platform/zhghh5/activity/workscollection/upload/mine.html") - @SaCheckPermission("activity.workscollection.upload") - public void uploadMine() { - } -} diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksMineCollectionController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksMineCollectionController.java new file mode 100644 index 00000000..66157baa --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksMineCollectionController.java @@ -0,0 +1,36 @@ +package com.budwk.app.zhgh.activity.workscollection.controller.h5; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import com.budwk.app.base.service.BaseService; +import io.swagger.annotations.ApiOperation; +import org.nutz.dao.Dao; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; + +/** + * @author zhf + * @date 2025/9/16 08:54 + * @description 我的作品 + */ +@IocBean +@At("/platform/activity/worksCollection/mine/h5") +@Ok("json:full") +@ApiOperation("手机端我的作品") +public class H5ActivityWorksMineCollectionController { + + + @Inject + private BaseService baseService; + @Inject + private Dao dao; + + @At("") + @Ok("beetl:/platform/zhghh5/activity/workscollection/mine/index.html") + @SaCheckPermission("h5.activity.workscollection.mine") + public void index() { + } + + +} diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksReadCollectionController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksReadCollectionController.java new file mode 100644 index 00000000..19da0659 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksReadCollectionController.java @@ -0,0 +1,158 @@ +package com.budwk.app.zhgh.activity.workscollection.controller.h5; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.annotation.SLog; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.result.Result; +import com.budwk.app.base.service.BaseService; +import com.budwk.app.sys.views.View_user; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.activity.workscollection.models.Activity_works_collection; +import com.budwk.app.zhgh.activity.workscollection.models.Activity_works_collection_upload; +import com.budwk.app.zhgh.activity.workscollection.models.Activity_works_collection_upload_like_num; +import com.budwk.app.zhgh.activity.workscollection.param.ActivityWorksCollectionReadPageParam; +import io.swagger.annotations.ApiOperation; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; + +import javax.validation.Valid; + +/** + * @author zhf + * @date 2025/9/18 10:00 + * @description + */ +@IocBean +@At("/platform/activity/worksCollection/read/h5") +@Ok("json:full") +@ApiOperation("手机端作品阅览") +public class H5ActivityWorksReadCollectionController { + + + @Inject + private BaseService baseService; + @Inject + private Dao dao; + + @At("") + @Ok("beetl:/platform/zhghh5/activity/workscollection/read/index.html") + @SaCheckPermission("h5.activity.workscollection.read") + public void index() { + } + + @At + @SaCheckPermission("h5.activity.workscollection.read") + public Result pageData(@Valid ActivityWorksCollectionReadPageParam pageForm) { + Sql sql = Sqls.create(""" + select + up.*, + co.NAME AS activityName, + co.nbCount, + su.typeName AS subjectName, + wo.worksTypeName AS worksName, + ( + SELECT COUNT(*) + FROM activity_works_collection_upload_like_num likeNum + WHERE likeNum.uploadId = up.id + ) AS num, + EXISTS( + SELECT 1 + FROM activity_works_collection_upload_like_num thisLikeNum + WHERE thisLikeNum.uploadId = up.id + AND thisLikeNum.userId = @userId + ) AS isThisLike + from + activity_works_collection_upload up + LEFT JOIN activity_works_collection co ON up.activityId = co.id + LEFT JOIN activity_works_subjecttype su ON up.subjectId = su.id + LEFT JOIN activity_works_workstype wo ON up.worksId = wo.id + $condition + """).setParam("userId", SecurityUtil.getUserId()); + Cnd cnd = Cnd.NEW(); + cnd.andEX("YEAR(co.startDateTime)", "=", pageForm.getYear()); + cnd.andEX("up.activityId", "=", pageForm.getActivityId()); + cnd.andEX("up.subjectId", "=", pageForm.getSubjectId()); + cnd.andEX("up.worksId", "=", pageForm.getWorksId()); + cnd.andEX("unionId", "=", pageForm.getUnionId()); + cnd.andEX("unitId", "=", pageForm.getUnitId()); + if (StrUtil.isAllNotBlank(pageForm.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike("userName", pageForm.getSearchKeyword()); + seg.orLike("loginName", pageForm.getSearchKeyword()); + cnd.and(seg); + } + if (pageForm.getPageOrderName().equals("num")) { + cnd.desc(pageForm.getPageOrderName()).asc("createdAt"); + } else { + cnd.asc(pageForm.getPageOrderName()); + } + sql.setCondition(cnd); + Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } + + + @At + @ApiOperation("点赞") + @SLog(tag = "作品点赞", msg = "作品Id:${uploadId}") + @SaCheckPermission("h5.activity.workscollection.read") + public Result doLike(@Valid String uploadId) { + Activity_works_collection_upload upload = dao.fetch(Activity_works_collection_upload.class, uploadId); + Activity_works_collection activity = dao.fetch(Activity_works_collection.class, upload.getActivityId()); + if (activity.getNbStartDateTime().getTime() > System.currentTimeMillis()) { + return Result.error("点赞未开始!开始时间:" + DateUtil.format(activity.getNbStartDateTime(), "yyyy-MM-dd HH:mm:ss")); + } + if (activity.getNbEndDateTime().getTime() < System.currentTimeMillis()) { + return Result.error("点赞已结束!结束时间:" + DateUtil.format(activity.getNbEndDateTime(), "yyyy-MM-dd HH:mm:ss")); + } + int count = dao.count(Activity_works_collection_upload_like_num.class, + Cnd.where(Activity_works_collection_upload_like_num::getActivityId, "=", activity.getId()) + .and("DATE(FROM_UNIXTIME(createdAt / 1000))", "=", DateUtil.today()) + .and(Activity_works_collection_upload_like_num::getUserId, "=", SecurityUtil.getUserId())); + if (count >= activity.getNbCount()) { + return Result.error("当前活动每天只能点赞" + activity.getNbCount() + "次!"); + } + View_user vwUser = dao.fetch(View_user.class, Cnd.where(View_user::getId, "=", SecurityUtil.getUserId())); + Activity_works_collection_upload_like_num likeNum = new Activity_works_collection_upload_like_num(); + likeNum.setUploadId(uploadId); + likeNum.setActivityId(activity.getId()); + likeNum.setUserId(SecurityUtil.getUserId()); + likeNum.setUserName(SecurityUtil.getUserUsername()); + likeNum.setLoginName(SecurityUtil.getUserLoginname()); + likeNum.setUnitId(SecurityUtil.getUnitId()); + likeNum.setUnitName(vwUser.getUnitName()); + likeNum.setUnionId(SecurityUtil.getUnionId()); + likeNum.setUnionName(vwUser.getUnionName()); + dao.insert(likeNum); + return Result.success(); + } + + + @At + @ApiOperation("取消点赞") + @SaCheckPermission("h5.activity.workscollection.read") + public Result doDeleteLike(@Valid String uploadId) { + Activity_works_collection_upload upload = dao.fetch(Activity_works_collection_upload.class, uploadId); + Activity_works_collection activity = dao.fetch(Activity_works_collection.class, upload.getActivityId()); + if (activity.getNbStartDateTime().getTime() > System.currentTimeMillis()) { + return Result.error("点赞未开始!开始时间:" + DateUtil.format(activity.getNbStartDateTime(), "yyyy-MM-dd HH:mm:ss")); + } + if (activity.getNbEndDateTime().getTime() < System.currentTimeMillis()) { + return Result.error("点赞已结束!结束时间:" + DateUtil.format(activity.getNbEndDateTime(), "yyyy-MM-dd HH:mm:ss")); + } + dao.clear(Activity_works_collection_upload_like_num.class, + Cnd.where(Activity_works_collection_upload_like_num::getUploadId, "=", uploadId) + .and(Activity_works_collection_upload_like_num::getUserId, "=", SecurityUtil.getUserId())); + return Result.success(); + } + +} diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksUploadCollectionController.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksUploadCollectionController.java new file mode 100644 index 00000000..240e73fe --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/controller/h5/H5ActivityWorksUploadCollectionController.java @@ -0,0 +1,79 @@ +package com.budwk.app.zhgh.activity.workscollection.controller.h5; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.param.PageForm; +import com.budwk.app.base.result.Result; +import com.budwk.app.base.service.BaseService; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import io.swagger.annotations.ApiOperation; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.Static; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +/** + * 手机端作品征集 + */ +@IocBean +@At("/platform/activity/worksCollection/upload/h5") +@Ok("json:full") +@ApiOperation("手机端作品征集") +public class H5ActivityWorksUploadCollectionController { + + @Inject + private BaseService baseService; + @Inject + private Dao dao; + + @At("") + @Ok("beetl:/platform/zhghh5/activity/workscollection/upload/index.html") + @SaCheckPermission("h5.activity.workscollection.upload") + public void index() { + } + + + + + @At + @ApiOperation("活动查询") + @SaCheckPermission(value = {"h5.activity.workscollection.upload"}, mode = SaMode.OR) + public Result activityPageData(PageForm pageForm, + @Param(value = "year") Integer year, + @Param(value = "activityType") Integer activityType) { + Sql sql = Sqls.create(""" + SELECT + awc.*, + aus.groupName activityGroupName + FROM + `activity_works_collection` awc + LEFT JOIN activity_user_scope aus ON aus.groupId = awc.activityGroupId + AND aus.userId = @userId + """).setParam("userId", SecurityUtil.getUserId()); + Cnd cnd = Cnd.NEW(); + cnd.andEX("YEAR(awc.startDateTime)", "=", year); + //查询报名中 + if (activityType == 2) { + cnd.and(new Static("now() > awc.startDateTime and now() < awc.endDateTime")); + }//查询已结束的 + else if (activityType == 3) { + cnd.and(new Static("now() > awc.startDateTime")); + } else if (activityType == 4) { + cnd.and(new Static("now() < awc.endDateTime")); + } + cnd.and("awc.enable", "=", 1); + cnd.and("awc.type", "=", 1); + sql.setCondition(cnd); + Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } + + +} diff --git a/src/main/java/com/budwk/app/zhgh/activity/workscollection/models/Activity_works_collection_upload_like_num.java b/src/main/java/com/budwk/app/zhgh/activity/workscollection/models/Activity_works_collection_upload_like_num.java new file mode 100644 index 00000000..e6f52010 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/workscollection/models/Activity_works_collection_upload_like_num.java @@ -0,0 +1,72 @@ +package com.budwk.app.zhgh.activity.workscollection.models; + +import com.budwk.app.base.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.nutz.dao.entity.annotation.*; +import org.nutz.dao.interceptor.annotation.PrevInsert; + +/** + * @author zhf + * @date 2025/9/18 10:46 + * @description 作品点赞数量 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Table("activity_works_collection_upload_like_num") +@TableMeta("{'mysql-charset':'utf8mb4'}") +@Comment("作品点赞数量") +public class Activity_works_collection_upload_like_num extends BaseModel { + + @Name + @Comment("ID") + @PrevInsert(uu32 = true) + @ColDefine(type = ColType.VARCHAR, width = 32) + private String id; + + + @Column + @Comment("活动Id") + @ColDefine(type = ColType.VARCHAR, width = 32, notNull = true) + private String activityId; + + @Column + @Comment("作品Id") + @ColDefine(type = ColType.VARCHAR, width = 32, notNull = true) + private String uploadId; + + @Column + @Comment("点赞人id") + @ColDefine(type = ColType.VARCHAR, width = 32, notNull = true) + private String userId; + + @Column + @Comment("点赞人姓名") + @ColDefine(type = ColType.VARCHAR, width = 100, notNull = true) + private String userName; + + @Column + @Comment("点赞人工号") + @ColDefine(type = ColType.VARCHAR, width = 100, notNull = true) + private String loginName; + + @Column + @Comment("点赞人单位id") + @ColDefine(type = ColType.VARCHAR, width = 200, notNull = true) + private String unitId; + + @Column + @Comment("点赞人单位") + @ColDefine(type = ColType.VARCHAR, width = 200, notNull = true) + private String unitName; + + @Column + @Comment("点赞人分工会id") + @ColDefine(type = ColType.VARCHAR, width = 32, notNull = true) + private String unionId; + + @Column + @Comment("点赞人分工会") + @ColDefine(type = ColType.VARCHAR, width = 50, notNull = true) + private String unionName; +} diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/controller/OutlayReimburseApplyController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/controller/OutlayReimburseApplyController.java index 104b1748..75bb0df3 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/controller/OutlayReimburseApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/controller/OutlayReimburseApplyController.java @@ -79,7 +79,7 @@ public class OutlayReimburseApplyController { @ApiOperation("查询这个预算已经报销了的金额") @SaCheckPermission(value = {"outlay.reimburse.apply", "h5.outlay.reimburse.apply"}, mode = SaMode.OR) public Result getBxMoneyByBudgetId(String budgetId) { - return Result.success(outlayReimburseApplyService.getBxMoneyByActivityId(budgetId,null)); + return Result.success(outlayReimburseApplyService.getBxMoneyByActivityId(budgetId)); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/service/OutlayReimburseApplyService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/service/OutlayReimburseApplyService.java index 06bd962f..6545d73c 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/service/OutlayReimburseApplyService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayReimburse/service/OutlayReimburseApplyService.java @@ -24,10 +24,9 @@ public interface OutlayReimburseApplyService extends BaseService budgetList = dao().query(ActivityBudget.class, diff --git a/src/main/resources/static/components/plugins/sysUpload/h5Index.vue b/src/main/resources/static/components/plugins/sysUpload/h5Index.vue index 884f44ea..69fffc65 100644 --- a/src/main/resources/static/components/plugins/sysUpload/h5Index.vue +++ b/src/main/resources/static/components/plugins/sysUpload/h5Index.vue @@ -4,6 +4,7 @@ v-model="fileList" :before-read="beforeRead" :after-read="afterRead" + :before-delete="beforeDelete" multiple progress :accept="accept" @@ -128,12 +129,16 @@ module.exports = { } }, methods: { + beforeDelete(file) { + this.fileList = this.fileList.filter((f) => f.url !== file.url) + this.$emit("update:value", this.fileList) + }, beforeRead(file) { return true }, afterRead(files) { this.fileList.map((f) => { - if (f.file && f.file.name === files.file.name ) { + if (f.file && f.file.name === files.file.name) { f.status = "loading" } }) diff --git a/src/main/resources/views/platform/zhgh/activity/workscollection/read/index.html b/src/main/resources/views/platform/zhgh/activity/workscollection/read/index.html index 004e805f..fcbc3515 100644 --- a/src/main/resources/views/platform/zhgh/activity/workscollection/read/index.html +++ b/src/main/resources/views/platform/zhgh/activity/workscollection/read/index.html @@ -67,6 +67,7 @@ layout("/layouts/platform.html"){ {{$moment(scope.row.createdAt).format( 'YYYY-MM-DD')}} + From 90f37ef369aca7664914cb3357de1643721c9abb Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 19 Sep 2025 09:37:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=94=9F=E8=82=B2=E4=BC=91=E5=81=87?= =?UTF-8?q?=E3=80=81=E7=8B=AC=E7=94=9F=E5=AD=90=E5=A5=B3=E7=88=B6=E6=AF=8D?= =?UTF-8?q?=E9=80=80=E4=BC=91=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DsznfmtxApplyController.java | 56 +++ .../dsznfmtx/models/Dsznfmtx.java | 1 + .../MaternityLeaveCollectController.java | 2 +- .../MaternityLeaveSchoolAuditController.java | 2 +- .../unionReimburse/apply/index.html | 25 +- .../staffbenefit/dsznfmtx/apply/index.html | 169 ++++--- .../staffbenefit/dsznfmtx/collect/index.html | 2 +- .../zhgh/staffbenefit/dsznfmtx/common/info.js | 4 +- .../staffbenefit/dsznfmtx/mine/index.html | 4 +- .../dsznfmtx/schoolAudit/index.html | 102 +++- .../dsznfmtx/unionAudit/index.html | 5 +- .../maternityLeave/apply/index.html | 35 +- .../maternityLeave/schoolAudit/index.html | 3 + .../maternityLeave/unionAudit/index.html | 3 + .../unionReimburse/collect/index.html | 6 +- .../staffbenefit/dsznfmtx/apply/index.html | 377 ++++++++++++++ .../staffbenefit/dsznfmtx/collect/index.html | 127 +++++ .../staffbenefit/dsznfmtx/common/info.js | 122 +++++ .../staffbenefit/dsznfmtx/mine/index.html | 134 +++++ .../dsznfmtx/schoolAudit/index.html | 257 ++++++++++ .../dsznfmtx/unionAudit/index.html | 167 +++++++ .../maternityLeave/apply/index.html | 465 ++++++++++++++++++ .../maternityLeave/collect/index.html | 127 +++++ .../maternityLeave/common/info.js | 125 +++++ .../maternityLeave/mine/index.html | 133 +++++ .../maternityLeave/schoolAudit/index.html | 167 +++++++ .../maternityLeave/unionAudit/index.html | 167 +++++++ 27 files changed, 2708 insertions(+), 79 deletions(-) create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/collect/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/mine/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/schoolAudit/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/unionAudit/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/collect/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/common/info.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/mine/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/schoolAudit/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/unionAudit/index.html diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/controller/DsznfmtxApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/controller/DsznfmtxApplyController.java index 7ee27f26..4ce37789 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/controller/DsznfmtxApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/controller/DsznfmtxApplyController.java @@ -6,6 +6,7 @@ import cn.dev33.satoken.annotation.SaMode; import cn.hutool.core.lang.Dict; import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; +import com.budwk.app.base.page.Pagination; import com.budwk.app.base.result.Result; import com.budwk.app.base.service.BaseService; import com.budwk.app.flow.constant.FlowConst; @@ -16,18 +17,24 @@ import com.budwk.app.flow.enums.ProcessSubmitTypeEnum; import com.budwk.app.flow.service.FlowCommonService; import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.staffbenefit.dsznfmtx.models.Dsznfmtx; +import com.budwk.app.zhgh.staffbenefit.dsznfmtx.service.DsznfmtxService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Cnd; import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.aop.Aop; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.util.NutMap; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; +import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.List; @@ -49,6 +56,8 @@ public class DsznfmtxApplyController { @Inject private BaseService baseService; @Inject + private DsznfmtxService dsznfmtxService; + @Inject private FlowEngine flowEngine; @Inject private FlowCommonService flowCommonService; @@ -111,6 +120,53 @@ public class DsznfmtxApplyController { return Result.success(); } + @At + @Ok("json") + @ApiOperation("是否为退休、离休、离退休人员") + @SaCheckPermission(value = {"dsznfmtx.apply", "h5.dsznfmtx.apply"}, mode = SaMode.OR) + public Object checkRetirementStatus(HttpServletRequest req) { + Sql sql = Sqls.create(""" + SELECT + info.id, + info.userState + FROM + sys_user info + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and("info.id", "=", SecurityUtil.getUserId()); + sql.setCondition(cnd); + List map = dsznfmtxService.listMap(sql); + + if (!map.isEmpty()) { + NutMap user = map.get(0); + String userState = user.getString("userState"); + // 检查用户状态是否为退休相关状态 + if ("退休".equals(userState) || "离休".equals(userState) || "离退休".equals(userState)) { + return Result.success(true); + } + } + + return Result.success(false); + + } + + @At + @Ok("json") + @ApiOperation("是否已经申请过") + @SaCheckPermission(value = {"dsznfmtx.apply", "h5.dsznfmtx.apply"}, mode = SaMode.OR) + public Object checkUserApplied(HttpServletRequest req) { + try { + // 查询该用户是否已有申请记录 + long count = dao.count(Dsznfmtx.class, Cnd.where("userId", "=", SecurityUtil.getUserId())); + // 返回true表示已申请,false表示未申请 + return Result.success(count > 0); + } catch (Exception e) { + log.error("检查用户申请状态失败", e); + return Result.error("检查用户申请状态失败"); + } + } + @At @SaCheckLogin public Result findOne(String id) { diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java index 6c654a56..4f230fdc 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java @@ -146,5 +146,6 @@ public class Dsznfmtx extends BaseModel implements Serializable { @Comment("办证机关") private String office; + } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveCollectController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveCollectController.java index 032f4438..743fa988 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveCollectController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveCollectController.java @@ -126,7 +126,7 @@ public class MaternityLeaveCollectController { @At @ApiOperation("删除") @Aop(TransAop.READ_COMMITTED) - @SaCheckPermission(value = {"maternityLeave.mine", "h5.maternityLeave.mine"}, mode = SaMode.OR) + @SaCheckPermission(value = {"maternityLeave.collect", "h5.maternityLeave.collect"}, mode = SaMode.OR) @SLog( tag = "删除工会报销", msg = "删除工会报销") public Result delete(@Param("id") String id) { maternityLeaveService.delete(id); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveSchoolAuditController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveSchoolAuditController.java index c6ab7cd3..471f0376 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveSchoolAuditController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/controller/MaternityLeaveSchoolAuditController.java @@ -53,7 +53,7 @@ public class MaternityLeaveSchoolAuditController { @At @ApiOperation("分页查询") - @SaCheckPermission(value = {"maternityLeave.unionAudit", "h5.maternityLeave.unionAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"maternityLeave.schoolAudit", "h5.maternityLeave.schoolAudit"}, mode = SaMode.OR) public Result pageData(PageForm pageForm, boolean approval, Integer year, 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 d6b1303e..9a52e2fe 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 @@ -353,8 +353,21 @@ layout("/layouts/platform.html"){ }) }) }, + // 提交验证 + validateBeforeSubmit() { + return new Promise((resolve) => { + this.$refs.formRef.validate((valid) => { + if (valid) { + resolve(true); + } else { + this.$message.error('请完善必填信息'); + resolve(false); + } + }); + }); + }, // 提交 - onSubmit() { + async onSubmit() { // 余额校验 if (this.formData.money && this.formData.fundBalance) { const balance = parseFloat(this.formData.fundBalance); @@ -364,6 +377,10 @@ layout("/layouts/platform.html"){ return; } } + // 表单验证 + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -380,7 +397,7 @@ layout("/layouts/platform.html"){ }) }, // 再次提交 - onFinishTask() { + async onFinishTask() { // 余额校验 if (this.formData.money && this.formData.fundBalance) { const balance = parseFloat(this.formData.fundBalance); @@ -390,6 +407,10 @@ layout("/layouts/platform.html"){ return; } } + // 表单验证 + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html index 742113cf..a16a5f47 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html @@ -120,16 +120,8 @@ layout("/layouts/platform.html"){ placeholder="请输入办证机关"> - - - - - - - { - if (valid) { - this.$confirm("您确定要提交吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - this.$axios.post('/platform/dsznfmtx/apply/submit', { - data: JSON.stringify(this.formData) - }).then(res => { - if (res.code === 0) { - this.$message.success("提交成功") - window.location.href = '/platform/dsznfmtx/mine/index' - } - }) - }) - } else { - this.$message.error('请完善表单信息并勾选申报理由'); - return false; - } + // 提交验证 + validateBeforeSubmit() { + return new Promise((resolve) => { + this.$refs.formRef.validate((valid) => { + if (valid) { + resolve(true); + } else { + this.$message.error('请完善表单信息并勾选申报理由'); + resolve(false); + } + }); }); }, - // 再次提交 - onFinishTask() { - this.$refs.formRef.validate((valid) => { - if (valid) { - this.$confirm("您确定要提交吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - this.$axios.post('/platform/dsznfmtx/apply/submitAgain', { - data: JSON.stringify(this.formData), - taskId: GetQueryString("taskId") - }).then(res => { - if (res.code === 0) { - this.$message.success("提交成功") - window.location.href = '/platform/dsznfmtx/mine/index' - } - }) - }) - } else { - this.$message.error('请完善表单信息并勾选申报理由'); - return false; + // 添加检查是否为退休人员的方法 + async checkRetirementStatus() { + try { + const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkRetirementStatus'); + // 如果返回code为0且data为true,表示用户是退休人员 + if (resp.code === 0 && resp.data === true) { + return true; } - }); + return false; + } catch (error) { + console.error('检查退休状态失败:', error); + return false; + } + }, + // 检查用户是否已申请过 + async checkUserApplication() { + try { + const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkUserApplied'); + // 如果返回code为0且data为true,表示用户已申请过 + if (resp.code === 0 && resp.data === true) { + return true; + } + return false; + } catch (error) { + console.error('检查用户申请状态失败:', error); + return false; + } + }, + // 提交 + async onSubmit() { + // 检查是否为退休人员 + const isRetired = await this.checkRetirementStatus(); + if (!isRetired) { + this.$message.warning('您不是退休人员,无法申请此项福利'); + return; + } + + if (!this.bizId) { + const isApplied = await this.checkUserApplication(); + if (isApplied) { + this.$message.warning('您已经提交过申请,不能重复申请'); + return; + } + } + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + + this.$confirm("您确定要提交吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.$axios.post('/platform/dsznfmtx/apply/submit', { + data: JSON.stringify(this.formData) + }).then(res => { + if (res.code === 0) { + this.$message.success("提交成功") + window.location.href = '/platform/dsznfmtx/mine/index' + } + }) + }) + }, + // 再次提交 + async onFinishTask() { + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + + this.$confirm("您确定要提交吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.$axios.post('/platform/dsznfmtx/apply/submitAgain', { + data: JSON.stringify(this.formData), + taskId: GetQueryString("taskId") + }).then(res => { + if (res.code === 0) { + this.$message.success("提交成功") + window.location.href = '/platform/dsznfmtx/mine/index' + } + }) + }) }, async findOne(id) { const resp = await $.get('/platform/dsznfmtx/apply/findOne', {id}) @@ -273,9 +325,7 @@ layout("/layouts/platform.html"){ sex: sex, birthday: birthday, } - } - } }, created() { @@ -285,6 +335,7 @@ layout("/layouts/platform.html"){ + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/collect/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/collect/index.html index 7af91558..7911fcb3 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/collect/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/collect/index.html @@ -86,7 +86,7 @@ layout("/layouts/platform.html"){ //分页数据 mixins: [initTableMixins], components: { - "dsznfmtx-info": dsznfmtxInfo + "dsznfmtx-info": DSZNFMTX_INFO }, data() { return { diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js index 52c92022..e65bb213 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js @@ -1,4 +1,4 @@ -const dsznfmtxInfo = { +const DSZNFMTX_INFO = { template: /*language=HTML*/ `
@@ -17,7 +17,7 @@ const dsznfmtxInfo = { {{viewData.loverUnitName}} {{viewData.marryTime}} {{viewData.childrenBirthday}} - {{viewData.startTime}} + {{viewData.getCertificateTime}} {{viewData.childrenGraceNumber}} {{viewData.office}} {{viewData.bonus}} diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/mine/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/mine/index.html index 39e9a17f..c172f3c8 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/mine/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/mine/index.html @@ -34,7 +34,7 @@ layout("/layouts/platform.html"){ 编辑 撤回 - 删除 + 删除 @@ -57,7 +57,7 @@ layout("/layouts/platform.html"){ //分页数据 mixins: [initTableMixins], components: { - "dsznfmtx-info": dsznfmtxInfo + "dsznfmtx-info": DSZNFMTX_INFO }, data() { return { diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html index 933b9101..d18b3e05 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html @@ -88,6 +88,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 @@ -99,6 +102,19 @@ layout("/layouts/platform.html"){ + + + + + + + + + +
@@ -111,7 +127,7 @@ layout("/layouts/platform.html"){ //分页数据 mixins: [initTableMixins], components: { - "dsznfmtx-info": dsznfmtxInfo + "dsznfmtx-info": DSZNFMTX_INFO }, data() { return { @@ -124,6 +140,13 @@ layout("/layouts/platform.html"){ unionOptions: [], unitOptions: [], userOptions: [], + // 奖励金额输入对话框相关数据 + bonusDialogVisible: false, + bonusFormData: { + bonus: '' + }, + currentRow: null, + currentSubmitType: null } } , @@ -140,6 +163,7 @@ layout("/layouts/platform.html"){ processTaskId: row.taskId, taskName: row.curTaskName } + this.currentRow = row; this.$refs.dsznfmtxInfoRef.onOpen(row) }) }, @@ -157,7 +181,77 @@ layout("/layouts/platform.html"){ }) }) }, + // 显示奖励金额输入对话框 + showBonusInputDialog(submitType) { + this.currentSubmitType = submitType; + this.bonusFormData.bonus = ''; + this.bonusDialogVisible = true; + }, + // 确认奖励金额输入并提交 + confirmBonusInput() { + if (!this.bonusFormData.bonus) { + this.$message.warning('请输入奖励金额'); + return; + } + + // 验证金额格式 + const bonusPattern = /^([0-9]*[.]{0,1}[0-9]{0,2})$/; + if (!bonusPattern.test(this.bonusFormData.bonus)) { + this.$message.warning('请输入有效的金额格式'); + return; + } + + this.bonusDialogVisible = false; + + // 调用申请页面的保存方法来更新奖励金额 + this.saveBonusAndApprove(); + }, + // 取消奖励金额输入 + cancelBonusInput() { + this.bonusDialogVisible = false; + }, + // 保存奖励金额并执行审批 + // 保存奖励金额并执行审批 + saveBonusAndApprove() { + // 先获取完整的申请数据 + this.$axios.post('/platform/dsznfmtx/apply/findOne', {id: this.currentRow.id}).then(res => { + if (res.code === 0) { + // 获取完整的数据后,更新奖励金额 + const fullData = res.data; + fullData.bonus = this.bonusFormData.bonus; + + // 调用申请页面的保存方法,传递完整数据 + this.$axios.post('/platform/dsznfmtx/apply/save', {data: JSON.stringify(fullData)}).then(saveRes => { + if (saveRes.code === 0) { + // 保存成功后执行审批操作 + this.executeTaskAction(this.currentSubmitType); + } else { + this.$message.error(saveRes.msg || '保存奖励金额失败'); + } + }).catch(error => { + this.$message.error('保存奖励金额失败'); + console.error('保存奖励金额失败:', error); + }); + } else { + this.$message.error(res.msg || '获取申请数据失败'); + } + }).catch(error => { + this.$message.error('获取申请数据失败'); + console.error('获取申请数据失败:', error); + }); + }, handleTaskAction(val) { + // 如果是同意申请操作(val=1),需要先输入奖励金额 + if (val === 1) { + this.showBonusInputDialog(val); + return; + } + + // 其他操作直接执行 + this.executeTaskAction(val); + }, + // 执行任务操作 + executeTaskAction(val) { this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -170,9 +264,9 @@ layout("/layouts/platform.html"){ }) }).then((res) => { if (res.code === 0) { - this.$refs.guava.index() - this.$message.success(res.msg) - this.doSearch() + this.$refs.guava.index(); + this.$message.success(res.msg); + this.doSearch(); } }) }) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html index 5019fef8..96d6d712 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html @@ -86,6 +86,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 @@ -109,7 +112,7 @@ layout("/layouts/platform.html"){ //分页数据 mixins: [initTableMixins], components: { - "dsznfmtx-info": dsznfmtxInfo + "dsznfmtx-info": DSZNFMTX_INFO }, data() { return { diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html index 75586c61..828c5cc2 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html @@ -172,7 +172,16 @@ layout("/layouts/platform.html"){ bizId: GetQueryString("bizId"), taskId: GetQueryString("taskId"), formData: {}, - formRules: {}, + formRules: { + loverName: [{ required: true, message: '请输入爱人姓名', trigger: 'blur' }], + loverSex: [{ required: true, message: '请选择爱人性别', trigger: 'change' }], + loverNation: [{ required: true, message: '请选择爱人民族', trigger: 'change' }], + loverBirthday: [{ required: true, message: '请选择爱人出生年月', trigger: 'change' }], + loverUnitName: [{ required: true, message: '请输入爱人工作单位', trigger: 'blur' }], + startTime: [{ required: true, message: '请选择休假开始时间', trigger: 'change' }], + endTime: [{ required: true, message: '请选择休假结束时间', trigger: 'change' }], + childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }] + }, } }, computed: { @@ -216,8 +225,24 @@ layout("/layouts/platform.html"){ }) }) }, + // 提交验证 + validateBeforeSubmit() { + return new Promise((resolve) => { + this.$refs.formRef.validate((valid) => { + if (valid) { + resolve(true); + } else { + this.$message.error('请完善必填信息'); + resolve(false); + } + }); + }); + }, // 提交 - onSubmit() { + async onSubmit() { + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -234,7 +259,10 @@ layout("/layouts/platform.html"){ }) }, // 再次提交 - onFinishTask() { + async onFinishTask() { + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -289,6 +317,7 @@ layout("/layouts/platform.html"){ + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html index 52c95cfa..77486188 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html @@ -87,6 +87,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html index a799f015..f9ece2fc 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html @@ -86,6 +86,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/collect/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/collect/index.html index 40e5fe3a..f02fedc0 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/collect/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/collect/index.html @@ -5,6 +5,9 @@ layout("/layouts/platform_h5.html"){
+ + + - - - diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html new file mode 100644 index 00000000..6c17e2ca --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html @@ -0,0 +1,377 @@ + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。
+ 说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。 +
+ + + + + + + + +
+ 保存 + 提交 + 提交1 +
+
+
+
+ + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/collect/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/collect/index.html new file mode 100644 index 00000000..66613382 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/collect/index.html @@ -0,0 +1,127 @@ + + +
+ + + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js new file mode 100644 index 00000000..5124e59a --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js @@ -0,0 +1,122 @@ +const DSZNFMTX_INFO = { + template: + /*language=HTML*/` + +
+ + {{ viewData.userName }} + {{ viewData.sex }} + {{ viewData.birthday }} + {{ viewData.unitName }} + {{ viewData.retireTime }} + {{ viewData.loverName }} + {{ viewData.loverSex }} + {{ viewData.loverUnitName }} + {{ viewData.loverBirthday }} + {{ viewData.loverBirthday }} + {{ viewData.getCertificateTime }} + {{ viewData.childrenGraceNumber }} + {{ viewData.office }} + {{ viewData.bonus }} + + + + + + + + + + + + + +
+ +
+ `, + dicts: ["PROCESS_TASK_SUBMIT_TYPE"], + data() { + return { + visible:false, + viewData: {}, + doneTasks: [], + row: null, + } + }, + methods: { + onOpen(row) { + this.row = row + this.visible = true + this.getInfo() + this.getDoneTasks() + }, + // 关闭 + onClose(){ + this.visible = false + }, + // 获取申请信息 + getInfo() { + this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.row.id}).then((res) => { + if (res.code === 0) { + this.viewData = res.data + } + }) + }, + // 查看 + openView(id) { + this.$nextTick(() => { + this.$refs.infoDialogRef.onOpen(id) + }) + }, + // 获取已办任务审批记录 + getDoneTasks() { + this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => { + if (res.code === 0) { + this.doneTasks = res.data + } + }) + }, + }, + +} diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/mine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/mine/index.html new file mode 100644 index 00000000..45c496ec --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/mine/index.html @@ -0,0 +1,134 @@ + + +
+ + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/schoolAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/schoolAudit/index.html new file mode 100644 index 00000000..24745d5c --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/schoolAudit/index.html @@ -0,0 +1,257 @@ + + +
+ + + + + + + + + + + + + + + + +
+
+ 校工会审核 +
+
+ + + + + + + + + + +
+ 退回到发起人 + 拒绝申请 + 同意申请 +
+
+
+
+
+ + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/unionAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/unionAudit/index.html new file mode 100644 index 00000000..f037939a --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/unionAudit/index.html @@ -0,0 +1,167 @@ + + +
+ + + + + + + + + + + + + + + + +
+
+ 分工会审核 +
+
+ + + + + + + + + + +
+ 退回到发起人 + 拒绝申请 + 同意申请 +
+
+
+
+
+ +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html new file mode 100644 index 00000000..6127bfdd --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html @@ -0,0 +1,465 @@ + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 保存 + 提交 + 提交1 +
+
+
+
+ + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/collect/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/collect/index.html new file mode 100644 index 00000000..566b6c65 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/collect/index.html @@ -0,0 +1,127 @@ + + +
+ + + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/common/info.js b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/common/info.js new file mode 100644 index 00000000..72dc1276 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/common/info.js @@ -0,0 +1,125 @@ +const MATERNITY_LEAVE_INFO = { + template: + /*language=HTML*/` + +
+ + {{ viewData.userName }} + {{ viewData.sex }} + {{ viewData.nation }} + {{ viewData.birthday }} + {{ viewData.unitName }} + {{ viewData.mobile }} + {{ viewData.loverName }} + {{ viewData.loverSex }} + {{ viewData.loverNation }} + {{ viewData.loverBirthday }} + {{ viewData.loverUnitName }} + + + + {{ viewData.withLeave }} + {{ viewData.parentalLeave }} + {{ viewData.maternityLeave }} + {{ viewData.extendLeave }} + {{ viewData.birthsLeave }} + {{ viewData.difficultLeave }} + {{ viewData.winterLeave }} + {{ viewData.summerLeave }} + {{ viewData.leaveDays }} + {{ viewData.startTime }} + {{ viewData.endTime }} + {{ viewData.childrenBirthday }} + + + + +
+ +
+ `, + dicts: ["PROCESS_TASK_SUBMIT_TYPE"], + data() { + return { + visible:false, + viewData: {}, + doneTasks: [], + row: null, + } + }, + methods: { + onOpen(row) { + this.row = row + this.visible = true + this.getInfo() + this.getDoneTasks() + }, + // 关闭 + onClose(){ + this.visible = false + }, + // 获取申请信息 + getInfo() { + this.$axios.post("/platform/maternityLeave/apply/findOne", {id: this.row.id}).then((res) => { + if (res.code === 0) { + this.viewData = res.data + } + }) + }, + // 查看 + openView(id) { + this.$nextTick(() => { + this.$refs.infoDialogRef.onOpen(id) + }) + }, + // 获取已办任务审批记录 + getDoneTasks() { + this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => { + if (res.code === 0) { + this.doneTasks = res.data + } + }) + }, + }, + +} diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/mine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/mine/index.html new file mode 100644 index 00000000..2f136a74 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/mine/index.html @@ -0,0 +1,133 @@ + + +
+ + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/schoolAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/schoolAudit/index.html new file mode 100644 index 00000000..be0d9ee5 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/schoolAudit/index.html @@ -0,0 +1,167 @@ + + +
+ + + + + + + + + + + + + + + + +
+
+ 校工会审核 +
+
+ + + + + + + + + + +
+ 退回到发起人 + 拒绝申请 + 同意申请 +
+
+
+
+
+ +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/unionAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/unionAudit/index.html new file mode 100644 index 00000000..87334f18 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/unionAudit/index.html @@ -0,0 +1,167 @@ + + +
+ + + + + + + + + + + + + + + + +
+
+ 分工会审核 +
+
+ + + + + + + + + + +
+ 退回到发起人 + 拒绝申请 + 同意申请 +
+
+
+
+
+ +
+ + + + From c8c83e5abd850f78a2ceff6bef6bd019d5d447d1 Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 19 Sep 2025 14:08:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=94=9F=E8=82=B2=E4=BC=91=E5=81=87?= =?UTF-8?q?=E3=80=81=E7=8B=AC=E7=94=9F=E5=AD=90=E5=A5=B3=E7=88=B6=E6=AF=8D?= =?UTF-8?q?=E9=80=80=E4=BC=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../staffbenefit/dsznfmtx/apply/index.html | 466 ++++++++++-------- .../zhgh/staffbenefit/dsznfmtx/common/info.js | 6 + .../dsznfmtx/schoolAudit/index.html | 6 +- .../dsznfmtx/unionAudit/index.html | 6 +- .../maternityLeave/apply/index.html | 4 - .../maternityLeave/common/info.js | 13 +- .../maternityLeave/schoolAudit/index.html | 4 +- .../maternityLeave/unionAudit/index.html | 5 +- .../staffbenefit/dsznfmtx/apply/index.html | 11 +- .../staffbenefit/dsznfmtx/common/info.js | 9 +- .../maternityLeave/apply/index.html | 2 +- 11 files changed, 296 insertions(+), 236 deletions(-) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html index 928284ac..a9569d89 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html @@ -3,164 +3,156 @@ layout("/layouts/platform.html"){ #-->
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。
+ 说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。 +
+
+ +
+ + 保存 + 提交 + 提交1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。
- 说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。 -
-
- -
- - 保存 - 提交 - 提交1 -
@@ -176,9 +168,23 @@ layout("/layouts/platform.html"){ taskId: GetQueryString("taskId"), formData: {}, formRules: { - declarationAgreed: [ - { required: true, message: '请勾选申报理由', trigger: 'change' } - ] + userName: [{ required: true, message: '职工姓名不能为空', trigger: 'blur' }], + sex: [{ required: true, message: '性别不能为空', trigger: 'blur' }], + birthday: [{ required: true, message: '出生年月不能为空', trigger: 'blur' }], + unitName: [{ required: true, message: '原工作单位不能为空', trigger: 'blur' }], + retireTime: [{ required: true, message: '请选择退休时间', trigger: 'change' }], + loverName: [{ required: true, message: '请输入爱人姓名', trigger: 'blur' }], + loverSex: [{ required: true, message: '请选择爱人性别', trigger: 'change' }], + loverUnitName: [{ required: true, message: '请输入爱人工作单位', trigger: 'blur' }], + marryTime: [{ required: true, message: '请选择结婚日期', trigger: 'change' }], + childrenBirthday: [{ required: true, message: '请选择子女出生日', trigger: 'change' }], + getCertificateTime: [{ required: true, message: '请选择领独生子女证日', trigger: 'change' }], + childrenGraceNumber: [{ required: true, message: '请输入独生子女光荣证号', trigger: 'blur' }], + office: [{ required: true, message: '请输入办证机关', trigger: 'blur' }], + honorFiles: [{ required: true, message: '请上传独生子女父母光荣证', trigger: 'change' }], + retireFiles: [{ required: true, message: '请上传退休证', trigger: 'change' }], + sign: [{ required: true, message: '请签字', trigger: 'change' }], + declarationAgreed: [{ required: true, message: '请勾选申报理由', trigger: 'change', type: 'enum', enum: [true] }] }, } }, @@ -199,54 +205,101 @@ layout("/layouts/platform.html"){ }) }) }, - // 提交 - onSubmit() { - this.$refs.formRef.validate((valid) => { - if (valid) { - this.$confirm("您确定要提交吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - this.$axios.post('/platform/dsznfmtx/apply/submit', { - data: JSON.stringify(this.formData) - }).then(res => { - if (res.code === 0) { - this.$message.success("提交成功") - commonUtil.pjaxPush('/platform/dsznfmtx/mine/index') - } - }) - }) - } else { - this.$message.error('请完善表单信息并勾选申报理由'); - return false; - } + // 提交验证 + validateBeforeSubmit() { + return new Promise((resolve) => { + this.$refs.formRef.validate((valid) => { + if (valid) { + resolve(true); + } else { + this.$message.error('请完善表单信息并勾选申报理由'); + resolve(false); + } + }); }); }, - // 再次提交 - onFinishTask() { - this.$refs.formRef.validate((valid) => { - if (valid) { - this.$confirm("您确定要提交吗?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - this.$axios.post('/platform/dsznfmtx/apply/submitAgain', { - data: JSON.stringify(this.formData), - taskId: GetQueryString("taskId") - }).then(res => { - if (res.code === 0) { - this.$message.success("提交成功") - commonUtil.pjaxPush('/platform/dsznfmtx/mine/index') - } - }) - }) - } else { - this.$message.error('请完善表单信息并勾选申报理由'); - return false; + // 添加检查是否为退休人员的方法 + async checkRetirementStatus() { + try { + const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkRetirementStatus'); + // 如果返回code为0且data为true,表示用户是退休人员 + if (resp.code === 0 && resp.data === true) { + return true; } - }); + return false; + } catch (error) { + console.error('检查退休状态失败:', error); + return false; + } + }, + // 检查用户是否已申请过 + async checkUserApplication() { + try { + const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkUserApplied'); + // 如果返回code为0且data为true,表示用户已申请过 + if (resp.code === 0 && resp.data === true) { + return true; + } + return false; + } catch (error) { + console.error('检查用户申请状态失败:', error); + return false; + } + }, + // 提交 + async onSubmit() { + // 检查是否为退休人员 + const isRetired = await this.checkRetirementStatus(); + if (!isRetired) { + this.$message.warning('您不是退休人员,无法申请此项福利'); + return; + } + + if (!this.bizId) { + const isApplied = await this.checkUserApplication(); + if (isApplied) { + this.$message.warning('您已经提交过申请,不能重复申请'); + return; + } + } + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + + this.$confirm("您确定要提交吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.$axios.post('/platform/dsznfmtx/apply/submit', { + data: JSON.stringify(this.formData) + }).then(res => { + if (res.code === 0) { + this.$message.success("提交成功") + commonUtil.pjaxPush('/platform/dsznfmtx/mine/index') + } + }) + }) + }, + // 再次提交 + async onFinishTask() { + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + + this.$confirm("您确定要提交吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.$axios.post('/platform/dsznfmtx/apply/submitAgain', { + data: JSON.stringify(this.formData), + taskId: GetQueryString("taskId") + }).then(res => { + if (res.code === 0) { + this.$message.success("提交成功") + commonUtil.pjaxPush('/platform/dsznfmtx/mine/index') + } + }) + }) }, async findOne(id) { const resp = await $.get('/platform/dsznfmtx/apply/findOne', {id}) @@ -272,9 +325,7 @@ layout("/layouts/platform.html"){ sex: sex, birthday: birthday, } - } - } }, created() { @@ -284,6 +335,7 @@ layout("/layouts/platform.html"){ + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js index e65bb213..567ccfc5 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/common/info.js @@ -63,6 +63,12 @@ const DSZNFMTX_INFO = { {{ task.taskFormData.opinion }} + + + 暂无 +
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html index d18b3e05..f0e8edb0 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/schoolAudit/index.html @@ -88,9 +88,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> - - - + + + 取消 diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html index 96d6d712..94a9507a 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/unionAudit/index.html @@ -86,9 +86,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> - - - + + + 取消 diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html index f599d1c9..034e96a2 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html @@ -111,12 +111,8 @@ layout("/layouts/platform.html"){ {{formData.leaveDays}} - - - - {{viewData.winterLeave}} {{viewData.summerLeave}} - {{viewData.leaveDays}} - + {{viewData.leaveDays}} - - {{viewData.startTime}} {{viewData.endTime}} {{viewData.childrenBirthday}} @@ -76,9 +73,15 @@ const maternityLeaveInfo = { - {{ + {{ task.taskFormData.opinion }} + + + 暂无 +
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html index 77486188..7de9ea33 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/schoolAudit/index.html @@ -87,8 +87,8 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
- - + + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html index f9ece2fc..dd273a85 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/unionAudit/index.html @@ -86,8 +86,8 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> - - + + @@ -131,6 +131,7 @@ layout("/layouts/platform.html"){ methods: { onView(row) { this.$refs.guava.view(()=>{ + this.showApprovalForm = false; this.$refs.maternityLeaveInfoRef.onOpen(row) }) }, diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html index 6c17e2ca..848c776b 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html @@ -9,7 +9,7 @@ layout("/layouts/platform_h5.html"){ }
-
@@ -101,10 +101,11 @@ layout("/layouts/platform_h5.html"){ > - - - - + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js index 5124e59a..7db1a8ac 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js @@ -24,10 +24,11 @@ const DSZNFMTX_INFO = { - - - - + + +