overage.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('余额报表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li class="select-time">
  14. <label>时间: </label>
  15. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
  16. <span>-</span>
  17. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  18. </li>
  19. <li>
  20. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i>&nbsp;搜索</a>
  21. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  22. </li>
  23. </ul>
  24. </div>
  25. </form>
  26. </div>
  27. <div class="btn-group-sm" id="toolbar" role="group">
  28. <a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="report:overage:excel">
  29. <i class="fa fa-cloud-download"></i> 导出Excel
  30. </a>
  31. </div>
  32. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  33. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  34. </div>
  35. </div>
  36. </div>
  37. <th:block th:include="include :: footer" />
  38. <script th:inline="javascript">
  39. var prefix = ctx + "report/overage";
  40. $(function() {
  41. var today = new Date();
  42. $("#startTime").val(today.Format("yyyy-MM-dd"));
  43. $("#endTime").val(today.Format("yyyy-MM-dd"));
  44. var options = {
  45. url: prefix + "/list",
  46. exportUrl: prefix + "/export",
  47. modalName: "余额报表",
  48. height: $(window).height()-120,
  49. columns: [
  50. {
  51. field: 'createDate',
  52. title: '时间'
  53. },
  54. {
  55. field: 'goldSum',
  56. title: '金币总额'
  57. },
  58. {
  59. field: 'diamondSum',
  60. title: '钻石总额',
  61. align : 'center'
  62. },
  63. {
  64. field: 'giftNomalDiamondSum',
  65. title: '普通礼物钻石',
  66. align : 'center'
  67. },
  68. {
  69. field: 'giftDrawDiamondSum',
  70. title: '砸蛋礼物钻石',
  71. align : 'center'
  72. }]
  73. };
  74. $.table.init(options);
  75. });
  76. Date.prototype.Format = function (fmt) { //author: meizz
  77. var o = {
  78. "M+": this.getMonth() + 1, //月份
  79. "d+": this.getDate(), //日
  80. "H+": this.getHours(), //小时
  81. "m+": this.getMinutes(), //分
  82. "s+": this.getSeconds(), //秒
  83. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  84. "S": this.getMilliseconds() //毫秒
  85. };
  86. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  87. for (var k in o)
  88. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  89. return fmt;
  90. };
  91. </script>
  92. </body>
  93. </html>