519 lines
21 KiB
Plaintext
519 lines
21 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>
|
||
<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>
|