123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .minheight{
- min-height: 100px;
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>{$info['title']}[{$info['start']} ~ {$info['end']}]</h5>
- <div class="ibox-tools">
- <a class="toback" href="{:url('index')}">
- 返回上一页
- </a>
- </div>
- </div>
- <div class="ibox-content">
- <ul class="nav nav-tabs">
- {volist name="weeks" id="v"}
- <li {if condition="$v['day'] eq $day"}class="active"{/if}>
- <a href="{:url('setting',['id'=>$info['id'],'day'=>$v['day']])}">{$v.week}</a>
- </li>
- {/volist}
- </ul>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>餐次</th>
- <th>菜单</th>
- </tr>
- </thead>
- {volist name="typeList" id="v"}
- <tr>
- <td style="width: 150px">
- {$v.name}
- {if condition="$v['limit'] gt 0"}(最多选{$v['limit']}种){/if}
- {if condition="$v['limit'] eq 0"}(不限制){/if}
- <br>
- <a url="{:url('limits',['id'=>$info['id'],'day'=>$day,'typeId'=>$v['id']])}" href="javascript:;" data-title="{$v.name}设置" onclick="layer_open(this,2)" class="btn btn-xs btn-primary">设置</a>
- </td>
- <td>
- <div>
- <a url="{:url('items',['id'=>$info['id'],'day'=>$day,'typeId'=>$v['id']])}" href="javascript:;" data-title="{$v.name}-添加商品" onclick="layer_open(this,2)" class="btn btn-xs btn-primary">添加商品</a>
- </div>
- <div class="minheight">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>编号</th>
- <th>名称</th>
- <th>价格</th>
- <th>图片</th>
- <th>是否必选</th>
- <th>最大数量</th>
- <th>操作</th>
- </tr>
- </thead>
- {notempty name="v['items']"}
- {volist name="v['items']" id="vo"}
- <tr>
- <td>#{$vo.dinner_id}</td>
- <td>{$vo.name}</td>
- <td>
- <input type="text" class="form-control" oninput="clearNoNum(this)" data-id="{$vo['id']}" value="{$vo['money']}" onchange="changeMoney(this)">
- </td>
- <td>
- {notempty name="vo['img']"}
- <img src="{$vo.img}" style="width: 30px;height: 30px;" onclick="open_img(this)" alt="">
- {/notempty}
- </td>
- <td>
- {eq name="vo['required']" value="0"}
- <a href="{:url('itemrequired',['id'=>$vo['id']])}" class="btn btn-xs btn-primary confirm ajax-get data-reload" data-confirm="确定要标记为必选吗?">否</a>
- {else /}
- <a href="{:url('itemrequired',['id'=>$vo['id']])}" class="btn btn-xs btn-primary confirm ajax-get data-reload" data-confirm="确定要标记为非必选吗?">是</a>
- {/eq}
- </td>
- <td>
- <input type="text" class="form-control" oninput="clearNoNum1(this)" data-id="{$vo['id']}" value="{$vo['max']}" onchange="changeMax(this)">
- </td>
- <td>
- <a href="{:url('itemdel',['id'=>$vo['id']])}" class="btn btn-xs btn-danger confirm ajax-get data-reload" data-confirm="确定要删除此菜品吗?">删除</a>
- </td>
- </tr>
- {/volist}
- {else /}
- <tr>
- <td colspan="6">暂无数据</td>
- </tr>
- {/notempty}
- </table>
- </div>
- <div>
- <a url="{:url('combination',['groupId'=>$info['id'],'day'=>$day,'typeId'=>$v['id']])}" href="javascript:;" data-title="{$v.name}-添加组合" onclick="layer_open(this,2)" class="btn btn-xs btn-primary">添加组合</a>
- <span class="text-danger">注意:如果添加过组合,用户必选选择其中一种,不选无法下单</span>
- </div>
- <div>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>编号</th>
- <th>名称</th>
- <th>组合菜品</th>
- <th>操作</th>
- </tr>
- </thead>
- {notempty name="v['combination']"}
- {volist name="v['combination']" id="vo"}
- <tr>
- <td>{$vo.id}</td>
- <td>{$vo.title}</td>
- <td>{$vo.names}</td>
- <td>
- <a href="{:url('combinationdel',['id'=>$vo['id']])}" class="btn btn-xs btn-danger confirm ajax-get data-reload" data-confirm="确定要删除此组合吗?">删除</a>
- </td>
- </tr>
- {/volist}
- {else /}
- <tr>
- <td colspan="4">暂无数据</td>
- </tr>
- {/notempty}
- </table>
- </div>
- <div>
- <a url="{:url('combination2',['groupId'=>$info['id'],'day'=>$day,'typeId'=>$v['id']])}" href="javascript:;" data-title="{$v.name}-添加互斥组合" onclick="layer_open(this,2)" class="btn btn-xs btn-primary">添加互斥组合</a>
- <span class="text-danger">注意:同一餐次组合内的商品无法同时购买</span>
- </div>
- <div>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>编号</th>
- <th>组合菜品</th>
- <th>操作</th>
- </tr>
- </thead>
- {notempty name="v['combination2']"}
- {volist name="v['combination2']" id="vo"}
- <tr>
- <td>{$vo.id}</td>
- <td>{$vo.names}</td>
- <td>
- <a href="{:url('combination2del',['id'=>$vo['id']])}" class="btn btn-xs btn-danger confirm ajax-get data-reload" data-confirm="确定要删除此互斥组合吗?">删除</a>
- </td>
- </tr>
- {/volist}
- {else /}
- <tr>
- <td colspan="3">暂无数据</td>
- </tr>
- {/notempty}
- </table>
- </div>
- </td>
- </tr>
- {/volist}
- </table>
- <table class="table table-bordered" style="display: none;">
- <thead>
- <tr>
- <th>餐次</th>
- <th>星期一<br>2023-03-27</th>
- <th>星期二(2023-03-28)</th>
- <th>星期三(2023-03-29)</th>
- <th>星期四(2023-03-30)</th>
- <th>星期五(2023-03-31)</th>
- <th>星期六(2023-04-01)</th>
- <th>星期日(2023-04-02)</th>
- </tr>
- </thead>
- <tr>
- <th style="width: 50px">
- 早餐 <br>
- (6种) <br>
- <a url="{:url('')}" href="#">设置</a>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- <div>
- <a href="#">添加商品</a>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- <th>
- <div class="minheight">
- <div>[#22]黄瓜红油金针磨金针磨</div>
- <div>[#23]星期一星期一</div>
- <div>[#24]星期一星期一</div>
- </div>
- </th>
- </tr>
- <tr>
- <th>
- 早餐 <br>
- (6种) <br>
- <a href="#">设置</a>
- </th>
- <th>
- <div class="minheight">
- 星期一
- </div>
- </th>
- <th>星期二</th>
- <th>星期三</th>
- <th>星期四</th>
- <th>星期五</th>
- <th>星期六</th>
- <th>星期日</th>
- </tr>
- <tr>
- <th>晚餐</th>
- <th>
- <div class="minheight">
- 星期一
- </div>
- </th>
- <th>星期二</th>
- <th>星期三</th>
- <th>星期四</th>
- <th>星期五</th>
- <th>星期六</th>
- <th>星期日</th>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- function changeMax(_self) {
- var val = $(_self).val();
- var id = $(_self).attr('data-id');
- console.log('val',val);
- let url = "{:url('itemmax')}";
- $.post(url,{id:id,val:val},function (ret) {
- if(ret.code == 1){
- window.location.reload();
- }else{
- layer.msg('操作失败')
- }
- })
- }
- function changeMoney(_self) {
- var val = $(_self).val();
- var id = $(_self).attr('data-id');
- console.log('val',val);
- let url = "{:url('itemmoney')}";
- $.post(url,{id:id,val:val},function (ret) {
- if(ret.code == 1){
- window.location.reload();
- }else{
- layer.msg('操作失败')
- }
- })
- }
- </script>
- {/block}
|