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

168 lines
7.0 KiB
Plaintext
Raw Permalink 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.

<!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 () {
});
function saveFun() {
$("#addForm").bootstrapValidator('validate');//提交验证
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/kpi/KpiIndicatorLibDetail/save.do", 'indicatorId='+'${indicatorId}'+'&'+$("#addForm").serialize(), function (data) {
if (data.res == 0) {
showAlert('d', '用户信息保存失败');
} else {
$("#table").bootstrapTable('refresh');
closeModal('subModal');
}
}, 'json');
}
}
$("#addForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
indicatorName: {
validators: {
notEmpty: {
message: '考核指标不能为空'
}
}
},
contentA: {
validators: {
notEmpty: {
message: '等级不能为空'
}
}
},
contentB: {
validators: {
notEmpty: {
message: '等级不能为空'
}
}
},
contentC: {
validators: {
notEmpty: {
message: '等级不能为空'
}
}
},
contentD: {
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">&times;</span></button>
<h4 class="modal-title">新增界面</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为addForm -->
<form class="form-horizontal" id="addForm">
<div id="alertDiv"></div>
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
<!-- 界面提醒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">
<input type="text" name="indicatorName" class="form-control" placeholder="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">* A级</label>
<div class="col-sm-9">
<input type="text" 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" 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" 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" 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">
<input type="text" name="morder" 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" name="indicatorDetail" class="form-control" placeholder=""></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之间的数字">
</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/KpiIndicatorLibDetail/save.do">
<button type="button" class="btn btn-primary" onclick="saveFun()">保存</button>
</security:authorize>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>