export.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-title">
  7. <h5>{$meta_title}</h5>
  8. <div class="ibox-tools">
  9. <a class="toback" href="{:url('index')}">
  10. 返回上一页
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <div class="" style="background-color: #d9edf7;
  16. padding: 15px 20px 20px 20px;margin-bottom: 20px;font-size: 14px">
  17. <span><i class="fa fa-info-circle">考虑服务器承受力,尽量导出数据量不要超过一个月</i></span>
  18. </div>
  19. <form method="post" action="{:url('export')}" class="form-horizontal">
  20. <div class="form-group">
  21. <label class="col-sm-1 control-label">开始日期</label>
  22. <div class="col-sm-6">
  23. <input id="Ymd" readonly class="form-control" name="start" value="">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-sm-1 control-label">结束日期</label>
  28. <div class="col-sm-6">
  29. <input id="Ymd1" readonly class="form-control" name="end" value="">
  30. </div>
  31. </div>
  32. <div class="hr-line-dashed"></div>
  33. <div class="form-group">
  34. <div class="col-sm-6 col-sm-offset-2">
  35. <button class="btn btn-primary " target-form="form-horizontal" type="submit">导出并下载文件</button>
  36. </div>
  37. </div>
  38. </form>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. {/block}
  44. {block name="script"}
  45. <script type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
  46. <script>
  47. var time =new Date();
  48. var Htime= time.toLocaleDateString()+3;
  49. console.log(Htime);
  50. laydate.render({
  51. elem: '#Ymd',
  52. showBottom: false,
  53. trigger: 'click' ,
  54. format:'yyyyMMdd',
  55. value:'{$s}',
  56. theme:'#f99c34'
  57. });
  58. laydate.render({
  59. elem: '#Ymd1',
  60. showBottom: false,
  61. trigger: 'click' ,
  62. format:'yyyyMMdd',
  63. value:'{$e}',
  64. theme:'#f99c34'
  65. });
  66. //当前日期格式化
  67. function dateFormat() {
  68. var year=time.getFullYear();
  69. var mouth=time.getMonth()+ 1;
  70. if(mouth < 10){
  71. var mouths='0'+mouth;
  72. }else {
  73. var mouths=mouth;
  74. }
  75. var day=time.getDate();
  76. if(day < 10){
  77. var days='0'+day;
  78. }else {
  79. var days=day;
  80. }
  81. var dateStr=year+mouths+days;
  82. return dateStr;
  83. }
  84. //当前日期格式化
  85. function dateFormatH() {
  86. var year=time.getFullYear();
  87. var mouth=time.getMonth()+ 1;
  88. if(mouth < 10){
  89. var mouths='0'+mouth;
  90. }else {
  91. var mouths=mouth;
  92. }
  93. var day=time.getDate()+3;
  94. if(day < 10){
  95. var days='0'+day;
  96. }else {
  97. var days=day;
  98. }
  99. var dateStr=year+mouths+days;
  100. return dateStr;
  101. }
  102. </script>
  103. {/block}