0
0

add.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .laydate-time-list{padding-bottom:0;overflow:hidden}
  5. .laydate-time-list>li{width:50%!important;}
  6. .laydate-time-list>li:last-child { display: none;}
  7. .laydate-time-list ol>li:last-child{margin-bottom:.26rem;}
  8. .rr{
  9. padding-right: 10px;
  10. }
  11. </style>
  12. <div class="row">
  13. <div class="col-sm-12">
  14. <div class="ibox float-e-margins">
  15. <div class="ibox-content">
  16. <form method="post" action="{:url('add')}" class="form-horizontal">
  17. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  18. <div class="col-sm-12">
  19. <div class="form-group">
  20. <label class="control-label">食品名<span class="text-danger">*</span></label></br>
  21. <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
  22. </div>
  23. </div>
  24. <div class="col-sm-12">
  25. <div class="form-group">
  26. <label class="control-label">价格<span class="text-danger">*</span></label></br>
  27. <input type="text" class="form-control" name="money" value="{$info.money|default=''}">
  28. </div>
  29. </div>
  30. <div class="col-sm-6">
  31. <div class="form-group">
  32. <label class="control-label">(预售)可以售卖的开始时间<span class="text-danger">*</span></label></br>
  33. <div class="rr">
  34. <input type="text" readonly class="form-control" id="start_time" name="start_time" value="{$info.start_time|default=''}">
  35. </div>
  36. </div>
  37. </div>
  38. <div class="col-sm-6">
  39. <div class="form-group">
  40. <label class="control-label">(预售)可以售卖的结束时间<span class="text-danger">*</span></label></br>
  41. <input type="text" readonly class="form-control" id="end_time" name="end_time" value="{$info.end_time|default=''}">
  42. </div>
  43. </div>
  44. <div class="col-sm-6">
  45. <div class="form-group">
  46. <label class="control-label">(当日)可以售卖的开始时间<span class="text-danger">*</span></label></br>
  47. <div class="rr">
  48. <input type="text" readonly class="form-control" id="today_start_time" name="today_start_time" value="{$info.today_start_time|default=''}">
  49. </div>
  50. </div>
  51. </div>
  52. <div class="col-sm-6">
  53. <div class="form-group">
  54. <label class="control-label">(当日)可以售卖的结束时间<span class="text-danger">*</span></label></br>
  55. <input type="text" readonly class="form-control" id="today_end_time" name="today_end_time" value="{$info.today_end_time|default=''}">
  56. </div>
  57. </div>
  58. <div class="col-sm-12">
  59. <div class="form-group">
  60. <label class="control-label">分类<span class="text-danger">*</span></label></br>
  61. <select name="dinner_type_id" class="form-control">
  62. <option value="">选择分类</option>
  63. {foreach $typeList as $k=>$v}
  64. <option value="{$v.id}">{$v.name}</option>
  65. {/foreach}
  66. </select>
  67. </div>
  68. </div>
  69. <div class="col-sm-12">
  70. <div class="form-group">
  71. <label class="control-label">描述</label></br>
  72. <textarea name="content" class="form-control" cols="30" rows="3" >{$info.content|default=''}</textarea>
  73. </div>
  74. </div>
  75. <div class="col-sm-12">
  76. <div class="form-group">
  77. <label class="control-label">图片<span class="text-danger">*</span></label>
  78. {:widget_view('common/upimg',['name'=>'imgs','multi'=>10,'val'=>isset($info)?$info['imgs']:''])}
  79. </div>
  80. </div>
  81. <div class="col-sm-12">
  82. <div class="form-group">
  83. <label class="control-label">排序(正序)<span class="text-danger">*</span></label></br>
  84. <input type="text" class="form-control" name="sort" value="{$info.sort|default='0'}">
  85. </div>
  86. </div>
  87. <div class="col-sm-12">
  88. <div class="hr-line-dashed">
  89. </div>
  90. </div>
  91. <div class="form-group">
  92. <div class="col-sm-6 col-sm-offset-2">
  93. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. {/block}
  102. {block name="script"}
  103. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  104. <script>
  105. $(function () {
  106. laydate.render({
  107. elem: '#start_time'
  108. ,type: 'time',
  109. trigger: 'click' ,
  110. format:'HH:mm',
  111. });
  112. laydate.render({
  113. elem: '#end_time'
  114. ,type: 'time',
  115. trigger: 'click' ,
  116. format:'HH:mm',
  117. });
  118. laydate.render({
  119. elem: '#today_start_time'
  120. ,type: 'time',
  121. trigger: 'click' ,
  122. format:'HH:mm',
  123. });
  124. laydate.render({
  125. elem: '#today_end_time'
  126. ,type: 'time',
  127. trigger: 'click' ,
  128. format:'HH:mm',
  129. });
  130. })
  131. $(document).ready(function(){
  132. formSetValue("enable", {$info.enable|default=1});
  133. formSetValue("dinner_type_id", {$info.dinner_type_id|default=''});
  134. });
  135. </script>
  136. {/block}