|
@@ -279,42 +279,35 @@ img {
|
|
|
<header><?php echo $lang->showWord("charging_relevant_parameters"); ?><i class="fa fa-plus"></i></header>
|
|
|
<section>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
- <label>Max Charging Energy</label>
|
|
|
+ <label id="MaxChargingEnergyLbl">Max Charging Energy</label>
|
|
|
<small class="form-text text-muted-red">kWh</small>
|
|
|
- <input type="text" name="MaxChargingEnergy" id="MaxChargingEnergy" class="form-control" value="<?php echo $obj['MaxChargingEnergy'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit" onchange="MaxValue_changed(document.getElementById('MaxChargingEnergy').id,document.getElementById('MaxChargingEnergyText').id);">
|
|
|
+ <input type="text" name="MaxChargingEnergy" id="MaxChargingEnergy" class="form-control" value="<?php echo $obj['MaxChargingEnergy'];?>" placeholder="<?php echo ($obj['MaxChargingEnergy']==0||$obj['MaxChargingEnergy']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<small class="form-text text-muted-red"><label id="MaxChargingEnergyText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
- <label>Max Charging Power</label>
|
|
|
+ <label id="MaxChargingPowerLbl">Max Charging Power</label>
|
|
|
<small class="form-text text-muted-red">kW</small>
|
|
|
- <input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>" placeholder="<?php echo ($obj['MaxChargingPower']==0||$obj['MaxChargingPower']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit" onchange="MaxValue_changed(document.getElementById('MaxChargingPower').id,document.getElementById('MaxChargingPowerText').id);">
|
|
|
+ <input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>" placeholder="<?php echo ($obj['MaxChargingPower']==0||$obj['MaxChargingPower']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<input type="hidden" name="RatingPower" id="RatingPower" value="<?php echo $RatingPower;?>">
|
|
|
<small class="form-text text-muted-red"><label id="MaxChargingPowerText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label id="MaxChargingCurrentLbl">Max Charging Current</label>
|
|
|
<small class="form-text text-muted-red">amp</small>
|
|
|
- <input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>" placeholder="<?php echo ($obj['MaxChargingCurrent']==0||$obj['MaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit" onchange="MaxValue_changed(document.getElementById('MaxChargingCurrent').id,document.getElementById('MaxChargingCurrentText').id);">
|
|
|
+ <input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>" placeholder="<?php echo ($obj['MaxChargingCurrent']==0||$obj['MaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<input type="hidden" name="RatingCurrent" id="RatingCurrent" value="<?php echo $RatingCurrent;?>">
|
|
|
<small class="form-text text-muted-red"><label id="MaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
- <label>Max Charging Duration</label>
|
|
|
+ <label id="MaxChargingDurationLbl">Max Charging Duration</label>
|
|
|
<small class="form-text text-muted-red">minutes</small>
|
|
|
- <input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>" placeholder="<?php echo ($obj['MaxChargingDuration']==0||$obj['MaxChargingDuration']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit" onchange="MaxValue_changed(document.getElementById('MaxChargingDuration').id,document.getElementById('MaxChargingDurationText').id);">
|
|
|
+ <input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>" placeholder="<?php echo ($obj['MaxChargingDuration']==0||$obj['MaxChargingDuration']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<small class="form-text text-muted-red"><label id="MaxChargingDurationText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
|
- <div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
- <label>AC Phase Loss Policy</label>
|
|
|
- <select class="form-control" id="PhaseLossPolicy" name="PhaseLossPolicy">
|
|
|
- <option value="0" <?php echo $obj['PhaseLossPolicy']=="0"?"selected":""?>>de-rating</option>
|
|
|
- <option value="1" <?php echo $obj['PhaseLossPolicy']=="1"?"selected":""?>>stop charging</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
<div class="form-group" id="AcMaxChargingCurrentDiv">
|
|
|
<label>AC Max Charging Current</label>
|
|
|
<small class="form-text text-muted-red">amp</small>
|
|
|
- <input type="text" name="AcMaxChargingCurrent" id="AcMaxChargingCurrent" class="form-control" value="<?php echo $obj['AcMaxChargingCurrent'];?>" placeholder="<?php echo ($obj['AcMaxChargingCurrent']==0||$obj['AcMaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit" onchange="MaxValue_changed(document.getElementById('AcMaxChargingCurrent').id,document.getElementById('AcMaxChargingCurrentText').id);">
|
|
|
+ <input type="text" name="AcMaxChargingCurrent" id="AcMaxChargingCurrent" class="form-control" value="<?php echo $obj['AcMaxChargingCurrent'];?>" placeholder="<?php echo ($obj['AcMaxChargingCurrent']==0||$obj['AcMaxChargingCurrent']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<input type="hidden" name="AcRatingCurrent" id="AcRatingCurrent" value="<?php echo $AcRatingCurrent;?>">
|
|
|
<small class="form-text text-muted-red"><label id="AcMaxChargingCurrentText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
@@ -573,22 +566,22 @@ img {
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
<label>Present Charging Voltage</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?> volt">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingVoltage'],2);?> volt">
|
|
|
<input type="hidden" name="PresentChargingVoltage1" id="PresentChargingVoltage1" value="<?php echo $obj['ChargingInfo1']['PresentChargingVoltage'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label>Present Charging Current</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?> amp">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingCurrent'],2);?> amp">
|
|
|
<input type="hidden" name="PresentChargingCurrent1" id="PresentChargingCurrent1" value="<?php echo $obj['ChargingInfo1']['PresentChargingCurrent'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label>Present Charging Power</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?> kW">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargingPower'],2);?> kW">
|
|
|
<input type="hidden" name="PresentChargingPower1" id="PresentChargingPower1" value="<?php echo $obj['ChargingInfo1']['PresentChargingPower'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label>Present Charging Energy</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?> kWh">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['PresentChargedEnergy'],2);?> kWh">
|
|
|
<input type="hidden" name="PresentChargedEnergy1" id="PresentChargedEnergy1" value="<?php echo $obj['ChargingInfo1']['PresentChargedEnergy'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
@@ -603,12 +596,12 @@ img {
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
<label>EV Battery Max Voltage</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?> volt">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['EvBatteryMaxVoltage'],2);?> volt">
|
|
|
<input type="hidden" name="EvBatteryMaxVoltage1" id="EvBatteryMaxVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatteryMaxVoltage'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
<label>EV Battery Target Voltage</label>
|
|
|
- <input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?> volt">
|
|
|
+ <input type="text" readonly class="form-control" placeholder="<?php echo round($obj['ChargingInfo1']['EvBatterytargetVoltage'],2);?> volt">
|
|
|
<input type="hidden" name="EvBatterytargetVoltage1" id="EvBatterytargetVoltage1" value="<?php echo $obj['ChargingInfo1']['EvBatterytargetVoltage'];?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
@@ -819,12 +812,55 @@ img {
|
|
|
if(document.getElementById("AcMaxChargingCurrent").value=="0" || document.getElementById("AcMaxChargingCurrent").value==""){
|
|
|
document.getElementById("AcMaxChargingCurrentText").style.display="block";
|
|
|
}
|
|
|
+ document.getElementById("MaxChargingEnergyLbl").innerHTML="DC MaxCharging Energy";
|
|
|
+ document.getElementById("MaxChargingPowerLbl").innerHTML="DC MaxCharging Power";
|
|
|
document.getElementById("MaxChargingCurrentLbl").innerHTML="DC MaxCharging Current";
|
|
|
+ document.getElementById("MaxChargingDurationLbl").innerHTML="DC MaxCharging Duration";
|
|
|
}
|
|
|
else{
|
|
|
document.getElementById("AcMaxChargingCurrentDiv").style.display="none";
|
|
|
}
|
|
|
isBilling_clicked();
|
|
|
+ document.getElementById("MaxChargingEnergy").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.getElementById("MaxChargingPower").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.getElementById("MaxChargingCurrent").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.getElementById("MaxChargingDuration").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.getElementById("AcMaxChargingCurrent").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
document.getElementById("save").onclick = function() {
|
|
@@ -842,7 +878,6 @@ img {
|
|
|
"&MaxChargingCurrent=" + document.getElementById("MaxChargingCurrent").value+
|
|
|
"&AcMaxChargingCurrent=" + document.getElementById("AcMaxChargingCurrent").value+
|
|
|
"&MaxChargingDuration=" + document.getElementById("MaxChargingDuration").value+
|
|
|
- "&PhaseLossPolicy=" + document.getElementById("PhaseLossPolicy").value+
|
|
|
"&LocalWhiteCard0=" + document.getElementById("LocalWhiteCard0").value+
|
|
|
"&LocalWhiteCard1=" + document.getElementById("LocalWhiteCard1").value+
|
|
|
"&LocalWhiteCard2=" + document.getElementById("LocalWhiteCard2").value+
|
|
@@ -991,6 +1026,12 @@ img {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ if(MaxChargingEnergy =="")
|
|
|
+ {
|
|
|
+ alert("Fill Max Charging Energy !");
|
|
|
+ document.getElementById("MaxChargingEnergy").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if(MaxChargingEnergy >65535)
|
|
|
{
|
|
|
alert("Max Charging Energy must <= 65535!");
|
|
@@ -1003,16 +1044,10 @@ img {
|
|
|
document.getElementById("MaxChargingEnergy").focus();
|
|
|
return false;
|
|
|
}
|
|
|
- if(AcMaxChargingCurrent >65535)
|
|
|
- {
|
|
|
- alert("Ac Max Charging Current must <= 65535!");
|
|
|
- document.getElementById("AcMaxChargingCurrent").focus();
|
|
|
- return false;
|
|
|
- }
|
|
|
- if(AcMaxChargingCurrent < 0)
|
|
|
+ if(MaxChargingPower =="")
|
|
|
{
|
|
|
- alert("Ac Max Charging Current must >= 0!");
|
|
|
- document.getElementById("AcMaxChargingCurrent").focus();
|
|
|
+ alert("Fill Max Charging Power !");
|
|
|
+ document.getElementById("MaxChargingPower").focus();
|
|
|
return false;
|
|
|
}
|
|
|
if(RatingPower!="" && RatingPower!=0){
|
|
@@ -1031,10 +1066,10 @@ img {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- if(MaxChargingPower < 0)
|
|
|
+ if(MaxChargingCurrent =="")
|
|
|
{
|
|
|
- alert("Max Charging Power must >= 0!");
|
|
|
- document.getElementById("MaxChargingPower").focus();
|
|
|
+ alert("Fill Max Charging Current !");
|
|
|
+ document.getElementById("MaxChargingCurrent").focus();
|
|
|
return false;
|
|
|
}
|
|
|
if(RatingCurrent!="" && RatingCurrent!=0){
|
|
@@ -1053,6 +1088,12 @@ img {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ if(document.getElementById("ModelName").value.substr(8,1)!= "0" && AcMaxChargingCurrent =="")
|
|
|
+ {
|
|
|
+ alert("Fill AC Max Charging Current !");
|
|
|
+ document.getElementById("AcMaxChargingCurrent").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if(AcRatingCurrent!="" && AcRatingCurrent!=0){
|
|
|
if(parseFloat(AcMaxChargingCurrent) > parseFloat(AcRatingCurrent))
|
|
|
{
|
|
@@ -1068,6 +1109,18 @@ img {
|
|
|
document.getElementById("AcMaxChargingCurrent").focus();
|
|
|
return false;
|
|
|
}
|
|
|
+ if(AcMaxChargingCurrent < 0)
|
|
|
+ {
|
|
|
+ alert("Ac Max Charging Current must >= 0!");
|
|
|
+ document.getElementById("AcMaxChargingCurrent").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(MaxChargingCurrent =="")
|
|
|
+ {
|
|
|
+ alert("Fill Max Charging Current !");
|
|
|
+ document.getElementById("MaxChargingCurrent").focus();
|
|
|
+ return false;
|
|
|
}
|
|
|
if(MaxChargingCurrent < 0)
|
|
|
{
|
|
@@ -1077,7 +1130,13 @@ img {
|
|
|
}
|
|
|
if(MaxChargingDuration >65535)
|
|
|
{
|
|
|
- alert("MaxChargingDuration must <= 65535!");
|
|
|
+ alert("MaxChargingDuration must <= 65535!");
|
|
|
+ document.getElementById("MaxChargingDuration").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(MaxChargingDuration =="")
|
|
|
+ {
|
|
|
+ alert("Fill Max Charging Duration !");
|
|
|
document.getElementById("MaxChargingDuration").focus();
|
|
|
return false;
|
|
|
}
|
|
@@ -1090,16 +1149,6 @@ img {
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
- function MaxValue_changed(id,id2){
|
|
|
- if(document.getElementById(id).value == "0" || document.getElementById(id).value == ""){
|
|
|
- document.getElementById(id2).style.display="block";
|
|
|
- }
|
|
|
- else{
|
|
|
- document.getElementById(id2).style.display="none";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
function isBilling_clicked(){
|
|
|
if(document.getElementById("isBilling").checked){
|
|
|
document.getElementById("CurrencyDiv").style.display="block";
|