修改代码

This commit is contained in:
liuwu 2023-08-28 17:53:51 +08:00
parent 959180859a
commit f65d54d161
11 changed files with 102 additions and 56 deletions

View File

@ -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));
}

View File

@ -121,10 +121,10 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
// actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}

View File

@ -105,10 +105,10 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
actions.push('<a data-files="'+row.events+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.events+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
// actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -185,10 +185,6 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
if (row.status === '1'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>上传附件</a> ');
}else if (row.status === '2'){
@ -199,10 +195,10 @@
}else if (row.status === '4'){
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)">已完成</a> ');
}
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.files && row.status !=='3'){
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-picture-o"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-download"></i>下载附件</a> ');
}
return actions.join('');
}
}]

View File

@ -189,13 +189,20 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.status === '1'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>上传附件</a> ');
}else if (row.status === '2'){
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)">待审核</a> ');
}else if(row.status === '3'){
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>重新上传附件</a> ');
}else if (row.status === '4'){
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)">已完成</a> ');
}
if (row.files && row.status !=='3'){
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-picture-o"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-download"></i>下载附件</a> ');
}
return actions.join('');
}
}]

View File

@ -186,13 +186,20 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.status === '1'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>上传附件</a> ');
}else if (row.status === '2'){
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)">待审核</a> ');
}else if(row.status === '3'){
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>重新上传附件</a> ');
}else if (row.status === '4'){
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)">已完成</a> ');
}
if (row.files && row.status !=='3'){
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-picture-o"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-download"></i>下载附件</a> ');
}
return actions.join('');
}
}]

View File

@ -58,7 +58,7 @@
<div class="form-group">
<div class="col-sm-4 col-sm-offset-3">
<button class="btn btn-primary" onclick="submitHandler()">通过</button>
<button class="btn btn-default">取消</button>
<button class="btn btn-default" onclick="cancelS()">取消</button>
<button class="btn btn-danger" onclick="reback()">驳回</button>
</div>
</div>
@ -73,25 +73,38 @@
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();
$(document).ready(function () {
let _id = parent.parent.a_upload_id;
let header = parent.parent.a_header;
let deptName = parent.parent.a_deptName;
@ -103,6 +116,7 @@
$("#header").val(header)
$("#deptName").val(deptName)
$("#commitTime").val(new Date())
});
</script>
</body>
</html>

View File

@ -58,7 +58,6 @@
events:_fileNames
}
}
console.log(_data)
$.ajax({
url:_url,
type:'post',

View File

@ -189,7 +189,7 @@
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.upload(\'' + row.id + '\')"><i class="fa fa-edit"></i>重新上传附件</a> ');
}
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');

View File

@ -165,13 +165,20 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>下载文件</a> ');
actions.push('<a data-id="'+row.id+'" class="openUpload btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>上传附件</a> ');
actions.push('<a class="btn btn-default btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.status === '1'){
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>上传附件</a> ');
}else if (row.status === '2'){
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)">待审核</a> ');
}else if(row.status === '3'){
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)">已驳回</a> ');
actions.push('<a data-id="'+row.id+'" data-header="'+row.header+'" data-shotname="'+row.shotName+'" data-deptname="'+row.deptName+'" class="openUpload btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-upload"></i>重新上传附件</a> ');
}else if (row.status === '4'){
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)">已完成</a> ');
}
if (row.files && row.status !=='3'){
actions.push('<a data-files="'+row.files+'" data-type="1" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-picture-o"></i>查看图片</a> ');
actions.push('<a data-files="'+row.files+'" data-type="2" class="viewFiles0828 btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)"><i class="fa fa-download"></i>下载附件</a> ');
}
return actions.join('');
}
}]

View File

@ -271,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="demand != null">demand = #{demand},</if>
<if test="detailed != null">detailed = #{detailed},</if>
<if test="score != null">score = #{score},</if>
<if test="nowScore != null">now_score = #{nowScore},</if>
<if test="method != null">method = #{method},</if>
<if test="head != null">head = #{head},</if>
<if test="reviewed != null">reviewed = #{reviewed},</if>