125 lines
5.8 KiB
Plaintext
125 lines
5.8 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
function dosaveMaintain() {
|
|||
|
|
$("#subFormLib").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subFormLib").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/maintenance/workorderLibraryMaintain/doupdate.do", $("#subFormLib").serialize(), function(data) {
|
|||
|
|
if (data.res == 1){
|
|||
|
|
//showAlert('s','保存成功');
|
|||
|
|
closeModal('libraryModal')
|
|||
|
|
$("#table_library_repair").bootstrapTable('refresh');
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subFormLib").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
actualWorkTime: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '实际工时不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="libraryModal">
|
|||
|
|
<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强制为subFormLib -->
|
|||
|
|
<form class="form-horizontal" id="subFormLib">
|
|||
|
|
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input type="hidden" class="form-control" name ="id" value="${workorderLibraryMaintain.id}">
|
|||
|
|
<input type="hidden" class="form-control" name ="pid" value="${workorderLibraryMaintain.pid}">
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">维修部位</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<p class="form-control-static">${workorderLibraryMaintain.libraryRepairBloc.libraryFaultBloc.equipmentClass.name}</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">${workorderLibraryMaintain.libraryRepairBloc.libraryFaultBloc.faultNumber}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">故障名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${workorderLibraryMaintain.libraryRepairBloc.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">${workorderLibraryMaintain.libraryRepairBloc.repairNumber}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">维修名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${workorderLibraryMaintain.libraryRepairBloc.repairName}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">维修内容</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<p class="form-control-static">${workorderLibraryMaintain.libraryRepairBloc.repairContent}</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">${workorderLibraryMaintain.libraryRepairBloc.libraryRepairEquBiz.insideRepairTime}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">实际工时(小时)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="actualWorkTime" name="actualWorkTime" value="${workorderLibraryMaintain.actualWorkTime}" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">工时差异分析</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control" id="differences" name="differences" rows="3" placeholder="工时差异分析">${workorderLibraryMaintain.differences}</textarea>
|
|||
|
|
</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="dosaveMaintain()" >保存</button>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|