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 a83931e7..870b9e57 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 @@ -56,13 +56,25 @@ public class ProposalSecondedController { @Inject private ProposalSecondedService proposalSecondedService; - @At("") @Ok("beetl:/platform/zhgh/democratic/proposal/transact/seconded/index.html") @SaCheckPermission("proposal.seconded") public void index() { } + @At(value = "/platform/h5/proposal/seconded",top = true) + @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/seconded/index.html") + @SaCheckPermission("proposal.seconded") + public void h5Index() { + } + + @At(value = "/platform/h5/proposal/seconded/approval",top = true) + @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/seconded/approval.html") + @SaCheckPermission("proposal.seconded") + public void h5Approval(){ + + } + @At @SaCheckPermission("proposal.seconded") public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) { @@ -121,14 +133,4 @@ public class ProposalSecondedController { return Result.success(pagination); } - @At - @SaCheckPermission("proposal.seconded") - @ApiOperation("附议") - @Aop(TransAop.READ_COMMITTED) - @SLog(tag = "提案", msg = "提案人附议") - public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) { - proposalSecondedService.approval(approvalParam); - return Result.success(); - } - } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalWriteController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalWriteController.java index c13813a4..3e8fd19e 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalWriteController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/transact/ProposalWriteController.java @@ -59,7 +59,7 @@ public class ProposalWriteController { public void index() { } - @At("") + @At(value = "/platform/h5/proposal/write",top = true) @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/write/index.html") @SaCheckPermission("proposal.write") public void h5Index(){ diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/h5controller/H5ProposalWriteController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/h5controller/H5ProposalWriteController.java deleted file mode 100644 index 0b654d59..00000000 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/h5controller/H5ProposalWriteController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.budwk.app.zhgh.democratic.proposal.h5controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import io.swagger.annotations.Api; -import org.nutz.ioc.loader.annotation.IocBean; -import org.nutz.mvc.annotation.At; -import org.nutz.mvc.annotation.Ok; - -@IocBean -@At("/platform/h5/proposal/write") -@Ok("json:full") -@Api("h5提案撰写") -public class H5ProposalWriteController { - - @At("") - @Ok("beetl:/platform/zhghh5/democratic/proposal/transact/write/index_.html") - @SaCheckPermission("h5.proposal.write") - public void index() { - } -} 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 6adcbbd6..a9b0a910 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 @@ -1,9 +1,9 @@ const H5_PROPOSAL_INFO_COMPONENT = { name: "ProposalInfo", - template: ` + template: /*language=HTML*/ `
-
基本信息
- +
基本信息
+
{{ viewData.name }} @@ -24,7 +24,7 @@ const H5_PROPOSAL_INFO_COMPONENT = { - +
@@ -35,195 +35,94 @@ const H5_PROPOSAL_INFO_COMPONENT = {
-
+
-
+
- - - - - - -
- -
+ + + + + + + + +
附议人信息 -
- - - + + + +
- `, - dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT"], + `, + dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT","PROCESS_TASK_SUBMIT_TYPE"], data() { return { viewData: {}, + doneTasks: [], + row: null, viewDialogVisible: false } }, methods: { - onOpen(id) { - this.$axios.post("/platform/proposal/common/proposalInfo", { id }).then((res) => { + // 打开 + onOpen(row) { + this.row = row + this.visible = true + this.getInfo() + this.getDoneTasks() + }, + // 获取申请信息 + getInfo() { + this.$axios.post("/platform/proposal/common/proposalInfo", {id: this.row.id}).then((res) => { if (res.code === 0) { this.viewData = res.data } }) }, + + // 查看提案 openView(id) { - // this.viewDialogVisible = true - // this.$nextTick(() => { - // this.$refs.infoDialogRef.onOpen(id) - // }) - } + this.viewDialogVisible = true + 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/democratic/proposal/transact/mine/index.html b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/mine/index.html index 3662af3e..7378380c 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/mine/index.html @@ -13,17 +13,45 @@ layout("/layouts/platform_h5.html"){ v-model="pageForm.name" > - - + @@ -39,8 +67,8 @@ layout("/layouts/platform_h5.html"){
+ + 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 af03d7ed..caa05971 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 @@ -21,28 +21,30 @@ layout("/layouts/platform_h5.html"){ - - -
-
-
{{row.name}}
- - - - - - - -
+ + + + @@ -82,10 +84,6 @@ layout("/layouts/platform_h5.html"){ approvalText: "0", approval: false }, - tableData: [], - tableLoading: false, - tableFinished: false, - tableRefreshing: false, sessionOptions: [], infoShow: false, @@ -110,9 +108,12 @@ layout("/layouts/platform_h5.html"){ openApproval(row) { this.infoShow = true this.$nextTick(() => { - this.$refs.infoRef.onOpen(row.id) - this.formData = row.approvalParam this.showApprovalForm = true + this.$refs.infoRef.onOpen(row.id) + this.formData = { + processTaskId: row.taskId, + taskName: row.curTaskName + } }) }, doApproval(approvalType) { diff --git a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html index fab11283..d4bce771 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html @@ -7,11 +7,11 @@ layout("/layouts/platform_h5.html"){
-
- + @@ -124,7 +127,7 @@ layout("/layouts/platform_h5.html"){ v-model="formData.typeName" is-link readonly - name="提案类别" + name="typeName" label="提案类别" placeholder="请选择提案类别" @click="showTypePicker = true" @@ -144,12 +147,14 @@ layout("/layouts/platform_h5.html"){ @@ -177,15 +184,15 @@ layout("/layouts/platform_h5.html"){ - + + + + + + + + + @@ -242,10 +249,6 @@ layout("/layouts/platform_h5.html"){ } }, methods: { - onClickLeft() { - history.back(); - }, - // 选择器确认事件 onSessionConfirm(value) { this.formData.sessionId = value.value; @@ -278,12 +281,7 @@ layout("/layouts/platform_h5.html"){ async onSave() { // 表单验证 try { - await this.$refs.addForm.validate(); - - if (!this.formData.name || this.formData.name.trim().length < 1) { - this.$toast("请填写提案名称"); - return; - } + await this.$refs.formRef.validate(); this.$toast.loading({ message: '保存中...', @@ -295,10 +293,7 @@ layout("/layouts/platform_h5.html"){ this.$toast.clear(); if (res.code === 0) { this.$toast.success(res.msg); - this.formData = res.data; - setTimeout(() => { - pjaxReplace('/platform/h5/proposal/mine') - }, 1500); + pjaxReplace('/platform/h5/proposal/mine') } else { this.$toast.fail(res.msg || '保存失败'); } @@ -316,7 +311,7 @@ layout("/layouts/platform_h5.html"){ // 提交 async onSubmit() { try { - await this.$refs.addForm.validate(); + await this.$refs.formRef.validate(); if (!this.formData.name || this.formData.name.trim().length < 1) { this.$toast("请填写提案名称"); @@ -324,7 +319,7 @@ layout("/layouts/platform_h5.html"){ } if (this.formData.brief.length < this.proposalConfig.briefMinLength) { - this.$toast("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字"); + this.$toast("案由" + this.proposalConfig.briefMinLength + "字"); return; } @@ -342,9 +337,7 @@ layout("/layouts/platform_h5.html"){ this.$toast.clear(); if (res.code === 0) { this.$toast.success("提交成功"); - setTimeout(() => { - pjaxReplace('/platform/h5/proposal/mine') - }, 1500); + pjaxReplace('/platform/h5/proposal/mine') } else { this.$toast.fail(res.msg || '提交失败'); } @@ -365,7 +358,7 @@ layout("/layouts/platform_h5.html"){ // 重新提交 async onSubmitAgain() { try { - await this.$refs.addForm.validate(); + await this.$refs.formRef.validate(); if (!this.formData.name || this.formData.name.trim().length < 1) { this.$toast("请填写提案名称"); @@ -388,7 +381,7 @@ layout("/layouts/platform_h5.html"){ this.$axios.post('/platform/proposal/write/submitAgain', { info: JSON.stringify(this.formData), - taskId: this.$utils.getQueryString("taskId") + taskId: this.taskId }).then(res => { this.$toast.clear(); if (res.code === 0) { @@ -466,6 +459,10 @@ layout("/layouts/platform_h5.html"){ await this.searchMineDelegation(); // 检查是否在撰写时间内 this.checkWriteTime(); + } else { + await this.listDelegation(); + await this.listSource(); + this.echoPicker() } } }); @@ -508,28 +505,28 @@ layout("/layouts/platform_h5.html"){ }); }, + // 回显 + echoPicker() { + // 设置选择器显示值 + + this.$set(this.formData, "sessionName", this.sessionOptions.find(item => item.id === this.formData.sessionId)?.fullName) + + const delegation = this.delegationOptions.find(item => item.id === this.formData.delegationId); + this.$set(this.formData, "delegationName", delegation?.name) + + const source = this.sourceOptions.find(item => item.code === this.formData.source); + this.$set(this.formData, "sourceName", source?.name) + + + const type = this.typeOptions.find(item => item.id === this.formData.typeId); + this.$set(this.formData, "typeName", type?.name) + }, + init() { if (this.bizId) { this.$axios.post("/platform/proposal/write/detail", {id: this.bizId}).then((res) => { if (res.code === 0) { this.formData = res.data; - - // // 设置选择器显示值 - // const delegation = this.delegationOptions.find(item => item.id === this.formData.delegationId); - // if (delegation) { - // this.formData.delegationName = delegation.name; - // } - // - // const source = this.sourceOptions.find(item => item.code === this.formData.source); - // if (source) { - // this.sourceName = source.name; - // } - // - // const type = this.typeOptions.find(item => item.id === this.formData.typeId); - // if (type) { - // this.typeName = type.name; - // } - this.listOpenSession(true); } });