diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalMineController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalMineController.java index fc56056..75539fa 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalMineController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalMineController.java @@ -343,6 +343,7 @@ public class ProposalMineController { seconded.setUnionName(item.getString("unionName")); seconded.setDelegationName(item.getString("delegationName")); seconded.setMobile(item.getString("mobile")); + seconded.setMode(true); seconded.setInviteTime(new Date()); return seconded; }).toList(); diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalPositiveSecondedController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalPositiveSecondedController.java new file mode 100644 index 0000000..ce179d2 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalPositiveSecondedController.java @@ -0,0 +1,179 @@ +package com.budwk.app.zhgh.democratic.proposal.controller.transact; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; +import cn.hutool.core.util.ObjectUtil; +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.flow.enums.ProcessSubmitTypeEnum; +import com.budwk.app.sys.views.View_user; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig; +import com.budwk.app.zhgh.democratic.proposal.models.ProposalSecond; +import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam; +import com.budwk.app.zhgh.democratic.proposal.service.ProposalSecondedService; +import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService; +import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate; +import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation; +import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session; +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.dao.util.cri.Static; +import org.nutz.ioc.aop.Aop; +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; + +import javax.validation.Valid; +import java.util.Date; +import java.util.List; + +/** + * @ClassName ProposalPositiveSecondedController + * @Author JyuHsin + * @Date 2026/1/27 14:27 + * @Version 1.0 + * @Description TODO + */ +@IocBean +@At("/platform/proposal/positiveSeconded") +@Slf4j +@Ok("json:full") +@Api(tags = "提案管理系统-提案主动附议") +public class ProposalPositiveSecondedController { + + @Inject + private Dao dao; + @Inject + private ProposalSecondedService proposalSecondedService; + @Inject + private ProposalCommonService proposalCommonService; + + @At("") + @Ok("beetl:/platform/zhgh/democratic/proposal/transact/positiveSeconded/index.html") + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public void index() { + } + + @At("/h5") + @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/positiveSeconded/index.html") + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public void h5Index() { + } + + @At + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) { + Sql sql = Sqls.create(""" + SELECT + info.*, + type.name AS typeName, + tcs.fullName AS sessionName, + tcd.`name` AS delegationName, + ins.state instanceState, + t.displayName taskName, + IFNULL(GROUP_CONCAT(DISTINCT t.displayName),'结束') curTaskName, + sum( CASE WHEN ps.seconderId=@seconderId and ps.isAgree is not null THEN 1 ELSE 0 END ) as count + FROM + `proposal_info` info + LEFT JOIN proposal_second ps ON ps.proposalId = info.id + LEFT JOIN proposal_type type on type.id = info.typeId + LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId + LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId + LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id + LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10 + $condition + """); + Cnd cnd = Cnd.NEW(); + sql.setCondition(cnd); + sql.setParam("seconderId", SecurityUtil.getUserId()); + + cnd.and("t.taskName", "in", List.of("invite", "second", "delegation", "committee")); + cnd.and("ins.id", "is not", null); + + if (approval) { + cnd.and("ps.seconderId", "=", SecurityUtil.getUserId()); + cnd.and("ps.mode", "=", false); + cnd.and("ps.isAgree", "is not", null); + } else { + cnd.and(new Static("info.id not in (select proposalId from proposal_second where seconderId = '%s' and isAgree is not null)".formatted(SecurityUtil.getUserId()))); + } + + cnd.groupBy("info.id"); + ProposalSearchParam.buildSearch(cnd, pageForm); + + Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @Aop(TransAop.READ_COMMITTED) + @ApiOperation("主动附议") + @SLog(tag = "提案管理系统-主动附议", msg = "主动附议") + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public Result handle(@Param("proposalId") String proposalId, + @Param("opinion") String opinion, + @Param("submitType") Integer submitType) { + View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())); + + // 查询当前用户所属的教代会 + Teacher_congress_session session = dao.fetch(Teacher_congress_session.class, Cnd.where("enable", "=", 1).desc("startDate")); + Teacher_congress_delegate delegate = dao.fetch(Teacher_congress_delegate.class, Cnd.where("sessionId", "=", session.getId()).and("userId", "=", user.getId())); + + if (delegate == null) { + return Result.error("未查询到您的代表信息"); + } + + Teacher_congress_delegation delegation = dao.fetch(Teacher_congress_delegation.class, delegate.getDelegationId()); + if (delegation == null) { + return Result.error("未查询到您所在的代表团信息"); + } + + ProposalSecond seconded = new ProposalSecond(); + seconded.setProposalId(proposalId); + seconded.setSeconderId(user.getId()); + seconded.setUserName(user.getUsername()); + seconded.setLoginName(user.getLoginname()); + seconded.setUnitName(user.getUnitName()); + seconded.setUnionName(user.getUnionName()); + seconded.setDelegationName(delegation.getName()); + seconded.setMobile(user.getMobile()); + seconded.setMode(false); + seconded.setInviteTime(new Date()); + seconded.setOpinion(opinion); + seconded.setSecondedTime(new Date()); + seconded.setIsAgree(ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.AGREE.getCode())); + + dao.insert(seconded); + return Result.success(); + } + + @At + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public Result listPositiveSeconded(String bizId) { + List list = dao.query(ProposalSecond.class, Cnd.where(ProposalSecond::getProposalId, "=", bizId).and(ProposalSecond::getMode, "=", false)); + return Result.success(list); + } + + @At + @SaCheckPermission(value = {"proposal.positiveSeconded", "proposal.positiveSeconded.h5"}, mode = SaMode.OR) + public Result validateTime() { + ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.NEW()); + if(System.currentTimeMillis() < config.getSecondedStartTime().getTime()) { + return Result.error(99, "主动附议时间未开始"); + } + if(System.currentTimeMillis() > config.getSecondedEndTime().getTime()) { + return Result.error(99, "主动附议时间已结束"); + } + return Result.success(); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalSecondedController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalSecondedController.java index 0d6c726..c544b56 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalSecondedController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalSecondedController.java @@ -1,28 +1,38 @@ package com.budwk.app.zhgh.democratic.proposal.controller.transact; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.constant.RoleConstant; 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.bpm.service.BpmService; +import com.budwk.app.flow.enums.ProcessSubmitTypeEnum; import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo; +import com.budwk.app.zhgh.democratic.proposal.models.ProposalSecond; import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam; import com.budwk.app.zhgh.democratic.proposal.service.ProposalSecondedService; import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService; 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.validation.Valid; import java.util.List; @@ -37,89 +47,111 @@ import java.util.List; @Api(tags = "提案管理系统-提案附议") public class ProposalSecondedController { - @Inject - private Dao dao; - @Inject - private BaseService baseService; - @Inject - private ProposalCommonService proposalCommonService; - @Inject - private BpmService bpmService; - @Inject - private ProposalSecondedService proposalSecondedService; + @Inject + private Dao dao; + @Inject + private BaseService baseService; + @Inject + private ProposalCommonService proposalCommonService; + @Inject + private BpmService bpmService; + @Inject + private ProposalSecondedService proposalSecondedService; - @At("") - @Ok("beetl:/platform/zhgh/democratic/proposal/transact/seconded/index.html") - @SaCheckPermission("proposal.seconded") - public void index() { - } + @At("") + @Ok("beetl:/platform/zhgh/democratic/proposal/transact/seconded/index.html") + @SaCheckPermission("proposal.seconded") + public void index() { + } - @At("/h5") - @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/seconded/index.html") - @SaCheckPermission("proposal.seconded") - public void h5Index() { - } + @At("/h5") + @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/seconded/index.html") + @SaCheckPermission("proposal.seconded") + public void h5Index() { + } - @At - @SaCheckPermission("proposal.seconded") - public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) { - Sql sql = Sqls.create(""" - SELECT - info.*, - type.name AS typeName, - tcs.fullName AS sessionName, - tcd.`name` AS delegationName, - ins.id AS instanceId, - ins.businessNo, - ins.state instanceState, - ins.variable instanceVariable, - ins.processDefineId instanceProcessDefineId, - t.id taskId, - t.taskName AS taskKey, - t.displayName taskName, - t.taskType, - t.performType taskPerformType, - t.taskState, - t.finishTime, - t.taskParentId, - t.variable taskVariable, - ta.actorName taskActorName, - IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, - IF(rt.id IS NOT NULL, 1, 0) AS canRevoke - FROM - wf_process_task t - LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId - LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id - LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10 - LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10 - LEFT JOIN proposal_info info ON info.id = ins.businessNo - LEFT JOIN proposal_type type on type.id = info.typeId - LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId - LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId - $condition - """); - Cnd cnd = Cnd.NEW(); - cnd.and("t.taskName", "=", "second"); + @At + @SaCheckPermission("proposal.seconded") + public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) { + Sql sql = Sqls.create(""" + SELECT + info.*, + type.name AS typeName, + tcs.fullName AS sessionName, + tcd.`name` AS delegationName, + ins.id AS instanceId, + ins.businessNo, + ins.state instanceState, + ins.variable instanceVariable, + ins.processDefineId instanceProcessDefineId, + t.id taskId, + t.taskName AS taskKey, + t.displayName taskName, + t.taskType, + t.performType taskPerformType, + t.taskState, + t.finishTime, + t.taskParentId, + t.variable taskVariable, + ta.actorId taskActorUserId, + ta.actorName taskActorName, + IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, + IF(rt.id IS NOT NULL, 1, 0) AS canRevoke + FROM + wf_process_task t + LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId + LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10 + LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10 + LEFT JOIN proposal_info info ON info.id = ins.businessNo + LEFT JOIN proposal_type type on type.id = info.typeId + LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId + LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and("t.taskName", "=", "second"); - if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) { - cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); - } + if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) { + cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + } - if (approval) { - cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); - } else { - cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); - } - ProposalSearchParam.buildSearch(cnd, pageForm); - cnd.groupBy("t.id"); - cnd.desc("t.createdAt"); - sql.setCondition(cnd); - Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); - List list = pagination.getList(NutMap.class); - for (NutMap row : list) { + if (approval) { + cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); + } else { + cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); + } + ProposalSearchParam.buildSearch(cnd, pageForm); + cnd.groupBy("t.id"); + cnd.desc("t.createdAt"); + sql.setCondition(cnd); + Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + List list = pagination.getList(NutMap.class); + for (NutMap row : list) { // String instanceId = row.getString("instanceId"); - } - return Result.success(pagination); - } + } + return Result.success(pagination); + } + @At + @SaCheckPermission("proposal.seconded") + @Aop(TransAop.READ_COMMITTED) + @ApiOperation("修改提案附议信息") + @SLog(tag = "提案管理系统-附议提案", msg = "修改提案附议信息") + public Result updateInfo(@Param("proposalId") String proposalId, + @Param("taskActorUserId") String taskActorUserId, + @Param("opinion") String opinion, + @Param("submitType") Integer submitType) { + // 查询附议信息表 + ProposalSecond proposalSecond = dao.fetch( + ProposalSecond.class, + Cnd.where(ProposalSecond::getProposalId, "=", proposalId) + .and(ProposalSecond::getSeconderId, "=", taskActorUserId) + ); + proposalSecond.setIsAgree(ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.AGREE.getCode())); + proposalSecond.setOpinion(opinion); + proposalSecond.setSecondedTime(DateUtil.date()); + dao.update(proposalSecond); + return Result.success(); + } } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalConfig.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalConfig.java index c1612fa..feaf998 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalConfig.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalConfig.java @@ -1,5 +1,6 @@ package com.budwk.app.zhgh.democratic.proposal.models; +import cn.hutool.core.date.DateTime; import com.budwk.app.base.model.BaseModel; import lombok.Data; import lombok.EqualsAndHashCode; @@ -60,4 +61,14 @@ public class ProposalConfig extends BaseModel { @Comment("校领导单位") @ColDefine(type = ColType.MYSQL_JSON) private List schoolLeaderUnitIds; + + @Column + @Comment("附议开始时间") + @ColDefine(type = ColType.DATETIME) + private DateTime secondedStartTime; + + @Column + @Comment("附议结束时间") + @ColDefine(type = ColType.DATETIME) + private DateTime secondedEndTime; } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalSecond.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalSecond.java index 46080d5..4dbf51f 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalSecond.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/models/ProposalSecond.java @@ -77,4 +77,14 @@ public class ProposalSecond extends BaseModel { @ColDefine(type = ColType.BOOLEAN) private Boolean isAgree; + @Column + @Comment("附议类型,true表示正常邀请,false表示主动附议") + @ColDefine(type = ColType.BOOLEAN) + @Default("1") + private Boolean mode; + + @Column + @Comment("附议人内容") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String opinion; } diff --git a/src/main/resources/static/components/plugins/sysCard/index.vue b/src/main/resources/static/components/plugins/sysCard/index.vue new file mode 100644 index 0000000..b635275 --- /dev/null +++ b/src/main/resources/static/components/plugins/sysCard/index.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/main/resources/views/layouts/v4/baseLayout.html b/src/main/resources/views/layouts/v4/baseLayout.html index 56f649c..dc9a561 100644 --- a/src/main/resources/views/layouts/v4/baseLayout.html +++ b/src/main/resources/views/layouts/v4/baseLayout.html @@ -392,6 +392,7 @@ Vue.component("excel-import", httpVueLoader("/components/plugins/sysImport/excelImport.vue?v=" + new Date().getTime())) Vue.component("flow-form-button", httpVueLoader("/components/plugins/flowable/formButton.vue?v=" + new Date().getTime())) Vue.component("snaker-flow", httpVueLoader("/components/plugins/snaker/snakerFlow.vue?v=" + new Date().getTime())) + Vue.component("custom-card", httpVueLoader("/components/plugins/sysCard/index.vue?v=" + new Date().getTime())) Vue.component( "snaker-flow-task-form-action", httpVueLoader("/components/plugins/snaker/snakerFlowTaskFormAction.vue?v=" + new Date().getTime()) diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js b/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js index 8eedeef..8dab39f 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js @@ -137,8 +137,34 @@ const PROPOSAL_INFO = { + + + + + + + + + + + + + + + + + + 暂无主动附议信息 + @@ -208,7 +234,8 @@ const PROPOSAL_INFO = { viewData: {}, doneTasks: [], row: null, - viewDialogVisible: false + viewDialogVisible: false, + positiveSecondList: [], } }, methods: { @@ -218,6 +245,7 @@ const PROPOSAL_INFO = { this.visible = true this.getInfo() this.getDoneTasks() + this.listPositiveSeconded() }, // 获取申请信息 @@ -246,6 +274,15 @@ const PROPOSAL_INFO = { }) }, + // 获取主动附议信息 + listPositiveSeconded() { + this.$axios.post("/platform/proposal/positiveSeconded/listPositiveSeconded", {bizId: this.row.id}).then((res) => { + if (res.code === 0) { + this.positiveSecondList = res.data + } + }) + }, + }, style: /*language=CSS*/ diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/config/all/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/config/all/index.html index 605bb90..26fd87f 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/config/all/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/config/all/index.html @@ -19,6 +19,17 @@ layout("/layouts/platform.html"){ + + + + @@ -75,7 +86,8 @@ layout("/layouts/platform.html"){ trigger: ["blur", "change"] } ], - schoolLeaderUnitIds: [{ required: true, message: "请选择校领导单位", trigger: ["blur", "change"] }] + schoolLeaderUnitIds: [{ required: true, message: "请选择校领导单位", trigger: ["blur", "change"] }], + secondedTime: [{ required: true, message: "请选择附议时间", trigger: ["blur", "change"] }], } } }, @@ -89,12 +101,15 @@ layout("/layouts/platform.html"){ this.$axios.post(loc() + "/findOne").then((res) => { if (res.code === 0) { this.formData = res.data + this.$set(this.formData, 'secondedTime', [this.formData.secondedStartTime || '', this.formData.secondedEndTime || '']) } }) }, save() { this.$refs.formRef.validate((valid) => { if (valid) { + this.$set(this.formData, 'secondedStartTime', this.formData.secondedTime[0] || '') + this.$set(this.formData, 'secondedEndTime', this.formData.secondedTime[1] || '') this.$axios .post(loc() + "/update", { config: JSON.stringify(this.formData) diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/positiveSeconded/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/positiveSeconded/index.html new file mode 100644 index 0000000..512da26 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/positiveSeconded/index.html @@ -0,0 +1,240 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + 已附议 + 未附议 + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/seconded/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/seconded/index.html index b3c6e7a..04ebc45 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/seconded/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/seconded/index.html @@ -116,6 +116,7 @@ layout("/layouts/platform.html"){ showApprovalForm: false, sessionOptions: [], delegationOptions: [], + row: {}, } }, methods: { @@ -126,6 +127,7 @@ layout("/layouts/platform.html"){ }) }, openAudit(row) { + this.row = row this.$refs.guava.edit(() => { this.showApprovalForm = true this.formData = { @@ -155,12 +157,22 @@ layout("/layouts/platform.html"){ this.$refs.guava.index() this.$message.success(res.msg) this.doSearch() + this.updateSecond(val) } }) }) }) }, + updateSecond(submitType) { + this.$axios.post("/platform/proposal/seconded/updateInfo", { + proposalId: this.row.id, + taskActorUserId: this.row.taskActorUserId, + opinion: this.formData.tf_opinion, + submitType: submitType, + }) + }, + onRevoke(row) { this.$confirm("您确定要撤回吗?", "提示", { confirmButtonText: "确定", diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/write/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/write/index.html index b1bd7c2..04b4805 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/write/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/write/index.html @@ -5,162 +5,160 @@ layout("/layouts/platform.html"){
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/resources/views/platform/zhghh5/democratic/proposal/common/info.js b/src/main/resources/views/platform/zhghh5/democratic/proposal/common/info.js index c0a910f..e66ea7e 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/proposal/common/info.js +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/common/info.js @@ -108,17 +108,38 @@ const PROPOSAL_INFO = { {{ task.finishTime }} - + - - - + + + + + + + + + + + + + + + + 暂无主动附议信息 + @@ -179,6 +200,7 @@ const PROPOSAL_INFO = { doneTasks: [], row: null, originalRow: null, // 用于保存原始数据,支持返回功能 + positiveSecondList: [], } }, methods: { @@ -188,6 +210,7 @@ const PROPOSAL_INFO = { this.visible = true this.getInfo() this.getDoneTasks() + this.listPositiveSeconded() }, // 关闭 @@ -236,5 +259,14 @@ const PROPOSAL_INFO = { } }) }, + + // 获取主动附议信息 + listPositiveSeconded() { + this.$axios.post("/platform/proposal/positiveSeconded/listPositiveSeconded", {bizId: this.row.id}).then((res) => { + if (res.code === 0) { + this.positiveSecondList = res.data + } + }) + }, } }; diff --git a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/positiveSeconded/index.html b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/positiveSeconded/index.html new file mode 100644 index 0000000..dea0155 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/positiveSeconded/index.html @@ -0,0 +1,222 @@ + +
+ + + + + + + + + + + + + + + + + + + +
+
主动附议
+ + + +
+ 不同意 + 同意 +
+
+
+ +
+ + diff --git a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/seconded/index.html b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/seconded/index.html index f487421..43dccdd 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/seconded/index.html +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/seconded/index.html @@ -98,7 +98,8 @@ layout("/layouts/platform_h5.html"){ showApprovalForm: false, rules: { approvalSignature: [{required: true, message: "请签字"}] - } + }, + row: {}, } }, components: { @@ -131,6 +132,7 @@ layout("/layouts/platform_h5.html"){ }, onApproval(row) { + this.row = row this.showApprovalForm = true this.$refs.proposalInfoRef.onOpen(row) this.formData = { @@ -157,6 +159,7 @@ layout("/layouts/platform_h5.html"){ this.$refs.proposalInfoRef.onClose() this.$toast.success(res.msg) this.doSearch() + this.updateSecond(val) } }) }).catch(() => { @@ -167,6 +170,15 @@ layout("/layouts/platform_h5.html"){ } }, + updateSecond(submitType) { + this.$axios.post("/platform/proposal/seconded/updateInfo", { + proposalId: this.row.id, + taskActorUserId: this.row.taskActorUserId, + opinion: this.formData.tf_opinion, + submitType: submitType, + }) + }, + doSearch() { this.$nextTick(() => { this.pageForm.pageNumber = 1