0
0

batch.html 3.7 KB

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