128 lines
4.9 KiB
Plaintext
128 lines
4.9 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<%@page import="com.sipai.entity.timeefficiency.TimeEfficiencyCommStr"%>
|
||
<%request.setAttribute("PatrolType_Product", TimeEfficiencyCommStr.PatrolType_Product);%>
|
||
<%request.setAttribute("PatrolType_Equipment", TimeEfficiencyCommStr.PatrolType_Equipment);%>
|
||
<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 dosave() {
|
||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/maintenance/libraryFaultBloc/doupdate.do", $("#subForm").serialize(), function(data) {
|
||
if (data.code == 1) {
|
||
closeModal('subModal');
|
||
$("#faultTable").bootstrapTable('refresh');
|
||
|
||
}else if(data.code == 0){
|
||
showAlert('d',data.msg);
|
||
}else{
|
||
showAlert('d',data.msg);
|
||
}
|
||
},'json');
|
||
}
|
||
|
||
}
|
||
|
||
$("#subForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
faultNumber:{
|
||
validators: {
|
||
notEmpty: {
|
||
message: '故障编号不能为空'
|
||
}
|
||
}
|
||
},
|
||
name: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '故障名称不能为空'
|
||
}
|
||
}
|
||
},
|
||
morder: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '顺序不能为空'
|
||
}
|
||
}
|
||
},
|
||
faultDescribe:{
|
||
validators: {
|
||
notEmpty: {
|
||
message: '故障现象描述不能为空'
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
$(function () {
|
||
|
||
});
|
||
</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强制为subForm -->
|
||
<form class="form-horizontal" id="subForm">
|
||
<input type="hidden" id="id" name="id" value="${libraryFaultBloc.id}">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">故障编号</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${libraryFaultBloc.faultNumber}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">故障名称</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${libraryFaultBloc.faultName}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">顺序</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${libraryFaultBloc.morder}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">上级部位</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${pname}</p>
|
||
<input type="hidden" id="pid" name="pid" value="${libraryFaultBloc.pid}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">故障描述</label>
|
||
<div class="col-sm-10">
|
||
<p class="form-control-static">${libraryFaultBloc.faultDescribe}</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</form>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||
<%-- <button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>--%>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|