实时报表 小时报、日报、月报查询优化

This commit is contained in:
leijun
2018-09-03 09:55:36 +08:00
parent 3447a87f63
commit 3e819d56bb

View File

@@ -90,15 +90,18 @@
var reportTime = "${bean.reportTime}"; var reportTime = "${bean.reportTime}";
return cfgName + action + reportType + reportTime; return cfgName + action + reportType + reportTime;
} }
var reportDate=0;
function changeReportType(reportType) { function changeReportType(reportType) {
$("#intype").remove(); $("#intype").remove();
var reportTime = "${bean.reportTime }"; var reportTime = "${bean.reportTime }";
var time=getNowFormatDate(); var time=getNowFormatDate();
if(reportTime.length==4){ if(reportDate > 0){
reportTime = reportTime+"-"+time.substring(5,10); if(reportTime.length < 10){
}else if(reportTime.length==7){ reportTime =time;
reportTime = reportTime+"-"+time.substring(8,10);
} }
}
reportDate ++;
if(reportType == 1){//需删除元素后重新添加直接更改onclick会出现缓存问题 if(reportType == 1){//需删除元素后重新添加直接更改onclick会出现缓存问题
$("#reportTypeDiv").append('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:true});>'); $("#reportTypeDiv").append('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:true});>');
} else if(reportType == 2){ } else if(reportType == 2){