434 lines
19 KiB
Plaintext
434 lines
19 KiB
Plaintext
<%@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> |