first commit
This commit is contained in:
167
WebRoot/jsp/kpi/IndicatorLibAdd.jsp
Normal file
167
WebRoot/jsp/kpi/IndicatorLibAdd.jsp
Normal file
@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
|
||||
function saveFun() {
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiIndicatorLibDetail/save.do", 'indicatorId='+'${indicatorId}'+'&'+$("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
indicatorName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentA: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentB: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentC: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentD: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="indicatorName" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentA" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentB" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentC" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentD" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="morder" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="indicatorDetail" class="form-control" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight" name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入0.01~100之间的数字">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiIndicatorLibDetail/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
174
WebRoot/jsp/kpi/IndicatorLibEdit.jsp
Normal file
174
WebRoot/jsp/kpi/IndicatorLibEdit.jsp
Normal file
@ -0,0 +1,174 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
|
||||
function updateFun() {
|
||||
$("#editFrom").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editFrom").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiIndicatorLibDetail/update.do", $("#editFrom").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '信息保存失败');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#editFrom").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
indicatorName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentA: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentB: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentC: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentD: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为editFrom -->
|
||||
<form class="form-horizontal" id="editFrom">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" value="${KpiIndicatorLibDetail.id }"/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="indicatorName" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.indicatorName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentA" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.contentA}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentB" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.contentB}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentC" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.contentC}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="contentD" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.contentD}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="morder" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLibDetail.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="indicatorDetail" class="form-control"
|
||||
placeholder="">${KpiIndicatorLibDetail.indicatorDetail}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight" name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入0.01~100之间的数字" value="${KpiIndicatorLibDetail.indicatorWeight}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiIndicatorLibDetail/update.do">
|
||||
<button type="button" class="btn btn-primary" onclick="updateFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
542
WebRoot/jsp/kpi/IndicatorLibList.jsp
Normal file
542
WebRoot/jsp/kpi/IndicatorLibList.jsp
Normal file
@ -0,0 +1,542 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*.content-header{display:none;}*/
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
/*.select2-selection__arrow{*/
|
||||
/*margin-top:3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var pid = "-1";//Pid
|
||||
var jobid = "";//职位id
|
||||
var did = "";//绩效id
|
||||
var jtid = "";//考核周期id
|
||||
// var viewFun = function(id) {
|
||||
// $.post(ext.contextPath + '/work/mpoint/showHistory.do', {id:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
var selelct_3Data = jQuery.parseJSON('${jobTypeList}');
|
||||
var selelct_3 = $("#jobTypeCon").select2({
|
||||
data: selelct_3Data,
|
||||
cache: false,
|
||||
// placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_3.find('option:eq(0)').attr('selected', 'selected');
|
||||
selelct_3.on("change", function (e) {
|
||||
$("#periodTypeCon").text("");
|
||||
periodList();
|
||||
if ($("#periodTypeCon").val()) {
|
||||
loadTreeData();
|
||||
}
|
||||
if (pid != "-1") {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
});
|
||||
selelct_3.val(selelct_3.val()).trigger("change");
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiIndicatorLib/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
periodType: $("#periodTypeCon").val(),
|
||||
dimensionId: pid,
|
||||
jobId: jobid,
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '排序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodTypeName', // 返回json数据中的name
|
||||
title: '考核周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 150,
|
||||
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150,
|
||||
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.infoId + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.infoId + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (data) { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 动态加载周期下拉列表
|
||||
function periodList() {
|
||||
var jobType = $('#jobTypeCon').val();
|
||||
$.post(ext.contextPath + "/kpi/KpiDimension/getPeriodTypeListByJobType.do?jobType=" + jobType, function (data) {
|
||||
var selelct_2 = $("#periodTypeCon").select2({
|
||||
data: data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
// $("#jobTypeCon").find('option:eq(0)').attr('selected', 'selected');
|
||||
|
||||
|
||||
$("#jobTypeCon").attr('value', $('#jobTypeCon option:first').val());
|
||||
|
||||
selelct_2.on("change", function (e) {
|
||||
loadTreeData();
|
||||
if (pid != "-1") {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
});
|
||||
$("#periodTypeCon").attr('value', $('#periodTypeCon option:first').val());
|
||||
loadTreeData();
|
||||
}, 'json')
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 加载树数据
|
||||
function loadTreeData() {
|
||||
var periodType = $('#periodTypeCon').val()
|
||||
var jobType = $('#jobTypeCon').val();
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLib/showTree.do?periodType=' + periodType + "&jobType=" + jobType, {}, function (data) {
|
||||
if (data.length > 0) {
|
||||
$("#tree").treeview({data: data});
|
||||
}
|
||||
$("#tree").on('nodeSelected', function (event, data) {
|
||||
pid = data.id;
|
||||
jobid = data.pid;
|
||||
if (pid !== '-1') {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
// // 权重设置按钮
|
||||
// function weightFun() {
|
||||
//
|
||||
// console.log(pid)
|
||||
// if (pid==='-1'){
|
||||
// showAlert('d',"请选择职位及维度",'mainAlertdiv')
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// $.post(ext.contextPath + '/kpi/KpiIndicatorLib/getIndicator.do', {
|
||||
// dimensionId: pid,
|
||||
// jobId: jobid,
|
||||
// periodType: $("#periodType1").val(),
|
||||
// }, function (data) {
|
||||
// let info = data === 'null' ? {} : JSON.parse(data)
|
||||
// $.post(ext.contextPath + '/kpi/KpiIndicatorLib/Weight.do', {
|
||||
// id:info.id,
|
||||
// dimensionId: pid,
|
||||
// jobId: jobid,
|
||||
// periodType: $("#periodType1").val(),
|
||||
// }, function (body) {
|
||||
// $("#subDiv").html(body);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// });
|
||||
//
|
||||
//
|
||||
//
|
||||
// };
|
||||
//
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
|
||||
if (pid === '-1' || jobid == '-1') {
|
||||
showAlert('d', "请先点击相应职位维度!", 'mainAlertdiv')
|
||||
return
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLib/getIndicator.do', {
|
||||
dimensionId: pid,
|
||||
jobId: jobid,
|
||||
periodType: $("#periodTypeCon").val(),
|
||||
}, function (data) {
|
||||
let info = data === 'null' ? {} : JSON.parse(data)
|
||||
|
||||
// console.log(info)
|
||||
// if (info.id && info.auditLevelWeight.length > 0 && info.processWeight !== 0 && info.resultWeight !== 0) {
|
||||
if (info.id) {
|
||||
openAddDialog(info.id)
|
||||
} else {
|
||||
$.post(ext.contextPath + "/kpi/KpiIndicatorLib/addOrUpdate.do", {
|
||||
id: "",
|
||||
dimensionId: pid,
|
||||
jobId: jobid,
|
||||
periodType: $("#periodType1").val(),
|
||||
}, function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
openAddDialog(data.data)
|
||||
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
|
||||
}
|
||||
|
||||
// } else {
|
||||
// // showAlert('d',"请先配置权重!",'mainAlertdiv')
|
||||
// }
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
function openAddDialog(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLibDetail/IndicatorLibAdd.do', {
|
||||
indicatorId: id
|
||||
}, function (body) {
|
||||
$("#subDiv").html(body);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLibDetail/IndicatorLibEdit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLibDetail/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.infoId + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiIndicatorLibDetail/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<%-- <div class="form-group form-inline" style="padding:0;height: 15px;">--%>
|
||||
<%-- <div class="input-group input-group-sm " style="width:220px;">--%>
|
||||
<%-- <label class="col-sm-5 control-label"--%>
|
||||
<%-- style="padding:0px 10px 0px 10px;line-height:30px;">岗位类型:</label>--%>
|
||||
<%-- <div class="col-sm-7 control-label" style="padding: 0px;">--%>
|
||||
<%-- <select class="form-control select2 " id="jobTypeCon" name="jobType"--%>
|
||||
<%-- style="width:150px;" onchange="periodList()"></select>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="input-group input-group-sm " style="width:220px;">--%>
|
||||
<%-- <label class="col-sm-5 control-label"--%>
|
||||
<%-- style="padding:0px 10px 0px 10px;line-height:30px;">考核周期类型:</label>--%>
|
||||
<%-- <div class="col-sm-7 control-label" style="padding: 0px;">--%>
|
||||
<%-- <select class="form-control select2 " id="periodTypeCon" name="periodType"--%>
|
||||
<%-- style="width:150px;"></select>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
|
||||
<%-- <div class="form-group pull-right form-inline" style="width: 190px;">--%>
|
||||
<%-- <div class="btn-group" style="width: 100px;padding-bottom:10px;">--%>
|
||||
<%-- <security:authorize buttonUrl="kpi/kpiIndicatorLib/Weight.do">--%>
|
||||
<%-- <button type="button" class="btn btn-default" onclick="weightFun();"><i--%>
|
||||
<%-- class="fa fa-plus"></i>--%>
|
||||
<%-- 权重配置--%>
|
||||
<%-- </button>--%>
|
||||
<%-- </security:authorize>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="form-group pull-right form-inline" style="width: 190px;">--%>
|
||||
<%-- <div class="btn-group" style="width: 100px;padding-bottom:10px;">--%>
|
||||
<%-- <security:authorize buttonUrl="kpi/KpiIndicatorLibDetail/IndicatorLibAdd.do">--%>
|
||||
<%-- <button type="button" class="btn btn-default" onclick="addFun();"><i--%>
|
||||
<%-- class="fa fa-plus"></i>--%>
|
||||
<%-- 新增--%>
|
||||
<%-- </button>--%>
|
||||
<%-- </security:authorize>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
|
||||
<%-- </div>--%>
|
||||
|
||||
<%-- </div>--%>
|
||||
<%-- <br>--%>
|
||||
<div class="box-body no-padding" style="float: left;width: 20%">
|
||||
<div class="form-group form-inline" style="width: 100%">
|
||||
<div class="input-group input-group-sm " style="width:30px;padding-right: 5%;">
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="jobTypeCon" name="jobType"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="width:30px;">
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="periodTypeCon" name="periodType"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div style="float: right;width:80%">
|
||||
<div class="form-group pull-left form-inline" style="width: 190px;">
|
||||
<div class="btn-group" style="padding-bottom:0px;">
|
||||
<security:authorize buttonUrl="kpi/KpiIndicatorLibDetail/IndicatorLibAdd.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
156
WebRoot/jsp/kpi/IndicatorLibWeight.jsp
Normal file
156
WebRoot/jsp/kpi/IndicatorLibWeight.jsp
Normal file
@ -0,0 +1,156 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
});
|
||||
|
||||
|
||||
function saveFun() {
|
||||
|
||||
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
let str = '{"' + $("#addForm").serialize().replaceAll("%EF%BC%8C", "%2C").replaceAll("%2C", ",").replaceAll("=", '":"').replaceAll("&", '","') + '"}'
|
||||
let kpiIndicatorLib = JSON.parse(str)
|
||||
if (parseInt(kpiIndicatorLib.resultWeight) + parseInt(kpiIndicatorLib.processWeight) !== 100) {
|
||||
showAlert("d", "完成结果权重与过程表现权重占比之和应为100!");
|
||||
}
|
||||
let temp = 0;
|
||||
let weights = kpiIndicatorLib.auditLevelWeight.split(",")
|
||||
for (let index = 0; index < weights.length; index++) {
|
||||
temp += parseInt(weights[index]);
|
||||
}
|
||||
if (temp !== 100) {
|
||||
showAlert("d", "评分层级权重占比之和应为100!");
|
||||
}
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiIndicatorLib/addOrUpdate.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
auditLevelWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[1-9]+(,\d+)*$/,
|
||||
message: '评分层级权重输入有误,逗号应为英文状态,数字应为正整数'
|
||||
}
|
||||
}
|
||||
},
|
||||
resultWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[1-9]+(\d+)*$/,
|
||||
message: '评分层级权重输入有误'
|
||||
},
|
||||
stringLength: {
|
||||
min: 1,
|
||||
max: 2,
|
||||
message: '长度必须在1到2位之间'
|
||||
}
|
||||
}
|
||||
},
|
||||
processWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[1-9]+(\d+)*$/,
|
||||
message: '评分层级权重输入有误'
|
||||
},
|
||||
stringLength: {
|
||||
min: 1,
|
||||
max: 2,
|
||||
message: '长度必须在1到2位之间'
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">权重界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<input type="hidden" name="id" value="${KpiIndicatorLib.id}"/>
|
||||
<input type="hidden" name="dimensionId" value="${KpiIndicatorLib.dimensionId}"/>
|
||||
<input type="hidden" name="jobId" value="${KpiIndicatorLib.jobId}"/>
|
||||
<input type="hidden" name="periodType" value="${KpiIndicatorLib.periodType}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*评分层级权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="auditLevelWeight" class="form-control"
|
||||
placeholder="多层级以英文半角逗号(,)隔开"
|
||||
value="${KpiIndicatorLib.auditLevelWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 完成结果权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" name="resultWeight" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLib.resultWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 过程表现权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" name="processWeight" class="form-control" placeholder=""
|
||||
value="${KpiIndicatorLib.processWeight}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
|
||||
<security:authorize buttonUrl="kpi/KpiIndicatorLib/addOrUpdate.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
211
WebRoot/jsp/kpi/dimensionAdd.jsp
Normal file
211
WebRoot/jsp/kpi/dimensionAdd.jsp
Normal file
@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var selelct_3Data = jQuery.parseJSON('${enableTypeList}');
|
||||
var selelct_3 = $("#status2").select2({
|
||||
data: selelct_3Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
selelct_3.val('').trigger("change");
|
||||
|
||||
var selectData2 = jQuery.parseJSON('${jobTypeList}');
|
||||
var select_2 = $("#jobType").select2({
|
||||
data: selectData2,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_2.val('').trigger("change");
|
||||
|
||||
var selectData1 = jQuery.parseJSON('${periodTypeList}');
|
||||
var select_1 = $("#periodType").select2({
|
||||
data: selectData1,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_1.val('').trigger("change");
|
||||
});
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiDimension/save.do", $("#addForm").serialize(), function (data) {
|
||||
if (data == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else if (data == 9) {
|
||||
showAlert('d', '考核维度名称重复!');
|
||||
}else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维度名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
status: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '状态不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '职位类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '周期类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '排序不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 维度名称:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="dimensionName" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 岗位类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="jobType" id="jobType" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 周期类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="periodType" id="periodType" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" name="morder" class="form-control" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 状态:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="status" id="status2" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="remark" class="form-control" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiDimension/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
214
WebRoot/jsp/kpi/dimensionEdit.jsp
Normal file
214
WebRoot/jsp/kpi/dimensionEdit.jsp
Normal file
@ -0,0 +1,214 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
/*.select2-selection__arrow {*/
|
||||
/* margin-top: 3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var select_Data = jQuery.parseJSON('${enableTypeList}');
|
||||
var select_3 = $("#status3").select2({
|
||||
data: select_Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
|
||||
select_3.val('${kpiDimension.status}').trigger("change");
|
||||
|
||||
var selectData2 = jQuery.parseJSON('${jobTypeList}');
|
||||
var select_2 = $("#jobType").select2({
|
||||
data: selectData2,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_2.val('${kpiDimension.jobType}').trigger("change");
|
||||
|
||||
var selectData1 = jQuery.parseJSON('${periodTypeList}');
|
||||
var select_1 = $("#periodType").select2({
|
||||
data: selectData1,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_1.val('${kpiDimension.periodType}').trigger("change");
|
||||
});
|
||||
|
||||
function updateFun() {
|
||||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiDimension/update.do", $("#editForm").serialize(), function (data) {
|
||||
if (data == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else if (data == 9) {
|
||||
showAlert('d', '考核维度名称重复!');}
|
||||
else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#editForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维度名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
status: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '状态不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '职位类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '周期类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '排序不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="editForm">
|
||||
<input type="hidden" name="id" value="${kpiDimension.id}"/>
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 维度名称:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="dimensionName" class="form-control" placeholder=""
|
||||
value="${kpiDimension.dimensionName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 岗位类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="jobType" id="jobType" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 周期类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="periodType" id="periodType" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" name="morder" class="form-control" placeholder="" value="${kpiDimension.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 状态:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="status" id="status3" style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="remark" name="remark" class="form-control"
|
||||
placeholder="">${kpiDimension.remark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiDimension/update.do">
|
||||
<button type="button" class="btn btn-primary" onclick="updateFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
412
WebRoot/jsp/kpi/dimensionList.jsp
Normal file
412
WebRoot/jsp/kpi/dimensionList.jsp
Normal file
@ -0,0 +1,412 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- <style type="text/css">
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
// var viewFun = function(id) {
|
||||
// $.post(ext.contextPath + '/work/mpoint/showHistory.do', {id:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
var selelct_3Data = jQuery.parseJSON('${enableTypeList}');
|
||||
var selelct_3 = $("#status").select2({
|
||||
data: selelct_3Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_3.val('').trigger("change");
|
||||
selelct_3.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
var selectData2 = jQuery.parseJSON('${jobTypeList}');
|
||||
var select_2 = $("#jobTypeCon").select2({
|
||||
data: selectData2,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_2.val('').trigger("change");
|
||||
select_2.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
var selectData1 = jQuery.parseJSON('${periodTypeList}');
|
||||
var select_1 = $("#periodTypeCon").select2({
|
||||
data: selectData1,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select_1.val('').trigger("change");
|
||||
select_1.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiDimension/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
periodType: $("#periodTypeCon").val(),
|
||||
jobType: $("#jobTypeCon").val(),
|
||||
status: $("#status").val(),
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'jobTypeName', // 返回json数据中的name
|
||||
title: '岗位类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'periodTypeName', // 返回json数据中的name
|
||||
title: '考核周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
// {
|
||||
// field: 'dimensionName', // 返回json数据中的name
|
||||
// title: '名称', // 表格表头显示文字
|
||||
// align: 'center', // 左右居中
|
||||
// valign: 'middle' // 上下居中
|
||||
// },
|
||||
{
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '排序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'statusName', // 返回json数据中的name
|
||||
title: '启用状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
if (row.status === 0) {
|
||||
|
||||
buts += '<a class="" onclick="statusChange(\'' + row.id + '\',1)" data-toggle="tooltip" title="禁用"><span style="color: red"> 禁用</span></a>';
|
||||
} else {
|
||||
buts += '<a class="" onclick="statusChange(\'' + row.id + '\',0)" data-toggle="tooltip" title="启用"><span style="color: green"> 启用</span></a>';
|
||||
}
|
||||
return buts;
|
||||
|
||||
}
|
||||
}, {
|
||||
field: 'remark', // 返回json数据中的name
|
||||
|
||||
title: '备注', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width:400,
|
||||
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width:150,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiDimension/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiDimension/edit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 启用禁用
|
||||
function statusChange(id, status) {
|
||||
$.post(ext.contextPath + '/kpi/KpiDimension/changeStatus.do?status=' + status + '&id=' + id, function (data) {
|
||||
if (data.code === 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiDimension/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
//删除多条数据
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiDimension/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<div class="form-group pull-left form-inline" style="width: 190px;">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/KpiDimension/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm " style="padding: 0px 10px">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">岗位类型:</label>
|
||||
<div class="col-sm-7 control-label" >
|
||||
<select class="form-control select2 " id="jobTypeCon" name="jobType"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="padding: 0px 10px">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核周期类型:</label>
|
||||
<div class="col-sm-7 control-label" >
|
||||
<select class="form-control select2 " id="periodTypeCon" name="periodType"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="padding: 0px 10px">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">启用状态:</label>
|
||||
<div class="col-sm-7 control-label" >
|
||||
<select class="form-control select2 " id="status" name="status"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
174
WebRoot/jsp/kpi/kpiCopyAdd.jsp
Normal file
174
WebRoot/jsp/kpi/kpiCopyAdd.jsp
Normal file
@ -0,0 +1,174 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: limo
|
||||
Date: 2021/10/19
|
||||
Time: 上午9:17
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
/*.select2-selection__arrow {*/
|
||||
/* margin-top: 3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var old = ''
|
||||
function jobList() {
|
||||
$.post(ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(), function (data) {
|
||||
$("#jobId").select2({
|
||||
data:data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/kpiPlan/copySave.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
objUserName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '周期类型不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
function showUser4OneSelectFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "addForm", hiddenId: "objUserId", textId: "objUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function positionSelect() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/positionSelect.do',
|
||||
{formId: "addForm", hiddenId: "position", textId: "position"},
|
||||
function (data) {
|
||||
$("#position4Select").html(data);
|
||||
openModal('position4Select');
|
||||
});
|
||||
}
|
||||
|
||||
$(function (){
|
||||
var key = setInterval(()=>{
|
||||
if ($('#objUserId').val()!=old){
|
||||
jobList()
|
||||
old = $('#objUserId').val()
|
||||
}
|
||||
if ($('#subModal').is(':hidden')){
|
||||
clearInterval(key)
|
||||
}
|
||||
},500)
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
|
||||
<input type="hidden" name="id" value="${kpiPlan.id}"/>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
<%--
|
||||
<input type="hidden" name="id" value="${String.id }" />
|
||||
--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<%-- <span id="userInfo">--%>
|
||||
<%-- </span>--%>
|
||||
<%-- <div class="form-group">--%>
|
||||
<%-- <label class="col-sm-3 control-label">* 复制对象:</label>--%>
|
||||
<%-- <div class="col-sm-9">--%>
|
||||
<%-- <input type="text" id="caption" name="caption" class="form-control" placeholder=""--%>
|
||||
<%-- value="${kpiPlan.caption}">--%>
|
||||
<%-- <input type="hidden" id="id" name="id" class="form-control"/>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 复制到人员:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="objUserName" name="objUserName" class="form-control"
|
||||
placeholder="请输入文本" onclick="showUser4OneSelectFun();" onchange="jobList()"/>
|
||||
<input type="hidden" id="objUserId" name="objUserId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 岗位:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="jobId" name="jobId"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/kpiPlan/copySave.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
255
WebRoot/jsp/kpi/kpiPlanAdd.jsp
Normal file
255
WebRoot/jsp/kpi/kpiPlanAdd.jsp
Normal file
@ -0,0 +1,255 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var key = ''
|
||||
var old = ''
|
||||
$(function () {
|
||||
var selelct_3Data = jQuery.parseJSON('${periodTypeList}');
|
||||
var selelct_3 = $("#status2").select2({
|
||||
data: selelct_3Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_3.val('').trigger("change");
|
||||
|
||||
var selelct_4Data = jQuery.parseJSON('${positionTypeList}');
|
||||
var selelct_4 = $("#status3").select2({
|
||||
data: selelct_4Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_4.val('').trigger("change");
|
||||
|
||||
|
||||
//TODO 代码有冲突
|
||||
key = setInterval(() => {
|
||||
// console.log(document.getElementById('objUserName'))
|
||||
if ($('#objUserId').val() != old) {
|
||||
onValueChange()
|
||||
old = $('#objUserId').val()
|
||||
}
|
||||
|
||||
if ($('#subModal').is(':hidden')) {
|
||||
clearInterval(key)
|
||||
}
|
||||
}, 500)
|
||||
});
|
||||
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/kpiPlan/save.do", $("#addForm").serialize() + "&check=1", function (data) {
|
||||
if (data.code == -1) {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '用户信息保存失败', 'mainAlertdiv');
|
||||
} else if (data.code == 2) {
|
||||
swal({
|
||||
text: data.creater + "已为该考核对象创建了考核方案,是否继续添加该考核对象",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
}).then(willCreate => {
|
||||
if (willCreate) {
|
||||
$.post(ext.contextPath + "/kpi/kpiPlan/save.do", $("#addForm").serialize() + "&check=0", function (data) {
|
||||
if (data.code == 0) {
|
||||
showAlert('d', '保存失败', 'mainAlertdiv');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
objUserName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '周期类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '周期类型不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function showUser4OneSelectFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "addForm", hiddenId: "objUserId", textId: "objUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function onValueChange() {
|
||||
// console.log($('#objUserId').val())
|
||||
$.post(ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(), function (data) {
|
||||
$("#jobId").select2({
|
||||
data: data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
},'json');
|
||||
}
|
||||
|
||||
function positionSelect() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/positionSelect.do',
|
||||
{formId: "addForm", hiddenId: "position", textId: "position"},
|
||||
function (data) {
|
||||
$("#position4Select").html(data);
|
||||
openModal('position4Select');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="unitId" value="${unitId}" />
|
||||
<div id="alertDiv"></div>
|
||||
<div id="mainAlertdiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 姓名:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="objUserName" name="objUserName" class="form-control"
|
||||
placeholder="请输入文本" onclick="showUser4OneSelectFun();"
|
||||
onchange="onValueChange()"/>
|
||||
<input type="hidden" id="objUserId" name="objUserId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 岗位:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="jobId" name="jobId"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">* 周期类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="periodType" id="status2" style="width: 100%;">
|
||||
<%-- <option value="1">启用</option>--%>
|
||||
<%-- <option value="0">停用</option>--%>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/kpiPlan/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
289
WebRoot/jsp/kpi/kpiPlanEdit.jsp
Normal file
289
WebRoot/jsp/kpi/kpiPlanEdit.jsp
Normal file
@ -0,0 +1,289 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lihongye
|
||||
Date: 2021/10/12
|
||||
Time: 上午10:43
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
var selelct_5Data = jQuery.parseJSON('${positionTypeList}');
|
||||
var selelct_5 = $("#status").select2({
|
||||
data: selelct_5Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_5.val('').trigger("change");
|
||||
selelct_5.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
var selelct_1Datas = jQuery.parseJSON('${periodTypeList}');
|
||||
var selelct_1 = $("#status1").select2({
|
||||
data: selelct_1Datas,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_1.val('').trigger("change");
|
||||
selelct_1.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/kpiPlan/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
// status: $("#status").val(),
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'objUserId', // 返回json数据中的name
|
||||
title: '考核对象', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobId', // 返回json数据中的name
|
||||
title: '岗位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'periodType', // 返回json数据中的name
|
||||
title: '周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'createUserId', // 返回json数据中的name
|
||||
title: '创建人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
// 复制新增按钮
|
||||
function copyAddFun() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/copyAdd.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlanDetail/getList.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<div class="input-group input-group-sm " style="width:190px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">岗位类型</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="struts" name="positionType" style="width:100px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="width:190px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">周期类型</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="struts1" name="periodType" style="width:100px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline" style="width: 190px;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/kpiPlan/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline" style="width: 190px;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/kpiPlan/copyAdd.do">
|
||||
<button type="button" class="btn btn-default" onclick="copyAddFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
复制新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
393
WebRoot/jsp/kpi/kpiPlanList.jsp
Normal file
393
WebRoot/jsp/kpi/kpiPlanList.jsp
Normal file
@ -0,0 +1,393 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lihongye
|
||||
Date: 2021/10/12
|
||||
Time: 上午10:43
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
var selelct_3Data = jQuery.parseJSON('${positionTypeList}');
|
||||
var selelct_3 = $("#positionTypeList").select2({
|
||||
data: selelct_3Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_3.val('').trigger("change");
|
||||
selelct_3.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
var selelct_1Data = jQuery.parseJSON('${periodTypeList}');
|
||||
var selelct_1 = $("#periodTypeList").select2({
|
||||
data: selelct_1Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_1.val('').trigger("change");
|
||||
selelct_1.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/kpiPlan/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规
|
||||
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
// status: $("#status").val(),
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
periodTypeName: $('#periodTypeList').val(),
|
||||
positionType: $('#positionTypeList').val(),
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'cardId', // 返回json数据中的name
|
||||
title: '工号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'deptName', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '岗位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'positionType', // 返回json数据中的name
|
||||
title: '岗位类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodTypeName', // 返回json数据中的name
|
||||
title: '周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 260,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="copyAddFun(\'' + row.id + '\')" data-toggle="tooltip" title="复制新增"><i class="fa fa-add "></i><span> 复制新增</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="detailFun(\'' + row.id + '\',\'' + row.jobId + '\')" data-toggle="tooltip" title="考核内容"><i class="fa fa-edit "></i><span> 考核内容</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span> 删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
|
||||
// 复制新增按钮
|
||||
function copyAddFun(id) {
|
||||
console.log(id)
|
||||
// $.post(ext.contextPath + '/kpi/kpiPlan/kpiCopyAdd.do?id='+id,function (data) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/kpiCopyAdd.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
// 考核内容列表页
|
||||
function detailFun(id, jobId) {
|
||||
window.location.href = ext.contextPath + "/kpi/kpiPlanDetail/showDetailList.do?id=" + id + '&jobId=' + jobId;
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdivs');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 跳转到考核计划列表
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/kpiPlan/showList.do";
|
||||
}
|
||||
|
||||
//删除多条数据
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//导入
|
||||
function importExcel() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlan/importExcelShow.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
//导出
|
||||
function exportExcel() {
|
||||
var periodTypeName = $('#periodTypeList').val();
|
||||
var positionType = $('#positionTypeList').val();
|
||||
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdivs"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="position4Select"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<div class="form-group pull-right form-inline">
|
||||
<div class="input-group input-group-sm " style="padding: 0px 10px">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 0px 0px 10px;line-height:30px;">岗位类型:</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="positionTypeList" name="positionTypeList"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="padding: 0px 15px">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">周期类型:</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="periodTypeList" name="periodTypeList"
|
||||
style="width:150px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-left form-inline">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<div style="float: left;width: 300px;">
|
||||
<security:authorize buttonUrl="kpi/kpiPlan/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="importExcel();"><i
|
||||
class="fa fa-compress "></i>
|
||||
导入
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="exportExcel();"><i
|
||||
class="fa fa-expand"></i>
|
||||
导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div style="height:5px;"></div>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
101
WebRoot/jsp/kpi/kpiPlanListImport.jsp
Normal file
101
WebRoot/jsp/kpi/kpiPlanListImport.jsp
Normal file
@ -0,0 +1,101 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.tools.CommUtil" %>
|
||||
<%request.setAttribute("nowDate", CommUtil.nowDate().replaceAll("[[\\s-:punct:]]", "")); %>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var control;
|
||||
|
||||
function initUpload(ctrlName, uploadUrl) {
|
||||
control = $('#' + ctrlName);
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
uploadUrl: uploadUrl, //上传的地址
|
||||
uploadAsync: true, //默认异步上传
|
||||
showCaption: true,//是否显示标题
|
||||
showUpload: false, //是否显示上传按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
allowedFileExtensions: ["xls", "xlsx"], //接收的文件后缀
|
||||
maxFileCount: 1,//最大上传文件数限制
|
||||
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
||||
showPreview: false, //是否显示预览
|
||||
previewFileIconSettings: {
|
||||
'docx': '<i ass="fa fa-file-word-o text-primary"></i>',
|
||||
'xlsx': '<i class="fa fa-file-excel-o text-success"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o text-success"></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
|
||||
'jpg': '<i class="fa fa-file-photo-o text-warning"></i>',
|
||||
'pdf': '<i class="fa fa-file-archive-o text-muted"></i>',
|
||||
'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
|
||||
},
|
||||
//参数
|
||||
uploadExtraData: function () {
|
||||
var data = {
|
||||
"unitId": unitId, //此处自定义传参
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
control.on("fileuploaded", function (event, data, previewId, index) {
|
||||
if (data.response.status == true) {
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
showAlert('s', data.response.msg, 'mainAlertdiv');
|
||||
} else {
|
||||
showAlert('d', data.response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
initUpload("filelist", ext.contextPath + "/kpi/kpiPlan/importExcel.do");
|
||||
})
|
||||
|
||||
//导入上传文件的数据
|
||||
function importExcelFun() {
|
||||
if ($("#filelist").val() == null || $("#filelist").val() == "") {
|
||||
showAlert('d', '上传的文件不能为空!');
|
||||
} else {
|
||||
control.fileinput("upload");
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">导入数据</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="importFile" name="importFile" class="form-horizontal" method="post"
|
||||
enctype="multipart/form-data">
|
||||
<div id="alertDiv"></div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<input id="filelist" name="filelist" class="file-loading" type="file" multiple
|
||||
accept=".xls,.xlsx">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="importExcelFun()" id="btn_save">导入</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
218
WebRoot/jsp/kpi/kpiTaskList.jsp
Normal file
218
WebRoot/jsp/kpi/kpiTaskList.jsp
Normal file
@ -0,0 +1,218 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lihongye
|
||||
Date: 2021/10/12
|
||||
Time: 上午10:43
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
// $("#ul li").click(function() {
|
||||
// $(this).siblings('li').removeClass('active');
|
||||
// $(this).addClass('active');
|
||||
// });
|
||||
//
|
||||
// rowNumMakePlan();
|
||||
// rowNumMark();
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiTask/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规
|
||||
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
// status: $("#status").val(),
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
processDefinitionKey: $('#processDefinitionKey').val()
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'objUserName', // 返回json数据中的name
|
||||
title: '考核对象', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'cardId', // 返回json数据中的name
|
||||
title: '工号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'deptName', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobName', // 返回json数据中的name
|
||||
title: '岗位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobLevelTypeName', // 返回json数据中的name
|
||||
title: '岗位类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodName', // 返回json数据中的name
|
||||
title: '周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
// alert(row.processTypeId);
|
||||
if(row.processTypeId=="KPI_MAKE_PLAN"){
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="audit(\'' + row.planStaffId + '\',\'' + row.taskId + '\')" data-toggle="tooltip" title="审批"><i class="fa fa-add "></i><span> 审批</span></button>';
|
||||
}
|
||||
if(row.processTypeId=="KPI_MARK") {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="mark(\'' + row.planStaffId + '\',\'' + row.taskId + '\')" data-toggle="tooltip" title="打分"><i class="fa fa-edit "></i><span> 打分</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
<%--// 加载待办条数--%>
|
||||
<%--function rowNumMakePlan() {--%>
|
||||
<%-- $.post(ext.contextPath + '/kpi/KpiTask/getTodoListRowCount.do?processDefinitionKey=${KPI_MAKE_PLAN}', function (data) {--%>
|
||||
<%-- $("#KPI_MAKE_PLAN").html(data.result);--%>
|
||||
<%-- });--%>
|
||||
<%--}--%>
|
||||
|
||||
<%--// 加载待办条数--%>
|
||||
<%--function rowNumMark() {--%>
|
||||
<%-- $.post(ext.contextPath + '/kpi/KpiTask/getTodoListRowCount.do?processDefinitionKey=${KPI_MARK}', function (data) {--%>
|
||||
<%-- $("#KPI_MARK").html(data.result);--%>
|
||||
<%-- });--%>
|
||||
<%--}--%>
|
||||
|
||||
// 审批页面
|
||||
function audit(planStaffId, taskId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPlanStaffDetail/showList.do?planStaffId=" + planStaffId + "&taskId=" + taskId+"&backToKpiTaskList=1";
|
||||
}
|
||||
|
||||
|
||||
// 打分页面
|
||||
function mark(planStaffId, taskId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiResultIndicator/showListForMark.do?planStaffId=" + planStaffId + "&taskId=" + taskId+"&backToKpiTaskList=1";
|
||||
}
|
||||
|
||||
// // 跳转到考核计划列表
|
||||
// function gotoFirstTab() {
|
||||
// $("#processDefinitionKey").val("KPI_MAKE_PLAN");
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// }
|
||||
//
|
||||
// function gotoSecondTab() {
|
||||
// $("#processDefinitionKey").val("KPI_MARK");
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// }
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdivs"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="position4Select"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<input type="hidden" id="processDefinitionKey" value="KPI_MAKE_PLAN"/>
|
||||
<%-- <div>--%>
|
||||
<%-- <ul id="ul" class="nav nav-pills">--%>
|
||||
<%-- <li class="active">--%>
|
||||
<%-- <a href="javascript:gotoFirstTab();">绩效方案待审批--%>
|
||||
<%-- <span id="KPI_MAKE_PLAN" class="badge"></span>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li>--%>
|
||||
<%-- <a href="javascript:gotoSecondTab();">绩效考核待评价--%>
|
||||
<%-- <span id="KPI_MARK" class="badge"></span>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- </ul>--%>
|
||||
<%-- </div>--%>
|
||||
<br/>
|
||||
<div style="height:5px;"></div>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
112
WebRoot/jsp/kpi/makePlanApply.jsp
Normal file
112
WebRoot/jsp/kpi/makePlanApply.jsp
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
|
||||
<%@page import="com.sipai.entity.kpi.KpiActivitiRequest" %>
|
||||
<%request.setAttribute("Type_PLAN", KpiActivitiRequest.Type_PLAN); %>
|
||||
<%request.setAttribute("Type_MARK", KpiActivitiRequest.Type_MARK); %>
|
||||
|
||||
<style type="text/css">
|
||||
/*.select2-container .select2-selection--single {*/
|
||||
/* height: 34px;*/
|
||||
/* line-height: 34px;*/
|
||||
/*}*/
|
||||
|
||||
/*.select2-selection__arrow {*/
|
||||
/* margin-top: 3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#unitId").val(unitId);
|
||||
});
|
||||
|
||||
// 提交审核
|
||||
function submitApplyFun() {
|
||||
$("#applyForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#applyForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiApplyBiz/apply.do", $("#applyForm").serialize(), function (data) {
|
||||
// alert(data);
|
||||
if (data.code == 1) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPeriodInstance/showList.do";
|
||||
} else {
|
||||
showAlert('d', data.msg);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#applyForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
auditorId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审批人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//选人
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#auditorId").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect4FirstActiviti.do', {
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "applyForm",
|
||||
hiddenId: "auditorId",
|
||||
textId: "auditorName",
|
||||
userIds: userIds,
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
//type:'${Type_PLAN}'
|
||||
type: 'KPI_MAKE_PLAN'
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">审批人选择</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="applyForm">
|
||||
<input type="hidden" name="bizId" value="${applyBizId}"/>
|
||||
<input type="hidden" id="unitId" name="unitId" value=""/>
|
||||
<div id="alertDiv"></div>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批人:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="auditorName" name="auditorName" class="form-control"
|
||||
placeholder="请输入文本" onclick="showUser4Handle()" autocomplete="off">
|
||||
<input type="hidden" id="auditorId" name="auditorId" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaff/apply.do">
|
||||
<button type="button" class="btn btn-primary" onclick="submitApplyFun()">提交</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
518
WebRoot/jsp/kpi/makePlanAudit.jsp
Normal file
518
WebRoot/jsp/kpi/makePlanAudit.jsp
Normal file
@ -0,0 +1,518 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*.content-header{display:none;}*/
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
/*.select2-selection__arrow{*/
|
||||
/*margin-top:3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var planStaffId = ""
|
||||
var panName = ""
|
||||
var panGongHao = ""
|
||||
var panZhiWei = ""
|
||||
var planDaFenRen = ""
|
||||
|
||||
var treeData = []
|
||||
var applyBizId = '${kpiApplyBiz.id}';
|
||||
|
||||
$(function () {
|
||||
|
||||
loadTreeData();
|
||||
|
||||
|
||||
$("#tablePlan").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiPlanStaffDetail/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
onlyInfoPagination: false,
|
||||
// showRefresh: true,
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 100, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
// sort: params.sort, // 要排序的字段
|
||||
// order: params.order, // 排序规则
|
||||
planStaffId: planStaffId
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}
|
||||
|
||||
, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
if ('${kpiPlanStaffBo.kpiPeriodInstance.status}' === '0' || '${kpiPlanStaffBo.kpiPeriodInstance.status}' === '7') {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("tablePlan");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
// 控制是否选择下一个审批人
|
||||
if ('${hasNextAuditor}' === '1') {
|
||||
$('#nextAuditDiv').show();
|
||||
} else {
|
||||
$('#nextAuditDiv').hide();
|
||||
|
||||
}
|
||||
|
||||
// 控制驳回时显示审批意见
|
||||
if ('${kpiApplyBiz.status}' === '7') {
|
||||
$('#rejectionCommentDiv').show();
|
||||
} else {
|
||||
$('#rejectionCommentDiv').hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
var choiceFun = function (row) {
|
||||
|
||||
planStaffId = row.id;
|
||||
$('#periodName').html('<label>' + row.periodTypeName + '</lable>');
|
||||
$('#userName').html('<label>' + row.text + '</lable>');
|
||||
$('#userCardId').html('<label>' + row.cardId + '</lable>');
|
||||
$('#jobName').html('<label>' + row.jobName + '</lable>');
|
||||
$("#tablePlan").bootstrapTable('refresh');
|
||||
|
||||
};
|
||||
|
||||
// 加载树数据
|
||||
function loadTreeData() {
|
||||
console.log("加载树");
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/getListNonPage.do?applyBizId=' + applyBizId, function (data) {
|
||||
let temp = data.result;
|
||||
let list = [];
|
||||
temp.forEach(item => {
|
||||
list.push({
|
||||
id: item.id,
|
||||
text: item.objUserName,
|
||||
cardId: item.cardId,
|
||||
jobName: item.jobName,
|
||||
periodTypeName: item.periodName,
|
||||
|
||||
})
|
||||
});
|
||||
$("#tree").treeview({data: list});
|
||||
|
||||
$("#tree").on('nodeSelected', function (event, data) {
|
||||
choiceFun(data);
|
||||
|
||||
});
|
||||
choiceFun(list[0]);
|
||||
}, 'json');
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 提交审批(1:通过;0:不通过)
|
||||
function auditSubmitFunc(status) {
|
||||
|
||||
if (status == 1) {
|
||||
|
||||
if (($('#nextAuditorId').val() === '' && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === null && '${hasNextAuditor}' === '1')) {
|
||||
alert("请选择下一级审核人!");
|
||||
return;
|
||||
}
|
||||
if (($('#nextAuditorId').val() === '' && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === null && '${taskId}' === '')) {
|
||||
alert("请选择下一级审核人!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#pass').val(status);
|
||||
$.post(ext.contextPath + "/kpi/KpiApplyBiz/audit.do", $("#auditForm").serialize(), function (data) {
|
||||
|
||||
|
||||
if (data.code == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// 如果是从菜单进来的,就回到菜单页面去
|
||||
if ('${backToKpiTaskList}' === '1') {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiTask/showList.do";
|
||||
} else {
|
||||
// $("#kpiDiv").html('');
|
||||
location.reload();
|
||||
}
|
||||
} else {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
// $("#kpiDiv").html('');
|
||||
location.reload();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
|
||||
// 选择下一级审核人员
|
||||
function selectNextAuditFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "auditForm", hiddenId: "nextAuditorId", textId: "nextAuditorName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var dosearch = function () {
|
||||
$("#tablePlan").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/edit.do', {
|
||||
id: id,
|
||||
jobType: '${jobType}'
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#tablePlan").bootstrapTable('refresh');
|
||||
totalWeightFun();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/add.do?planStaffId=${planStaffId}&jobType=${jobType}', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//跳转到记录查询列表
|
||||
function gotoRecordTab(periodInstanceId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiResult/showList.do";
|
||||
}
|
||||
|
||||
|
||||
if ('${pageStatus}' === "0") {
|
||||
$('.notRecord').css('display', 'inline-block')
|
||||
$('.notRecord').show()
|
||||
} else {
|
||||
$('.record').css('display', 'inline-block')
|
||||
$('.record').show()
|
||||
}
|
||||
|
||||
//选人
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#nextAuditorId").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "auditForm",
|
||||
hiddenId: "nextAuditorId",
|
||||
textId: "nextAuditorName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<!-- 搜索状态 0为隐藏 1为显示 -->
|
||||
<input type="hidden" id="searchStatus" name="searchStatus" value="0">
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">人员信息</h3>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="
|
||||
height:500px;overflow:auto; "></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10" id="contentListTable">
|
||||
<div class="form-group pull-left form-inline" style="width: 100%" id="tablePlanList">
|
||||
|
||||
|
||||
<span class="col-md-2">考核周期:<div id="periodName">
|
||||
</div></span>
|
||||
|
||||
|
||||
<span class="col-md-4">姓名:
|
||||
<div id="userName">
|
||||
</div>
|
||||
</span>
|
||||
<span class="col-md-2">工号:
|
||||
<div id="userCardId">
|
||||
</div>
|
||||
</span>
|
||||
<span class="col-md-2">职位:
|
||||
<div id="jobName">
|
||||
</div>
|
||||
</span>
|
||||
<br>
|
||||
|
||||
<div id="editDiv" class="form-group form-inline" style="display: none">
|
||||
<div class="form-group pull-left">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaffDetail/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
添加考核内容
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div></div>
|
||||
|
||||
|
||||
<table id="tablePlan"></table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="audit">
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<div class="col-md-12" id="rejectionCommentDiv" style="display: none">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">驳回意见:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" disabled="disabled" name="auditComment" class="form-control"
|
||||
placeholder="请输入文本">${kpiPlanStaff.rejectionComment}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="auditDiv">
|
||||
<form id="auditForm">
|
||||
<input type="hidden" id="taskId" name="taskId" value="${taskId}"/>
|
||||
<input type="hidden" id="bizId" name="bizId" value="${kpiApplyBiz.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label" style="float: left;width: 180px;line-height: 54px;">驳回意见(驳回时填写):</label>
|
||||
<div class="col-sm-2">
|
||||
<textarea type="text" name="auditComment" class="form-control"
|
||||
placeholder="请输入文本"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="nextAuditDiv">
|
||||
<label class="control-label" style="float: left;width: 130px;line-height: 54px;">指定下一级审核人:</label>
|
||||
<div class="col-sm-2" style="padding-top: 10px;">
|
||||
<input type="text" name="auditorName" id="nextAuditorName" class="form-control"
|
||||
onclick="showUser4Handle()" placeholder="请输入文本" style="width: 50%" autocomplete="off" />
|
||||
<input type="hidden" name="auditorId" id="nextAuditorId" class="form-control"/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3 col-sm-offset-8">
|
||||
<%-- --%>
|
||||
<input type="hidden" name="pass" id="pass" value="1" class="form-control"/>
|
||||
<button type="button" class="btn btn-primary" onclick="auditSubmitFunc(1)">同意
|
||||
</button>
|
||||
|
||||
<button onclick="auditSubmitFunc(0)" class="btn btn-danger" type="button">驳回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="user4SelectDiv">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--<div class="box-body no-padding" style="float: left;width: 20%">
|
||||
<div name="tree" id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div style="float: right;width:80%" id="divTable">
|
||||
|
||||
--%>
|
||||
<%-- <jsp:include page="makePlanAuditDiv.jsp">--%>
|
||||
<%-- <jsp:param name="applyBizId" value="applyBizId"/>--%>
|
||||
<%-- </jsp:include>--%>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
232
WebRoot/jsp/kpi/periodInstanceAdd.jsp
Normal file
232
WebRoot/jsp/kpi/periodInstanceAdd.jsp
Normal file
@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// 岗位类型数据填充
|
||||
var selelct_1Data = jQuery.parseJSON('${jobTypeList}');
|
||||
var selelct_1 = $("#jobType").select2({
|
||||
data: selelct_1Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
selelct_1.val('0').trigger("change");
|
||||
|
||||
// 考核周期类型数据填充
|
||||
var selelct_2Data = jQuery.parseJSON('${periodTypeList}');
|
||||
var selelct_2 = $("#periodType").select2({
|
||||
data: selelct_2Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
}).on('select2:select', function (evt) {
|
||||
|
||||
showPeriodNo();
|
||||
|
||||
});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
selelct_2.val('0').trigger("change");
|
||||
|
||||
// 考核年份
|
||||
var selelct_4Data =
|
||||
jQuery.parseJSON('[{"id":"2020","text":"2020"},{"id":"2021","text":"2021"},{"id":"2022","text":"2022"},{"id":"2023","text":"2023"},{"id":"2024","text":"2024"},{"id":"2025","text":"2025"},{"id":"2026","text":"2026"},{"id":"2027","text":"2027"},{"id":"2028","text":"2028"},{"id":"2029","text":"2029"},{"id":"2030","text":"2030"},{"id":"2031","text":"2031"},{"id":"2032","text":"2032"},{"id":"2033","text":"2033"},{"id":"2034","text":"2034"},{"id":"2035","text":"2035"},{"id":"2036","text":"2036"},{"id":"2037","text":"2037"},{"id":"2038","text":"2038"},{"id":"2039","text":"2039"},{"id":"2040","text":"2040"},{"id":"2041","text":"2041"},{"id":"2042","text":"2042"},{"id":"2043","text":"2043"},{"id":"2044","text":"2044"},{"id":"2045","text":"2045"},{"id":"2046","text":"2046"},{"id":"2047","text":"2047"},{"id":"2048","text":"2048"},{"id":"2049","text":"2049"},{"id":"2050","text":"2050"}]');
|
||||
var selelct_4 = $("#periodYear").select2({
|
||||
data: selelct_4Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
var date = new Date();
|
||||
selelct_4.val(date.getFullYear()).trigger("change");
|
||||
|
||||
// 考核周期初始化数据
|
||||
showPeriodNo();
|
||||
});
|
||||
|
||||
//考核周期初始化
|
||||
function showPeriodNo() {
|
||||
var periodType = $("#periodType").val();
|
||||
$.post(ext.contextPath + "/kpi/KpiPeriodInstance/periodNoList.do?periodType=" + periodType, function (data) {
|
||||
if ($('#periodNo').data('select2')) {
|
||||
$('#periodNo').select2('destroy').empty()
|
||||
}
|
||||
let temp = $("#periodNo").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
temp.val(data[0].id).trigger("change")
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function saveFun() {
|
||||
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiPeriodInstance/save.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.code != 1) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
jobType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '绩效类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodYear: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核年份不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核周期类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
periodNo: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核周期不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">绩效(岗位)类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="jobType" id="jobType" style="width: 200px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核年份:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="periodYear" name="periodYear"
|
||||
style="width: 200px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核周期类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="periodType" id="periodType"
|
||||
style="width: 200px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核周期:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="periodNo" id="periodNo"
|
||||
style="width: 200px"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiPeriodInstance/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
328
WebRoot/jsp/kpi/periodInstanceList.jsp
Normal file
328
WebRoot/jsp/kpi/periodInstanceList.jsp
Normal file
@ -0,0 +1,328 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiPeriodInstance/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
status: $("#status").val(),
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'positionTypeName', // 返回json数据中的name
|
||||
title: '绩效类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodName', // 返回json数据中的name
|
||||
title: '考核周期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodTypeName', // 返回json数据中的name
|
||||
title: '考核周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'createTime', // 返回json数据中的name
|
||||
title: '创建时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'statusName', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 200,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.applyBizId + '\',\''+row.id+'\')" data-toggle="tooltip" title="考核对象"><i class="fa fa-edit "></i><span> 考核对象</span></button>';
|
||||
|
||||
// 计划编制
|
||||
if (row.status == 0 || row.status == 7) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="applyPageFun(\'' + row.applyBizId + '\')" data-toggle="tooltip" title="提交审核"><i class="fa fa-edit "></i><span> 提交审核</span></button>';
|
||||
}
|
||||
// 下发
|
||||
if (row.status == 2) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="sendFun(\'' + row.applyBizId + '\',\''+row.id+'\')" data-toggle="tooltip" title="下发"><i class="fa fa-edit "></i><span> 下发</span></button>';
|
||||
}
|
||||
// 开始评分
|
||||
if (row.status == 3||row.status == 8 ) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="markPageFun(\'' + row.applyBizId + '\',\''+row.id+'\')" data-toggle="tooltip" title="开始评分"><i class="fa fa-edit "></i><span> 开始评分</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
|
||||
// buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span> 删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPeriodInstance/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 考核对象列表页
|
||||
function editFun(applyBizId,periodInstanceId) {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiPlanStaff/showList.do?applyBizId=" + applyBizId+"&periodInstanceId="+periodInstanceId;
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
function applyPageFun(applyBizId) {
|
||||
$.post(ext.contextPath + "/kpi/KpiApplyBiz/applyPage.do?applyBizId=" + applyBizId, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 开始评分
|
||||
function markPageFun(applyBizId,periodInstanceId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiResultIndicator/showListForMark.do?applyBizId=" + applyBizId+"&periodInstanceId="+periodInstanceId;
|
||||
}
|
||||
|
||||
// 下发
|
||||
function sendFun(applyBizId,id) {
|
||||
swal({
|
||||
text: "确定要下发至该员工?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiApplyBiz/send.do', {id: id}, function (data) {
|
||||
if (data.code === 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '下发失败', 'mainAlertdiv');
|
||||
}
|
||||
}, "json");
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPeriodInstance/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 跳转到计划列表
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiPeriodInstance/showList.do";
|
||||
}
|
||||
// 人员单选
|
||||
function showUser4OneSelectFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "applyForm", hiddenId: "auditorId", textId: "auditorName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
//删除多条数据
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPeriodInstance/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<div class="form-group pull-left form-inline" style="width: 190px;">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<%-- 拥有该菜单的人就该拥有制定计划的权限 --%>
|
||||
<security:authorize buttonUrl="kpi/KpiPeriodInstance/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
添加计划
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
184
WebRoot/jsp/kpi/planStaffAdd.jsp
Normal file
184
WebRoot/jsp/kpi/planStaffAdd.jsp
Normal file
@ -0,0 +1,184 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var old = '';
|
||||
var key = '';
|
||||
$(function () {
|
||||
var key = setInterval(()=>{
|
||||
//JSON序列化方式导致中文乱码
|
||||
if ($('#objUserId').val()!=old){
|
||||
jobList()
|
||||
old = $('#objUserId').val()
|
||||
}
|
||||
if ($('#subModalAdd').is(':hidden')){
|
||||
clearInterval(key)
|
||||
}
|
||||
},500)
|
||||
});
|
||||
|
||||
function jobList() {
|
||||
clearInterval(key);
|
||||
$.post(ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(), function (data) {
|
||||
$("#jobId").select2({
|
||||
data:data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
// alert("调用接口前");
|
||||
$.post(ext.contextPath + "/kpi/KpiPlanStaff/save.do", $("#addForm").serialize()+ "&check=1", function (data) {
|
||||
// alert("接口返回码:"+data.code);
|
||||
if (data.code == -1) {
|
||||
showAlert('d', data.msg, 'addAlertdiv');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg, 'addAlertdiv');
|
||||
} else if (data.code == 2) {
|
||||
swal({
|
||||
text: data.creater + "已为该考核对象创建了考核方案,是否继续添加该考核对象",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
}).then(willCreate => {
|
||||
if (willCreate) {
|
||||
$.post(ext.contextPath + "/kpi/KpiPlanStaff/save.do", $("#addForm").serialize() + "&check=0", function (data) {
|
||||
if (data.code == 0) {
|
||||
showAlert('d', '保存失败', 'addAlertdiv');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModalAdd');
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// alert("走其他");
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModalAdd');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
objUserName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择用户'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '状态不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function showUser4OneSelectFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "addForm", hiddenId: "objUserId", textId: "objUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="subModalAdd">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<div id="addAlertdiv"></div>
|
||||
<%-- 考核计划主键--%>
|
||||
<input type="hidden" id="periodInstanceId" name="periodInstanceId" value="${periodInstanceId}" />
|
||||
<input type="hidden" id="applyBizId" name="applyBizId" value="${applyBizId}" />
|
||||
<input type="hidden" name="unitId" value="${unitId}" />
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核对象:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="objUserName" name="objUserName" class="form-control"
|
||||
placeholder="请输入文本" onclick="showUser4OneSelectFun();" onchange="jobList()"/>
|
||||
<input type="hidden" id="objUserId" name="objUserId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">职位:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="jobId" name="jobId"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaff/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
173
WebRoot/jsp/kpi/planStaffDetailAdd.jsp
Normal file
173
WebRoot/jsp/kpi/planStaffDetailAdd.jsp
Normal file
@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// 考核维度下拉列表数据填充
|
||||
$("#dimensionId").select2({
|
||||
data: jQuery.parseJSON('${dimensionList}'),
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$("#dimensionId").val('').trigger("change");
|
||||
|
||||
});
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiPlanStaffDetail/save.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
totalWeightFun();
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核维度不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="planStaffId" value="${planStaffId}"/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核维度:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="dimensionId" name="dimensionId" style="width: 100%;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="indicatorName" name="indicatorName" class="form-control"
|
||||
placeholder="请输入文本"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentA" name="contentA" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentB" name="contentB" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentC" name="contentC" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentD" name="contentD" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="indicatorDetail" name="indicatorDetail" class="form-control"
|
||||
placeholder="请输入文本"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight" name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入0.01~100之间的数字">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaffDetail/save.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
183
WebRoot/jsp/kpi/planStaffDetailEdit.jsp
Normal file
183
WebRoot/jsp/kpi/planStaffDetailEdit.jsp
Normal file
@ -0,0 +1,183 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
<%--$(function () {--%>
|
||||
<%-- // 考核维度下拉列表数据填充--%>
|
||||
<%-- $("#dimensionId2").select2({--%>
|
||||
<%-- data: jQuery.parseJSON('${dimensionList}'),--%>
|
||||
<%-- cache: false,--%>
|
||||
<%-- placeholder: '请选择',//默认文字提示--%>
|
||||
<%-- // allowClear: true,//允许清空--%>
|
||||
<%-- escapeMarkup: function (markup) {--%>
|
||||
<%-- return markup;--%>
|
||||
<%-- }, // 自定义格式化防止xss注入--%>
|
||||
<%-- language: "zh-CN",--%>
|
||||
<%-- minimumInputLength: 0,--%>
|
||||
<%-- minimumResultsForSearch: 10,//数据超过十个启用搜索框--%>
|
||||
<%-- formatResult: function formatRepo(repo) {--%>
|
||||
<%-- return repo.text;--%>
|
||||
<%-- }, // 函数用来渲染结果--%>
|
||||
<%-- formatSelection: function formatRepoSelection(repo) {--%>
|
||||
<%-- return repo.text;--%>
|
||||
<%-- } // 函数用于呈现当前的选择--%>
|
||||
<%-- });--%>
|
||||
<%-- $("#dimensionId2").val('${planStaffDetail.dimensionId}').trigger("change");--%>
|
||||
<%--});--%>
|
||||
|
||||
function updateFun() {
|
||||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiPlanStaffDetail/update.do", $("#editForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
totalWeightFun();
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#editForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核维度不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="editForm">
|
||||
<input type="hidden" name="id" value="${planStaffDetail.id}"/>
|
||||
<div id="alertDiv"></div>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<%-- <label class="col-sm-3 control-label">考核维度:</label>--%>
|
||||
<%-- <div class="col-sm-9">--%>
|
||||
<%-- <select class="form-control" id="dimensionId2" name="dimensionId"--%>
|
||||
<%-- style="width: 100%;"></select>--%>
|
||||
<%-- </div>--%>
|
||||
<label class="col-sm-3 control-label">考核维度:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" readonly name="dimensionName" class="form-control" placeholder=""
|
||||
value="${planStaffDetail.dimensionName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="indicatorName"
|
||||
name="indicatorName" class="form-control"
|
||||
placeholder="请输入文本">${planStaffDetail.indicatorName}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" value="${planStaffDetail.contentA}" id="contentA" name="contentA"
|
||||
class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" value="${planStaffDetail.contentB}" id="contentB" name="contentB"
|
||||
class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" value="${planStaffDetail.contentC}" id="contentC" name="contentC"
|
||||
class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" value="${planStaffDetail.contentD}" id="contentD" name="contentD"
|
||||
class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="indicatorDetail"
|
||||
name="indicatorDetail" class="form-control"
|
||||
placeholder="请输入文本">${planStaffDetail.indicatorDetail}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight" name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入0.01~100之间的数字" value="${planStaffDetail.indicatorWeight}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaffDetail/update.do">
|
||||
<button type="button" class="btn btn-primary" onclick="updateFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
434
WebRoot/jsp/kpi/planStaffDetailList.jsp
Normal file
434
WebRoot/jsp/kpi/planStaffDetailList.jsp
Normal file
@ -0,0 +1,434 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- <style type="text/css">
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<style>
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.t_back:link {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:visited {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:hover {
|
||||
color: #3c8dbc;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.notRecord {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.record {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
// var viewFun = function(id) {
|
||||
// $.post(ext.contextPath + '/work/mpoint/showHistory.do', {id:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var dosearch = function () {
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
$(function () {
|
||||
if ('${pageStatus}' === "0") {
|
||||
$('.notRecord').css('display', 'inline-block')
|
||||
$('.notRecord').show()
|
||||
} else {
|
||||
$('.record').css('display', 'inline-block')
|
||||
$('.record').show()
|
||||
}
|
||||
|
||||
|
||||
<%--alert('${kpiPlanStaff.status}-\'${taskId}\'')--%>
|
||||
// 控制从菜单进入时的页面展示
|
||||
if ('${kpiPlanStaff.status}' === '0' || '${kpiPlanStaff.status}' === '7') {
|
||||
$('#editDiv').show();
|
||||
}
|
||||
if ('${kpiPlanStaff.status}' === '1' && '${taskId}' === '') {
|
||||
$('#tab').show();
|
||||
}
|
||||
// 控制从代办页面进入时的页面展示
|
||||
else if ('${kpiPlanStaff.status}' === '1' && '${taskId}' !== '') {
|
||||
$('#auditDiv').show();
|
||||
} else {
|
||||
$('#tab').show();
|
||||
}
|
||||
// 控制是否选择下一个审批人
|
||||
if ('${hasNextAuditor}' === '1') {
|
||||
$('#nextAuditDiv').show();
|
||||
}
|
||||
|
||||
// 控制驳回时显示审批意见
|
||||
if ('${kpiPlanStaff.status}' === '7') {
|
||||
$('#rejectionCommentDiv').show();
|
||||
}
|
||||
|
||||
//加载权重总数
|
||||
totalWeightFun();
|
||||
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiPlanStaffDetail/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
onlyInfoPagination: false,
|
||||
// showRefresh: true,
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 100, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
// sort: params.sort, // 要排序的字段
|
||||
// order: params.order, // 排序规则
|
||||
planStaffId: '${planStaffId}'
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
if ('${kpiPlanStaff.status}' === '0' || '${kpiPlanStaff.status}' === '7') {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table2");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 权重总数
|
||||
function totalWeightFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/getTotalWeight.do?planStaffId=${planStaffId}', function (data) {
|
||||
// alert(data);
|
||||
$("#totalWeight").text(data);
|
||||
if (data !== 100) {
|
||||
$("#totalWeight").css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/add.do?planStaffId=${planStaffId}&jobType=${jobType}', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/edit.do', {
|
||||
id: id,
|
||||
jobType: '${jobType}'
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
totalWeightFun();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 跳转到计划列表
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPeriodInstance/showList.do";
|
||||
}
|
||||
|
||||
// 跳转到考核人员列表
|
||||
function gotoSecondTab(periodInstanceId,applyBizId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPlanStaff/showList.do?periodInstanceId=" + periodInstanceId+"&applyBizId="+applyBizId;
|
||||
}
|
||||
|
||||
//跳转到记录查询列表
|
||||
function gotoRecordTab(periodInstanceId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiResult/showList.do";
|
||||
}
|
||||
|
||||
// 选择下一级审核人员
|
||||
function selectNextAuditFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "auditForm", hiddenId: "nextAuditorId", textId: "nextAuditorName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<%-- <h1 id="head_title"></h1>--%>
|
||||
<h3 id="head_title2" class="t_tab t_back notRecord" onclick="gotoFirstTab()">考核计划</h3>
|
||||
<span class="t_tab notRecord">>></span>
|
||||
<h3 id="head_title3" class="t_tab t_back record" onclick="gotoRecordTab('${periodInstanceId}','${applyBizId}')">记录查询</h3>
|
||||
<span class="t_tab record">>></span>
|
||||
<h4 id="head_title4" class="t_tab t_back notRecord" onclick="gotoSecondTab('${periodInstanceId}','${applyBizId}')">考核对象</h4>
|
||||
<span class="t_tab notRecord">>></span>
|
||||
<h5 id="head_title5" class="t_tab">考核内容</h5>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<%-- <div id="tab" style="display:none">--%>
|
||||
<%-- <ul class="nav nav-pills">--%>
|
||||
<%-- <li class="notRecord">--%>
|
||||
<%-- <a href="javascript:gotoFirstTab();">考核计划--%>
|
||||
<%-- <%– <span class="badge">42</span>–%>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li class="notRecord">--%>
|
||||
<%-- <a href="javascript:gotoSecondTab('${periodInstanceId}');">考核对象</a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li id="record">--%>
|
||||
<%-- <a href="javascript:gotoRecordTab('${periodInstanceId}');">记录查询</a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li class="active">--%>
|
||||
<%-- <a href="#">考核内容--%>
|
||||
<%-- <%– <span class="badge">3</span>–%>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- </ul>--%>
|
||||
<%-- </div>--%>
|
||||
<br>
|
||||
<br>
|
||||
<div class="form-group form-inline">
|
||||
<span class="col-md-2">被考核人:<label>${kpiPlanStaff.user.caption}</label></span>
|
||||
<span class="col-md-2">部门:<label>${kpiPlanStaff.user._pname}</label></span>
|
||||
<span class="col-md-2">岗位:<label>${kpiPlanStaff.job.name}</label></span>
|
||||
<span class="col-md-2">状态:<label>${kpiPlanStaff.statusName}</label></span>
|
||||
<span class="col-md-2">考核周期:<label>${kpiPlanStaff.kpiPeriodInstance.periodName}</label></span>
|
||||
</div>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<div id="editDiv" class="form-group form-inline" style="display: none">
|
||||
<div class="form-group pull-left">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/KpiPlanStaffDetail/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
添加考核内容
|
||||
</button>
|
||||
</security:authorize>
|
||||
<%-- <button type="button" class="btn btn-default" onclick="applyPage2Fun();"><i--%>
|
||||
<%-- class="fa fa-check-square"></i>--%>
|
||||
<%-- 提交审核--%>
|
||||
<%-- </button>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right">
|
||||
|
||||
<div>当前权重总数:<label id="totalWeight"></label>/100</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div></div>
|
||||
<table id="table2"></table>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<div class="col-md-12" id="rejectionCommentDiv" style="display:none">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核意见:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" disabled="disabled" name="auditComment" class="form-control"
|
||||
placeholder="请输入文本">${kpiPlanStaff.rejectionComment}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" id="auditDiv" style="display:none">
|
||||
<form id="auditForm">
|
||||
<input type="hidden" id="taskId" name="taskId" value="${taskId}"/>
|
||||
<input type="hidden" id="bizId" name="bizId" value="${planStaffId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核意见:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" name="auditComment" class="form-control"
|
||||
placeholder="请输入文本"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="nextAuditDiv" style="display: none">
|
||||
<label class="col-sm-2 control-label">指定下一级审核人:</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" name="auditorName" id="nextAuditorName" class="form-control"
|
||||
onclick="selectNextAuditFun()" placeholder="请输入文本"/>
|
||||
<input type="hidden" name="auditorId" id="nextAuditorId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-sm-offset-4">
|
||||
<input type="hidden" name="pass" id="pass" value="1" class="form-control"/>
|
||||
<button type="button" class="btn btn-primary" onclick="auditSubmitFunc(1)">同意</button>
|
||||
|
||||
<button onclick="auditSubmitFunc(0)" class="btn btn-danger" type="button">驳回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
198
WebRoot/jsp/kpi/planStaffDetailListHisMark.jsp
Normal file
198
WebRoot/jsp/kpi/planStaffDetailListHisMark.jsp
Normal file
@ -0,0 +1,198 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
var initFun = function () {
|
||||
$("#hisMarktable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiResultIndicator/getListFinal.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
//showFooter: true,//添加页脚
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
planStaffId: '${planStaffId}'
|
||||
}
|
||||
},
|
||||
sortName: 'ord', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
|
||||
}, {
|
||||
field: 'auditor',
|
||||
title: "评价人",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
var labels = "";
|
||||
labels += '<div>' + row.auditor1 + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.auditor2 == "") {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + row.auditor2 + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.auditor3 == "") {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + row.auditor3 + '</div>';
|
||||
}
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
}
|
||||
}, {
|
||||
field: 'resultPoint',
|
||||
title: "完成结果得分",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
|
||||
var labels = "";
|
||||
<%--if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {--%>
|
||||
<%-- // return "内部客户维度由直接上级打分";--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%--} else {--%>
|
||||
// return initCell(row.id, "processPoint", "text", "过程表现得分", value);
|
||||
labels += '<div>' + Number(row.resultPoint1).toFixed(2) + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.resultPoint2 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.resultPoint2).toFixed(2) + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.resultPoint3 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.resultPoint3).toFixed(2) + '</div>';
|
||||
}
|
||||
// }
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
|
||||
}
|
||||
}, {
|
||||
field: 'processPoint',
|
||||
title: "过程表现得分",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
,
|
||||
formatter: function (value, row, index) {
|
||||
var labels = "";
|
||||
<%--if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {--%>
|
||||
<%-- // return "内部客户维度由直接上级打分";--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%--} else {--%>
|
||||
// return initCell(row.id, "processPoint", "text", "过程表现得分", value);
|
||||
labels += '<div>' + Number(row.processPoint1).toFixed(2) + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
|
||||
if (row.processPoint2 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.processPoint2).toFixed(2) + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.processPoint3 == 0) {
|
||||
labels += '<div>-</div>'
|
||||
} else {
|
||||
labels += '<div>' + Number(row.processPoint3).toFixed(2) + '</div>'
|
||||
}
|
||||
// }
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
}
|
||||
}
|
||||
],
|
||||
//注册加载子表的事件。index:父表当前行的行索引,row:父表当前行的Json数据对象,$detail:当前行下面创建的新行里面的td对象。
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
initFun();
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="showHisScoreModal">
|
||||
<div class="modal-dialog" style="width: 1200px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">历史评分情况</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table id="hisMarktable"></table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
622
WebRoot/jsp/kpi/planStaffDetailListMark.jsp
Normal file
622
WebRoot/jsp/kpi/planStaffDetailListMark.jsp
Normal file
@ -0,0 +1,622 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
/*.main-header{display:none;}*/
|
||||
/* .content-header{display:none;}*/
|
||||
/* .main-footer{display:none;}*/
|
||||
/* .select2-container .select2-selection--single{*/
|
||||
/* height:34px;*/
|
||||
/* line-height: 34px;*/
|
||||
/* }*/
|
||||
/* .select2-selection__arrow{*/
|
||||
/* margin-top:3px;*/
|
||||
/* }*/
|
||||
a {
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
outline: none;
|
||||
display: block;
|
||||
/*width: 100%;*/
|
||||
/*height: 100%;*/
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.emptyEditView {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.t_back:link {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:visited {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:hover {
|
||||
color: #3c8dbc;
|
||||
text-decoration: underline
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var planStaffId
|
||||
// var viewFun = function(id) {
|
||||
// $.post(ext.contextPath + '/work/mpoint/showHistory.do', {id:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var treeData = []
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
};
|
||||
var curCell = {};
|
||||
var applyBizId = '${applyBizId}'
|
||||
|
||||
|
||||
function danLieZhiBiaoSave() {
|
||||
var singleName = $('#singleIndicatorName').val();
|
||||
var singlePoint = $('#singleIndicatorPoint').val();
|
||||
if ('${taskId}' === '') {
|
||||
// alert(singleName)
|
||||
// if (singleName === '') {
|
||||
// alert('请填写单列指标名称!');
|
||||
// return;
|
||||
// } else if (singlePoint === '') {
|
||||
// alert('请填写单列指标评分!');
|
||||
// return;
|
||||
// } else
|
||||
if (singlePoint < 0 || singlePoint > 100) {
|
||||
alert('分数范围应该在0~100分!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$.post(ext.contextPath + "/kpi/KpiResultIndicator/saveSingleIndicator.do?planStaffId=" + planStaffId, $("#auditForm").serialize(), function (data) {
|
||||
// $("#auditForm").serialize()
|
||||
})
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// alert("0");
|
||||
// 控制从菜单进入时的页面展示
|
||||
if (('${kpiApplyBiz.status}' === '3' && '${taskId}' === '')
|
||||
|| ('${kpiApplyBiz.createUserId}' === '${loginUserId}')
|
||||
|| ('${kpiApplyBiz.status}' === '4')) {
|
||||
$('#tab').show();
|
||||
$('#auditDiv').show();
|
||||
$("#singleDiv").show();
|
||||
// alert("1");
|
||||
if ('${kpiApplyBiz.createUserId}' === '${loginUserId}') {
|
||||
// alert("2");
|
||||
$('#singleIndicatorName').removeAttr("disabled");
|
||||
$('#singleIndicatorPoint').removeAttr("disabled");
|
||||
} else {
|
||||
// alert("3");
|
||||
$('#singleIndicatorName').attr("disabled", "disabled");
|
||||
$('#singleIndicatorPoint').attr("disabled", "disabled");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (('${kpiApplyBiz.status}' === '4' && '${taskId}' === '')) {
|
||||
$('#tab').show();
|
||||
$('#auditDiv').show();
|
||||
}
|
||||
// 控制从代办页面进入时的页面展示
|
||||
else if ('${kpiApplyBiz.status}' === '4' && '${taskId}' !== '') {
|
||||
$('#auditDiv').show();
|
||||
} else {
|
||||
// 从待办菜单进入
|
||||
if ('${backToKpiTaskList}' !== '1') {
|
||||
$('#auditDiv').show();
|
||||
$('#tab').show();
|
||||
}
|
||||
}
|
||||
|
||||
if ('${hasNextAuditor}' === '1') {
|
||||
$('#nextAuditDiv').show();
|
||||
$('#QRRShow').show();
|
||||
} else if ('${taskId}' === '') {
|
||||
$('#nextAuditDiv').show();
|
||||
$('#PFRShow').show();
|
||||
}
|
||||
|
||||
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiResultIndicator/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false/kpi/KpiResultIndicator/getListFinal.do
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
onlyInfoPagination: false,
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 100, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
toolbar: "#toolbar",
|
||||
idField: "Id",
|
||||
// showRefresh: true,
|
||||
// search: true,
|
||||
clickToSelect: true,
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
// sort: params.sort, // 要排序的字段
|
||||
// order: params.order, // 排序规则
|
||||
planStaffId: planStaffId
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
|
||||
}, {
|
||||
field: 'completionStatus',
|
||||
title: "完成情况",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
,
|
||||
formatter: function (value, row, index) {
|
||||
if ('${kpiApplyBiz.status}' === '3') {
|
||||
// console.log("completionStatus" + value);
|
||||
return initCells(row.id, "completionStatus", "text", "完成情况", value);
|
||||
} else {
|
||||
return initCellText(row.id, "completionStatus", "text", "完成情况", value);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'resultPoint',
|
||||
title: "完成结果得分",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
,
|
||||
formatter: function (value, row, index) {
|
||||
if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {
|
||||
return "内部客户维度由直接上级打分";
|
||||
} else {
|
||||
return initCell(row.id, "resultPoint", "text", "完成结果得分", value);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'processPoint',
|
||||
title: "过程表现得分",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
,
|
||||
formatter: function (value, row, index) {
|
||||
if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {
|
||||
return "内部客户维度由直接上级打分";
|
||||
} else {
|
||||
return initCell(row.id, "processPoint", "text", "过程表现得分", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
onClickRow: function (cell, $element) {
|
||||
curCell = cell;
|
||||
|
||||
let view = $('.editable-input').find('input');
|
||||
|
||||
if (curCell[$element.find('a').attr('name')] === '' || curCell[$element.find('a').attr('name')] === 0) {
|
||||
view.attr('placeholder', view.val());
|
||||
view.val('');
|
||||
// console.log('1111111')
|
||||
view.on('change', (e) => {
|
||||
curCell[$element.find('a').attr('name')] = view.val()
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoadSuccess: function () {
|
||||
$("#table2 a").editable({
|
||||
emptytext: '点击开始填写',
|
||||
emptyclass: 'emptyEditView',
|
||||
url: function (params) {
|
||||
|
||||
var sName = $(this).attr("name");
|
||||
curCell[sName] = params.value;
|
||||
var id = curCell["id"];
|
||||
|
||||
// if (sName ==='resultPoint'||sName ==='processPoint' ){
|
||||
// if (params.value < 0 ||params.value >100 ){
|
||||
// alert('请填写0~100范围内的数字。');
|
||||
//
|
||||
// return ;
|
||||
// }
|
||||
// }
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + '/kpi/KpiResultIndicator/save.do?planStaffDetailId=' + id + "&" + sName + "=" + params.value,
|
||||
dataType: 'JSON',
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
|
||||
// alert('保存成功!');
|
||||
},
|
||||
error: function (res) {
|
||||
// alert("error");
|
||||
|
||||
if (res.status == 400) {
|
||||
showAlert('d', '输入有误,请检查输入', 'mainAlertdiv')
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
type: 'text'
|
||||
});
|
||||
},
|
||||
// onLoadSuccess: function () { //加载成功时执行
|
||||
// adjustBootstrapTableView("table");
|
||||
// },
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
loadTreeData()
|
||||
|
||||
var choiceFun = function (row) {
|
||||
planStaffId = row.id;
|
||||
// console.log(planStaffId)
|
||||
$('#periodName').html('<label>' + row.periodTypeName + '</lable>');
|
||||
$('#userName').html('<label>' + row.text + '</lable>');
|
||||
$('#userCardId').html('<label>' + row.cardId + '</lable>');
|
||||
$('#jobName').html('<label>' + row.jobName + '</lable>');
|
||||
$('#statusName').html('<label>' + row.statusName + '</lable>');
|
||||
$('#deptName').html('<label>' + row.deptName + '</lable>');
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
$('#singleIndicatorName').val("");
|
||||
$('#singleIndicatorPoint').val("");
|
||||
danLieZhiBiao(row.id)
|
||||
|
||||
};
|
||||
var danLieZhiBiao = function (planStaffId) {
|
||||
$.post(ext.contextPath + "/kpi/KpiResultIndicator/getSingleIndicator.do?planStaffId=" + planStaffId, $("#auditForm").serialize(), function (data) {
|
||||
if (data.result) {
|
||||
$('#singleIndicatorName').val(data.result.singleIndicatorName)
|
||||
$('#singleIndicatorPoint').val(data.result.singleIndicatorPoint)
|
||||
}
|
||||
}, "json")
|
||||
}
|
||||
|
||||
|
||||
function loadTreeData() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/getListNonPage.do?applyBizId=' + applyBizId, {}, function (data) {
|
||||
let temp = data.result;
|
||||
let list = [];
|
||||
temp.forEach(item => {
|
||||
list.push({
|
||||
id: item.id,
|
||||
text: item.objUserName,
|
||||
cardId: item.cardId,
|
||||
jobName: item.jobName,
|
||||
periodTypeName: item.periodName,
|
||||
statusName: item.statusName,
|
||||
deptName: item.deptName
|
||||
})
|
||||
});
|
||||
|
||||
$("#tree").treeview({data: list});
|
||||
|
||||
$("#tree").on('nodeSelected', function (event, data) {
|
||||
danLieZhiBiaoSave();
|
||||
choiceFun(data);
|
||||
|
||||
});
|
||||
choiceFun(list[0]);
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 编辑表格
|
||||
function initCell(id, name, dataTyp, dataTitle, value) {
|
||||
|
||||
if (value === undefined || value == null || value == "") {
|
||||
value = '';
|
||||
}
|
||||
|
||||
return '<a href="#" name="' + name + '" data-type="' + dataTyp + '" data-pk="' + id + '" data-title="' + dataTitle + '" style="text-decoration: none;border: none;outline: none;line-height: 47px">' + value + '</a>'
|
||||
// return "<a href=\"#\" name=\""+name+"\" data-type=\""+dataType+"\" data-pk=\"" + id + "\" data-title=\""+dataTitle+"\">" + value + "</a>"
|
||||
}
|
||||
|
||||
function initCells(id, name, dataType, dataTitle, value) {
|
||||
if (value === undefined || value == null || value == "") {
|
||||
value = '';
|
||||
// value =(placeholder='点击这里开始评价');
|
||||
}
|
||||
return "<a href=\"#\" name=\"" + name + "\" data-type=\"" + dataType + "\" data-pk=\"" + id + '" data-title="' + dataTitle + '" style="text-decoration: none;border: none;outline: none;line-height: 47px">' + value + '</a>'
|
||||
// return "<a href=\"#\" name=\""+name+"\" data-type=\""+dataType+"\" data-pk=\"" + id + "\" data-title=\""+dataTitle+"\">" + value + "</a>"
|
||||
}
|
||||
|
||||
function initCellText(id, name, dataType, dataTitle, value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/add.do?planStaffId=${planStaffId}', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/edit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 提交审批(1:通过;0:不通过)
|
||||
function markSubmitFunc(status) {
|
||||
$('#pass').val(status);
|
||||
danLieZhiBiaoSave();
|
||||
if (status == 1) {
|
||||
if (($('#nextAuditorId').val() === '' && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === null && '${hasNextAuditor}' === '1')) {
|
||||
alert("请选择下一级确认人!");
|
||||
return;
|
||||
}
|
||||
if (($('#nextAuditorId').val() === '' && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === null && '${taskId}' === '')) {
|
||||
alert("请选择下一级评分人!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
$('#unitId').val(unitId);
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/kpi/KpiResultIndicator/markSubmit.do"
|
||||
, $("#auditForm").serialize(), function (data) {
|
||||
|
||||
if ('${taskId}' === '') {
|
||||
|
||||
if (data.code === 1) {
|
||||
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPeriodInstance/showList.do";
|
||||
} else {
|
||||
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
} else {
|
||||
if (data.code === 1) {
|
||||
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// 如果是从菜单进来的,就回到菜单页面去
|
||||
if ('${backToKpiTaskList}' === '1') {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiTask/showList.do";
|
||||
} else {
|
||||
$("#kpiDiv").html('');
|
||||
}
|
||||
} else {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
// 选择下一级审核人员
|
||||
function selectNextAuditFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "auditForm", hiddenId: "nextAuditorId", textId: "nextAuditorName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function showHisScore() {
|
||||
$.post(ext.contextPath + '/kpi/KpiResultIndicator/showHisScore.do', {planStaffId: planStaffId}, function (data) {
|
||||
console.log(data)
|
||||
$("#showHisScoreDiv").html(data);
|
||||
openModal('showHisScoreModal');
|
||||
});
|
||||
}
|
||||
|
||||
//选人
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#nextAuditorId").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "auditForm",
|
||||
hiddenId: "nextAuditorId",
|
||||
textId: "nextAuditorName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h3 id="head_title2" class="t_tab t_back">考核评分</h3>
|
||||
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="subDiv"></div>
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="showHisScoreDiv"></div>
|
||||
|
||||
<input type="hidden" name="unitId" id="unitId" class="form-control"/>
|
||||
|
||||
<div class="box-body no-padding" style="float: left;width: 20%">
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<div style="float: right;width:80%">
|
||||
<div class="form-group form-inline">
|
||||
<span class="col-md-2">被考核人:<label id="userName"></label></span>
|
||||
<span class="col-md-2">部门:<label id="deptName"></label></span>
|
||||
<span class="col-md-2">岗位:<label id="jobName"></label></span>
|
||||
<span class="col-md-2">考核周期:<label id="periodName"></label></span>
|
||||
<span class="col-md-2">状态:<label id="statusName"></label></span>
|
||||
</div>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<button type="button" class="btn pull-left" onclick="showHisScore();">历史评分</button>
|
||||
<br>
|
||||
<table id="table2"></table>
|
||||
<br>
|
||||
<form id="auditForm">
|
||||
<div class="form-group" id="singleDiv" style="display: none">
|
||||
<div class="form-group inline pull-left" style="width: 420px;">
|
||||
<label class="col-sm-4 control-label pull-left">单列指标名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" name="singleIndicatorName" id="singleIndicatorName"
|
||||
class="form-control"
|
||||
placeholder="请输入文本"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group inline pull-left">
|
||||
<label class="col-sm-5 control-label">单列指标评分:</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="number" name="singleIndicatorPoint" id="singleIndicatorPoint"
|
||||
class="form-control"
|
||||
placeholder="请输入文本"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<div class="col-md-12" id="auditDiv" style="display:none">
|
||||
|
||||
<input type="hidden" id="taskId" name="taskId" value="${taskId}"/>
|
||||
<input type="hidden" id="bizId" name="bizId" value="${applyBizId}"/>
|
||||
|
||||
<div class="form-inline">
|
||||
<div class="form-group" id="nextAuditDiv" style="display: none;width: 100%;">
|
||||
<label class="control-label" id="PFRShow" style="float: left;width: 150px;line-height: 54px;display: none;">
|
||||
指定下一级评分人:
|
||||
</label>
|
||||
<label class="control-label" id="QRRShow" style="float: left;width: 150px;line-height: 54px;display: none;">
|
||||
指定下一级确认人:
|
||||
</label>
|
||||
<div style="float: left;width: 230px;padding-top: 10px;">
|
||||
<input type="text" name="auditorName" id="nextAuditorName" class="form-control"
|
||||
onclick="showUser4Handle()" placeholder="请输入文本" autocomplete="off"/>
|
||||
<input type="hidden" name="auditorId" id="nextAuditorId" class="form-control"/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
<label class="control-label"
|
||||
style="float: left;width: 80px;line-height: 54px;">审核意见:</label>
|
||||
<div style="float: left;width: 250px;">
|
||||
<textarea type="text" name="auditComment" class="form-control" style="width: 240px;"
|
||||
placeholder="请输入文本">${kpiApplyBiz.rejectionComment}</textarea>
|
||||
</div>
|
||||
<div style="float: left;width: 200px;padding-left: 50px;padding-top: 10px;">
|
||||
<input type="hidden" name="pass" id="pass" value="1" class="form-control"/>
|
||||
<button type="button" class="btn btn-primary" onclick="markSubmitFunc(1)">提交
|
||||
</button>
|
||||
<button onclick="markSubmitFunc(0)" class="btn btn-danger" type="button">驳回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
636
WebRoot/jsp/kpi/planStaffDetailListMarkFinal.jsp
Normal file
636
WebRoot/jsp/kpi/planStaffDetailListMarkFinal.jsp
Normal file
@ -0,0 +1,636 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
/*.main-header{display:none;}*/
|
||||
/* .content-header{display:none;}*/
|
||||
/* .main-footer{display:none;}*/
|
||||
/* .select2-container .select2-selection--single{*/
|
||||
/* height:34px;*/
|
||||
/* line-height: 34px;*/
|
||||
/* }*/
|
||||
/* .select2-selection__arrow{*/
|
||||
/* margin-top:3px;*/
|
||||
/* }*/
|
||||
a {
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
outline: none;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.emptyEditView {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.t_back:link {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:visited {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:hover {
|
||||
color: #3c8dbc;
|
||||
text-decoration: underline
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var planStaffId
|
||||
// var viewFun = function(id) {
|
||||
// $.post(ext.contextPath + '/work/mpoint/showHistory.do', {id:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var treeData = []
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
};
|
||||
var curCell = {};
|
||||
var applyBizId = '${applyBizId}'
|
||||
|
||||
$(function () {
|
||||
// 控制从菜单进入时的页面展示
|
||||
if (('${kpiApplyBiz.status}' === '3' && '${taskId}' === '')
|
||||
||('${kpiApplyBiz.createUserId}' === '${loginUserId}')
|
||||
|| ('${kpiApplyBiz.status}' === '4')) {
|
||||
$('#tab').show();
|
||||
$('#auditDiv').show();
|
||||
$("#singleDiv").show();
|
||||
if ('${kpiApplyBiz.createUserId}' === '${loginUserId}') {
|
||||
$('#singleIndicatorName').removeAttr("disabled");
|
||||
$('#singleIndicatorPoint').removeAttr("disabled");
|
||||
}else {
|
||||
$('#singleIndicatorName').attr("disabled","disabled");
|
||||
$('#singleIndicatorPoint').attr("disabled","disabled");
|
||||
}
|
||||
}
|
||||
|
||||
if (('${kpiApplyBiz.status}' === '4' && '${taskId}' === '')) {
|
||||
$('#tab').show();
|
||||
$('#auditDiv').show();
|
||||
}
|
||||
// 控制从代办页面进入时的页面展示
|
||||
else if ('${kpiApplyBiz.status}' === '4' && '${taskId}' !== '') {
|
||||
$('#auditDiv').show();
|
||||
} else {
|
||||
// 从待办菜单进入
|
||||
if ('${backToKpiTaskList}' !== '1') {
|
||||
$('#auditDiv').show();
|
||||
$('#tab').show();
|
||||
}
|
||||
}
|
||||
|
||||
if ('${hasNextAuditor}' === '1') {
|
||||
$('#nextAuditDiv').show();
|
||||
} else if ('${taskId}' === '') {
|
||||
$('#nextAuditDiv').show();
|
||||
}
|
||||
|
||||
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiResultIndicator/getListFinal.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
onlyInfoPagination: false,
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 100, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
toolbar: "#toolbar",
|
||||
idField: "Id",
|
||||
// showRefresh: true,
|
||||
// search: true,
|
||||
clickToSelect: true,
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
// sort: params.sort, // 要排序的字段
|
||||
// order: params.order, // 排序规则
|
||||
planStaffId: planStaffId
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
|
||||
}, {
|
||||
field: 'completionStatus',
|
||||
title: "完成情况",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'auditor',
|
||||
title: "评价人",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
var labels = "";
|
||||
labels += '<div>' + row.auditor1 + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.auditor2 == "") {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + row.auditor2 + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.auditor3 == "") {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + row.auditor3 + '</div>';
|
||||
}
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
}
|
||||
}, {
|
||||
field: 'resultPoint',
|
||||
title: "完成结果得分",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
|
||||
var labels = "";
|
||||
<%--if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {--%>
|
||||
<%-- // return "内部客户维度由直接上级打分";--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%--} else {--%>
|
||||
// return initCell(row.id, "processPoint", "text", "过程表现得分", value);
|
||||
labels += '<div>' + Number(row.resultPoint1).toFixed(2) + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.resultPoint2 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.resultPoint2).toFixed(2) + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.resultPoint3 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.resultPoint3).toFixed(2) + '</div>';
|
||||
}
|
||||
// }
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
|
||||
}
|
||||
}, {
|
||||
field: 'processPoint',
|
||||
title: "过程表现得分",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
,
|
||||
formatter: function (value, row, index) {
|
||||
var labels = "";
|
||||
<%--if (row.dimensionName === "内部客户" && '${kpiApplyBiz.status}' !== '3') {--%>
|
||||
<%-- // return "内部客户维度由直接上级打分";--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%-- labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>'--%>
|
||||
<%-- labels += '<div>内部客户维度由直接上级打分</div>'--%>
|
||||
<%--} else {--%>
|
||||
// return initCell(row.id, "processPoint", "text", "过程表现得分", value);
|
||||
labels += '<div>' + Number(row.processPoint1).toFixed(2) + '</div>';
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
|
||||
if (row.processPoint2 == 0) {
|
||||
labels += '<div>-</div>';
|
||||
} else {
|
||||
labels += '<div>' + Number(row.processPoint2).toFixed(2) + '</div>';
|
||||
}
|
||||
labels += '<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>';
|
||||
if (row.processPoint3 == 0) {
|
||||
labels += '<div>-</div>'
|
||||
} else {
|
||||
labels += '<div>' + Number(row.processPoint3).toFixed(2) + '</div>'
|
||||
}
|
||||
// }
|
||||
labels = '<div class="btn-group" >' + labels + '</div>';
|
||||
return labels;
|
||||
}
|
||||
}
|
||||
],
|
||||
onClickRow: function (cell, $element) {
|
||||
curCell = cell;
|
||||
|
||||
let view = $('.editable-input').find('input');
|
||||
|
||||
if (curCell[$element.find('a').attr('name')] === '' || curCell[$element.find('a').attr('name')] === 0) {
|
||||
view.attr('placeholder', view.val());
|
||||
view.val('');
|
||||
// console.log('1111111')
|
||||
view.on('change', (e) => {
|
||||
curCell[$element.find('a').attr('name')] = view.val()
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoadSuccess: function () {
|
||||
$("#table2 a").editable({
|
||||
emptytext: '点击开始填写',
|
||||
emptyclass: 'emptyEditView',
|
||||
url: function (params) {
|
||||
|
||||
var sName = $(this).attr("name");
|
||||
curCell[sName] = params.value;
|
||||
var id = curCell["id"];
|
||||
|
||||
// if (sName ==='resultPoint'||sName ==='processPoint' ){
|
||||
// if (params.value < 0 ||params.value >100 ){
|
||||
// alert('请填写0~100范围内的数字。');
|
||||
//
|
||||
// return ;
|
||||
// }
|
||||
// }
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + '/kpi/KpiResultIndicator/save.do?planStaffDetailId=' + id + "&" + sName + "=" + params.value,
|
||||
dataType: 'JSON',
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
|
||||
// alert('保存成功!');
|
||||
},
|
||||
error: function (res) {
|
||||
// alert("error");
|
||||
|
||||
if (res.status == 400) {
|
||||
showAlert('d', '输入有误,请检查输入', 'mainAlertdiv')
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
type: 'text'
|
||||
});
|
||||
},
|
||||
// onLoadSuccess: function () { //加载成功时执行
|
||||
// adjustBootstrapTableView("table");
|
||||
// },
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
loadTreeData()
|
||||
|
||||
var choiceFun = function (row) {
|
||||
planStaffId = row.id;
|
||||
console.log(planStaffId)
|
||||
$('#periodName').html('<label>' + row.periodTypeName + '</lable>');
|
||||
$('#userName').html('<label>' + row.text + '</lable>');
|
||||
$('#userCardId').html('<label>' + row.cardId + '</lable>');
|
||||
$('#jobName').html('<label>' + row.jobName + '</lable>');
|
||||
$('#statusName').html('<label>' + row.statusName + '</lable>');
|
||||
$('#deptName').html('<label>' + row.deptName + '</lable>');
|
||||
$("#table2").bootstrapTable('refresh');
|
||||
danLieZhiBiao(row.id)
|
||||
|
||||
};
|
||||
var danLieZhiBiao = function (planStaffId) {
|
||||
$.post(ext.contextPath + "/kpi/KpiResultIndicator/getSingleIndicator.do?planStaffId=" + planStaffId, $("#auditForm").serialize(), function (data) {
|
||||
if (data.result) {
|
||||
$('#singleIndicatorName').val(data.result.singleIndicatorName)
|
||||
$('#singleIndicatorPoint').val(data.result.singleIndicatorPoint)
|
||||
}
|
||||
}, "json")
|
||||
}
|
||||
|
||||
function loadTreeData() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/getListNonPage.do?applyBizId=' + applyBizId, {}, function (data) {
|
||||
let temp = data.result;
|
||||
let list = [];
|
||||
temp.forEach(item => {
|
||||
list.push({
|
||||
id: item.id,
|
||||
text: item.objUserName,
|
||||
cardId: item.cardId,
|
||||
jobName: item.jobName,
|
||||
periodTypeName: item.periodName,
|
||||
statusName: item.statusName,
|
||||
deptName: item.deptName
|
||||
})
|
||||
});
|
||||
|
||||
$("#tree").treeview({data: list});
|
||||
|
||||
$("#tree").on('nodeSelected', function (event, data) {
|
||||
choiceFun(data);
|
||||
});
|
||||
choiceFun(list[0]);
|
||||
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 编辑表格
|
||||
function initCell(id, name, dataTyp, dataTitle, value) {
|
||||
|
||||
if (value === undefined || value == null || value == "") {
|
||||
value = '';
|
||||
}
|
||||
|
||||
return '<a href="#" name="' + name + '" data-type="' + dataTyp + '" data-pk="' + id + '" data-title="' + dataTitle + '" style="text-decoration: none;border: none;outline: none;line-height: 47px">' + value + '</a>'
|
||||
// return "<a href=\"#\" name=\""+name+"\" data-type=\""+dataType+"\" data-pk=\"" + id + "\" data-title=\""+dataTitle+"\">" + value + "</a>"
|
||||
}
|
||||
|
||||
function initCells(id, name, dataType, dataTitle, value) {
|
||||
if (value === undefined || value == null || value == "") {
|
||||
value = '';
|
||||
// value =(placeholder='点击这里开始评价');
|
||||
}
|
||||
return "<a href=\"#\" name=\"" + name + "\" data-type=\"" + dataType + "\" data-pk=\"" + id + '" data-title="' + dataTitle + '" style="text-decoration: none;border: none;outline: none;line-height: 47px">' + value + '</a>'
|
||||
// return "<a href=\"#\" name=\""+name+"\" data-type=\""+dataType+"\" data-pk=\"" + id + "\" data-title=\""+dataTitle+"\">" + value + "</a>"
|
||||
}
|
||||
|
||||
function initCellText(id, name, dataType, dataTitle, value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/add.do?planStaffId=${planStaffId}', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaffDetail/edit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 提交审批(1:通过;0:不通过)
|
||||
function markSubmitFunc(status) {
|
||||
$('#pass').val(status);
|
||||
var singleName = $('#singleIndicatorName').val();
|
||||
var singlePoint = $('#singleIndicatorPoint').val();
|
||||
|
||||
// 如果是直接上级评分,则需要填写单列指标
|
||||
if ('${taskId}' === '') {
|
||||
if (singleName === '' && singlePoint !== '') {
|
||||
alert('请填写单列指标名称!');
|
||||
return;
|
||||
} else if (singleName !== '' && singlePoint === '') {
|
||||
alert('请填写单列指标评分!');
|
||||
return;
|
||||
} else if (singlePoint < 0 || singlePoint > 100) {
|
||||
alert('分数范围应该在0~100分!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (status == 1) {
|
||||
if (($('#nextAuditorId').val() === '' && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${hasNextAuditor}' === '1')
|
||||
|| ($('#nextAuditorId').val() === null && '${hasNextAuditor}' === '1')) {
|
||||
alert("请选择下一级打分人!");
|
||||
return;
|
||||
}
|
||||
if (($('#nextAuditorId').val() === '' && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === undefined && '${taskId}' === '')
|
||||
|| ($('#nextAuditorId').val() === null && '${taskId}' === '')) {
|
||||
alert("请选择下一级打分人!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
$('#unitId').val(unitId);
|
||||
|
||||
$.post(ext.contextPath + "/kpi/KpiResultIndicator/markSubmit.do"
|
||||
, $("#auditForm").serialize(), function (data) {
|
||||
|
||||
if ('${taskId}' === '') {
|
||||
|
||||
if (data.code === 1) {
|
||||
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPeriodInstance/showList.do";
|
||||
} else {
|
||||
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
} else {
|
||||
if (data.code === 1) {
|
||||
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// 如果是从菜单进来的,就回到菜单页面去
|
||||
if ('${backToKpiTaskList}' === '1') {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiTask/showList.do";
|
||||
} else {
|
||||
$("#kpiDiv").html('');
|
||||
}
|
||||
} else {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
// 跳转到考核人员列表
|
||||
function gotoSecondTab(periodInstanceId) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPlanStaff/showList.do?periodInstanceId=" + periodInstanceId;
|
||||
}
|
||||
|
||||
// 选择下一级审核人员
|
||||
function selectNextAuditFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "auditForm", hiddenId: "nextAuditorId", textId: "nextAuditorName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h3 id="head_title2" class="t_tab t_back">考核评分</h3>
|
||||
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="subDiv"></div>
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div class="box-body no-padding" style="float: left;width: 20%">
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<div style="float: right;width:80%">
|
||||
<div class="form-group form-inline">
|
||||
<span class="col-md-2">被考核人:<label id="userName"></label></span>
|
||||
<span class="col-md-2">部门:<label id="deptName"></label></span>
|
||||
<span class="col-md-2">岗位:<label id="jobName"></label></span>
|
||||
<span class="col-md-2">考核周期:<label id="periodName"></label></span>
|
||||
<span class="col-md-2">状态:<label id="statusName"></label></span>
|
||||
</div>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<br>
|
||||
<table id="table2"></table>
|
||||
<br>
|
||||
<form id="auditForm">
|
||||
<div class="form-group" id="singleDiv" style="display: none">
|
||||
<div class="form-group inline pull-left">
|
||||
<label class="col-sm-5 control-label pull-left">单列指标名称:</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" name="singleIndicatorName" id="singleIndicatorName"
|
||||
class="form-control"
|
||||
placeholder="请输入文本"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group inline pull-left">
|
||||
<label class="col-sm-5 control-label">单列指标评分:</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="number" name="singleIndicatorPoint" id="singleIndicatorPoint"
|
||||
class="form-control"
|
||||
placeholder="请输入文本"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr style="border-top:1px dashed #987cb9;" width="100%" color="#987cb9" size=1>
|
||||
<div class="col-md-12" id="auditDiv" style="display:none">
|
||||
|
||||
<input type="hidden" id="taskId" name="taskId" value="${taskId}"/>
|
||||
<input type="hidden" id="bizId" name="bizId" value="${applyBizId}"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label" style="float: left;width: 80px;line-height: 54px;">审核意见:</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea type="text" name="auditComment" class="form-control"
|
||||
placeholder="请输入文本">${kpiApplyBiz.rejectionComment}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<div class="form-group pull-left" id="nextAuditDiv" style="display: none">
|
||||
<label class="col-sm-5 control-label">指定下一级打分人:</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" name="auditorName" id="nextAuditorName" class="form-control"
|
||||
onclick="selectNextAuditFun()" placeholder="请输入文本"/>
|
||||
<input type="hidden" name="auditorId" id="nextAuditorId" class="form-control"/>
|
||||
<input type="hidden" name="unitId" id="unitId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-left">
|
||||
<div class="col-sm-12 col-sm-offset-4">
|
||||
<input type="hidden" name="pass" id="pass" value="1" class="form-control"/>
|
||||
<button type="button" class="btn btn-primary" onclick="markSubmitFunc(1)">同意
|
||||
</button>
|
||||
<button onclick="markSubmitFunc(0)" class="btn btn-danger" type="button">驳回
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
326
WebRoot/jsp/kpi/planStaffList.jsp
Normal file
326
WebRoot/jsp/kpi/planStaffList.jsp
Normal file
@ -0,0 +1,326 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
};
|
||||
$(function () {
|
||||
|
||||
var initFlg = ${initFlg};
|
||||
var status = ${applyBiz.status};
|
||||
if (status != 0) {
|
||||
$('#addBtn').hide();
|
||||
$('#delBtn').hide();
|
||||
} else {
|
||||
$('#addBtn').show();
|
||||
$('#delBtn').show();
|
||||
}
|
||||
|
||||
|
||||
// alert(initFlg);
|
||||
if (initFlg === 0) {
|
||||
$('#init').hide();
|
||||
} else {
|
||||
$('#init').show();
|
||||
}
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/KpiPlanStaff/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// showRefresh: true,
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
applyBizId: '${applyBizId}',
|
||||
periodInstanceId: '${periodInstanceId}',
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'objUserName', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'cardId', // 返回json数据中的name
|
||||
title: '工号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'deptName', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobName', // 返回json数据中的name
|
||||
title: '岗位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'statusName', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 200
|
||||
}, {
|
||||
field: 'createUserName', // 返回json数据中的name
|
||||
title: '编制人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 200
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300,
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="detailFun(\'' + row.id + '\',\'' + row.jobLevelType + '\')" data-toggle="tooltip" title="考核内容"><i class="fa fa-edit "></i><span> 考核内容</span></button>';
|
||||
// 计划编制
|
||||
if (row.status == 0) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/add.do?periodInstanceId=${periodInstanceId}&applyBizId=${applyBizId}', function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModalAdd');
|
||||
});
|
||||
}
|
||||
|
||||
// 批量新增(从绩效方案)
|
||||
function initFun() {
|
||||
window.location.href = ext.contextPath +
|
||||
'/kpi/KpiPlanStaff/adds.do?periodInstanceId=${periodInstanceId}&applyBizId=${applyBizId}';
|
||||
}
|
||||
|
||||
// 考核内容
|
||||
function detailFun(id, jobType) {
|
||||
window.location.href = ext.contextPath
|
||||
+ "/kpi/KpiPlanStaffDetail/showList.do?periodInstanceId=${periodInstanceId}&applyBizId=${applyBizId}"
|
||||
+ "&planStaffId=" + id + "&jobType=" + jobType;
|
||||
}
|
||||
|
||||
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 跳转到计划列表
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiPeriodInstance/showList.do";
|
||||
}
|
||||
|
||||
|
||||
//删除多条数据
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/KpiPlanStaff/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.t_back:link {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:visited {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:hover {
|
||||
color: #3c8dbc;
|
||||
text-decoration: underline
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h3 id="head_title2" class="t_tab t_back" onclick="gotoFirstTab()">考核计划</h3><span class="t_tab">>></span>
|
||||
<h4 id="head_title3" class="t_tab">考核对象</h4>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<div class="form-group pull-left form-inline" style="width: 100%;">
|
||||
<div class="btn-group" style="padding-bottom:10px;">
|
||||
<%-- <security:authorize buttonUrl="kpi/KpiPlanStaff/add.do">--%>
|
||||
<button id="addBtn" type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
添加考核对象
|
||||
</button>
|
||||
<button id="init" type="button" class="btn btn-default" onclick="initFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
从绩效方案初始化考核对象
|
||||
</button>
|
||||
<%-- </security:authorize>--%>
|
||||
<button id="delBtn" type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
418
WebRoot/jsp/kpi/resultInfoNotYear.jsp
Normal file
418
WebRoot/jsp/kpi/resultInfoNotYear.jsp
Normal file
@ -0,0 +1,418 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<%-- // TODO 拼接的考核详情表 --%>
|
||||
<head>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- <style type="text/css">
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
|
||||
<style>
|
||||
.drug-ele-td {
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.chosen-area-p,
|
||||
.rightmouse-panel-div,
|
||||
.panel-div-left,
|
||||
.panel-div-right,
|
||||
.drug-ele-td {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.setting {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.duiqifangsi {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var data = {
|
||||
level: ['直接上级', '隔级上级']
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('.modal-dialog').width(1200)
|
||||
let info = JSON.parse('${info}')
|
||||
let list = JSON.parse('${list}')
|
||||
let formatList = []
|
||||
list.map(item => {
|
||||
if (formatList.length == 0) {
|
||||
formatList.push([item])
|
||||
} else {
|
||||
let child = formatList.find(a => a[0].dimensionName === item.dimensionName)
|
||||
for (let i = 0; i < formatList.length; i++) {
|
||||
if (formatList[i][0].dimensionName === item.dimensionName) {
|
||||
formatList[i].push(item)
|
||||
}
|
||||
}
|
||||
if (child === undefined) {
|
||||
formatList.push([item])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
data = {...info, list: formatList, level: ['直接上级', '隔级上级'], listNeiBu: JSON.parse('${listNeiBu}')}
|
||||
data.maker = info.planMakeInfo.find(info => info.taskName === '编制人')?.userName
|
||||
data.makerDate = info.planMakeInfo.find(info => info.taskName === '编制人')?.date
|
||||
data.verifier = info.planMakeInfo.find(info => info.taskName.indexOf('审核人') != -1)?.userName
|
||||
data.verifierDate = info.planMakeInfo.find(info => info.taskName.indexOf('审核人') != -1)?.date
|
||||
|
||||
|
||||
initBtn()
|
||||
if (info.markLevelWeight.length > 2) {
|
||||
data.level.push("隔级上级2")
|
||||
}
|
||||
|
||||
document.documentElement.oncontextmenu = function (e) {
|
||||
return false
|
||||
}
|
||||
$(".wyb-excel").wybExcel();
|
||||
initTable()
|
||||
});
|
||||
|
||||
function initTable() {
|
||||
|
||||
let childList = ''
|
||||
data.list.map(child => {
|
||||
childList += tableItem({list: child, level: data.level})
|
||||
})
|
||||
|
||||
let neibu = ''
|
||||
if (data.listNeiBu.length > 0) {
|
||||
neibu = tableItem({list: data.listNeiBu, colspan: data.level.length})
|
||||
}
|
||||
|
||||
|
||||
$(".wyb-excel").setExcelHtml(
|
||||
tableHeader(data.level, (data.planStaffStatus === 6 ? '绩效考核表' : '个人确定页')) +
|
||||
tableFirstRow(data.objUserName, data.cardId, data.jobName, data.deptName, data.periodName, data.level.length) +
|
||||
//控制不同级别
|
||||
tableTitle({
|
||||
dims: ['完成结果得分(权重' + data.resultProcessWeight[0] + '%)', '过程表现得分(权重' + data.resultProcessWeight[1] + '%)'],
|
||||
level: data.level
|
||||
}) +
|
||||
// tableItem({list: data.list[0], level: data.level}) +
|
||||
childList +
|
||||
//控制其他 默认为无上下级
|
||||
tableTitle({
|
||||
dims: ['完成结果得分(权重' + data.resultProcessWeight[0] + '%)', '过程表现得分(权重' + data.resultProcessWeight[1] + '%)'],
|
||||
colspan: data.level.length
|
||||
}) +
|
||||
|
||||
neibu +
|
||||
|
||||
// tableItem({list: data.listNeiBu, colspan: data.level.length}) +
|
||||
|
||||
|
||||
tableOther(data.planStaffStatus, {
|
||||
maker: data.maker,
|
||||
makerDate: data.makerDate,
|
||||
verifier: data.verifier,
|
||||
verifierDate: data.verifierDate,
|
||||
examinerList: data.markInfo,
|
||||
singleIndicatorName: data.singleIndicatorName,
|
||||
grade: data.resultLevel,
|
||||
score: data.resultPoint,
|
||||
singleColumnScore: data.singleIndicatorPoint,
|
||||
dimensionScore: data.dimensionPoint,
|
||||
name: data.objUserName
|
||||
}, data.level.length === 3 ? 14 : 12) +
|
||||
tableFooter())
|
||||
// $(".wyb-excel").initTable($(".wyb-excel").getExcelHtml(), {})
|
||||
}
|
||||
|
||||
function tableFirstRow(name, id, work, company, periodName, count) {
|
||||
let tds = ''
|
||||
for (let index = 0; index < count - 1; index++) {
|
||||
tds += `<td style="width: 100px; display: none;"></td>`
|
||||
}
|
||||
return `<tr style="height: 38px;">
|
||||
<td style="width: 68px;" readonly="readonly">姓名</td>
|
||||
<td style="width: 70px;" readonly="readonly">` + name + `</td>
|
||||
<td style="width: 60px;" readonly="readonly">工号</td>
|
||||
<td style="width: 80px;" readonly="readonly">` + id + `</td>
|
||||
<td style="width: 60px;" readonly="readonly">岗位</td>
|
||||
<td style="width: 200px;" readonly="readonly">` + work + `</td>
|
||||
|
||||
<td style="width: 100px;" rowspan="1" colspan="` + count + `" readonly="readonly">部门</td>`
|
||||
+ tds +
|
||||
`<td style="width: 100px;" rowspan="1" colspan="` + count + `" readonly="readonly">` + company + `</td>`
|
||||
+ tds +
|
||||
`<td style="width: 85px;" readonly="readonly">考核周期</td>
|
||||
<td style="width: 100px;" readonly="readonly">` + periodName + `</td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
function tableTitle({dims = ['完成结果得分(权重80%)', '过程表现得分(权重20%)'], info = '过程、结果合计得分', level = [], colspan = 1}) {
|
||||
let tds = ''
|
||||
for (let index = 0; index < level.length; index++) {
|
||||
tds += `<td style="width: 100px;" readonly="readonly">` + level[index] + `</td>`
|
||||
|
||||
}
|
||||
let tempDims = ''
|
||||
for (let index = 0; index < dims.length; index++) {
|
||||
tempDims += `<td style="width: 100px;" rowspan="` + (level.length == 0 ? 2 : 1) + `" colspan="` + (level.length === 0 ? colspan : level.length) + `" readonly="readonly">` + dims[index] + `</td>`
|
||||
+ level.map(item => '').join(`<td style="width: 100px; display: none;"></td>`)
|
||||
}
|
||||
return ` <tr style="height: 38px;">
|
||||
<td style="width: 68px;" rowspan="2" colspan="1" readonly="readonly">考核维度</td>
|
||||
<td style="width: 210px;" rowspan="2" colspan="3" readonly="readonly">内容</td>
|
||||
<td style="width: 74px; display: none;" readonly="readonly"></td>
|
||||
<td style="width: 84px; display: none;" readonly="readonly"></td>
|
||||
<td style="width: 60px;" rowspan="2" colspan="1" readonly="readonly">权重</td>
|
||||
<td style="width: 200px;" rowspan="2" colspan="1" readonly="readonly">完成情况</td>`
|
||||
+ tempDims +
|
||||
`<td style="width: 162px;" rowspan="2" colspan="2" readonly="readonly">` + info + `</td>
|
||||
<td style="width: 100px; display: none;"></td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td style="width: 68px; display: none;"></td>
|
||||
<td style="width: 70px; display: none;"></td>
|
||||
<td style="width: 60px; display: none;"></td>
|
||||
<td style="width: 80px; display: none;"></td>
|
||||
<td style="width: 60px; display: none;"></td>
|
||||
<td style="width: 200px; display: none;"></td>`
|
||||
+ tds + tds +
|
||||
`<td style="width: 85px; display: none;" rowspan="1" colspan="2" readonly="readonly"></td>
|
||||
<td style="width: 100px; display: none;" readonly="readonly"></td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
|
||||
function tableItem({list = [], level = [], colspan = 1}) {
|
||||
let tableItemStr = ''
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
tableItemStr += `<tr>
|
||||
<td rowspan="` + list.length + `" colspan="1" readonly="readonly" ` + (i === 0 ? '' : 'style="display:none"') + `>` + list[i].dimensionName + `</td>
|
||||
<td rowspan="1" colspan="3" readonly="readonly">` + list[i].indicatorName + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].indicatorWeight + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].completionStatus + `</td>
|
||||
<td rowspan="1" colspan="` + colspan + `" readonly="readonly">` + list[i].resultPointList[0] + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly" ` + (level.length > 1 ? '' : 'style="display:none"') + `>` + (list[i].resultPointList[1]) + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly" ` + (level.length > 2 ? '' : 'style="display:none"') + `>` + (list[i].resultPointList[2]) + `</td>
|
||||
<td rowspan="1" colspan="` + colspan + `" readonly="readonly">` + list[i].processPointList[0] + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly" ` + (level.length > 1 ? '' : 'style="display:none"') + `>` + list[i].processPointList[1] + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly" ` + (level.length > 2 ? '' : 'style="display:none"') + `>` + list[i].processPointList[2] + `</td>
|
||||
<td rowspan="1" colspan="2" readonly="readonly">` + list[i].indicatorWeightPoint + `</td>
|
||||
</tr>`
|
||||
}
|
||||
return tableItemStr
|
||||
}
|
||||
|
||||
function tableOther(status, {
|
||||
dimensionScore = '0.00',//四维度绩效得分
|
||||
singleIndicatorName = '',
|
||||
singleColumnScore = '0.00', //单列指标得分
|
||||
maker = '',//绩效计划制定人签名
|
||||
makerDate = '',
|
||||
verifier = '', //审定人签名
|
||||
verifierDate = '',
|
||||
examinerList = [],//考核人签名
|
||||
score = '0.00',
|
||||
grade = '',
|
||||
name = ''
|
||||
}, maxCol) {
|
||||
|
||||
let examinerListTableRow = ''
|
||||
examinerList.map((item, index) => {
|
||||
examinerListTableRow += `<tr>
|
||||
<td colspan="3" readonly="readonly">计划考核人` + (index + 1) + `</td>
|
||||
<td colspan="3" readonly="readonly">` + item.userName + `</td>
|
||||
<td colspan="3" readonly="readonly">制定日期</td>
|
||||
<td colspan="` + (maxCol == 14 ? 5 : 3) + `" readonly="readonly">` + item.date + `</td>
|
||||
</tr>`
|
||||
})
|
||||
|
||||
|
||||
return `<tr>
|
||||
<td rowspan="1" colspan="6" readonly="readonly">四维度绩效得分</td>
|
||||
<td rowspan="1" colspan="` + (maxCol == 14 ? 8 : 6) + `" readonly="readonly">` + dimensionScore + `</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="1" colspan="6" readonly="readonly">` + singleIndicatorName + `</td>
|
||||
<td rowspan="1" colspan="` + (maxCol == 14 ? 8 : 6) + `" readonly="readonly">` + singleColumnScore + `</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">计划制定人</td>
|
||||
<td colspan="3" readonly="readonly">` + maker + `</td>
|
||||
<td colspan="3">制定日期</td>
|
||||
<td colspan="` + (maxCol == 14 ? 5 : 3) + `" readonly="readonly">` + makerDate + `</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">计划审定人</td>
|
||||
<td colspan="3" readonly="readonly">` + verifier + `</td>
|
||||
<td colspan="3">制定日期</td>
|
||||
<td colspan="` + (maxCol == 14 ? 5 : 3) + `" readonly="readonly">` + verifierDate + `</td>
|
||||
</tr>` + examinerListTableRow +
|
||||
`<tr>
|
||||
<td rowspan="1" colspan="2" readonly="readonly">本次考核得分:</td>
|
||||
<td style="text-align:center" rowspan="1" colspan="1" readonly="readonly">` + score + `</td>
|
||||
<td rowspan="1" colspan="2" readonly="readonly">评定等级:` + grade + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">被考核人签名:</td>
|
||||
<td id="username" rowspan="1" colspan="` + (maxCol - 6) + `" readonly="readonly" style="margin: auto">` + (status === 6 ? name : ``) + `</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td style="text-align:center" rowspan="2" colspan="2" readonly="readonly">备注:</td>
|
||||
<td rowspan="1" style="height:36px;line-height:18px;" colspan="` + (maxCol - 2) + `" readonly="readonly">
|
||||
1、每项结果得分之和={【直接上级评分(完成结果)×0.7+隔级上级评分(完成结果)×0.3】×0.8+【直接上级评分(过程表现)×0.7+隔级上级评分(过程表现)×0.3】×0.2}×该项指标的权重;
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td style="height:36px" rowspan="1" colspan="` + (maxCol - 2) + `" readonly="readonly">
|
||||
2、本次考核得分=指标过程结果得分之和+任务过程结果得分之和
|
||||
</td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
function tableHeader(level, title) {
|
||||
return `<table width="100%" style="text-align:center"><tbody>
|
||||
<tr><td class="title" rowspan="1" colspan="` + (10 + level.length) + `" readonly="readonly"> ` + title + ` </td></tr>`
|
||||
}
|
||||
|
||||
function tableFooter() {
|
||||
return `</tbody></table>`
|
||||
}
|
||||
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiResult/showList.do";
|
||||
}
|
||||
function close() {
|
||||
closeModal('subModal');
|
||||
}
|
||||
function initBtn() {
|
||||
if (data.planStaffStatus === 6) {
|
||||
$('#submit').css('display', 'none')
|
||||
// $('#submit').text('导出')
|
||||
}
|
||||
}
|
||||
|
||||
function submit() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + '/kpi/KpiResult/updateStatus.do',
|
||||
data: {
|
||||
planStaffId: '${id}',
|
||||
status: 6
|
||||
},
|
||||
success: function (res) {
|
||||
// alert('保存成功!');
|
||||
if (res === 1 || res === '1') {
|
||||
$('#username').html(data.objUserName)
|
||||
} else if (res === -9 || res === '-9') {
|
||||
showAlert('d', '非本人无权限确认', 'mainAlertdiv')
|
||||
} else {
|
||||
showAlert('d', '确认失败,此条记录已失效,请联系直接上级', 'mainAlertdiv')
|
||||
}
|
||||
// initBtn()
|
||||
},
|
||||
error: function () {
|
||||
// alert("error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiResult/showList.do";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog" style="width: 1200px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div class="wyb-excel" style="width:100%;margin: 0 auto;"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" onclick="close()">关闭</button>
|
||||
<c:if test="${status==5}">
|
||||
<button type="button" class="btn btn-primary" onclick="submit()">确认</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<body>--%>
|
||||
<%--<div class="modal fade" id="subModal">--%>
|
||||
<%-- <div class="modal-dialog">--%>
|
||||
<%-- <!-- Content Header (Page header) -->--%>
|
||||
<%-- <div class="modal-content">--%>
|
||||
<%-- <section class="content-header">--%>
|
||||
<%-- <h1 id="head_title"></h1>--%>
|
||||
<%-- <ol class="breadcrumb">--%>
|
||||
<%-- <li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>--%>
|
||||
<%-- </ol>--%>
|
||||
<%-- </section>--%>
|
||||
<%-- <!-- Main content -->--%>
|
||||
<%-- <section class="content container-fluid" style="width: 100%;margin: 20px auto auto;">--%>
|
||||
<%-- <div id="mainAlertdiv"></div>--%>
|
||||
<%-- <div class="wyb-excel" style="width:100%;margin: 0 auto;"></div>--%>
|
||||
<%-- </section>--%>
|
||||
<%-- <!-- /.content -->--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <%– <jsp:include page="/jsp/bottom.jsp"></jsp:include> –%>--%>
|
||||
<%-- <%– <jsp:include page="/jsp/side.jsp"></jsp:include> –%>--%>
|
||||
<%--</div>--%>
|
||||
<%--</body>--%>
|
||||
<!-- 引入daterangepicker-->
|
||||
<script type="text/javascript" src="https://www.phpmoban.cn/demo/js/9002/js/excel.min.js"></script>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/excel.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/font-awesome.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/xlsx/js/excel.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
300
WebRoot/jsp/kpi/resultInfoYear.jsp
Normal file
300
WebRoot/jsp/kpi/resultInfoYear.jsp
Normal file
@ -0,0 +1,300 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<%-- // TODO 拼接的考核详情表 --%>
|
||||
<head>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- <style type="text/css">
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
|
||||
<style>
|
||||
.drug-ele-td {
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.chosen-area-p,
|
||||
.rightmouse-panel-div,
|
||||
.panel-div-left,
|
||||
.panel-div-right,
|
||||
.drug-ele-td {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.setting {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.duiqifangsi {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
// var data = {
|
||||
// name: '',
|
||||
// workId: '',
|
||||
// workName: '',
|
||||
// companyName: '',
|
||||
// week: '',
|
||||
// list: [1, 2, 3],
|
||||
// level: ['直接上级', '隔级上级', '隔级上级2']
|
||||
// }
|
||||
|
||||
|
||||
$(function () {
|
||||
$('.modal-dialog').width(1200)
|
||||
let list = JSON.parse('${list}')
|
||||
let formatList = []
|
||||
list.map(item => {
|
||||
if (formatList.length == 0) {
|
||||
formatList.push([item])
|
||||
} else {
|
||||
let child = formatList.find(a => a[0].dimensionName === item.dimensionName)
|
||||
for (let i = 0; i < formatList.length; i++) {
|
||||
if (formatList[i][0].dimensionName === item.dimensionName) {
|
||||
formatList[i].push(item)
|
||||
}
|
||||
}
|
||||
if (child === undefined) {
|
||||
formatList.push([item])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
data = {...JSON.parse('${info}'), list: formatList, level: ['直接上级', '隔级上级']}
|
||||
if (data.markLevelWeight > 2) {
|
||||
data.level.push('隔级上级2')
|
||||
}
|
||||
|
||||
|
||||
document.documentElement.oncontextmenu = function (e) {
|
||||
return false
|
||||
}
|
||||
$(".wyb-excel").wybExcel();
|
||||
initTable()
|
||||
});
|
||||
|
||||
|
||||
function initTable() {
|
||||
|
||||
let childList = ''
|
||||
data.list.map(child => {
|
||||
childList += tableItem({list: child, level: data.level})
|
||||
})
|
||||
|
||||
$(".wyb-excel").setExcelHtml(
|
||||
tableHeader(data.planStaffStatus === 6 ? '年度绩效考核表' : '个人确定页') +
|
||||
tableFirstRow(data.objUserName, data.cardId, data.jobName, data.deptName, data.periodName, data.resultPoint, data.markLevelWeight) +
|
||||
childList +
|
||||
|
||||
tableOther(data.planStaffStatus, {
|
||||
name: data.objUserName,
|
||||
grade: data.resultLevel,
|
||||
score: data.resultPoint,
|
||||
examinerList: data.markInfo
|
||||
}) +
|
||||
tableFooter())
|
||||
// $(".wyb-excel").initTable($(".wyb-excel").getExcelHtml(), {})
|
||||
}
|
||||
|
||||
function tableFirstRow(name, id, work, company, week, score, level) {
|
||||
return `<tr style="height: 38px;">
|
||||
<td style="width: 80px;" readonly="readonly">姓名</td>
|
||||
<td style="width: 80px;" readonly="readonly">` + name + `</td>
|
||||
<td style="width: 80px;" readonly="readonly">部门</td>
|
||||
<td style="width: 80px;" readonly="readonly">` + id + `</td>
|
||||
<td style="width: 80px;" readonly="readonly">岗位</td>
|
||||
<td style="width: 80px;" readonly="readonly">` + work + `</td>
|
||||
<td style="width: 80px;" readonly="readonly">考核年度</td>
|
||||
<td style="width: 80px;" readonly="readonly">` + week + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">年度内绩效考核平均成绩</td>
|
||||
<td colspan="1" readonly="readonly">` + score + `</td>
|
||||
<td colspan="5" readonly="readonly"></td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td readonly="readonly">考核指标</td>
|
||||
<td readonly="readonly">评分项目</td>
|
||||
<td readonly="readonly">权重</td>
|
||||
<td readonly="readonly">直接上级评分(` + level[0] + `%)</td>
|
||||
<td ` + (level.length > 1 ? '' : `style="display:none"`) + ` readonly="readonly">隔级上级评分(` + level[1] + `%)</td>
|
||||
<td ` + (level.length > 2 ? '' : `style="display:none"`) + ` readonly="readonly">隔级上级评分2(` + level[2] + `%)</td>
|
||||
<td readonly="readonly">各项目合计得分</td>
|
||||
<td colspan="` + (Math.ceil(3 / level.length)) + `" readonly="readonly">备注</td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
|
||||
function tableItem({list = [], level = []}) {
|
||||
let tableItemStr = ''
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
tableItemStr += `<tr>
|
||||
<td rowspan="` + list.length + `" colspan="1" readonly="readonly" ` + (i === 0 ? '' : 'style="display:none"') + ` >` + list[i].dimensionName + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].indicatorName + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].indicatorWeight + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].resultPointList[0] + `</td>
|
||||
<td ` + (level.length > 1 ? '' : `style="display:none"`) + ` rowspan="1" colspan="1" readonly="readonly">` + list[i].resultPointList[1] + `</td>
|
||||
<td ` + (level.length > 2 ? '' : `style="display:none"`) + ` rowspan="1" colspan="1" readonly="readonly">` + list[i].resultPointList[2] + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">` + list[i].indicatorWeightPoint + `</td>
|
||||
<td rowspan="1" colspan="` + (Math.ceil(3 / level.length)) + `" readonly="readonly"></td>
|
||||
</tr>`
|
||||
}
|
||||
return tableItemStr
|
||||
}
|
||||
|
||||
|
||||
function tableOther(status, {
|
||||
examinerList = '',//考核人签名
|
||||
score = '0.00',
|
||||
grade = '',
|
||||
name = ''
|
||||
}) {
|
||||
return `<tr style="text-align:left">
|
||||
<td rowspan="1" colspan="1" readonly="readonly">说明</td>
|
||||
<td rowspan="1" colspan="7" readonly="readonly">每项结果得分=(直接上级评分×0.7+隔级上级评分×0.3)×各项目所占权重</td>
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td rowspan="1" colspan="2" readonly="readonly">年度绩效考核得分:</td>
|
||||
<td style="text-align:center" rowspan="1" colspan="2" readonly="readonly">` + score + `</td>
|
||||
<td rowspan="1" colspan="4" readonly="readonly">评定等级:` + grade + `</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left" rowspan="1" colspan="4" readonly="readonly">考核人签名:` + examinerList.map(info => info.userName).join(',') + `</td>
|
||||
<td rowspan="1" colspan="1" readonly="readonly">被考核人签名:</td>
|
||||
<td id="username" rowspan="1" colspan="3" readonly="readonly">` + (status === 6 ? name : ``) + `</td>
|
||||
</tr>`
|
||||
}
|
||||
|
||||
function tableHeader(title) {
|
||||
return `<table width="100%" style="text-align:center"><tbody>
|
||||
<tr><td class="title" colspan="8" readonly="readonly">` + title + `</td></tr>`
|
||||
}
|
||||
|
||||
function tableFooter() {
|
||||
return `</tbody></table>`
|
||||
}
|
||||
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiResult/showList.do";
|
||||
}
|
||||
function close() {
|
||||
closeModal('subModal');
|
||||
}
|
||||
function submit() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + '/kpi/KpiResult/updateStatus.do',
|
||||
data: {
|
||||
planStaffId: '${id}',
|
||||
status: 6
|
||||
},
|
||||
success: function (res) {
|
||||
// alert('保存成功!');
|
||||
if (res === 1 || res === '1') {
|
||||
$('#username').html(data.objUserName)
|
||||
} else if (res === -9 || res === '-9') {
|
||||
showAlert('d', '非本人无权限确认', 'mainAlertdiv')
|
||||
} else {
|
||||
showAlert('d', '确认失败,此条记录已失效,请联系直接上级', 'mainAlertdiv')
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
// alert("error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog" style="width: 1200px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div class="wyb-excel" style="width:100%;margin: 0 auto;"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" onclick="close()">关闭</button>
|
||||
<c:if test="${status==5}">
|
||||
<button type="button" class="btn btn-primary" onclick="submit()">确认</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<body>--%>
|
||||
<%--<div class="modal fade" id="subModal">--%>
|
||||
<%-- <div class="modal-dialog">--%>
|
||||
<%-- <div class="modal-content">--%>
|
||||
<%-- <!-- Content Header (Page header) -->--%>
|
||||
<%-- <section class="content-header">--%>
|
||||
<%-- <h1 id="head_title"></h1>--%>
|
||||
<%-- <ol class="breadcrumb">--%>
|
||||
<%-- <li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>--%>
|
||||
<%-- </ol>--%>
|
||||
<%-- </section>--%>
|
||||
<%-- <section class="content container-fluid" style="width: 100%;margin: 20px auto auto;">--%>
|
||||
<%-- <div class="wyb-excel" style="width:100%;margin: 0 auto;"></div>--%>
|
||||
<%-- </section>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</body>--%>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/excel.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/font-awesome.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/xlsx/js/excel.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
547
WebRoot/jsp/kpi/resultList.jsp
Normal file
547
WebRoot/jsp/kpi/resultList.jsp
Normal file
@ -0,0 +1,547 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: limo
|
||||
Date: 2021/10/21
|
||||
Time: 下午4:35
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lihongye
|
||||
Date: 2021/10/12
|
||||
Time: 上午10:43
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<style>
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var dosearch = function () {
|
||||
if ($('#deptId').val() !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}
|
||||
};
|
||||
var oldUser = '';
|
||||
var jobid = "";//职位id
|
||||
var data99 = {
|
||||
deptId: '',
|
||||
periodYear: '',
|
||||
periodType: '',
|
||||
periodNo: '',
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
initTreeView();
|
||||
/*
|
||||
var key = setInterval(() => {
|
||||
let newUser = $('#objUserId').val()
|
||||
if (newUser.length > 0) {
|
||||
if (oldUser != newUser) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
oldUser = newUser
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
*/
|
||||
|
||||
// 考核年份
|
||||
var selelct_4Data =
|
||||
jQuery.parseJSON('[{"id":"2020","text":"2020"},{"id":"2021","text":"2021"},{"id":"2022","text":"2022"},{"id":"2023","text":"2023"},{"id":"2024","text":"2024"},{"id":"2025","text":"2025"},{"id":"2026","text":"2026"},{"id":"2027","text":"2027"},{"id":"2028","text":"2028"},{"id":"2029","text":"2029"},{"id":"2030","text":"2030"},{"id":"2031","text":"2031"},{"id":"2032","text":"2032"},{"id":"2033","text":"2033"},{"id":"2034","text":"2034"},{"id":"2035","text":"2035"},{"id":"2036","text":"2036"},{"id":"2037","text":"2037"},{"id":"2038","text":"2038"},{"id":"2039","text":"2039"},{"id":"2040","text":"2040"},{"id":"2041","text":"2041"},{"id":"2042","text":"2042"},{"id":"2043","text":"2043"},{"id":"2044","text":"2044"},{"id":"2045","text":"2045"},{"id":"2046","text":"2046"},{"id":"2047","text":"2047"},{"id":"2048","text":"2048"},{"id":"2049","text":"2049"},{"id":"2050","text":"2050"}]');
|
||||
var selelct_4 = $("#periodYear").select2({
|
||||
data: selelct_4Data,
|
||||
cache: false,
|
||||
placeholder: '全部',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
var date = new Date();
|
||||
selelct_4.val(date.getFullYear()).trigger("change");
|
||||
selelct_4.on("change", function (e) {
|
||||
/* if ($('#deptId').val() !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}*/
|
||||
});
|
||||
$("#objUserName").on("change", function (e) {
|
||||
// if ($('#objUserName').val() != '') {
|
||||
// $('.input_clear').show()
|
||||
// } else {
|
||||
// $('.input_clear').hide()
|
||||
// }
|
||||
/* if ($('#deptId').val() !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}*/
|
||||
});
|
||||
|
||||
var selelct_1Data = jQuery.parseJSON('${periodType}');
|
||||
console.log(selelct_1Data)
|
||||
var selelct_1 = $("#periodType").select2({
|
||||
data: selelct_1Data,
|
||||
cache: false,
|
||||
placeholder: '全部',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
// selelct_1.val('').trigger("change");
|
||||
selelct_1.on("change", function (e) {
|
||||
/*if (data99.deptId !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}*/
|
||||
showPeriodNo();
|
||||
});
|
||||
selelct_1.val(selelct_1Data[0].id).trigger("change")
|
||||
|
||||
$("#rhistorytable").bootstrapTable({ // 对应table标签的id
|
||||
|
||||
url: ext.contextPath + '/kpi/KpiResult/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规
|
||||
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
<%--periodInstanceId: ${periodInstanceId}, 报错--%>
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
userInfoLike: $('#userInfoLike').val(),
|
||||
jobType: $('#jobType').val(),
|
||||
deptId: data99.deptId,
|
||||
periodYear: $('#periodYear').val(),
|
||||
periodType: $('#periodType').val(),
|
||||
periodNo: $('#periodNo').val(),
|
||||
isAllSearch: $('#isAllSearch').val()
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'userName', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'userCardId', // 返回json数据中的name
|
||||
title: '工号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'deptName', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobName', // 返回json数据中的name
|
||||
title: '岗位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'jobLevelTypeName', // 返回json数据中的name
|
||||
title: '岗位类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodYear', // 返回json数据中的name
|
||||
title: '年份', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'periodTypeName', // 返回json数据中的name
|
||||
title: '周期类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'resultPoint', // 返回json数据中的name
|
||||
title: '考核结果', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'statusName', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
|
||||
var buts = "";
|
||||
if (row.status === 5 && '${loginUserid}' === row.objUserId) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="detailFun(\'' + row.id + '\')" data-toggle="tooltip" title="确认"><i class="fa fa-add "></i><span> 确认</span></button>';
|
||||
}
|
||||
if (row.status === 3) {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="showContent(\'' + row.id + '\',\'' + row.periodInstanceId + '\',\'' + row.applyBizId + '\',\'' + row.jobLevelType + '\')" data-toggle="tooltip" title="详情"><i class="fa fa-edit "></i><span> 详情</span></button>';
|
||||
|
||||
} else {
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="detailFun(\'' + row.id + '\')" data-toggle="tooltip" title="详情"><i class="fa fa-edit "></i><span> 详情</span></button>';
|
||||
|
||||
}
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("rhistorytable");
|
||||
console.log('${loginUserid}', "1111111")
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
var selelct_5Data = jQuery.parseJSON('${jobType}');
|
||||
var selelct_5 = $("#jobType").select2({
|
||||
data: selelct_5Data,
|
||||
cache: false,
|
||||
placeholder: '全部',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
selelct_5.find('option:eq(0)').attr('selected', 'selected');
|
||||
selelct_5.on("change", function (e) {
|
||||
|
||||
/* if (data99.deptId !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}*/
|
||||
|
||||
|
||||
});
|
||||
selelct_5.val(selelct_5.val()).trigger("change");
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//考核周期初始化
|
||||
function showPeriodNo() {
|
||||
var periodType = $("#periodType").val();
|
||||
$.post(ext.contextPath + "/kpi/KpiPeriodInstance/periodNoList.do?periodType=" + periodType, function (data) {
|
||||
|
||||
if ($('#periodNo').data('select2')) {
|
||||
$('#periodNo').select2('destroy').empty()
|
||||
}
|
||||
let temp = $("#periodNo").select2({
|
||||
data: data,
|
||||
placeholder: '全部',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
console.log(temp);
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
temp.on("change", function (e) {
|
||||
/* if (data99.deptId !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}*/
|
||||
})
|
||||
temp.val(data[0].id).trigger("change")
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
//获取部门树
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/user/getAllParentByUnitId.do?unitId=' + unitId, {ng: ''}, function (res) {
|
||||
$('#companytree').treeview({
|
||||
data: res,
|
||||
showBorder: true,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, node) {
|
||||
data99.deptId = node.id;
|
||||
// TODO 判断选中的是否为部门?
|
||||
|
||||
|
||||
// console.log(node)
|
||||
});
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
|
||||
// 确认结果
|
||||
function confirmFun(id) {
|
||||
|
||||
}
|
||||
|
||||
function showContent(id, periodInstanceId, applyBizId, jobType) {
|
||||
window.location.href = ext.contextPath + "/kpi/KpiPlanStaffDetail/showList.do?status=1&planStaffId=" + id + '&periodInstanceId=' + periodInstanceId + '&applyBizId=' + applyBizId + '&jobType=' + jobType;
|
||||
|
||||
// $.get(ext.contextPath + "/kpi/KpiPlanStaffDetail/showList.do?status=1&planStaffId=" + id + '&periodInstanceId=' + periodInstanceId, function (data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
}
|
||||
|
||||
function jobList() {
|
||||
|
||||
// console.log("111111111111111111111"),
|
||||
$("#jobId").select2({
|
||||
|
||||
ajax: {
|
||||
url: ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(),
|
||||
dataType: 'json',
|
||||
type: "GET",
|
||||
processResults: function (data) {
|
||||
var obj = jQuery.parseJSON(data);
|
||||
return {
|
||||
results: obj,
|
||||
text: 'name'
|
||||
};
|
||||
}
|
||||
},
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
}
|
||||
|
||||
// 考核详情列表页
|
||||
function detailFun(id) {
|
||||
|
||||
$.get(ext.contextPath + "/kpi/KpiResult/resultDetail.do?planStaffId=" + id, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function showUser4OneSelectFun() {
|
||||
// console.log("1111111"),
|
||||
// console.log($('#objUserName').val()),
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "addForm", hiddenId: "objUserId", textId: "objUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function clearInput() {
|
||||
$('#objUserName').val('');
|
||||
$('#objUserId').val('');
|
||||
// $('.input_clear').hide();
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}
|
||||
function getExcelData() {
|
||||
if (data99.deptId !== undefined) {
|
||||
$("#rhistorytable").bootstrapTable('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<%-- <h1 id="head_title" class="ul_title t_tab"></h1>--%>
|
||||
<h3>记录查询</h3>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<%-- <div id="mainAlertdiv"></div>--%>
|
||||
<div id="subDiv"></div>
|
||||
<div id="position4Select"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div style="float: left;width: 20%">
|
||||
|
||||
|
||||
<div class="form-group pull-left form-inline" style="padding:0;height: 30px;width:100%">
|
||||
|
||||
<div id="companytree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;width:80%">
|
||||
|
||||
<div class="form-group pull-right form-inline" style="padding:0;height: 30px;">
|
||||
|
||||
<form id="addForm">
|
||||
<div class="input-group input-group-sm " style="width:300px;">
|
||||
<label class="col-sm-4 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核对象:</label>
|
||||
<input type="text" id="userInfoLike" name="userInfoLike" class="form-control"
|
||||
placeholder="请输入姓名、工号或者岗位名称" style="width: 200px"/>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm " style="width:230px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">岗位类型:</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="jobType" name="jobType"
|
||||
style="width:100px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="width:230px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">周期类型:</label>
|
||||
<div class="col-sm-7 control-label" style="padding: 0px;">
|
||||
<select class="form-control select2 " id="periodType" name="periodType"
|
||||
style="width:100px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm" style="width:230px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核年份:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="periodYear" name="periodYear"
|
||||
style="width: 100px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm" style="width:230px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核周期:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="periodNo" name="periodNo"
|
||||
style="width: 100px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<%if (sessionManager.havePermission(session,"kpi/KpiResult/searchAll.do")) {%>
|
||||
<div class="form-group input-group-sm" style="width:290px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">是否查询全员:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="isAllSearch" name="isAllSearch"
|
||||
style="width: 100px">
|
||||
<option value="true">是</option>
|
||||
<option value="false" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
<div class="form-group input-group-sm" style="width:290px;">
|
||||
|
||||
<div class="col-sm-7">
|
||||
<button type="button" class="control-label btn btn-primary"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;" onclick="getExcelData()">查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<table id="rhistorytable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
543
WebRoot/jsp/kpi/resultStatistics.jsp
Normal file
543
WebRoot/jsp/kpi/resultStatistics.jsp
Normal file
@ -0,0 +1,543 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
<!DOCTYPE html >
|
||||
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.drug-ele-td {
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.chosen-area-p,
|
||||
.rightmouse-panel-div,
|
||||
.panel-div-left,
|
||||
.panel-div-right,
|
||||
.drug-ele-td {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.setting {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.duiqifangsi {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#resultStatisticsExcel {
|
||||
background: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
||||
var data = {
|
||||
deptId: '',
|
||||
periodYear: '',
|
||||
periodType: '',
|
||||
periodNo: '',
|
||||
jobType: '',
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
initTreeView()
|
||||
|
||||
// 岗位类型数据填充
|
||||
var selelct_1Data = jQuery.parseJSON('${jobTypeList}');
|
||||
var selelct_1 = $("#jobType").select2({
|
||||
data: selelct_1Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
selelct_1.val('0').trigger("change");
|
||||
|
||||
// 考核周期类型数据填充
|
||||
var selelct_2Data = jQuery.parseJSON('${periodTypeList}');
|
||||
var selelct_2 = $("#periodType").select2({
|
||||
data: selelct_2Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
}).on('select2:select', function (evt) {
|
||||
|
||||
showPeriodNo();
|
||||
|
||||
});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
selelct_2.val('0').trigger("change");
|
||||
|
||||
// 考核年份
|
||||
var selelct_4Data = getYears()
|
||||
// jQuery.parseJSON('[{"id":"2020","text":"2020"},{"id":"2021","text":"2021"},{"id":"2022","text":"2022"},{"id":"2023","text":"2023"},{"id":"2024","text":"2024"},{"id":"2025","text":"2025"},{"id":"2026","text":"2026"},{"id":"2027","text":"2027"},{"id":"2028","text":"2028"},{"id":"2029","text":"2029"},{"id":"2030","text":"2030"},{"id":"2031","text":"2031"},{"id":"2032","text":"2032"},{"id":"2033","text":"2033"},{"id":"2034","text":"2034"},{"id":"2035","text":"2035"},{"id":"2036","text":"2036"},{"id":"2037","text":"2037"},{"id":"2038","text":"2038"},{"id":"2039","text":"2039"},{"id":"2040","text":"2040"},{"id":"2041","text":"2041"},{"id":"2042","text":"2042"},{"id":"2043","text":"2043"},{"id":"2044","text":"2044"},{"id":"2045","text":"2045"},{"id":"2046","text":"2046"},{"id":"2047","text":"2047"},{"id":"2048","text":"2048"},{"id":"2049","text":"2049"},{"id":"2050","text":"2050"}]');
|
||||
var selelct_4 = $("#periodYear").select2({
|
||||
data: selelct_4Data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
var date = new Date();
|
||||
selelct_4.val(date.getFullYear()).trigger("change");
|
||||
|
||||
// 考核周期初始化数据
|
||||
showPeriodNo();
|
||||
|
||||
|
||||
});
|
||||
|
||||
function getYears() {
|
||||
let list = []
|
||||
let d = 2020
|
||||
list.push({
|
||||
id: String(d),
|
||||
text: String(d)
|
||||
})
|
||||
let target = new Date().getFullYear()
|
||||
for (let i = 1; Number(list[list.length - 1].text) < target; i++) {
|
||||
list.push({
|
||||
id: String(d + i),
|
||||
text: String(d + i)
|
||||
})
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
//考核周期初始化
|
||||
function showPeriodNo() {
|
||||
var periodType = $("#periodType").val();
|
||||
$.post(ext.contextPath + "/kpi/KpiPeriodInstance/periodNoList.do?periodType=" + periodType, function (data) {
|
||||
$("#periodNo").select2({
|
||||
data: data,
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
$("#periodNo").val('1').trigger("change");
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function saveFun() {
|
||||
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/KpiPeriodInstance/save.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败', 'subDiv');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//获取部门树
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/user/getAllParentByUnitId.do?unitId='+unitId, {ng: ''}, function (res) {
|
||||
$('#companytree').treeview({
|
||||
data: res,
|
||||
showBorder: true,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, node) {
|
||||
data.deptId = node.id;
|
||||
// TODO 判断选中的是否为部门?
|
||||
});
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
function getExcelData() {
|
||||
|
||||
data.jobType = $('#jobType').val()
|
||||
data.periodYear = $('#periodYear').val()
|
||||
data.periodType = $('#periodType').val()
|
||||
data.periodNo = $('#periodNo').val()
|
||||
if (isNull(data.deptId) || isNull(data.periodYear) || isNull(data.periodType) || isNull(data.periodNo)) {
|
||||
showAlert('d', '请先选择查询条件', 'mainAlertdiv');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/kpi/KpiResult/getResultStatistics.do', data, function (res) {
|
||||
let result = JSON.parse(res)
|
||||
if (result.code == 0) {
|
||||
console.log(result.data)
|
||||
console.log(result.data.detailInfo)
|
||||
if (result.data.detailInfo.userNumber === 0) {
|
||||
showAlert('w', '暂无统计数据', 'mainAlertdiv')
|
||||
|
||||
// showExcel(result.data)
|
||||
} else {
|
||||
showExcel(result.data)
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
// getResultStatistics
|
||||
}
|
||||
|
||||
function exportExcel() {
|
||||
data.jobType = $('#jobType').val()
|
||||
data.periodYear = $('#periodYear').val()
|
||||
data.periodType = $('#periodType').val()
|
||||
data.periodNo = $('#periodNo').val()
|
||||
if (isNull(data.deptId) || isNull(data.periodYear) || isNull(data.periodType) || isNull(data.periodNo)) {
|
||||
showAlert('d', '请先选择查询条件', 'mainAlertdiv');
|
||||
} else {
|
||||
|
||||
window.open(ext.contextPath + '/kpi/KpiResult/getResultStatisticsExcel.do?deptId=' + data.deptId +
|
||||
'&periodYear=' + data.periodYear +
|
||||
'&periodType=' + data.periodType +
|
||||
'&jobType=' + data.jobType +
|
||||
'&periodNo=' + data.periodNo);
|
||||
|
||||
}
|
||||
// getResultStatistics
|
||||
}
|
||||
|
||||
|
||||
function showExcel(data) {
|
||||
document.documentElement.oncontextmenu = function (e) {
|
||||
return false
|
||||
}
|
||||
$("#resultStatisticsExcel").wybExcel();
|
||||
$('#resultStatisticsExcel').css("padding", "0 37px 37px")
|
||||
initTable(data.detailInfo, data.listInfo)
|
||||
}
|
||||
|
||||
function isNull(str) {
|
||||
if (str === '') {
|
||||
return true
|
||||
}
|
||||
if (str === null) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function initTable(detailInfo, list) {
|
||||
$("#resultStatisticsExcel").setExcelHtml(
|
||||
tableHeader('人员绩效考核结果汇总表') +
|
||||
tableFristRow({
|
||||
deptName: detailInfo.deptName,
|
||||
time: detailInfo.periodName,
|
||||
total: detailInfo.userNumber,
|
||||
pointLevel1Number: detailInfo.pointLevel1Number,
|
||||
pointLevel1Percent: detailInfo.pointLevel1Percent,
|
||||
pointLevel2Number: detailInfo.pointLevel2Number,
|
||||
pointLevel2Percent: detailInfo.pointLevel2Percent,
|
||||
pointLevel3Number: detailInfo.pointLevel3Number,
|
||||
pointLevel3Percent: detailInfo.pointLevel3Percent,
|
||||
pointLevel4Number: detailInfo.pointLevel4Number,
|
||||
pointLevel4Percent: detailInfo.pointLevel4Percent,
|
||||
pointLevel5Number: detailInfo.pointLevel5Number,
|
||||
pointLevel5Percent: detailInfo.pointLevel5Percent,
|
||||
pointLevel6Number: detailInfo.pointLevel6Number,
|
||||
pointLevel6Percent: detailInfo.pointLevel6Percent,
|
||||
}) +
|
||||
tableItem({list: list}) +
|
||||
tableOther({}, true, false) +
|
||||
tableFooter())
|
||||
// $(".wyb-excel").initTable($(".wyb-excel").getExcelHtml(), {})
|
||||
}
|
||||
|
||||
function tableFristRow({
|
||||
deptName = '',
|
||||
time = '',
|
||||
total = '',
|
||||
pointLevel1Number = 0,
|
||||
pointLevel1Percent = '0',
|
||||
pointLevel2Number = 0,
|
||||
pointLevel2Percent = '0',
|
||||
pointLevel3Number = 0,
|
||||
pointLevel3Percent = '0',
|
||||
pointLevel4Number = 0,
|
||||
pointLevel4Percent = '0',
|
||||
pointLevel5Number = 0,
|
||||
pointLevel5Percent = '0',
|
||||
pointLevel6Number = 0,
|
||||
pointLevel6Percent = '0'
|
||||
}) {
|
||||
|
||||
return `<tr style="height: 38px;text-align:left">
|
||||
<td style="width: 80px;" colspan="4" readonly="readonly">部门名称: ` + deptName + `</td>
|
||||
<td style="width: 80px;" colspan="4" readonly="readonly" >考核时间: ` + time + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">参加考核人数</td>
|
||||
<td colspan="6" readonly="readonly">` + total + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">优秀人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel1Number + `</td>
|
||||
<td colspan="4" readonly="readonly">优秀员工占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel1Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">称职A级人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel2Number + `</td>
|
||||
<td colspan="4" readonly="readonly">称职A级人数占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel2Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">称职B级人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel3Number + `</td>
|
||||
<td colspan="4" readonly="readonly">称职B级人数占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel3Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">称职C级人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel4Number + `</td>
|
||||
<td colspan="4" readonly="readonly">称职C级人数占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel4Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">基本称职人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel5Number + `</td>
|
||||
<td colspan="4" readonly="readonly">基本称职人数占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel5Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td colspan="2" readonly="readonly">不称职人数(人)</td>
|
||||
<td readonly="readonly">` + pointLevel6Number + `</td>
|
||||
<td colspan="4" readonly="readonly">不称职占考核人数比例(%)</td>
|
||||
<td readonly="readonly">` + pointLevel6Percent + `</td>
|
||||
</tr>
|
||||
<tr style="height: 38px;">
|
||||
<td readonly="readonly">序号</td>
|
||||
<td readonly="readonly">部门</td>
|
||||
<td readonly="readonly">岗位</td>
|
||||
<td readonly="readonly">姓名</td>
|
||||
<td readonly="readonly">考核得分</td>
|
||||
<td readonly="readonly">绩效等级</td>
|
||||
<td readonly="readonly">绩效工资考核系数</td>
|
||||
<td readonly="readonly">备注</td>
|
||||
</tr>
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
function tableItem({list = []}) {
|
||||
|
||||
let tableItemStr = ''
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
tableItemStr += `<tr>
|
||||
<td colspan="1" readonly="readonly">` + (i + 1) + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].deptName + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].jobName + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].userName + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].resultPoint + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].resultLevel + `</td>
|
||||
<td colspan="1" readonly="readonly">` + list[i].resultLevelCoefficient + `</td>
|
||||
<td colspan="1" readonly="readonly"></td>
|
||||
</tr>`
|
||||
}
|
||||
return tableItemStr
|
||||
}
|
||||
|
||||
function tableOther({
|
||||
examiner = '',//考核人签名
|
||||
sdate = '',
|
||||
name = '',
|
||||
tdate = '',
|
||||
remark = '每项结果得分=(直接上级评分×0.7+隔级上级评分×0.3)×各项目所占权重'
|
||||
}, showRemark, showPerson) {
|
||||
|
||||
let remarkStr = `<tr style="text-align:left">
|
||||
<td rowspan="1" colspan="8" readonly="readonly">注:` + remark + `</td>
|
||||
</tr>`
|
||||
|
||||
let personStr = `
|
||||
<tr style="text-align:left">
|
||||
<td colspan="4" readonly="readonly">填报人:` + name + `</td>
|
||||
<td colspan="4" readonly="readonly">审核人:` + examiner + `</td>
|
||||
|
||||
</tr>
|
||||
<tr style="text-align:left">
|
||||
<td rowspan="1" colspan="4" readonly="readonly">日期:` + tdate + `</td>
|
||||
<td rowspan="1" colspan="4" readonly="readonly">日期:` + sdate + `</td>
|
||||
</tr>`
|
||||
|
||||
let temp = ``
|
||||
if (showRemark) {
|
||||
temp += remarkStr
|
||||
}
|
||||
if (showPerson) {
|
||||
temp += personStr
|
||||
}
|
||||
|
||||
return temp
|
||||
}
|
||||
|
||||
function tableHeader(title) {
|
||||
return `<table width="100%" style="text-align:center"><tbody>
|
||||
<tr><td class="title" colspan="8" readonly="readonly">` + title + `</td></tr>`
|
||||
}
|
||||
|
||||
function tableFooter() {
|
||||
return `</tbody></table>`
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="position4Select"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="box-body no-padding col-md-3">
|
||||
<div id="companytree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="form-group form-inline" style="padding:0;height: 30px;">
|
||||
|
||||
<div class="input-group input-group-sm " style="width:280px;">
|
||||
<label class="col-sm-6 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">绩效(岗位)类型:</label>
|
||||
<div class="col-sm-6 control-label" style="padding: 0px;">
|
||||
<select class="form-control" id="jobType" name="jobType" style="width:120px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm" style="width:230px;">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核年份:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="periodYear" name="periodYear"
|
||||
style="width: 100px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm">
|
||||
<label class="col-sm-5 control-label" style="padding:0px 10px 0px 10px;line-height:30px;">考核周期类型:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" name="periodType" id="periodType"
|
||||
style="width: 150px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm">
|
||||
<label class="col-sm-5 control-label"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;">考核周期:</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" name="periodNo" id="periodNo"
|
||||
style="width: 120px"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-group-sm" style="margin-left: 5px">
|
||||
<button type="button" class="control-label btn btn-primary"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;" onclick="getExcelData()">查询
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group input-group-sm" style="margin-left: 5px">
|
||||
<button type="button" class="control-label btn btn-primary"
|
||||
style="padding:0px 10px 0px 10px;line-height:30px;" onclick="exportExcel()">导出Excel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div id="resultStatisticsExcel" style="width:100%;margin: 0 auto;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/excel.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/xlsx/css/font-awesome.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/xlsx/js/excel.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
180
WebRoot/jsp/kpi/showDetailAdd.jsp
Normal file
180
WebRoot/jsp/kpi/showDetailAdd.jsp
Normal file
@ -0,0 +1,180 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
/*.select2-selection__arrow {*/
|
||||
/* margin-top: 3px;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// 考核维度下拉列表数据填充
|
||||
$("#dimensionId").select2({
|
||||
data: jQuery.parseJSON('${dimensionList}'),
|
||||
cache: false,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$("#dimensionId").val('').trigger("change");
|
||||
|
||||
});
|
||||
|
||||
function saveFun() {
|
||||
//console.log($("#addForm").serialize());
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/kpiPlanDetail/detailSave.do", $("#addForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
// totalWeightFun();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#addForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核维度不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" value="${id}"/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核维度:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="dimensionId" name="dimensionId" style="width: 100%"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" type="text" style="height: 60px;"
|
||||
id="indicatorName" name="indicatorName" placeholder="请输入文本" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentA" name="contentA" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentB" name="contentB" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentC" name="contentC" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="contentD" name="contentD" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" id="indicatorDetail" name="indicatorDetail" class="form-control"
|
||||
placeholder="请输入文本"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="morder" name="morder" class="form-control"
|
||||
placeholder="请输入文本">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight" name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入1~100之间的数字">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/kpiPlanDetail/detailSave.do">
|
||||
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
154
WebRoot/jsp/kpi/showDetailEdit.jsp
Normal file
154
WebRoot/jsp/kpi/showDetailEdit.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function updateFun() {
|
||||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/kpi/kpiPlanDetail/detailUpdate.do", $("#editForm").serialize(), function (data) {
|
||||
if (data.res == 0) {
|
||||
showAlert('d', '用户信息保存失败');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#editForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
dimensionName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维度名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
indicatorWeight: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '考核指标权重不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^(100|([1-9][0-9]?)|(0|[1-9][0-9]?)(?:\.\d{0,2}))?$/,
|
||||
message: '请输入0.01~100的数'
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="editForm">
|
||||
<input type="hidden" name="id" value="${kpiPlanDetail.id}"/>
|
||||
<div id="alertDiv"></div>
|
||||
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核维度:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" readonly name="dimensionName" class="form-control" placeholder=""
|
||||
value="${kpiPlanDetail.dimensionName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考核指标:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="indicatorName" class="form-control"
|
||||
placeholder=""> ${kpiPlanDetail.indicatorName}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">A级:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="contentA" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.contentA}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">B级:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="contentB" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.contentB}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">C级:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="contentC" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.contentC}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">D级:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="contentD" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.contentD}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">排序:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="morder" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.morder}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">指标解释:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" name="indicatorDetail" class="form-control"
|
||||
placeholder="">${kpiPlanDetail.indicatorDetail}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权重:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" max="100" min="0.01" step="0.01" id="indicatorWeight"
|
||||
name="indicatorWeight" class="form-control"
|
||||
placeholder="请输入0.01~100之间的数字" value="${kpiPlanDetail.indicatorWeight}">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<security:authorize buttonUrl="kpi/kpiPlanDetail/detailUpdate.do">
|
||||
<button type="button" class="btn btn-primary" onclick="updateFun()">保存</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
352
WebRoot/jsp/kpi/showDetailList.jsp
Normal file
352
WebRoot/jsp/kpi/showDetailList.jsp
Normal file
@ -0,0 +1,352 @@
|
||||
<%@page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
|
||||
<style>
|
||||
.t_tab {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.t_back:link {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:visited {
|
||||
color: black;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.t_back:hover {
|
||||
color: #3c8dbc;
|
||||
text-decoration: underline
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/kpi/kpiPlanDetail/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
// showRefresh: true,
|
||||
// sortName: 'update_time', // 要排序的字段
|
||||
// sortOrder: 'desc', // 排序规则
|
||||
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
id: '${id}',
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: 'dimensionName', // 返回json数据中的name
|
||||
title: '考核维度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'indicatorName', // 返回json数据中的name
|
||||
title: '考核指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentA', // 返回json数据中的name
|
||||
title: 'A级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentB', // 返回json数据中的name
|
||||
title: 'B级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentC', // 返回json数据中的name
|
||||
title: 'C级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'contentD', // 返回json数据中的name
|
||||
title: 'D级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '排序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorDetail', // 返回json数据中的name
|
||||
title: '指标解释', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'indicatorWeight', // 返回json数据中的name
|
||||
title: '权重', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150,
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 新增按钮
|
||||
function addFun() {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlanDetail/showDetailAdd.do', {
|
||||
id: '${id}',
|
||||
jobType: '${jobType}'
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 编辑按钮
|
||||
function editFun(id) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlanDetail/showDetailEdit.do', {
|
||||
id: id,
|
||||
jobType: '${jobType}'
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
// 删除按钮
|
||||
// 删除按钮
|
||||
function deleteFun(id) {
|
||||
swal({
|
||||
text: "如果该维度已经被使用过,删除会导致业务数据不能正常获取维度名称。若不想使用该考核维度,推荐将该条记录的状态改为禁用。",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlanDetail/detailDelete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 跳转到计划列表
|
||||
function gotoFirstTab() {
|
||||
window.location.href = ext.contextPath + "/kpi/kpiPlan/showList.do";
|
||||
|
||||
}
|
||||
|
||||
//删除多条数据
|
||||
let deletesFun = function () {
|
||||
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
let datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/kpi/kpiPlanDetail/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h3 id="head_title2" class="t_tab t_back" onclick="gotoFirstTab()">绩效方案</h3>
|
||||
<span class="t_tab notRecord">>></span>
|
||||
<%-- <h3 id="head_title3" class="t_tab t_back record" onclick="gotoRecordTab('${periodInstanceId}')">记录查询</h3>--%>
|
||||
<%-- <span class="t_tab record">>></span>--%>
|
||||
<h4 id="head_title4" class="t_tab">考核内容</h4>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<%-- <ul class="nav nav-pills">--%>
|
||||
<%-- <li class="active">--%>
|
||||
<%-- <a href="javascript:gotoFirstTab();">绩效方案--%>
|
||||
<%-- <%– <span class="badge">42</span>–%>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- </ul>--%>
|
||||
<div class="form-group form-inline" style="padding:0;height: 15px;">
|
||||
<%-- <div class="input-group input-group-sm " style="width:190px;">--%>
|
||||
<%-- <label class="col-sm-5 control-label"--%>
|
||||
<%-- style="padding:0px 10px 0px 10px;line-height:30px;">启用状态</label>--%>
|
||||
<%-- <div class="col-sm-7 control-label" style="padding: 0px;">--%>
|
||||
<%-- <select class="form-control select2 " id="status" name="status" style="width:190px;"></select>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<div class="form-group pull-left form-inline" style="width: 190px;">
|
||||
<%-- <div class="btn-group" style="width: 220px;padding-bottom:10px;">--%>
|
||||
<%-- <ul class="nav nav-pills">--%>
|
||||
<%-- <li>--%>
|
||||
<%-- <a href="javascript:gotoFirstTab();">绩效方案--%>
|
||||
<%-- <%– <span class="badge">42</span>–%>--%>
|
||||
<%-- </a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- <li class="active">--%>
|
||||
<%-- <a href="#">考核内容</a>--%>
|
||||
<%-- </li>--%>
|
||||
<%-- </ul>--%>
|
||||
<%-- </div>--%>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-left form-inline" style="width: 190px;line-height: 15px;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="kpi/kpiPlanDetail/showDetailAdd.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user