report日期选择方式更改
This commit is contained in:
@@ -6,6 +6,7 @@ import java.util.Calendar;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -139,7 +140,7 @@ public class NtcTagReportController extends BaseController {
|
|||||||
// // TODO: handle exception
|
// // TODO: handle exception
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
HashMap<String,List<Long>> showData=new HashMap<>();//构造数据展示集合
|
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||||
for(ServiceDictInfo label:labels){
|
for(ServiceDictInfo label:labels){
|
||||||
List<Long> line= new ArrayList<Long>();
|
List<Long> line= new ArrayList<Long>();
|
||||||
long total=0l;
|
long total=0l;
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
|
//日期类型初始化
|
||||||
|
changeReportType("${bean.reportType}", true);
|
||||||
|
$("#reportType").change(function(){
|
||||||
|
changeReportType($("#reportType", false).val());
|
||||||
|
});
|
||||||
//reset
|
//reset
|
||||||
$("#resetBtn").on("click",function(){
|
$("#resetBtn").on("click",function(){
|
||||||
$("select.selectpicker").each(function(){
|
$("select.selectpicker").each(function(){
|
||||||
@@ -44,6 +49,20 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function changeReportType(reportType, init) {
|
||||||
|
$("#intype").remove();
|
||||||
|
if(reportType == 1){//需删除元素后重新添加,直接更改onclick会出现缓存问题
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM-dd",isShowClear:true});>');
|
||||||
|
} else if(reportType == 2){
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy-MM",isShowClear:true});>');
|
||||||
|
} else if(reportType == 3){
|
||||||
|
$("#reportTypeDiv").append('<input id="intype" class="form-control input-medium" type="text" value="" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy",isShowClear:true});>');
|
||||||
|
}
|
||||||
|
if (init) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var ajaxGetLabelReport=function(){
|
var ajaxGetLabelReport=function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
@@ -94,7 +113,6 @@ var ajaxGetLwhhReport=function(){
|
|||||||
<small><spring:message code="report_list"/></small>
|
<small><spring:message code="report_list"/></small>
|
||||||
</h3>
|
</h3>
|
||||||
<h5 class="page-header"></h5>
|
<h5 class="page-header"></h5>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -210,7 +228,7 @@ var ajaxGetLwhhReport=function(){
|
|||||||
<%@include file="/WEB-INF/views/report/entranceId.jsp" %>
|
<%@include file="/WEB-INF/views/report/entranceId.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user