export.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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',['mode'=>$mode])}">
  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',['mode'=>$mode])}" 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= parseInt(time.toLocaleDateString())+3;
  49. console.log(Htime);
  50. console.log(111);
  51. laydate.render({
  52. elem: '#Ymd',
  53. showBottom: false,
  54. trigger: 'click' ,
  55. format:'yyyyMMdd',
  56. value:dateFormat(),
  57. theme:'#284a94'
  58. });
  59. laydate.render({
  60. elem: '#Ymd1',
  61. showBottom: false,
  62. trigger: 'click' ,
  63. format:'yyyyMMdd',
  64. value:dateFormatH(),
  65. theme:'#284a94'
  66. });
  67. //当前日期格式化
  68. function dateFormat() {
  69. var year=time.getFullYear();
  70. var mouth=time.getMonth()+ 1;
  71. if(mouth < 10){
  72. var mouths='0'+mouth;
  73. }else {
  74. var mouths=mouth;
  75. }
  76. var day=time.getDate();
  77. if(day < 10){
  78. var days='0'+day;
  79. }else {
  80. var days=day;
  81. }
  82. var dateStr=year+mouths+days;
  83. return dateStr;
  84. }
  85. //当前日期格式化
  86. function dateFormatH() {
  87. var year=time.getFullYear();
  88. var mouth=time.getMonth()+ 1;
  89. if(mouth < 10){
  90. var mouths='0'+mouth;
  91. }else {
  92. var mouths=mouth;
  93. }
  94. var day=time.getDate()+3;
  95. if(day < 10){
  96. var days='0'+day;
  97. }else {
  98. var days=day;
  99. }
  100. var dateStr=year+mouths+days;
  101. return dateStr;
  102. }
  103. </script>
  104. {/block}