cyx-ament-pc/cyx-admin/src/main/resources/templates/base/affairs/reviewed.html

181 lines
8.4 KiB
HTML

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改党务')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<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" 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" 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" 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" 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" 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" 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" th:field="*{score}" readonly type="number" class="form-control">
</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="nowScore" required type="number" class="form-control" name="nowScore">
</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">
<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" th:field="*{detailed}" readonly class="form-control"></textarea>
</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="remark" required class="form-control" name="remark"></textarea>
</div>
</div>
</div>
</form>
<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" onclick="cancelS()">取消</button>
<button class="btn btn-danger" onclick="reback()">驳回</button>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "base/affairs";
$("#form-affairs-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.ajax({
type: "get",
url: ctx + "base/affairs/reviewedSave?"+$('#commentForm').serialize(),
data: {
},
success: function(data) {
parent.window.location.reload();
}
});
}
}
function cancelS(){
parent.window.location.reload();
}
function reback(){
layer.open({
title:'驳回',
type: 1,
area:['40%','40%'],
content: '<div style="box-sizing: border-box;padding: 10px">' +
'<textarea class="remark_val" placeholder="请输入驳回意见" name="remark" style="width: 100%"></textarea>' +
'<button class="btn btn-primary" onclick="rebackSubmit()">提交</button></div>' //这里content是一个普通的String
});
}
function rebackSubmit() {
let _remark = $(".remark_val").val();
if(_remark === ''){
layer.msg('请输入驳回意见!', {icon: 2});
}else{
let id = parent.parent.a_upload_id;
$.ajax({
type: "get",
url: ctx + "base/affairs/reback?id="+id+'&remark='+_remark,
data: {
},
success: function(data) {
parent.window.location.reload();
}
});
}
}
$("#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)
});
</script>
</body>
</html>