0
0

batch.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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>按月删除计划</h5>
  8. <div class="ibox-tools">
  9. <a class="toback" href="javascript:history.go(-1);">
  10. 返回上一页
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('batch')}?type={$type}" class="form-horizontal">
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label">选择要删除的月份<span class="text-danger">*</span></label>
  18. <div class="col-sm-6">
  19. <select name="from" class="form-control">
  20. {foreach $from as $k=>$v}
  21. <option value="{$v}">{$v}</option>
  22. {/foreach}
  23. </select>
  24. </div>
  25. </div>
  26. <div class="hr-line-dashed"></div>
  27. <div class="form-group">
  28. <div class="col-sm-6 col-sm-offset-2">
  29. <button class="btn btn-primary ajax-post" target-form="form-horizontal"type="submit">确 定</button>
  30. <a href="javascript:history.go(-1);" class="btn btn-default">取 消</a>
  31. </div>
  32. </div>
  33. </form>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. {/block}
  39. {block name="script"}
  40. <script type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
  41. <script>
  42. var time =new Date();
  43. //日期时间选择器
  44. laydate.render({
  45. elem: '#date',
  46. type: 'datetime',
  47. format:'yyyy-MM-dd HH:mm',
  48. trigger: 'click' ,
  49. theme:'#6eb7ff'
  50. // value:dateFormat(),
  51. });
  52. laydate.render({
  53. elem: '#date-one',
  54. type: 'datetime',
  55. trigger: 'click' ,
  56. format:'yyyy-MM-dd HH:mm',
  57. theme:'#6eb7ff'
  58. // value:dateFormatH(),
  59. });
  60. //当前日期格式化
  61. function dateFormat() {
  62. var year=time.getFullYear();
  63. var mouth=time.getMonth()+ 1;
  64. if(mouth < 10){
  65. var mouths='0'+mouth;
  66. }else {
  67. var mouths=mouth;
  68. }
  69. var day=time.getDate();
  70. if(day < 10){
  71. var days='0'+day;
  72. }else {
  73. var days=day;
  74. }
  75. var hour=time.getHours();
  76. if(hour < 10){
  77. var hours='0'+hour;
  78. }else {
  79. var hours=hour;
  80. }
  81. var minute=time.getMinutes();
  82. if(minute < 10){
  83. var minutes='0'+minute;
  84. }else {
  85. var minutes=minute;
  86. }
  87. var dateStr=year+'-'+mouths+'-'+days+' '+hours+':'+minutes;
  88. return dateStr;
  89. }
  90. function dateFormatH() {
  91. var year=time.getFullYear();
  92. var mouth=time.getMonth()+ 1;
  93. if(mouth < 10){
  94. var mouths='0'+mouth;
  95. }else {
  96. var mouths=mouth;
  97. }
  98. var day=time.getDate();
  99. if(day < 10){
  100. var days='0'+day;
  101. }else {
  102. var days=day;
  103. }
  104. var hour=time.getHours();
  105. if(hour < 10){
  106. var hours='0'+hour;
  107. }else {
  108. var hours=hour;
  109. }
  110. var minute=time.getMinutes()+20;
  111. var dateStr=year+'-'+mouths+'-'+days+' '+hours+':'+minute;
  112. return dateStr;
  113. }
  114. </script>
  115. {/block}