Edit D:\rfid\apache-tomcat-8.5.32\webapps\libsystem\page\statistics\statistics_bacj.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page import="zlicense.util.FunModuleEnum"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; String jsondata = request.getParameter("jsondata"); %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>??????</title> <%@ include file="../global/linkcss.jsp"%> <link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/page/statistics/css/statistics.css?version=<%=MyJspUtils.getVersion() %>"> <style type="text/css"> .all-data { position: relative; } .export-type { position: fixed; top: 50px; width: 140px; height: 180px; background-color: #2a94de; z-index: 999; display: none; } .export-type div { border-top: 1px solid #008fbf; cursor: pointer; height: 40px; line-height: 40px; color: #fff; } .all-data:hover .export-type { display: block; } </style> </head> <body id="body"> <!-- header --> <div class="header"> <!-- ???????? --> <div class="header-title">?????????</div> <div class="header-nva"> <ul class="navbar-nav navbar-nav-menu"> <li><a href="javascript:void(0)" onclick="onPrintPerview()"><i class="fa fa-print"></i> ??????</a></li> <li class="all-data"><a href="javascript:void(0)"><i class="fa fa-file-excel-o"></i> ??????</a> <% if (MyJspUtils.checkLicense(FunModuleEnum.YAN_SHI_GONG_NENG)) { %> <div class='export-type'> <div data="csv"> <a href="javascript:void(0)">???CSV</a> </div> <div data="dbf"> <a href="javascript:void(0)">???DBF</a> </div> <div data="excel"> <a href="javascript:void(0)">???EXCEL</a> </div> <div data="access"> <a href="javascript:void(0)">???ACCESS</a> </div> </div> <% } %></li> <!-- <li><a href="javascript:void(0)" onclick="onExportExcelFlie()"><i class="fa fa-file-excel-o"></i> ??????</a></li> --> <li><a href="javascript:void(0)" onclick="onCloseWin()"><i class="fa fa-close"></i> ??????</a></li> </ul> </div> <!-- ??????????????--> <div class="header-operator"> <ul class="navbar-nav"> </ul> </div> </div> <div class="lold-div"> <div style="color: #555;left: 46%;top:40%;position: absolute; ">??????????????....</div> <div class="lold-div container "> <div class="lold-div circle"></div> <div class="lold-div circle"></div> <div class="lold-div circle"></div> </div> </div> <div style="border: 1px solid #efefef;"> <div class="labelDisplayArea" style="width: 80%;margin: auto;"> <div class='count-title'>?????????</div> <div class='count-time-account'> <label class='count-time'>??????:<span class="tjdate"></span></label><label>??????:<span class="tjaccount"></span></label> </div> <table class='table-black export-table'> <caption style=' text-align:left;margin-left: 20px;font-size: 12px;height: auto;line-height: 30px;'><span class="tjcondition"></span></caption> <thead> <tr class = "th-list"> <th>?????</th> <th>???????????</th> <th>????????????</th> <th>?????????</th> <th>???????????</th> <th>???????????</th> <th>??????????</th> <th>???????????</th> <th>???????????</th> </tr> </thead> <tbody class="tbody-data"> </tbody> </table> </div> </div> <div class="show-grid"></div> <table class="table table-striped" id="stats_datatable"> <tbody id='uvnum'> </tbody> </table> </body> <%@ include file="../global/linkjs.jsp"%> <script type="text/javascript"> var jsonData = '<%=jsondata%>'; var vType = "statistics"; </script> <script type="text/javascript" src="${pageContext.request.contextPath}/third-party/jqprint/jquery-1.4.4.min.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/third-party/jqprint/jquery.jqprint-0.3.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/tableExport.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/jquery.base64.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/echarts.min.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/macarons.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/page/statistics/js/mychart.js?version=<%=MyJspUtils.getVersion() %>"></script> <script type="text/javascript"> var vGridExportList; $(function() { vGridExportList; jsonData = eval("(" + jsonData + ")"); //JSON.parse(jsonData); for(var i = 0;i<10;i++){ if(jsonData["limit["+ i +"].condition"] == "lib_cir_reader.rdrtype" || jsonData["limit["+ i +"].condition"] == "lib_cir_finelog.operid" ){ jsonData["limit["+ i +"].value"] = getSqlTableLimit(jsonData["limit["+ i +"].value"]); } } var url = base_path + 'cir/reader/listReaderFinCondition.do'; var param = {}; param = jsonData; $.post(url, param, function(data) { console.log(data); $(".lold-div").hide(); if (data.status == "0") { renderPageBzcj(data); } else { alert(data.message); } }, 'json'); $(".tjdate").html(fmtStringToDate(getCurDateYMD())); $(".tjaccount").html(mystorage.get("account")); $(".tjcondition").html(jsonData.jsonText); $(".export-type div").bind("click", function() { var data = $(this).attr("data"); onExportExcelFlie("", data); }); $(".sta_menu li").each(function(index) { $(this).click(function() { $(".sta_menu li.select-hover").removeClass("select-hover"); $(this).addClass("select-hover"); if (index == "0") { $(".labelDisplayArea").show(); $(".countDisplayArea").hide(); $(".pieDisplayArea").hide(); } if (index == "1") { $(".labelDisplayArea").hide(); $(".countDisplayArea").show(); $(".pieDisplayArea").hide(); } if (index == "2") { $(".labelDisplayArea").hide(); $(".countDisplayArea").hide(); $(".pieDisplayArea").show(); } }); }); }); function getSqlTableLimit(value){ var conditon = ""; var arr = value.split(","); for(var i = 0 ;i<arr.length;i++){ if(arr[i]){ conditon +="'"+arr[i]+"',"; } } conditon = conditon.substr(0, conditon.length-1); return conditon; } var paramjson = null; function onExportExcelFlie() { /* var url = base_path+'lib/export/download.do'; openPostWindowDownLoad(url,jsonData); */ /* $('.table-grid').tableExport({ type:'excel', escape:'false', fileName: 'sum' }); */ } function onPrintPerview(){ $(".labelDisplayArea").jqprint(); } /* YA_JIN("0","???" ,"deposit"), GUO_QI("1","??????","debt"), WU_SUN("2","??????","debt"), DIU_SHI("3","??????","debt"), QI_TA("4","??????","debt"), YU_FU_KUAN("5","?????","yu_fu_kuan"), GONG_BEN_FEI("6","?????","gong_ben_fei"), YAN_ZHENG_FEI("7","?????","yan_zheng_fei"), ZHUAN_XIANG_YA_JIN("8","??????" ,"deposit"), ZHUAN_XIANG_GUO_QI("9","?????????","debt"), ZHUAN_XIANG_WU_SUN("a","?????????","debt"), ZHUAN_XIANG_DIU_SHI("b","?????????","debt"), ZHUAN_XIANG_QI_TA("c","?????????","debt"), */ function renderPageBzcj(data){ var rows = data.rows; var tdRows = {}; var tdData = ["???","6-?????","0|1-?????","0|1-????????","????","0|2-?????","0|2-????????","0|???-???"]; if(jsonData.jsonText){ vGridExportList ="<div>"+ jsonData.jsonText +"</div>"; } vGridExportList += "<table>"; vGridExportList+="<caption>?????????</caption>"; vGridExportList+= "<thead><tr>"; vGridExportList+= $(".th-list").html(); vGridExportList += "</tr></thead><tbody>"; for(var i = 0;i < rows.length;i++){ var row = rows[i]; var type = row.TYPE; var rectype= row.RECTYPE; var getData = [0,0,0,0,0,0,0,0]; if(tdRows[row.RDRTYPE]){ getData = tdRows[row.RDRTYPE]; } if(type == "???"){ getData[0] = row.RDRCOUNT; } if(type == "6"){ getData[1] = row.MONEY; } if(type == "0" && rectype == "1"){ //????? getData[2] = row.MONEY; getData[3] = row.CNT; } if(type == "????"){ getData[4] = row.RDRCOUNT; } if(type == "0" && rectype == "2"){ //????? getData[5] = row.MONEY; getData[6] = row.CNT; } if(type == "0" && rectype == "???-???"){ //?????? getData[7] = row.MONEY; } tdRows[row.RDRTYPE] = getData; } var html = ''; var totalData = ["???",0,0,0,0,0,0,0,0]; for(var i in tdRows){ html += "<tr>"; html += "<td>"; html += getRdrName(i); html += "</td>"; var data = tdRows[i]; for(var k in data){ html += "<td>"; html += data[k]; html += "</td>"; totalData[parseInt(k)+1] = parseFloat(totalData[parseInt(k)+1]) + parseFloat(data[k]); } html += "</tr>" } if(html.length>0){ html += "<tr>"; for(var j in totalData){ html += "<td>"; html += totalData[j]; html += "</td>"; } html += "</tr>" } vGridExportList += html; vGridExportList += "</tbody></table>"; $(".tbody-data").html(html); setLabelDisplayArea(); } function getRdrName(value){ var comboboxData = _fmtGridDataAllValues.rows[0].rdrtype; if(!value){ value = ""; } for(var i = 0; i < comboboxData.length;i++){ if(value == comboboxData[i].code) return comboboxData[i].name; } return value; } function setLabelDisplayArea() { // ???outerHTML??????????able?????TML????????<table>?????????????????????HTML????????harset??rf-8??????????? var html = "<html><head><meta charset='utf-8' /></head><body>" + vGridExportList + "</body></html>"; // ????????lob???????????????????????????????????????????????????????????????? var blob = new Blob([ html ], { type : "application/vnd.ms-excel" }); var a = document.getElementsByTagName("a")[1]; // ???URL.createObjectURL()???????????blob URL a.href = URL.createObjectURL(blob); // ???????? a.download = "elib-statistics.xls"; if ($(".export-type").length > 0) { var blob1 = new Blob([ html ], { type : "application/vnd.ms-excel" }); var a1 = document.getElementsByTagName("a")[2]; // ???URL.createObjectURL()???????????blob URL a1.href = URL.createObjectURL(blob1); // ???????? a1.download = "elib-statistics.csv"; var blob2 = new Blob([ html ], { type : "application/vnd.ms-excel" }); var a2 = document.getElementsByTagName("a")[3]; // ???URL.createObjectURL()???????????blob URL a2.href = URL.createObjectURL(blob2); // ???????? a2.download = "elib-statistics.dbf"; a = document.getElementsByTagName("a")[4]; // ???URL.createObjectURL()???????????blob URL a.href = URL.createObjectURL(blob); // ???????? a.download = "elib-statistics.xls"; var blob4 = new Blob([ html ], { type : "application/vnd.ms-excel" }); var a4 = document.getElementsByTagName("a")[5]; // ???URL.createObjectURL()???????????blob URL a4.href = URL.createObjectURL(blob4); // ???????? a4.download = "elib-statistics.accdb"; } } </script> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de