combination2.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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('combination2')}" 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. {:widget_view('common/multiselect',['name'=>'items','lists' => $dinners, 'val' => [] ])}
  16. </div>
  17. </div>
  18. </div>
  19. <div class="hr-line-dashed"></div>
  20. <div class="form-group">
  21. <div class="col-sm-6 col-sm-offset-2">
  22. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  23. </div>
  24. </div>
  25. </form>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. {/block}
  31. {block name="script"}
  32. <script>
  33. $(document).ready(function(){
  34. formSetValue("enable", {$info.enable|default=1});
  35. formSetValue("type", {$info.type|default=0});
  36. formSetValue("auth", {$info.auth|default=0});
  37. formSetValue("ucenter", {$info.ucenter|default=0});
  38. changeAuth();
  39. });
  40. function changeAuth(){
  41. let auth = $('#auth').val();
  42. console.log('auth',auth);
  43. // if(auth == 0){
  44. // $('#module-box').show();
  45. // }else{
  46. // $('#module-box').hide();
  47. // }
  48. }
  49. </script>
  50. {/block}