0
0

plan.html 4.2 KB

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