From 80119fc6de7e143fd2deafd8b879074e79ee0cf0 Mon Sep 17 00:00:00 2001 From: b110212000 Date: Thu, 23 Sep 2021 19:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E5=A4=AA=E5=82=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Views/StationReport/Index.cshtml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml index 56b1443..e5ce673 100644 --- a/SolarPower/Views/StationReport/Index.cshtml +++ b/SolarPower/Views/StationReport/Index.cshtml @@ -897,11 +897,12 @@ } $('#TableBody').empty(); $('#totbody').empty(); + haveinvertName = []; return; } - var sta = ""; - $('#TableBody').empty(); + //var sta = ""; + $('#totbody').empty(); $('#tothead').empty(); if (form == 0) {//日報表 @@ -911,7 +912,7 @@ var kWhkwp = 0; var ntd = 0; var ntdone = 0; - + var sta = ""; $.each(rel.data, function (index, inverter) { sta += ""; sta += "" + inverter.report_date + ""; @@ -961,6 +962,7 @@ stb += ""; + $('#TableBody').empty(); $('#TableBody').append(sta); $('#totbody').append(stb); $('#tothead').append(stc); @@ -974,7 +976,7 @@ var monthmoney = 0; var monthmoneyone = 0; var monthday = 0; - + var sta = ""; var check_hire = false; var sitedb = ""; $.each(rel.data, function (index, inverter) { @@ -988,10 +990,10 @@ } }); sta += "" + inverter.dayKWH + ""; - sta += "" + inverter.dayKWHp + ""; + sta += "" + ((inverter.dayKWHp == null) ? 0 : inverter.dayKWHp) + ""; sta += "" + inverter.tothour + ""; sta += "" + inverter.KWHKWP + ""; - sta += "" + inverter.PR.toFixed(2) + ""; + sta += "" + ((inverter.PR == null) ? 0 : inverter.PR.toFixed(2)) + ""; sta += "" + inverter.irradiance + ""; sta += "" + inverter.temperature + ""; if (showmoney == 1) { @@ -1078,7 +1080,7 @@ }) } - + $('#TableBody').empty(); $('#TableBody').append(sta); $('#totbody').append(stb); $('#tothead').append(stc); @@ -1094,7 +1096,7 @@ var monthmoney = 0; var monthmoneyone = 0; var monthday = 0; - + var sta = ""; var check_hire = false; var sitedb = ""; $.each(rel.data, function (index, inverter) { @@ -1198,7 +1200,7 @@ }) } - + $('#TableBody').empty(); $('#TableBody').append(sta); $('#totbody').append(stb); $('#tothead').append(stc);