0
0

plan.html 4.1 KB

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