243 lines
12 KiB
HTML
243 lines
12 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" id="form-affairs-edit" th:object="${tAmentPartyAffairs}">
|
|
<input name="id" th:field="*{id}" type="hidden">
|
|
<!-- <select required name="type" id="type-selector" class="form-control m-b">-->
|
|
<!-- <option value="">请选择</option>-->
|
|
<!-- <option value="党务及意识形态">党务及意识形态</option>-->
|
|
<!-- <option value="党风廉政建设">党风廉政建设</option>-->
|
|
<!-- <option value="日常考核指标">日常考核指标</option>-->
|
|
<!-- <option value="季度考核指标">季度考核指标</option>-->
|
|
<!-- </select>-->
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">目标项:</label>
|
|
<div class="col-sm-8">
|
|
<select name="type" th:field="*{type}" readonly="true" disabled id="type-selector" class="form-control">
|
|
<option value="">请选择</option>
|
|
<option value="党务及意识形态">党务及意识形态</option>
|
|
<option value="党风廉政建设">党风廉政建设</option>
|
|
<option value="日常考核指标">日常考核指标</option>
|
|
<option value="季度考核指标">季度考核指标</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">目标项:</label>
|
|
<div class="col-sm-8">
|
|
<input name="target" required th:field="*{target}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">简称:</label>
|
|
<div class="col-sm-8">
|
|
<input name="shotName" required th:field="*{shotName}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">目标要求:</label>
|
|
<div class="col-sm-8">
|
|
<textarea name="demand" required class="form-control">[[*{demand}]]</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">评分细则:</label>
|
|
<div class="col-sm-8">
|
|
<textarea name="detailed" required rows="3" class="form-control">[[*{detailed}]]</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">重点工作:</label>
|
|
<div class="col-sm-8">
|
|
<div class="radio-box">
|
|
<input type="radio" id="radio1" th:field="*{degree}" name="degree" value="0">
|
|
<label for="radio1">非重点工作</label>
|
|
</div>
|
|
<div class="radio-box">
|
|
<input type="radio" id="radio2" th:field="*{degree}" name="degree" value="1">
|
|
<label for="radio2">重点工作</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">达标分:</label>
|
|
<div class="col-sm-8">
|
|
<input name="score" th:field="*{score}" class="form-control" type="number">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">考核方式:</label>
|
|
<div class="col-sm-8">
|
|
<textarea name="method" rows="3" class="form-control">[[*{method}]]</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group" th:if="*{type == '日常考核指标' || type == '季度考核指标'}">
|
|
<label class="col-sm-3 control-label">考核类别:</label>
|
|
<div class="col-sm-8">
|
|
<input name="score" th:field="*{examineType}" class="form-control">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">负责人:</label>
|
|
<div class="col-sm-8">
|
|
<select name="parentId" th:field="*{head}" onchange="headChange(this)" id="parentId" class="form-control">
|
|
<option value="">请选择</option>
|
|
<option th:each="item : ${perList}" th:text="${item.name}" th:value="${item.id}"></option>
|
|
</select>
|
|
<!-- <select name="head" th:field="*{head}" id="head" class="form-control m-b">-->
|
|
<!-- <option value="">请选择</option>-->
|
|
<!-- </select>-->
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">审核人:</label>
|
|
<div class="col-sm-8">
|
|
<select name="reviewed" th:field="*{reviewed}" id="reviewed" class="form-control m-b">
|
|
<option value="">请选择</option>
|
|
<option th:each="item : ${perList}" th:text="${item.name}" th:value="${item.id}"></option>
|
|
</select>
|
|
<!-- <input name="reviewed" th:field="*{reviewed}" class="form-control" type="text">-->
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">完成截止时间:</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group date">
|
|
<input name="finishDate" th:value="${#dates.format(tAmentPartyAffairs.finishDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">周/月/季度:</label>
|
|
<div class="col-sm-8">
|
|
<select name="unit" id="unit" th:field="*{unit}" class="form-control m-b">
|
|
<option value="">请选择</option>
|
|
<option value="1">周</option>
|
|
<option value="2">月</option>
|
|
<option value="3">季度</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="form-group"> -->
|
|
<!-- <label class="col-sm-3 control-label">操作人员:</label>-->
|
|
<!-- <div class="col-sm-8">-->
|
|
<!-- <select name="perId" th:field="*{perId}" id="perId" class="form-control m-b">-->
|
|
<!-- <option value="">请选择</option>-->
|
|
<!-- <option th:each="item : ${perList}" th:text="${item.name}" th:value="${item.id}"></option>-->
|
|
<!-- </select>-->
|
|
<!--<!– <input name="perId" th:field="*{perId}" class="form-control" type="text">–>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<input name="deptId" id="deptId" th:field="*{deptId}" type="hidden"/>
|
|
<input name="branchId" id="branchId" th:field="*{branchId}" type="hidden"/>
|
|
<!-- <div class="form-group"> -->
|
|
<!-- <label class="col-sm-3 control-label">部门:</label>-->
|
|
<!-- <div class="col-sm-8">-->
|
|
<!-- <select name="deptId" th:field="*{deptId}" id="deptId" class="form-control m-b">-->
|
|
<!-- <option value="">请选择</option>-->
|
|
<!-- <option th:each="item : ${deptList}" th:text="${item.deptName}" th:value="${item.deptId}"></option>-->
|
|
<!-- </select>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- <div class="form-group"> -->
|
|
<!-- <label class="col-sm-3 control-label">支部:</label>-->
|
|
<!-- <div class="col-sm-8">-->
|
|
<!-- <select name="branchId" th:field="*{branchId}" id="branchId" class="form-control m-b">-->
|
|
<!-- <option value="">请选择</option>-->
|
|
<!-- <option th:each="item : ${branchList}" th:text="${item.branchName}" th:value="${item.branchId}"></option>-->
|
|
<!-- </select>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">备注:</label>
|
|
<div class="col-sm-8">
|
|
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</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 headChange(obj){
|
|
var data = $(obj).val();
|
|
$.ajax({
|
|
type: "post",
|
|
url: ctx + "base/personnel/getById?id="+data,
|
|
data: {
|
|
},
|
|
success: function(res) {
|
|
$('#deptId').val(res.data.deptId)
|
|
$('#branchId').val(res.data.branchId)
|
|
console.log($('#form-affairs-edit').serialize())
|
|
}
|
|
});
|
|
}
|
|
|
|
$("#type-selector").on("change", function() {
|
|
var type = $(this).val();
|
|
var target = $("#target");
|
|
var demand = $("#demand");
|
|
var detailed = $("#detailed");
|
|
var score = $("#score");
|
|
switch (type) {
|
|
case "党务及意识形态":
|
|
$("#dw").show()
|
|
$(".dy").hide()
|
|
target[0].innerHTML = '目标项:'
|
|
demand[0].innerHTML = '目标要求:'
|
|
detailed[0].innerHTML = '工作任务:'
|
|
score[0].innerHTML = '达标分:'
|
|
break;
|
|
case "党风廉政建设":
|
|
$("#dw").show()
|
|
$(".dy").hide()
|
|
target[0].innerHTML = '责任类别:'
|
|
demand[0].innerHTML = '目标要求:'
|
|
detailed[0].innerHTML = '工作任务:'
|
|
score[0].innerHTML = '达标分:'
|
|
break;
|
|
case "日常考核指标":
|
|
$("#dw").hide()
|
|
$(".dy").show()
|
|
target[0].innerHTML = '考核内容:'
|
|
demand[0].innerHTML = '考核目标:'
|
|
detailed[0].innerHTML = '工作任务:'
|
|
score[0].innerHTML = '达标分:'
|
|
break;
|
|
case "季度考核指标":
|
|
$("#dw").hide()
|
|
$(".dy").show()
|
|
target[0].innerHTML = '考核内容:'
|
|
demand[0].innerHTML = '考核目标:'
|
|
detailed[0].innerHTML = '评分办法:'
|
|
score[0].innerHTML = '达标分:'
|
|
break;
|
|
}
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/edit", $('#form-affairs-edit').serialize());
|
|
}
|
|
}
|
|
|
|
$("input[name='finishDate']").datetimepicker({
|
|
format: "yyyy-mm-dd",
|
|
minView: "month",
|
|
autoclose: true
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |