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

418 lines
19 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 = {
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">&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">--%>
<%-- <!-- 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>--%>
<%-- &lt;%&ndash; <jsp:include page="/jsp/bottom.jsp"></jsp:include> &ndash;%&gt;--%>
<%-- &lt;%&ndash; <jsp:include page="/jsp/side.jsp"></jsp:include> &ndash;%&gt;--%>
<%--</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>