1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Insert title here</title>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/timepicker/jquery.ui.datepicker-zh-CN.js.js"></script>
- <style type="text/css">
- div {
- padding: 10px
- }
- </style>
- <script type="text/javascript">
- function iFrameHeight() {
- var ifm= document.getElementById("ReportFrame");
- var subWeb = document.frames ? document.frames["ReportFrame"].document : ifm.contentDocument;
- if(ifm != null && subWeb != null) {
- ifm.height = subWeb.body.scrollHeight;
- }
- }
- String.prototype.replaceAll = function(s1,s2){
- return this.replace(new RegExp(s1,"gm"),s2);
- }
- $(function(){
- var curr_time = new Date();
- var strDate = curr_time.getFullYear()+"-";
- strDate += curr_time.getMonth()+1+"-";
- strDate += curr_time.getDate()+"-";
- strDate += curr_time.getHours()+":";
- strDate += curr_time.getMinutes()+":";
- strDate += curr_time.getSeconds();
-
- $("#StartDate,#EndDate").datepicker({
- id: 'orderDate_datePicker',
- dateFormat: 'yy-mm-dd',
- //minDate: new Date(2010, 0, 1),
- maxDate: new Date(2020, 0, 1),
- showOn: 'focus'
- });
-
- $("#Statistics").click(function(){
- //alert($("#StartDate").val());
- var urlBase="${ctx}/myconsole/showReport/";
- var param="?StartDate="+$("#StartDate").val()+"&EndDate="+$("#EndDate").val();
- var fileName=($("#ReportType").find("option:selected").text()+"_"+$("#StartDate").val()+"_"+$("#EndDate").val()).replaceAll('-','');
- $("#ReportFrame").attr("src",urlBase+$("#ReportType").val()+param);
- $("#Exportpdf").attr("href",urlBase+$("#ReportType").val()+"-0-"+fileName+param);
- $("#Exportdoc").attr("href",urlBase+$("#ReportType").val()+"-1-"+fileName+param);
- $("#Exportxls").attr("href",urlBase+$("#ReportType").val()+"-2-"+fileName+param);
- });
- })
- </script>
- </head>
- <body>
- <div>
- <label>统计类型</label> <select id="ReportType" class="easyui-combobox" style="width: 200px;">
- <#list reports as report>
- <option value="${report.keyid}">${report.reportname}</option>
- </#list>
- </select> <label>开始日期</label> <input id="StartDate" type="text" class="FormElement ui-widget-content ui-corner-all"> <label>结束日期</label>
- <input id="EndDate" type="text" class="FormElement ui-widget-content ui-corner-all"> <a id="Statistics" href="#" ><button>统计</button></a>
- <a id="Exportpdf" href="#" ><button>导出pdf</button></a> <a id="Exportdoc" href="#" ><button>导出word</button></a> <a
- id="Exportxls" href="#" ><button>导出excel</button></a>
- </div>
- <div>
- <iframe id="ReportFrame" src="" style="width: 100%;" onload="iFrameHeight();" frameborder="0"></iframe>
- </div>
- </body>
- </html>
|