1. 修改日期顯示
2. 電站報表 加入Loading
This commit is contained in:
parent
09f1634f75
commit
784f09b46a
@ -346,9 +346,9 @@
|
||||
$('#monthbtn').hide();
|
||||
$('#yearbtn').show();
|
||||
$('#daybtn').show();
|
||||
document.getElementById("monthbtn").disabled = true;//月報表鎖定
|
||||
@*document.getElementById("monthbtn").disabled = true;//月報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定
|
||||
document.getElementById("daybtn").disabled = false;//日報表鎖定
|
||||
document.getElementById("daybtn").disabled = false;//日報表鎖定*@
|
||||
break;
|
||||
case 1:
|
||||
|
||||
@ -386,9 +386,9 @@
|
||||
$('#daybtn').hide();
|
||||
$('#monthbtn').show();
|
||||
$('#yearbtn').show();
|
||||
document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
@*document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
document.getElementById("monthbtn").disabled = false;//月報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定*@
|
||||
break;
|
||||
case 2: $('#DateGet').prop({ 'type': 'month' });
|
||||
$(".btn-change-quickSearch1").html("本月");
|
||||
@ -398,9 +398,9 @@
|
||||
$('#daybtn').hide();
|
||||
$('#monthbtn').show();
|
||||
$('#yearbtn').show();
|
||||
document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
@*document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
document.getElementById("monthbtn").disabled = false;//月報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定*@
|
||||
break;
|
||||
case 3:
|
||||
$(".btn-change-quickSearch1").html("今年");
|
||||
@ -411,9 +411,9 @@
|
||||
$('#daybtn').hide();
|
||||
$('#monthbtn').hide();
|
||||
$('#yearbtn').show();
|
||||
document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
@*document.getElementById("daybtn").disabled = true;//日報表鎖定
|
||||
document.getElementById("monthbtn").disabled = true;//月報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定
|
||||
document.getElementById("yearbtn").disabled = false;//綜合報表鎖定*@
|
||||
break;
|
||||
}
|
||||
if (type == 1) {
|
||||
@ -674,12 +674,81 @@
|
||||
FormType: form,
|
||||
PowerStation: nowpowerstation
|
||||
}
|
||||
|
||||
switch (form) {
|
||||
case 0:
|
||||
$("#daybtn").html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>').attr("disabled", true);
|
||||
$("#monthbtn").attr("disabled", true);
|
||||
$("#yearbtn").attr("disabled", true);
|
||||
$("#year2btn").attr("disabled", true);
|
||||
$(".btn-station").attr("disabled", true);
|
||||
break;
|
||||
case 1:
|
||||
$("#daybtn").attr("disabled", true);
|
||||
$("#monthbtn").html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>').attr("disabled", true);
|
||||
$("#yearbtn").attr("disabled", true);
|
||||
$("#year2btn").attr("disabled", true);
|
||||
$(".btn-station").attr("disabled", true);
|
||||
break;
|
||||
case 2:
|
||||
$("#daybtn").attr("disabled", true);
|
||||
$("#monthbtn").attr("disabled", true);
|
||||
$("#yearbtn").html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>').attr("disabled", true);
|
||||
$("#year2btn").attr("disabled", true);
|
||||
$(".btn-station").attr("disabled", true);
|
||||
break;
|
||||
case 3:
|
||||
$("#daybtn").attr("disabled", true);
|
||||
$("#monthbtn").attr("disabled", true);
|
||||
$("#yearbtn").attr("disabled", true);
|
||||
$("#year2btn").attr('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>', true);
|
||||
$(".btn-station").attr("disabled", true);
|
||||
break;
|
||||
}
|
||||
|
||||
var url = "/StationReport/GetTableHead";
|
||||
$.post(url, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_warning(rel.msg);
|
||||
|
||||
switch (form) {
|
||||
case 0:
|
||||
$("#daybtn").html('日報表').attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 1:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").html('月報表').attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 2:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").html('綜合報表').attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 3:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").html('年報表').attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$('#TableHead').empty();
|
||||
var str = "<tr>";
|
||||
switch (form)
|
||||
@ -756,6 +825,38 @@
|
||||
}
|
||||
var url = "/StationReport/GetForm";
|
||||
$.post(url, send_data, function (rel) {
|
||||
|
||||
switch (form) {
|
||||
case 0:
|
||||
$("#daybtn").html('日報表').attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 1:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").html('月報表').attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 2:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").html('綜合報表').attr("disabled", false);
|
||||
$("#year2btn").attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
case 3:
|
||||
$("#daybtn").attr("disabled", false);
|
||||
$("#monthbtn").attr("disabled", false);
|
||||
$("#yearbtn").attr("disabled", false);
|
||||
$("#year2btn").html('年報表').attr("disabled", false);
|
||||
$(".btn-station").attr("disabled", false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (rel.code != "0000") {
|
||||
if (rel.code == "9985") {
|
||||
toast_warning(rel.msg);
|
||||
@ -766,6 +867,7 @@
|
||||
$('#totbody').empty();
|
||||
return;
|
||||
}
|
||||
|
||||
var sta = "";
|
||||
$('#TableBody').empty();
|
||||
$('#totbody').empty();
|
||||
|
||||
@ -1224,14 +1224,21 @@ var initApp = (function(app) {
|
||||
|
||||
/* Add app date to js-get-date */
|
||||
if (myapp_config.appDateHook.length) {
|
||||
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
day = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
var months = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
|
||||
day = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
now = new Date(),
|
||||
formatted = day[now.getDay()] + ', ' +
|
||||
months[now.getMonth()] + ' ' +
|
||||
now.getDate() + ', ' +
|
||||
now.getFullYear();
|
||||
formatted = now.getFullYear() + '-' + months[now.getMonth()] + '-' + now.getDate();
|
||||
|
||||
myapp_config.appDateHook.text(formatted);
|
||||
|
||||
//var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
// day = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
// now = new Date(),
|
||||
// formatted = day[now.getDay()] + ', ' +
|
||||
// months[now.getMonth()] + ' ' +
|
||||
// now.getDate() + ', ' +
|
||||
// now.getFullYear();
|
||||
//myapp_config.appDateHook.text(formatted);
|
||||
}
|
||||
|
||||
/* Check conflicting classes to build/destroy slimscroll */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user