combination.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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-content">
  7. <form method="post" action="{:url('combination')}" class="form-horizontal">
  8. <input type="hidden" name="group_id" value="{$groupId}">
  9. <input type="hidden" name="dinner_type_id" value="{$typeId}">
  10. <input type="hidden" name="day" value="{$day}">
  11. <div id="module-box" style="display: block;">
  12. <div class="form-group">
  13. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  14. <div class="col-sm-6">
  15. <input type="text" name="title" value="" class="form-control">
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="col-sm-2 control-label">组合菜品<span class="text-danger">*</span></label>
  20. <div class="col-sm-6">
  21. {:widget_view('common/multiselect',['name'=>'items','lists' => $dinners, 'val' => [] ])}
  22. </div>
  23. </div>
  24. </div>
  25. <div class="hr-line-dashed"></div>
  26. <div class="form-group">
  27. <div class="col-sm-6 col-sm-offset-2">
  28. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  29. </div>
  30. </div>
  31. </form>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. {/block}
  37. {block name="script"}
  38. <script>
  39. $(document).ready(function(){
  40. formSetValue("enable", {$info.enable|default=1});
  41. formSetValue("type", {$info.type|default=0});
  42. formSetValue("auth", {$info.auth|default=0});
  43. formSetValue("ucenter", {$info.ucenter|default=0});
  44. changeAuth();
  45. });
  46. function changeAuth(){
  47. let auth = $('#auth').val();
  48. console.log('auth',auth);
  49. // if(auth == 0){
  50. // $('#module-box').show();
  51. // }else{
  52. // $('#module-box').hide();
  53. // }
  54. }
  55. </script>
  56. {/block}