From dbb5948f7cb44e4a39b541531d9c57cfbc0e0e88 Mon Sep 17 00:00:00 2001 From: Kai Date: Tue, 29 Jun 2021 16:22:35 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E9=9B=BB=E7=AB=99=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=20=E9=9B=BB=E7=AB=99=E9=A1=9E=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Controllers/PowerStationController.cs | 4 ++++ SolarPower/Models/PowerStation.cs | 2 ++ .../Views/PowerStation/PowerStationEdit.cshtml | 10 +++++++++- SolarPower/Views/PowerStation/_StationInfo.cshtml | 12 +++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/SolarPower/Controllers/PowerStationController.cs b/SolarPower/Controllers/PowerStationController.cs index 4ddaa42..d9a3250 100644 --- a/SolarPower/Controllers/PowerStationController.cs +++ b/SolarPower/Controllers/PowerStationController.cs @@ -276,6 +276,7 @@ namespace SolarPower.Controllers PhotovoltaicPanelSpecification = post.PhotovoltaicPanelSpecification, PhotovoltaicPanelAmount = post.PhotovoltaicPanelAmount, SiteDB = company.SiteDB, + SolarType = post.SolarType, CreatedBy = myUser.Id }; @@ -303,6 +304,7 @@ namespace SolarPower.Controllers "PhotovoltaicPanelSpecification", "PhotovoltaicPanelAmount", "SiteDB", + "SolarType", "CreatedBy" }; @@ -392,6 +394,7 @@ namespace SolarPower.Controllers PhotovoltaicPanelProductModel = post.PhotovoltaicPanelProductModel, PhotovoltaicPanelSpecification = post.PhotovoltaicPanelSpecification, PhotovoltaicPanelAmount = post.PhotovoltaicPanelAmount, + SolarType = post.SolarType, UpdatedBy = myUser.Id }; @@ -416,6 +419,7 @@ namespace SolarPower.Controllers "PhotovoltaicPanelProductModel", "PhotovoltaicPanelSpecification", "PhotovoltaicPanelAmount", + "SolarType", "UpdatedBy", }; diff --git a/SolarPower/Models/PowerStation.cs b/SolarPower/Models/PowerStation.cs index 8a09d11..e3f6682 100644 --- a/SolarPower/Models/PowerStation.cs +++ b/SolarPower/Models/PowerStation.cs @@ -177,6 +177,7 @@ namespace SolarPower.Models.PowerStation public string PhotovoltaicPanelProductModel { get; set; } //光電板型號 public string PhotovoltaicPanelSpecification { get; set; } //光電板規格 public int PhotovoltaicPanelAmount { get; set; } //光電板規格 + public byte SolarType { get; set; } //電站類型 } public class UpdatePowerStationInfo : Updated @@ -199,6 +200,7 @@ namespace SolarPower.Models.PowerStation public string PhotovoltaicPanelProductModel { get; set; } //光電板型號 public string PhotovoltaicPanelSpecification { get; set; } //光電板規格 public int PhotovoltaicPanelAmount { get; set; } //光電板規格 + public byte SolarType { get; set; } //電站類型 } public class PostBoETPCInfo diff --git a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml index e138a17..701e3f8 100644 --- a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml +++ b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml @@ -129,6 +129,8 @@ $("#canecl-station-info-btn").hide(); $("#check_escrow").attr('disabled', false); + $("#select_solar_tpye").attr('disabled', false); + $(".city-name").hide(); $(".power-station-name").html("新增電站"); @@ -897,7 +899,8 @@ PhotovoltaicPanelBrand: $("#photovoltaic_panel_brand").val(), PhotovoltaicPanelSpecification: $("#photovoltaic_panel_specification").val(), PhotovoltaicPanelAmount: $("#photovoltaic_panel_amount").val(), - PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val() + PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val(), + SolarType: $("#select_solar_tpye").val() } $.post(url, send_data, function (rel) { @@ -1039,6 +1042,8 @@ $("#electricity_meter_at").hide(); $("#estimated_recovery_time").hide(); + $("#select_solar_tpye").attr("disabled", true); + $("#generating_capacity").hide(); $("#escrow_name").hide(); $("#power_rate").hide(); @@ -1099,6 +1104,8 @@ $("#electricity_meter_at").show(); $("#estimated_recovery_time").show(); + $("#select_solar_tpye").attr("disabled", false); + $("#generating_capacity").show(); $("#escrow_name").show(); $("#power_rate").show(); @@ -1277,6 +1284,7 @@ $("#select_city").val(powerStationData.cityId).trigger("change"); $("#select_area").val(powerStationData.areaId); + $("#select_solar_tpye").val(powerStationData.solarType); //#region 電站基本資料 文字 $("#address_detail_text").html(powerStationData.address); diff --git a/SolarPower/Views/PowerStation/_StationInfo.cshtml b/SolarPower/Views/PowerStation/_StationInfo.cshtml index 84d91c5..c5bf32b 100644 --- a/SolarPower/Views/PowerStation/_StationInfo.cshtml +++ b/SolarPower/Views/PowerStation/_StationInfo.cshtml @@ -34,12 +34,22 @@ -
+
+
+ +
+ +
+