183 lines
9.0 KiB
Plaintext
183 lines
9.0 KiB
Plaintext
|
|
<!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>
|