This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -186,7 +186,10 @@
{
key: 'model',
caption: GetTextByKey('P_MA_MODELNAME', 'Model Name'),
width: 100
width: 100,
totalCss: {
'text-align': 'right'
}
},
{ key: 'h0', caption: '12AM-1AM', width: 94, align: 'right' },
{ key: 'h1', caption: '1AM-2AM', width: 94, align: 'right' },
@ -249,11 +252,11 @@
var source = grid.source;
var total = {
name: GetTextByKey('P_MA_TOTALCOLON', 'Total:') + ' ' + source.length,
model: $('<span></span>').css('float', 'right').text(GetTextByKey('P_MA_TOTALRUNTIMECOLON', 'Total Runtime:'))[0].outerHTML
model: GetTextByKey('P_MA_TOTALRUNTIMECOLON', 'Total Runtime:')
};
for (var h = 0; h < 24; h++) {
var seconds = source.reduce(function (current, s) {
var n = s.Values['s' + h];
var n = s['s' + h];
return isNaN(n) ? current : current + n;
}, 0);
if (seconds > 0) {
@ -265,7 +268,6 @@
}
}
grid.total = total;
grid.init();
loading = false;
$('.maskbg').fadeOut(100);
@ -356,7 +358,7 @@
it['h' + h] = text;
}
source.push({ Values: it });
source.push(it);
parent.append($('<tr></tr>').append(item));
}
source = grid.source.concat(source);
@ -390,11 +392,11 @@
function OnDateChanged() {
var date = $('#date-selector').val();
if (date == "") {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is required."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISREQUIRED", "The date is required."), alerttitle);
return false;
}
if (!checkDate(date)) {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is incorrect."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISINCORRECT", "The date is incorrect."), alerttitle);
return false;
}
getAssetTimeline(pcid, date);
@ -413,11 +415,11 @@
function OnExport() {
var date = $('#date-selector').val();
if (date == "") {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is required."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISREQUIRED", "The date is required."), alerttitle);
return false;
}
if (!checkDate(date)) {
showAlert(GetTextByKey("P_WO_XXXXXX", "The date is incorrect."), alerttitle);
showAlert(GetTextByKey("P_MA_THEDATEISINCORRECT", "The date is incorrect."), alerttitle);
return false;
}