222 lines
10 KiB
Plaintext
222 lines
10 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">
|
|||
|
|
var lengthStr = 0;
|
|||
|
|
|
|||
|
|
function dosave() {
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/maintenance/libraryAddResetProject/dosave4Bloc.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 () {
|
|||
|
|
|
|||
|
|
$("#div_in").show();
|
|||
|
|
$("#div_out").hide();
|
|||
|
|
$("#div_in").find(":input").attr("disabled", false);
|
|||
|
|
$("#div_out").find(":input").attr("disabled", true);
|
|||
|
|
|
|||
|
|
//委外显示运输费 自修隐藏
|
|||
|
|
$('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);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
</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" >
|
|||
|
|
</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" >
|
|||
|
|
</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="${pid}">
|
|||
|
|
</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 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0}" 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="0" 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>
|