236 lines
11 KiB
Plaintext
236 lines
11 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<%@page import="com.sipai.entity.maintenance.MaintainCommStr"%>
|
||
<%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/doupdate4Bloc.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 () {
|
||
|
||
//委外显示运输费 自修隐藏
|
||
$('input[type=radio][name=repairPartyType]').change(function () {
|
||
if (this.value == '${Maintain_IN}') {//自修
|
||
$("#div_in").show();
|
||
$("#div_out").hide();
|
||
$("#div_in").find(":input").attr("disabled", false);
|
||
$("#div_out").find(":input").attr("disabled", true);
|
||
}else {//委外
|
||
$("#div_in").hide();
|
||
$("#div_out").show();
|
||
$("#div_in").find(":input").attr("disabled", true);
|
||
$("#div_out").find(":input").attr("disabled", false);
|
||
}
|
||
});
|
||
|
||
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">
|
||
<input type="text" class="form-control" id="code" name="code" placeholder="项目编号" autocomplete="off" value="${libraryAddResetProject.code}">
|
||
</div>
|
||
<label class="col-sm-2 control-label">*项目名称</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="name" name="name" placeholder="项目名称" autocomplete="off" value="${libraryAddResetProject.name}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*大修方式</label>
|
||
<div class="col-sm-4">
|
||
<label class="radio-inline">
|
||
<input type="radio" name="repairPartyType" id="repairPartyType1" value="${Maintain_IN}" checked> 自修
|
||
</label>
|
||
<label class="radio-inline">
|
||
<input type="radio" name="repairPartyType" id="repairPartyType2" value="${Maintain_OUT}"> 委外
|
||
</label>
|
||
</div>
|
||
<label class="col-sm-2 control-label">*大修类型</label>
|
||
<div class="col-sm-4">
|
||
<label class="radio-inline">
|
||
<input type="radio" name="type" id="type1" value="${Maintain_OverhaulType_add}" checked> 新增
|
||
</label>
|
||
<label class="radio-inline">
|
||
<input type="radio" name="type" id="type2" value="${Maintain_OverhaulType_reset}"> 重置
|
||
</label>
|
||
</div>
|
||
</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="pname" name="pname" placeholder="上级层级" value="${pname}" readonly="true">
|
||
<input type="hidden" id="pid" name="pid" value="${libraryAddResetProject.pid}">
|
||
</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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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.libraryAddResetProjectBloc.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>
|