修改审批点击页面不一致bug

This commit is contained in:
liuwu 2023-11-15 11:18:43 +08:00
parent 0e6a4de19c
commit 8ddfbbe772
3 changed files with 43 additions and 32 deletions

View File

@ -171,7 +171,10 @@ public class TAmentPartyAffairsController extends BaseController
@GetMapping("reviewed")
public String reviewed(Long id, ModelMap mmap)
{
mmap.put("tAmentPartyAffairs",tAmentPartyAffairsService.selectTAmentPartyAffairsById(id));
TAmentPartyAffairs affairs = new TAmentPartyAffairs();
affairs.setId(id);
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.selectTAmentPartyAffairsList(affairs);
mmap.put("tAmentPartyAffairs",list.get(0));
return prefix + "/reviewed";
}

View File

@ -6,51 +6,52 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="commentForm">
<form class="form-horizontal m-t" id="commentForm" th:object="${tAmentPartyAffairs}">
<input id="id" readonly type="hidden" class="form-control" name="id">
<div class="row">
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交时间</label>
<div class="col-sm-8 col-md-8">
<input id="updatetime" readonly type="text" class="form-control">
<input id="updateTime" name="updateTime" readonly disabled th:value="${#dates.format(tAmentPartyAffairs.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<!-- <input id="updateTime" th:field="*{updateTime}" readonly type="text" class="form-control">-->
<!-- <input type="text" required class="form-control" id="datetimepicker-demo-1" placeholder="yyyy-MM-dd HH:mm">-->
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交人</label>
<div class="col-sm-8 col-md-8">
<input id="header" readonly type="text" class="form-control" name="header">
<input id="header" th:field="*{header}" readonly type="text" class="form-control" name="header">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">部门</label>
<div class="col-sm-8 col-md-8">
<!-- <p class="form-control-static" id="dept" name="dept"></p>-->
<input id="deptName" readonly type="text" class="form-control" name="deptName">
<input id="deptName" th:field="*{deptName}" readonly type="text" class="form-control" name="deptName">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">审核人</label>
<div class="col-sm-8 col-md-8">
<input id="reviewer" readonly type="text" class="form-control" name="reviewer">
<input id="reviewer" th:field="*{reviewer}" readonly type="text" class="form-control" name="reviewer">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">类型</label>
<div class="col-sm-8 col-md-8">
<input id="type" readonly type="text" class="form-control" name="type">
<input id="type" th:field="*{type}" readonly type="text" class="form-control" name="type">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">提交指标</label>
<div class="col-sm-8 col-md-8">
<input id="shotName" readonly type="text" class="form-control" name="shotName">
<input id="shotName" th:field="*{shotName}" readonly type="text" class="form-control" name="shotName">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 col-md-4 control-label">达标分</label>
<div class="col-sm-8 col-md-8">
<input id="score" readonly type="number" class="form-control">
<input id="score" th:field="*{score}" readonly type="number" class="form-control">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
@ -62,13 +63,13 @@
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 col-md-2 control-label">目标要求</label>
<div class="col-sm-10 col-md-10">
<input id="demand" readonly type="text" class="form-control">
<input id="demand" th:field="*{demand}" readonly type="text" class="form-control">
</div>
</div>
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 col-md-2 control-label">工作任务</label>
<div class="col-sm-10 col-md-10">
<textarea id="detailed" readonly class="form-control"></textarea>
<textarea id="detailed" th:field="*{detailed}" readonly class="form-control"></textarea>
</div>
</div>
<div class="form-group col-sm-12 col-md-12">
@ -146,28 +147,34 @@
$("#datetimepicker-demo-1").datetimepicker();
$("input[name='updateTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(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;
let type = parent.parent.a_type;
let demand = parent.parent.a_demand;
let detailed = parent.parent.a_detailed;
let updatetime = parent.parent.a_updatetime;
let score = parent.parent.a_score;
$("#id").val(_id)
$("#reviewer").val(reviewer)
$("#type").val(type)
$("#demand").val(demand)
$("#detailed").val(detailed)
$("#shotName").val(shotName)
$("#header").val(header)
$("#deptName").val(deptName)
$("#commitTime").val(new Date())
$("#updatetime").val(updatetime)
$("#score").val(score)
// 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;
// let type = parent.parent.a_type;
// let demand = parent.parent.a_demand;
// let detailed = parent.parent.a_detailed;
// let updatetime = parent.parent.a_updatetime;
// let score = parent.parent.a_score;
// $("#id").val(_id)
// $("#reviewer").val(reviewer)
// $("#type").val(type)
// $("#demand").val(demand)
// $("#detailed").val(detailed)
// $("#shotName").val(shotName)
// $("#header").val(header)
// $("#deptName").val(deptName)
// $("#commitTime").val(new Date())
// $("#updatetime").val(updatetime)
// $("#score").val(score)
});
</script>
</body>

View File

@ -550,6 +550,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark = #{remark},</if>
<if test="files != null">files = #{files},</if>
<if test="commitId != null">commit_id = #{commitId},</if>
<if test="reviewedId != null">reviewed_id = #{reviewedId},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}