2023-08-24 09:43:00 +08:00
|
|
|
|
<!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-add">
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<input name="method" type="hidden" id="method" class="form-control" />
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="form-group">
|
2023-08-24 16:25:17 +08:00
|
|
|
|
<label class="col-sm-3 control-label">类型:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-24 17:39:51 +08:00
|
|
|
|
<select required name="type" id="type-selector" class="form-control m-b">
|
2023-08-24 16:25:17 +08:00
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
<option value="党务及意识形态">党务及意识形态</option>
|
|
|
|
|
<option value="党风廉政建设">党风廉政建设</option>
|
|
|
|
|
<option value="日常考核指标">日常考核指标</option>
|
|
|
|
|
<option value="年度考核指标">年度考核指标</option>
|
|
|
|
|
</select>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-24 16:25:17 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label" id="target">目标项:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-24 17:39:51 +08:00
|
|
|
|
<textarea required name="target" class="form-control"></textarea>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label" id="shotName">简写:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<input required name="shotName" class="form-control" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="form-group">
|
2023-08-24 16:25:17 +08:00
|
|
|
|
<label class="col-sm-3 control-label" id="demand">目标要求:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-28 17:07:11 +08:00
|
|
|
|
<textarea name="demand" class="form-control"></textarea>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<div class="form-group dy" style="display: none">
|
|
|
|
|
<label class="col-sm-3 control-label" >标准要求:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<textarea name="method1" id="method1" class="form-control"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="form-group">
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<label class="col-sm-3 control-label" id="detailed">工作任务:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-24 17:39:51 +08:00
|
|
|
|
<textarea required name="detailed" class="form-control"></textarea>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2023-08-24 16:25:17 +08:00
|
|
|
|
<label class="col-sm-3 control-label" id="score">达标分:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-24 17:39:51 +08:00
|
|
|
|
<input required name="score" class="form-control" />
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<div class="form-group dy" style="display: none">
|
|
|
|
|
<label class="col-sm-3 control-label" id="unit">考核类别:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<input required name="unit" class="form-control" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group" id="dw" style="display: none">
|
|
|
|
|
<label class="col-sm-3 control-label" >考核方式:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<input name="method2" id="method2" class="form-control" />
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">负责人:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2023-08-28 17:07:11 +08:00
|
|
|
|
<select required name="head" id="head" class="form-control m-b">
|
2023-08-25 11:09:37 +08:00
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
</select>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">审核人:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2023-08-28 17:07:11 +08:00
|
|
|
|
<select required name="reviewed" id="reviewed" class="form-control m-b">
|
2023-08-25 11:09:37 +08:00
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
</select>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">完成截止时间:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<div class="input-group date">
|
2023-08-28 17:07:11 +08:00
|
|
|
|
<input required name="finishDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-09-01 17:18:33 +08:00
|
|
|
|
<div class="form-group dy" style="display: none">
|
|
|
|
|
<label class="col-sm-3 control-label">部门:</label>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
<div class="col-sm-8">
|
2023-08-25 11:09:37 +08:00
|
|
|
|
<select name="deptId" id="deptId" class="form-control m-b">
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
</select>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">支部ID:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2023-08-25 11:09:37 +08:00
|
|
|
|
<select name="branchId" id="branchId" class="form-control m-b">
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
</select>
|
2023-08-24 09:43:00 +08:00
|
|
|
|
</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"></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-add").validate({
|
2023-08-24 17:39:51 +08:00
|
|
|
|
onkeyup: false,
|
2023-08-24 09:43:00 +08:00
|
|
|
|
focusCleanup: true
|
|
|
|
|
});
|
2023-09-01 17:18:33 +08:00
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
2023-08-25 11:09:37 +08:00
|
|
|
|
$.ajax({
|
|
|
|
|
type: "post",
|
|
|
|
|
url: ctx + "base/personnel/personnelList",
|
|
|
|
|
data: {
|
|
|
|
|
},
|
|
|
|
|
success: function(data) {
|
2023-08-28 17:07:11 +08:00
|
|
|
|
var opt = '<option value="">请选择</option>';
|
2023-08-25 11:09:37 +08:00
|
|
|
|
data.data.forEach(d=>{
|
|
|
|
|
opt += '<option value="'+d.id+'">'+d.name+'</option>';
|
|
|
|
|
})
|
|
|
|
|
$("#head")[0].innerHTML=opt;
|
|
|
|
|
$("#reviewed")[0].innerHTML=opt;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "post",
|
|
|
|
|
url: ctx + "base/personnel/deptList",
|
|
|
|
|
data: {
|
|
|
|
|
},
|
|
|
|
|
success: function(data) {
|
2023-08-28 17:07:11 +08:00
|
|
|
|
var opt = '<option value="">请选择</option>';
|
2023-08-25 11:09:37 +08:00
|
|
|
|
data.data.forEach(d=>{
|
|
|
|
|
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
|
|
|
|
|
})
|
|
|
|
|
$("#deptId")[0].innerHTML=opt;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "post",
|
|
|
|
|
url: ctx + "base/personnel/branchList",
|
|
|
|
|
data: {
|
|
|
|
|
},
|
|
|
|
|
success: function(data) {
|
2023-08-28 17:07:11 +08:00
|
|
|
|
var opt = '<option value="">请选择</option>';
|
2023-08-25 11:09:37 +08:00
|
|
|
|
data.data.forEach(d=>{
|
|
|
|
|
opt += '<option value="'+d.branchId+'">'+d.branchName+'</option>';
|
|
|
|
|
})
|
|
|
|
|
$("#branchId")[0].innerHTML=opt;
|
|
|
|
|
}
|
|
|
|
|
});
|
2023-09-01 17:18:33 +08:00
|
|
|
|
})
|
2023-08-24 09:43:00 +08:00
|
|
|
|
|
2023-08-24 16:25:17 +08:00
|
|
|
|
$("#type-selector").on("change", function() {
|
|
|
|
|
var type = $(this).val();
|
|
|
|
|
var target = $("#target");
|
|
|
|
|
var demand = $("#demand");
|
|
|
|
|
var detailed = $("#detailed");
|
|
|
|
|
var score = $("#score");
|
|
|
|
|
switch (type) {
|
|
|
|
|
case "党务及意识形态":
|
2023-09-01 17:18:33 +08:00
|
|
|
|
$("#dw").show()
|
|
|
|
|
$(".dy").hide()
|
2023-08-24 16:25:17 +08:00
|
|
|
|
target[0].innerHTML = '目标项:'
|
|
|
|
|
demand[0].innerHTML = '目标要求:'
|
2023-09-01 17:18:33 +08:00
|
|
|
|
detailed[0].innerHTML = '工作任务:'
|
2023-08-24 16:25:17 +08:00
|
|
|
|
score[0].innerHTML = '达标分:'
|
|
|
|
|
break;
|
|
|
|
|
case "党风廉政建设":
|
2023-09-01 17:18:33 +08:00
|
|
|
|
$("#dw").show()
|
|
|
|
|
$(".dy").hide()
|
2023-08-24 16:25:17 +08:00
|
|
|
|
target[0].innerHTML = '责任类别:'
|
|
|
|
|
demand[0].innerHTML = '目标要求:'
|
2023-09-01 17:18:33 +08:00
|
|
|
|
detailed[0].innerHTML = '工作任务:'
|
|
|
|
|
score[0].innerHTML = '达标分:'
|
2023-08-24 16:25:17 +08:00
|
|
|
|
break;
|
|
|
|
|
case "日常考核指标":
|
2023-09-01 17:18:33 +08:00
|
|
|
|
$("#dw").hide()
|
|
|
|
|
$(".dy").show()
|
2023-08-24 16:25:17 +08:00
|
|
|
|
target[0].innerHTML = '考核内容:'
|
|
|
|
|
demand[0].innerHTML = '考核目标:'
|
2023-09-01 17:18:33 +08:00
|
|
|
|
detailed[0].innerHTML = '工作任务:'
|
2023-08-24 16:25:17 +08:00
|
|
|
|
score[0].innerHTML = '分值:'
|
|
|
|
|
break;
|
|
|
|
|
case "年度考核指标":
|
2023-09-01 17:18:33 +08:00
|
|
|
|
$("#dw").hide()
|
|
|
|
|
$(".dy").show()
|
2023-08-24 16:25:17 +08:00
|
|
|
|
target[0].innerHTML = '考核内容:'
|
|
|
|
|
demand[0].innerHTML = '考核目标:'
|
|
|
|
|
detailed[0].innerHTML = '评分办法:'
|
|
|
|
|
score[0].innerHTML = '分值:'
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2023-08-24 09:43:00 +08:00
|
|
|
|
function submitHandler() {
|
2023-09-01 17:18:33 +08:00
|
|
|
|
var type = $("#type-selector").val()
|
|
|
|
|
var method = $("#method");
|
|
|
|
|
var method1 = $("#method1");
|
|
|
|
|
var method2 = $("#method2");
|
|
|
|
|
switch (type) {
|
|
|
|
|
case "党务及意识形态":
|
|
|
|
|
method.val(method2.val())
|
|
|
|
|
break;
|
|
|
|
|
case "党风廉政建设":
|
|
|
|
|
method.val(method2.val())
|
|
|
|
|
break;
|
|
|
|
|
case "日常考核指标":
|
|
|
|
|
method.val(method1.val())
|
|
|
|
|
break;
|
|
|
|
|
case "年度考核指标":
|
|
|
|
|
method.val(method1.val())
|
|
|
|
|
break;
|
|
|
|
|
}
|
2023-08-24 09:43:00 +08:00
|
|
|
|
if ($.validate.form()) {
|
|
|
|
|
$.operate.save(prefix + "/add", $('#form-affairs-add').serialize());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("input[name='finishDate']").datetimepicker({
|
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
|
minView: "month",
|
|
|
|
|
autoclose: true
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|