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/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/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')}} + 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 4f41400c..1c62f3ea 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..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,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..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,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 8aa2e7d2..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}} - - - - { + 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 +255,10 @@ layout("/layouts/platform.html"){ }) }, // 再次提交 - onFinishTask() { + async onFinishTask() { + const isValid = await this.validateBeforeSubmit(); + if (!isValid) return; + this.$confirm("您确定要提交吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -289,6 +313,7 @@ layout("/layouts/platform.html"){ + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js index b0fed3c2..25ba9588 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js @@ -42,11 +42,8 @@ const maternityLeaveInfo = { {{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 52c95cfa..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,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..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,6 +86,9 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 @@ -128,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/activity/culture/applyUser.html b/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html index 7817a123..70ccb58e 100644 --- a/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html +++ b/src/main/resources/views/platform/zhghh5/activity/culture/applyUser.html @@ -8,8 +8,8 @@ layout("/layouts/platform_h5.html"){ } .list-card-body { - /* width: calc(100% - 140px); - display: flex;*/ + width: calc(100% - 140px); + display: flex; flex-direction: column; justify-content: space-between; } @@ -35,9 +35,6 @@ layout("/layouts/platform_h5.html"){ padding: 5px; border-radius: 5px; } - .list-card-img img{ - width: 100%; - }
@@ -47,7 +44,6 @@ layout("/layouts/platform_h5.html"){ - @@ -119,13 +115,12 @@ layout("/layouts/platform_h5.html"){ loading: false, refreshing: false, pageForm: { - state: 1, + state: 2, isEnrolledText: 0, year: new Date().getFullYear(), pageNumber: 1, pageSize: 5, - totalCount: 0, - activity_type: 40001 + totalCount: 0 }, yearList: [], isEnrolledOptions: [ @@ -139,12 +134,7 @@ layout("/layouts/platform_h5.html"){ ], subLoading: false, viewShow: false, - viewData: {}, - activityTypeOptions: [ - { value: 40001, text: "校文化活动" }, - { value: 40002, text: "分工会文化活动" }, - { value: 40003, text: "协会文化活动" }, - ] + viewData: {} } }, components: { diff --git a/src/main/resources/views/platform/zhghh5/activity/culture/signUp.html b/src/main/resources/views/platform/zhghh5/activity/culture/signUp.html index f534f24a..1342c371 100644 --- a/src/main/resources/views/platform/zhghh5/activity/culture/signUp.html +++ b/src/main/resources/views/platform/zhghh5/activity/culture/signUp.html @@ -279,7 +279,7 @@ layout("/layouts/platform_h5.html"){
-
选择报名人员 +
选择报名人员 ,报名人数 {{viewData.unionTeamNum}}人 diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/activity/index.html b/src/main/resources/views/platform/zhghh5/activity/workscollection/activity/index.html deleted file mode 100644 index 7b3a1daa..00000000 --- a/src/main/resources/views/platform/zhghh5/activity/workscollection/activity/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/index.html b/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/index.html new file mode 100644 index 00000000..63466609 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/index.html @@ -0,0 +1,112 @@ + +
+ + + + + + + + + + + + + + + + +
+ + + + + + diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/info.js b/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/info.js new file mode 100644 index 00000000..defb30d3 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/activity/workscollection/mine/info.js @@ -0,0 +1,67 @@ +const INFO = { + template: /*language=HTML*/ + ` +
+ +
+ + + {{ viewData.userName }} + + + {{ viewData.loginName }} + + + {{ viewData.unitName }} + + + {{ viewData.unionName }} + + + {{ viewData.unionName }} + + + {{ viewData.name }} + + + {{ viewData.activityName }} + + + {{ viewData.subjectName }} + + + {{ viewData.worksName }} + + + {{ viewData.description }} + + + + + +
+
+
+ `, + data() { + return { + viewData: {}, + visible: false, + } + }, + methods: { + onOpen(row) { + this.$axios.post("/platform/activity/worksCollection/common/findOne", {id: row.id}).then((res) => { + if (res.code === 0) { + this.viewData = res.data + try { + this.viewData.files = JSON.parse(this.viewData.files) + } catch (err) { + } + } + }) + this.visible = true + }, + + } +} diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/read/index.html b/src/main/resources/views/platform/zhghh5/activity/workscollection/read/index.html new file mode 100644 index 00000000..7de03ab6 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/activity/workscollection/read/index.html @@ -0,0 +1,159 @@ + +
+ + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/applyForm.js b/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/applyForm.js new file mode 100644 index 00000000..df0a511a --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/applyForm.js @@ -0,0 +1,191 @@ +const applyForm = { + template: + /*language=HTML*/ + ` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 提交 +
+
+ +
+
+ `, + data() { + return { + row: {}, + visible: false, + formData: {}, + subjectTypesOptions: [], + showSubjectPicker: false, + + worksTypeOptions: [], + showWorksPicker: false, + + fileAccept: null, + chooseWorksType: {} + } + }, + methods: { + async onOpen(row) { + this.$set(this.formData, 'username', this.$store.state.user.username) + this.$set(this.formData, 'loginname', this.$store.state.user.loginname) + this.$set(this.formData, 'unionName', this.$store.state.user.union.name) + this.$set(this.formData, 'unitName', this.$store.state.user.unit.name) + this.$set(this.formData, 'sex', this.$store.state.user.sex) + this.$set(this.formData, 'activityId', row.id) + await this.activityChange(row.id) + this.row = row + this.visible = true + }, + async onOpenEdit(row) { + const formData = clone(row) + formData.files = JSON.parse(formData.files) + await this.activityChange(formData.activityId) + await this.subjectChange(formData.subjectId) + this.row = formData + this.formData = formData + this.$set(this.formData, 'username', this.$store.state.user.username) + this.$set(this.formData, 'loginname', this.$store.state.user.loginname) + this.$set(this.formData, 'sex', this.$store.state.user.sex) + this.chooseWorksType = this.worksTypeOptions.find((o) => o.id === formData.worksId) + if (this.chooseWorksType.allowFileTypes && this.chooseWorksType.allowFileTypes.length > 0) { + this.fileAccept = this.chooseWorksType.allowFileTypes.map((item) => "." + item).join(",") + } + this.visible = true + }, + onWorksConfirm(value, index) { + this.$set(this.formData, 'worksName', value) + this.$set(this.formData, 'worksId', this.worksTypeOptions[index].id) + this.showWorksPicker = false + this.chooseWorksType = this.worksTypeOptions.find((o) => o.id === this.worksTypeOptions[index].id) + if (this.chooseWorksType.allowFileTypes && this.chooseWorksType.allowFileTypes.length > 0) { + this.fileAccept = this.chooseWorksType.allowFileTypes.map((item) => "." + item).join(",") + } + }, + async onSubjectConfirm(value, index) { + this.$set(this.formData, 'subjectName', value) + this.$set(this.formData, 'subjectId', this.subjectTypesOptions[index].id) + await this.subjectChange(this.subjectTypesOptions[index].id) + this.showSubjectPicker = false + }, + onSubmit() { + this.$refs.formRef.validate().then(() => { + this.$dialog.confirm({ + title: "提示", + message: "您确定要提交吗?" + }).then(() => { + this.$toast.loading({ + message: '提交中...', + forbidClick: true, + }); + this.$axios.post("/platform/activity/worksCollection/upload" + (this.formData.id ? "/update" : "/insert"), {data: JSON.stringify(this.formData)}).then((res) => { + if (res.code === 0) { + this.$toast.clear(); + this.$toast.success("提交成功") + pjaxReplace("/platform/activity/worksCollection/mine/h5") + } + }) + }) + }).catch(); + }, + async activityChange(value) { + const resp = await this.$axios.post("/platform/activity/worksCollection/common/getSubjectTypes", {activityId: value}) + if (resp.code === 0) { + this.subjectTypesOptions = resp.data + } + }, + async subjectChange(value) { + const resp = await this.$axios.post("/platform/activity/worksCollection/common/getWorksTypes", {subjectId: value}) + if (resp.code === 0) { + this.worksTypeOptions = resp.data + } + } + } +} diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/index.html b/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/index.html index 7b592260..5a122c66 100644 --- a/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/index.html +++ b/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/index.html @@ -1,7 +1,166 @@ -22222222222 + +
+ + + + + + + + + + + + + + + + + + +
+ +
{{infoRow.name}}
+ +
+
+
+ + + + 去报名 + + + +
+
+
+ + + + +
+ + + + + diff --git a/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/mine.html b/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/mine.html deleted file mode 100644 index 32818cb7..00000000 --- a/src/main/resources/views/platform/zhghh5/activity/workscollection/upload/mine.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Title - - - diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/asset/stocktaking/info.js b/src/main/resources/views/platform/zhghh5/dayofficework/asset/stocktaking/info.js index d1192e05..1ac57c69 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/asset/stocktaking/info.js +++ b/src/main/resources/views/platform/zhghh5/dayofficework/asset/stocktaking/info.js @@ -84,7 +84,7 @@ const H5_ASSET_INFO = {
{{item.oldAssetNotes}}
- {{item.oldAssetFiles}} + 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..848c776b --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html @@ -0,0 +1,378 @@ + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。
+ 说明: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..7db1a8ac --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/common/info.js @@ -0,0 +1,123 @@ +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..52f2e65d --- /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 @@ + + +
+ + + + + + + + + + + + + + + + +
+
+ 分工会审核 +
+
+ + + + + + + + + + +
+ 退回到发起人 + 拒绝申请 + 同意申请 +
+
+
+
+
+ +
+ + + +