From f65d54d161dc90cfa3182734875195debc56de52 Mon Sep 17 00:00:00 2001 From: liuwu <975499773@qq.com> Date: Mon, 28 Aug 2023 17:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TAmentPartyAffairsController.java | 17 ++++++- .../base/advanceddept/advanceddept.html | 8 ++-- .../base/advancedparty/advancedparty.html | 8 ++-- .../templates/base/affairs/affairs.html | 12 ++--- .../resources/templates/base/affairs/day.html | 21 ++++++--- .../templates/base/affairs/partystyle.html | 21 ++++++--- .../templates/base/affairs/reviewed.html | 46 ++++++++++++------- .../templates/base/affairs/upload.html | 1 - .../templates/base/affairs/warn.html | 2 +- .../templates/base/affairs/year.html | 21 ++++++--- .../mapper/base/TAmentPartyAffairsMapper.xml | 1 + 11 files changed, 102 insertions(+), 56 deletions(-) diff --git a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java index 6ba4546..fff4b98 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java @@ -131,14 +131,29 @@ public class TAmentPartyAffairsController extends BaseController @ResponseBody public AjaxResult reviewedSave(TAmentPartyAffairs tAmentPartyAffairs) { + TAmentPartyAffairs one = tAmentPartyAffairsService.selectTAmentPartyAffairsById(tAmentPartyAffairs.getId()); TAmentReviewedHis his = new TAmentReviewedHis(); his.setPer(tAmentPartyAffairs.getReviewer()); his.setReviewedTime(new Date()); - his.setScore(tAmentPartyAffairs.getScore()); + int before = 0; + if (null != one && null != one.getNowScore()){ + before = Integer.parseInt(one.getNowScore()); + } + int reviewScore = Integer.parseInt(tAmentPartyAffairs.getNowScore()); + his.setScore(tAmentPartyAffairs.getNowScore()); his.setRemark(tAmentPartyAffairs.getRemark()); reviewedHisService.insertTAmentReviewedHis(his); tAmentPartyAffairs.setReviewedId(his.getId()); tAmentPartyAffairs.setStatus("4"); + tAmentPartyAffairs.setNowScore(String.valueOf(reviewScore+before)); + return toAjax(tAmentPartyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs)); + } + + @GetMapping("/reback") + @ResponseBody + public AjaxResult reback(TAmentPartyAffairs tAmentPartyAffairs) + { + tAmentPartyAffairs.setStatus("3"); return toAjax(tAmentPartyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs)); } diff --git a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html index 9e1201d..5d11d17 100644 --- a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html +++ b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html @@ -121,10 +121,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); + actions.push('查看图片 '); + actions.push('下载附件 '); + actions.push('上传附件 '); + // actions.push('查看详情 '); // actions.push('删除'); return actions.join(''); } diff --git a/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html b/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html index 9be8f7a..9f20dcc 100644 --- a/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html +++ b/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html @@ -105,10 +105,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); + actions.push('查看图片 '); + actions.push('下载附件 '); + actions.push('上传附件 '); + // actions.push('查看详情 '); // actions.push('编辑 '); // actions.push('删除'); diff --git a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html index a78be16..6c2ae79 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html @@ -185,10 +185,6 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); if (row.status === '1'){ actions.push('上传附件 '); }else if (row.status === '2'){ @@ -199,10 +195,10 @@ }else if (row.status === '4'){ actions.push('已完成 '); } - actions.push('查看详情 '); - - // actions.push('编辑 '); - // actions.push('删除'); + if (row.files && row.status !=='3'){ + actions.push('查看图片 '); + actions.push('下载附件 '); + } return actions.join(''); } }] diff --git a/cyx-admin/src/main/resources/templates/base/affairs/day.html b/cyx-admin/src/main/resources/templates/base/affairs/day.html index 3360b17..6a1365a 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/day.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/day.html @@ -189,13 +189,20 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); - - // actions.push('编辑 '); - // actions.push('删除'); + if (row.status === '1'){ + actions.push('上传附件 '); + }else if (row.status === '2'){ + actions.push('待审核 '); + }else if(row.status === '3'){ + actions.push('已驳回 '); + actions.push('重新上传附件 '); + }else if (row.status === '4'){ + actions.push('已完成 '); + } + if (row.files && row.status !=='3'){ + actions.push('查看图片 '); + actions.push('下载附件 '); + } return actions.join(''); } }] diff --git a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html index 5434b93..8576cd6 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html @@ -186,13 +186,20 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); - - // actions.push('编辑 '); - // actions.push('删除'); + if (row.status === '1'){ + actions.push('上传附件 '); + }else if (row.status === '2'){ + actions.push('待审核 '); + }else if(row.status === '3'){ + actions.push('已驳回 '); + actions.push('重新上传附件 '); + }else if (row.status === '4'){ + actions.push('已完成 '); + } + if (row.files && row.status !=='3'){ + actions.push('查看图片 '); + actions.push('下载附件 '); + } return actions.join(''); } }] diff --git a/cyx-admin/src/main/resources/templates/base/affairs/reviewed.html b/cyx-admin/src/main/resources/templates/base/affairs/reviewed.html index 1b57360..6ecba93 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/reviewed.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/reviewed.html @@ -58,7 +58,7 @@
- +
@@ -73,36 +73,50 @@ function submitHandler() { if ($.validate.form()) { - // console.log($('#commentForm').serialize()) $.ajax({ type: "get", url: ctx + "base/affairs/reviewedSave?"+$('#commentForm').serialize(), data: { }, success: function(data) { - console.log(data) + location.reload(); } }); } } - function reback(id){ - alert(id) + function cancelS(){ + parent.window.location.reload(); + } + + function reback(){ + let id = parent.parent.a_upload_id; + $.ajax({ + type: "get", + url: ctx + "base/affairs/reback?id="+id, + data: { + }, + success: function(data) { + parent.window.location.reload(); + } + }); } $("#datetimepicker-demo-1").datetimepicker(); - let _id = parent.parent.a_upload_id; - let header = parent.parent.a_header; - let deptName = parent.parent.a_deptName; - let shotName = parent.parent.a_shotName; - let reviewer = parent.parent.a_reviewer; - $("#id").val(_id) - $("#reviewer").val(reviewer) - $("#shotName").val(shotName) - $("#header").val(header) - $("#deptName").val(deptName) - $("#commitTime").val(new Date()) + $(document).ready(function () { + let _id = parent.parent.a_upload_id; + let header = parent.parent.a_header; + let deptName = parent.parent.a_deptName; + let shotName = parent.parent.a_shotName; + let reviewer = parent.parent.a_reviewer; + $("#id").val(_id) + $("#reviewer").val(reviewer) + $("#shotName").val(shotName) + $("#header").val(header) + $("#deptName").val(deptName) + $("#commitTime").val(new Date()) + }); \ No newline at end of file diff --git a/cyx-admin/src/main/resources/templates/base/affairs/upload.html b/cyx-admin/src/main/resources/templates/base/affairs/upload.html index 4d14ad2..a3dc797 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/upload.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/upload.html @@ -58,7 +58,6 @@ events:_fileNames } } - console.log(_data) $.ajax({ url:_url, type:'post', diff --git a/cyx-admin/src/main/resources/templates/base/affairs/warn.html b/cyx-admin/src/main/resources/templates/base/affairs/warn.html index 42d96db..1c4bddb 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/warn.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/warn.html @@ -189,7 +189,7 @@ actions.push('已驳回 '); actions.push('重新上传附件 '); } - actions.push('查看详情 '); + // actions.push('查看详情 '); // actions.push('编辑 '); // actions.push('删除'); diff --git a/cyx-admin/src/main/resources/templates/base/affairs/year.html b/cyx-admin/src/main/resources/templates/base/affairs/year.html index cddf4ed..1e5b03c 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/year.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/year.html @@ -165,13 +165,20 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('查看图片 '); - actions.push('下载文件 '); - actions.push('上传附件 '); - actions.push('查看详情 '); - - // actions.push('编辑 '); - // actions.push('删除'); + if (row.status === '1'){ + actions.push('上传附件 '); + }else if (row.status === '2'){ + actions.push('待审核 '); + }else if(row.status === '3'){ + actions.push('已驳回 '); + actions.push('重新上传附件 '); + }else if (row.status === '4'){ + actions.push('已完成 '); + } + if (row.files && row.status !=='3'){ + actions.push('查看图片 '); + actions.push('下载附件 '); + } return actions.join(''); } }] diff --git a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml index 739ab80..b5cdfe9 100644 --- a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml +++ b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml @@ -271,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" demand = #{demand}, detailed = #{detailed}, score = #{score}, + now_score = #{nowScore}, method = #{method}, head = #{head}, reviewed = #{reviewed},