221 lines
10 KiB
Plaintext
221 lines
10 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintainCommStr"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<%request.setAttribute("Maintain_IN", MaintainCommStr.Maintain_IN);%>
|
|||
|
|
<%request.setAttribute("Maintain_OUT", MaintainCommStr.Maintain_OUT);%>
|
|||
|
|
<%request.setAttribute("Maintain_OverhaulType_add", MaintainCommStr.Maintain_OverhaulType_add);%>
|
|||
|
|
<%request.setAttribute("Maintain_OverhaulType_reset", MaintainCommStr.Maintain_OverhaulType_reset);%>
|
|||
|
|
<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');//提交验证
|
|||
|
|
$.post(ext.contextPath + "/maintenance/libraryAddResetProject/doupdate4Biz.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: {
|
|||
|
|
code:{
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '项目编号不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
name:{
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '项目名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
$(function () {
|
|||
|
|
|
|||
|
|
if ("${libraryAddResetProject.repairPartyType }" == "${Maintain_IN}") {//自修
|
|||
|
|
$("#repairPartyType1").attr("checked","checked");
|
|||
|
|
$("#repairPartyType2").removeAttr("checked");
|
|||
|
|
$("#div_in").show();
|
|||
|
|
$("#div_out").hide();
|
|||
|
|
$("#div_in").find(":input").attr("disabled", false);
|
|||
|
|
$("#div_out").find(":input").attr("disabled", true);
|
|||
|
|
}else{//委外
|
|||
|
|
$("#repairPartyType2").attr("checked","checked");
|
|||
|
|
$("#repairPartyType1").removeAttr("checked");
|
|||
|
|
$("#div_in").hide();
|
|||
|
|
$("#div_out").show();
|
|||
|
|
$("#div_in").find(":input").attr("disabled", true);
|
|||
|
|
$("#div_out").find(":input").attr("disabled", false);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if ("${libraryAddResetProject.type }" == "${Maintain_OverhaulType_add}") {
|
|||
|
|
$("#type1").attr("checked","checked");
|
|||
|
|
$("#type2").removeAttr("checked");
|
|||
|
|
}else{
|
|||
|
|
$("#type2").attr("checked","checked");
|
|||
|
|
$("#type1").removeAttr("checked");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog modal-lg">
|
|||
|
|
<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="${libraryAddResetProject.id}">
|
|||
|
|
<input type="hidden" id="modelId" name="modelId" value="${param.modelId}" readonly="true">
|
|||
|
|
<input type="hidden" id="unitId" name="unitId" value="${param.unitId}" readonly="true">
|
|||
|
|
<!-- 界面提醒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">${libraryAddResetProject.code}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">项目名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${libraryAddResetProject.name}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">大修方式</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="hidden" name="repairPartyType" value="${libraryAddResetProject.repairPartyType}" readonly="true">
|
|||
|
|
<c:if test="${libraryAddResetProject.repairPartyType == Maintain_IN}">
|
|||
|
|
<p class="form-control-static">自修</p>
|
|||
|
|
</c:if>
|
|||
|
|
<c:if test="${libraryAddResetProject.repairPartyType == Maintain_OUT}">
|
|||
|
|
<p class="form-control-static">委外</p>
|
|||
|
|
</c:if>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">大修类型</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<c:if test="${libraryAddResetProject.type == Maintain_OverhaulType_add}">
|
|||
|
|
<p class="form-control-static">新增</p>
|
|||
|
|
</c:if>
|
|||
|
|
<c:if test="${libraryAddResetProject.type == Maintain_OverhaulType_reset}">
|
|||
|
|
<p class="form-control-static">重置</p>
|
|||
|
|
</c:if>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">上级层级</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${pname}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div id="div_in">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label"><span style="color:red;">自修定额:</span></label>
|
|||
|
|
<div class="col-sm-4"></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="dismantle" name="dismantle" placeholder="原设备拆除" autocomplete="off" value="${libraryAddResetProject.libraryAddResetProjectBiz.dismantle}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">新设备安装(小时)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="install" name="install" placeholder="新设备本体安装" value="${libraryAddResetProject.libraryAddResetProjectBiz.install}" step="0.01">
|
|||
|
|
</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="debugging" name="debugging" placeholder="新设备调试" value="${libraryAddResetProject.libraryAddResetProjectBiz.debugging}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">附属及土建(小时)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="accessory" name="accessory" placeholder="附属物及土建" value="${libraryAddResetProject.libraryAddResetProjectBiz.accessory}" step="0.01">
|
|||
|
|
</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="materialCost" name="materialCost" placeholder="物资费" value="${libraryAddResetProject.libraryAddResetProjectBiz.materialCost}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div id="div_out">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label"><span style="color:red;">委外定额:</span></label>
|
|||
|
|
<div class="col-sm-4"></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="dismantle" name="dismantle" placeholder="原设备拆除" autocomplete="off" value="${libraryAddResetProject.libraryAddResetProjectBiz.dismantle}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">新设备安装(元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="install" name="install" placeholder="新设备本体安装" value="${libraryAddResetProject.libraryAddResetProjectBiz.install}" step="0.01">
|
|||
|
|
</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="debugging" name="debugging" placeholder="新设备调试" value="${libraryAddResetProject.libraryAddResetProjectBiz.debugging}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">附属物及土建(元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="accessory" name="accessory" placeholder="附属物及土建" value="${libraryAddResetProject.libraryAddResetProjectBiz.accessory}" step="0.01">
|
|||
|
|
</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="transport" name="transport" placeholder="运输费等" value="${libraryAddResetProject.libraryAddResetProjectBiz.transport}" 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="${libraryAddResetProject.libraryAddResetProjectBiz.materialCost}" step="0.01">
|
|||
|
|
</div>
|
|||
|
|
</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>
|