164 lines
7.3 KiB
Plaintext
164 lines
7.3 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/libraryOverhaulProjectBloc/doupdate.do", $("#subForm").serialize(), function(data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
closeModal('subModal');
|
|||
|
|
$("#projectTable").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: {
|
|||
|
|
projectNumber:{
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '项目编号不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
projectName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '项目名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
morder: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '顺序不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
condition: {
|
|||
|
|
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="${libraryOverhaulProjectBloc.id}">
|
|||
|
|
<input type="hidden" id="modelId" name="modelId" value="${param.modelId}">
|
|||
|
|
<input type="hidden" id="unitId" name="unitId" value="${param.unitId}">
|
|||
|
|
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*项目编号</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="projectNumber" name="projectNumber" placeholder="项目编号" autocomplete="off" value="${libraryOverhaulProjectBloc.projectNumber}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*项目名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="projectName" name="projectName" placeholder="项目名称" autocomplete="off" value="${libraryOverhaulProjectBloc.projectName}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*顺序</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序" autocomplete="off" value="${libraryOverhaulProjectBloc.morder}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*上级部位</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="pname" name="pname" placeholder="上级部位" value="${pname}" readonly="true">
|
|||
|
|
<input type="hidden" id="pid" name="pid" value="${libraryOverhaulProjectBloc.pid}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">周期(年)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="cycle" name="cycle" placeholder="周期(年)" step="0.01" value="${libraryOverhaulProjectBloc.cycle}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*大修条件</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control" rows="2" id ="condition" name ="condition" placeholder="请输入" autocomplete="off">${libraryOverhaulProjectBloc.condition}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label"><span style="color:red;">定额:</span></label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<p class="form-control-static" style="color:red;">(自修工时为大修内容合计,总费用为委外费加物资费合计)</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">委外工时费(元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="outsideRepairCost" name="outsideRepairCost" placeholder="委外工时费定额(元)" value="${libraryOverhaulProjectBloc.libraryOverhaulProjectModelBloc.outsideRepairCost}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">物资费(元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="materialCost" name="materialCost" placeholder="物资费定额(元)" value="${libraryOverhaulProjectBloc.libraryOverhaulProjectModelBloc.materialCost}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<%--<label class="col-sm-2 control-label">自修工时(时)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${libraryOverhaulProjectBloc.libraryOverhaulProjectModelBloc.insideRepairTime}</p>
|
|||
|
|
</div>--%>
|
|||
|
|
<label class="col-sm-2 control-label">总费用(元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${libraryOverhaulProjectBloc.libraryOverhaulProjectModelBloc.totalCost}</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>
|