|
@@ -10,18 +10,6 @@
|
|
|
$('#inDate').datetimepicker({
|
|
|
format: "YYYY-MM-DD HH:mm:ss"
|
|
|
});
|
|
|
-
|
|
|
- $(".list-tabs li").click(function(){
|
|
|
- $(".list-tabs li").each(function(){
|
|
|
- $(this).removeAttr("class","active");
|
|
|
- var id='#'+$(this).find("span").html();
|
|
|
- $(id).attr("class","hide");
|
|
|
- })
|
|
|
- $(this).attr("class","active");
|
|
|
- var id='#'+$(this).find("span").html();
|
|
|
- $(id).removeAttr("class","hide");
|
|
|
-
|
|
|
- })
|
|
|
});
|
|
|
|
|
|
function save() {
|
|
@@ -29,14 +17,15 @@
|
|
|
if(!isValidate){
|
|
|
return false;
|
|
|
}else{
|
|
|
+ var uuid = $("#uuid").val();
|
|
|
jp.loading();
|
|
|
- jp.post("${ctx}/filing/basicInformation/save",$('#inputForm').serialize(),function(data){
|
|
|
+ jp.post("${ctx}/raiseCapitalDesign/saveVlatage",$('#inputForm').serialize(),function(data){
|
|
|
if(data.success){
|
|
|
jp.getParent().refresh();
|
|
|
var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
|
|
parent.layer.close(dialogIndex);
|
|
|
jp.success(data.msg)
|
|
|
-
|
|
|
+ jp.getParent().refreshCharts(uuid);
|
|
|
}else{
|
|
|
jp.error(data.msg);
|
|
|
}
|
|
@@ -80,17 +69,33 @@
|
|
|
$(obj).parent().parent().removeClass("error");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ function highVoltageCalculate(obj,prefix) {
|
|
|
+ var tr=$(obj).parent().parent();
|
|
|
+ var singleCircuitPath =document.getElementById(prefix+"_singleCircuitPath").value;//单回路路径
|
|
|
+ var doubleCircuitPath =document.getElementById(prefix+"_doubleCircuitPath").value;//双回路路径
|
|
|
+ //var coefficient = document.getElementById(prefix+"_coefficient").value;//系数
|
|
|
+ var singleCoefficient = 3.3;
|
|
|
+ var doubleCoefficient = 6.6;
|
|
|
+ if (singleCircuitPath=='' || singleCircuitPath==undefined){
|
|
|
+ singleCircuitPath=0;
|
|
|
+ }if (doubleCircuitPath=='' || doubleCircuitPath==undefined){
|
|
|
+ doubleCircuitPath=0;
|
|
|
+ }
|
|
|
+ var total=parseFloat(singleCircuitPath)*parseFloat(singleCoefficient)+parseFloat(doubleCircuitPath)*parseFloat(doubleCoefficient);
|
|
|
+ document.getElementById(prefix+"_singleLong").value=total.toFixed(2);
|
|
|
+ }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body class="bg-white">
|
|
|
<div>
|
|
|
<ul class="nav nav-tabs list-tabs">
|
|
|
- <li class="active" role="presentation" id="click1"><a id="dq" href="javascript:void(0)"><span class="hide">highVoltage</span>10kV部分</a></li>
|
|
|
- <li role="presentation" id="click2" ><a id="qd" href="javascript:void(0)"><span class="hide">lowVoltage</span>0.4kV部分</a></li>
|
|
|
+ <li class="active" role="presentation" id="click1"><a id="dq" href="javascript:void(0)">10kV部分</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<form:form id="inputForm" modelAttribute="voltageData" action="${ctx}/filing/basicInformation/save" method="post" class="form-horizontal">
|
|
|
- <div class="tabs-container" id="highVoltage">
|
|
|
+ <input type="hidden" id="uuid" name="uuid" value="${uuid}">
|
|
|
+ <div class="tabs-container">
|
|
|
<div class="tab-content">
|
|
|
<div id="tab-1" class="tab-pane fade in active">
|
|
|
<table class="table table-striped table-bordered table-condensed">
|
|
@@ -114,17 +119,17 @@
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="highVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_voltageName" name="highVoltageList[{{idx}}].voltageName" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="highVoltageList[{{idx}}].singleCircuitPath" class="form-control" value="{{row.singleCircuitPath}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_singleCircuitPath" name="highVoltageList[{{idx}}].singleCircuitPath" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10" class="form-control number" value="{{row.singleCircuitPath}}" onchange="highVoltageCalculate(this,'highVoltageList[{{idx}}]')"/>
|
|
|
</td>
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="highVoltageList[{{idx}}].doubleCircuitPath" class="form-control" value="{{row.doubleCircuitPath}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_doubleCircuitPath" name="highVoltageList[{{idx}}].doubleCircuitPath" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10" class="form-control number" value="{{row.doubleCircuitPath}}" onchange="highVoltageCalculate(this,'highVoltageList[{{idx}}]')"/>
|
|
|
</td>
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="highVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control" value="{{row.singleLong}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_singleLong" name="highVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control number" value="{{row.singleLong}}"/>
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
</script>
|
|
@@ -143,7 +148,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="tabs-container hide" id="lowVoltage">
|
|
|
+ <div>
|
|
|
+ <ul class="nav nav-tabs list-tabs">
|
|
|
+ <li class="active" role="presentation" id="click2" ><a id="qd" href="javascript:void(0)">0.4kV部分</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tabs-container">
|
|
|
<div class="tab-content">
|
|
|
<div id="tab-2" class="tab-pane fade in active">
|
|
|
<table class="table table-striped table-bordered table-condensed">
|
|
@@ -167,28 +178,28 @@
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="lowVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_voltageName" name="lowVoltageList[{{idx}}].voltageName" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="lowVoltageList[{{idx}}].singleCircuitPath" class="form-control" value="{{row.singleCircuitPath}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_singleCircuitPath" name="lowVoltageList[{{idx}}].singleCircuitPath" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10" class="form-control number" value="{{row.singleCircuitPath}}" onchange="lowVoltageCalculate(this,'lowVoltageList[{{idx}}]')"/>
|
|
|
</td>
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="lowVoltageList[{{idx}}].doubleCircuitPath" class="form-control" value="{{row.doubleCircuitPath}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_doubleCircuitPath" name="lowVoltageList[{{idx}}].doubleCircuitPath" placeholder="请输入数字" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10" class="form-control number" value="{{row.doubleCircuitPath}}" onchange="lowVoltageCalculate(this,'lowVoltageList[{{idx}}]')"/>
|
|
|
</td>
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' name="lowVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control" value="{{row.singleLong}}"/>
|
|
|
+ <input type='text' id="highVoltageList[{{idx}}]_singleLong" name="lowVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control number" value="{{row.singleLong}}"/>
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
- var basicInformationRowIdx = 0, lowVoltageTpl = $("#lowVoltageTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ var lowVoltageRowIdx = 0, lowVoltageTpl = $("#lowVoltageTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
$(document).ready(function() {
|
|
|
var data = ${fns:toJson(lowVoltageList)};
|
|
|
for (var i=0; i<data.length; i++){
|
|
|
console.log(data[i])
|
|
|
- addRow('#lowVoltageList', basicInformationRowIdx, lowVoltageTpl, data[i]);
|
|
|
- basicInformationRowIdx = basicInformationRowIdx + 1;
|
|
|
+ addRow('#lowVoltageList', lowVoltageRowIdx, lowVoltageTpl, data[i]);
|
|
|
+ lowVoltageRowIdx = lowVoltageRowIdx + 1;
|
|
|
}
|
|
|
});
|
|
|
</script>
|