|
@@ -74,15 +74,45 @@
|
|
|
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){
|
|
|
+ var highSingleVoltageCoefficient = $("#highSingleVoltageCoefficient").val();//10KV单回路路径系数
|
|
|
+ var highDoubleVoltageCoefficient = $("#highDoubleVoltageCoefficient").val();//10KV双回路路径系数
|
|
|
+
|
|
|
+ if (singleCircuitPath==undefined || singleCircuitPath==null || singleCircuitPath==''){
|
|
|
singleCircuitPath=0;
|
|
|
- }if (doubleCircuitPath=='' || doubleCircuitPath==undefined){
|
|
|
+ }
|
|
|
+ if (doubleCircuitPath==undefined || doubleCircuitPath==null || doubleCircuitPath==''){
|
|
|
doubleCircuitPath=0;
|
|
|
}
|
|
|
- var total=parseFloat(singleCircuitPath)*parseFloat(singleCoefficient)+parseFloat(doubleCircuitPath)*parseFloat(doubleCoefficient);
|
|
|
+ if (highSingleVoltageCoefficient==undefined || highSingleVoltageCoefficient==null || highSingleVoltageCoefficient==''){
|
|
|
+ highSingleVoltageCoefficient=1;
|
|
|
+ }
|
|
|
+ if (highDoubleVoltageCoefficient==undefined || highDoubleVoltageCoefficient==null || highDoubleVoltageCoefficient==''){
|
|
|
+ highDoubleVoltageCoefficient=1;
|
|
|
+ }
|
|
|
+ var total=parseFloat(singleCircuitPath)*parseFloat(highSingleVoltageCoefficient)+parseFloat(doubleCircuitPath)*parseFloat(highDoubleVoltageCoefficient);
|
|
|
+ document.getElementById(prefix+"_singleLong").value=total.toFixed(2);
|
|
|
+ }
|
|
|
+
|
|
|
+ function lowVoltageCalculate(obj,prefix) {
|
|
|
+ var tr=$(obj).parent().parent();
|
|
|
+ var singleCircuitPath =document.getElementById(prefix+"_singleCircuitPath").value;//单回路路径
|
|
|
+ var doubleCircuitPath =document.getElementById(prefix+"_doubleCircuitPath").value;//双回路路径
|
|
|
+ var lowSingleVoltageCoefficient = $("#lowSingleVoltageCoefficient").val();//0.4KV单回路路径系数
|
|
|
+ var lowDoubleVoltageCoefficient = $("#lowDoubleVoltageCoefficient").val();//0.4KV双回路路径系数
|
|
|
+
|
|
|
+ if (singleCircuitPath==undefined || singleCircuitPath==null || singleCircuitPath==''){
|
|
|
+ singleCircuitPath=0;
|
|
|
+ }
|
|
|
+ if (doubleCircuitPath==undefined || doubleCircuitPath==null || doubleCircuitPath==''){
|
|
|
+ doubleCircuitPath=0;
|
|
|
+ }
|
|
|
+ if (lowSingleVoltageCoefficient==undefined || lowSingleVoltageCoefficient==null || lowSingleVoltageCoefficient==''){
|
|
|
+ lowSingleVoltageCoefficient=1;
|
|
|
+ }
|
|
|
+ if (lowDoubleVoltageCoefficient==undefined || lowDoubleVoltageCoefficient==null || lowDoubleVoltageCoefficient==''){
|
|
|
+ lowDoubleVoltageCoefficient=1;
|
|
|
+ }
|
|
|
+ var total=parseFloat(singleCircuitPath)*parseFloat(lowSingleVoltageCoefficient)+parseFloat(doubleCircuitPath)*parseFloat(lowDoubleVoltageCoefficient);
|
|
|
document.getElementById(prefix+"_singleLong").value=total.toFixed(2);
|
|
|
}
|
|
|
</script>
|
|
@@ -95,6 +125,10 @@
|
|
|
</div>
|
|
|
<form:form id="inputForm" modelAttribute="voltageData" action="${ctx}/filing/basicInformation/save" method="post" class="form-horizontal">
|
|
|
<input type="hidden" id="uuid" name="uuid" value="${uuid}">
|
|
|
+ <input type="hidden" id="highSingleVoltageCoefficient" value="${highSingleVoltageCoefficient}">
|
|
|
+ <input type="hidden" id="highDoubleVoltageCoefficient" value="${highDoubleVoltageCoefficient}">
|
|
|
+ <input type="hidden" id="lowSingleVoltageCoefficient" value="${lowSingleVoltageCoefficient}">
|
|
|
+ <input type="hidden" id="lowDoubleVoltageCoefficient" value="${lowDoubleVoltageCoefficient}">
|
|
|
<div class="tabs-container">
|
|
|
<div class="tab-content">
|
|
|
<div id="tab-1" class="tab-pane fade in active">
|
|
@@ -178,17 +212,17 @@
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <input type='text' id="highVoltageList[{{idx}}]_voltageName" name="lowVoltageList[{{idx}}].voltageName" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
+ <input type='text' id="lowVoltageList[{{idx}}]_voltageName" name="lowVoltageList[{{idx}}].voltageName" readonly= "true" class="form-control" value="{{row.voltageName}}"/>
|
|
|
</td>
|
|
|
|
|
|
<td class="max-width-250">
|
|
|
- <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}}]')"/>
|
|
|
+ <input type='text' id="lowVoltageList[{{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' 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}}]')"/>
|
|
|
+ <input type='text' id="lowVoltageList[{{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' id="highVoltageList[{{idx}}]_singleLong" name="lowVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control number" value="{{row.singleLong}}"/>
|
|
|
+ <input type='text' id="lowVoltageList[{{idx}}]_singleLong" name="lowVoltageList[{{idx}}].singleLong" readonly= "true" class="form-control number" value="{{row.singleLong}}"/>
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
</script>
|