stat.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {% if data['page']['ajax'] == False %}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. {%include '../inc/header.html'%}
  6. </head>
  7. <body>
  8. <div class="x-nav">
  9. <span class="layui-breadcrumb">
  10. {% block breadcrumb %}
  11. <a><cite>首页</cite></a>
  12. <a><cite><script>document.write(parent.config.parentTitle)</script></cite></a>
  13. <a><cite><script>document.write(parent.config.subTitle)</script></cite></a>
  14. {% end %}
  15. </span>
  16. <span id="currentUrl"><script>var cur = parent.config.cur;</script></span>
  17. <a class="layui-btn layui-btn-small" style="margin-top:3px;float:right" href="javascript:window.history.back();" title="返回"><i class="layui-icon">&#xe619;</i></a>
  18. </div>
  19. <div class="x-body">
  20. <form class="layui-form x-center" action="{{data['common']['path']}}" style="width:auto">
  21. <input type="hidden" name="id" id="id" value="{% if data['info'] and 'id' in data['info'] and data['info']['id'] > 0 %}{{data['info']['id']}}{% end %}" />
  22. <input type="hidden" name="method" id="method" value="{% if 'method' in data and data['method'] %}{{data['method']}}{% end %}" />
  23. <div class="layui-form-pane" style="margin-top: 15px;">
  24. <div class="layui-form-item">
  25. {% block search %}
  26. <label class="layui-form-label">日期范围</label>
  27. <div class="layui-input-inline">
  28. <input class="layui-input" placeholder="开始时间" id="LAY_demorange_s" name="search_start">
  29. </div>
  30. <div class="layui-input-inline">
  31. <input class="layui-input" placeholder="截止时间" id="LAY_demorange_e" name="search_end">
  32. </div>
  33. <div class="layui-input-inline">
  34. <input type="text" name="search_name" placeholder="标题" autocomplete="off" class="layui-input">
  35. </div>
  36. {% end %}
  37. <div class="layui-input-inline" style="width:80px">
  38. <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
  39. </div>
  40. </div>
  41. </div>
  42. </form>
  43. <div id="main" style="width: 100%;height:400px;"></div>
  44. </div>
  45. {%include '../inc/footer.html'%}
  46. {%include '../inc/script.html'%}
  47. </body>
  48. <script>
  49. layui.use(['laydate','element','laypage','layer', 'form'], function(){
  50. $ = layui.jquery;//jquery
  51. lement = layui.element();//面包导航
  52. laypage = layui.laypage;//分页
  53. layer = layui.layer;//弹出层
  54. if ($('.load').length) {
  55. $('.load').each(function()
  56. {
  57. load($(this))
  58. })
  59. }
  60. if ($('.time').length) {
  61. laydate = layui.laydate;//日期插件
  62. var start = {
  63. //min: laydate.now()
  64. max: laydate.now()
  65. ,format: 'YYYY-MM-DD hh:mm:ss'
  66. ,istoday: true
  67. ,istime: true
  68. ,choose: function(datas){
  69. end.min = datas; //开始日选好后,重置结束日的最小日期
  70. end.start = datas //将结束日的初始值设定为开始日
  71. }
  72. };
  73. var end = {
  74. //min: laydate.now()
  75. max: laydate.now()
  76. ,format: 'YYYY-MM-DD hh:mm:ss'
  77. ,istoday: true
  78. ,istime: true
  79. ,choose: function(datas){
  80. start.max = datas; //结束日选好后,重置开始日的最大日期
  81. }
  82. };
  83. $('.time').each(function()
  84. {
  85. type = $(this).attr('id').indexOf('start')
  86. $(this).click(function()
  87. {
  88. if (type > -1) {
  89. start.elem = this;
  90. laydate(start);
  91. } else {
  92. end.elem = this
  93. laydate(end);
  94. }
  95. })
  96. })
  97. }
  98. });
  99. </script>
  100. {% block script %}
  101. {% end %}
  102. </html>
  103. {% end %}