電站停用
This commit is contained in:
parent
8d9687a8d2
commit
2d8494456c
@ -606,6 +606,8 @@ namespace SolarPower.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
await StationUnStatus(post.Id);
|
||||
|
||||
apiResult.Code = "0000";
|
||||
apiResult.Msg = "儲存成功";
|
||||
apiResult.Data = await powerStationRepository.GetOneAsync(powerStation.Id);
|
||||
|
||||
@ -104,6 +104,7 @@
|
||||
var station_infocreate = false;
|
||||
$(function () {
|
||||
$('#power_station_operation_personnel-error').hide();
|
||||
$('#coordinate_text-error').hide();
|
||||
var url = new URL(location.href);
|
||||
stationId = url.searchParams.get('stationId');
|
||||
|
||||
@ -1034,9 +1035,9 @@
|
||||
|
||||
//#region 儲存電站基本資料資訊
|
||||
function SaveStationInfo() {
|
||||
var a = $('#coordinate').val().split(',');
|
||||
|
||||
|
||||
if ($("#station-created-form").valid() && $('#power_station_operation_personnel').val().length != 0) {
|
||||
if ($("#station-created-form").valid() && $('#power_station_operation_personnel').val().length != 0 && a.length == 2) {
|
||||
station_infocreate = false;
|
||||
|
||||
$(".select2-selection__choice").each(function () {
|
||||
@ -1231,7 +1232,7 @@
|
||||
if (mode === "view") {
|
||||
//觀看
|
||||
$('#power_station_operation_personnel-error').hide();
|
||||
|
||||
$('#coordinate_text-error').hide();
|
||||
//#region 電站基本資料 文字
|
||||
$("#address_detail_text").show();
|
||||
|
||||
@ -1652,6 +1653,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
//#region 設定電站基本資料
|
||||
function SetStationInfo() {
|
||||
|
||||
@ -3038,6 +3042,19 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#coordinate').change(function () {
|
||||
var a = $('#coordinate').val().split(',');
|
||||
if (stationId == 'new' || station_infocreate) {
|
||||
if (a.length != 2) {
|
||||
$('#coordinate_text-error').show();
|
||||
} else {
|
||||
$('#coordinate_text-error').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#Inverter-form").validate({
|
||||
rules: {
|
||||
Inverter_ControllerId_modal: {
|
||||
|
||||
@ -138,10 +138,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 row justify-content-center align-items-center">
|
||||
<label class="col-xl-4 form-label" id="coordinate_label" for="coordinate"><span class="text-danger">*</span>座標</label>
|
||||
<div class="col-xl-4">
|
||||
<label class="col-xl-12 form-label" id="coordinate_label" for="coordinate"><span class="text-danger">*</span>座標</label>
|
||||
<label class="col-xl-12">xxx,yyy</label>
|
||||
</div>
|
||||
<div class="col-xl-8">
|
||||
<label id="coordinate_text" class="color-info-600"></label>
|
||||
<input type="text" id="coordinate" name="coordinate" class="form-control">
|
||||
<label id="coordinate_text-error" class="" style="z-index:1;color:red;display:none">此欄位格式錯誤</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 row justify-content-center align-items-center">
|
||||
|
||||
@ -338,7 +338,7 @@
|
||||
case 0: $('#DateGet').prop({ 'type': 'date' });
|
||||
$(".btn-change-quickSearch1").html("昨天");
|
||||
$(".btn-change-quickSearch2").html("前天");
|
||||
var today = new Date().toISOString().substring(0, 10);
|
||||
var today = new Date(new Date().setDate(new Date().getDate() - 1)).toISOString().substring(0, 10);
|
||||
$('#DateGet').val(today);
|
||||
document.getElementById("monthbtn").disabled = true;//月報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定
|
||||
|
||||
Loading…
Reference in New Issue
Block a user