Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/kpi/resultInfoYear.jsp
2026-01-16 14:13:44 +08:00

300 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@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">&times;</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>