123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .laydate-time-list{padding-bottom:0;overflow:hidden}
- .laydate-time-list>li{width:50%!important;}
- .laydate-time-list>li:last-child { display: none;}
- .laydate-time-list ol>li:last-child{margin-bottom:.26rem;}
- .rr{
- /*padding-right: 10px;*/
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['id']|default='0'}">
- <input type="hidden" name="cate" value="0">
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">食品名<span class="text-danger">*</span></label></br>
- <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">价格<span class="text-danger">*</span></label></br>
- <input type="text" class="form-control" name="money" value="{$info.money|default=''}">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">(预售)可以售卖的开始时间<span class="text-danger">*</span></label></br>
- <div class="rr">
- <input type="text" readonly placeholder="请选择" class="form-control" id="start_time" name="start_time" value="{$info.start_time|default=''}">
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">(预售)可以售卖的结束时间<span class="text-danger">*</span></label></br>
- <input type="text" readonly placeholder="请选择" class="form-control" id="end_time" name="end_time" value="{$info.end_time|default=''}">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">(当日)可以售卖的开始时间<span class="text-danger">*</span></label></br>
- <div class="rr">
- <input type="text" readonly placeholder="请选择" class="form-control" id="today_start_time" name="today_start_time" value="{$info.today_start_time|default=''}">
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">(当日)可以售卖的结束时间<span class="text-danger">*</span></label></br>
- <input type="text" readonly placeholder="请选择" class="form-control" id="today_end_time" name="today_end_time" value="{$info.today_end_time|default=''}">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">分类<span class="text-danger">*</span></label></br>
- <select name="dinner_type_id" class="form-control">
- <option value="">选择分类</option>
- {foreach $typeList as $k=>$v}
- <option value="{$v.id}">{$v.name}</option>
- {/foreach}
- </select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">特殊人群是否免费<span class="text-danger">*</span></label></br>
- <select name="free" class="form-control">
- <option value="0">否</option>
- <option value="1">是</option>
- </select>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">特殊人群折扣(0-1之间的数)<span class="text-danger">*</span></label></br>
- <input type="text" class="form-control" name="discount" value="{$info.discount|default='1'}">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form-group">
- <label class="control-label">排序(正序)<span class="text-danger">*</span></label></br>
- <input type="text" class="form-control" name="sort" value="{$info.sort|default='0'}">
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">图片<span class="text-danger">*</span></label>
- {:widget_view('common/upimg',['name'=>'imgs','multi'=>10,'val'=>isset($info)?$info['imgs']:''])}
- </div>
- </div>
- <div class="col-sm-12">
- <div class="form-group">
- <label class="control-label">描述</label></br>
- <textarea name="content" class="form-control" cols="30" rows="3" >{$info.content|default=''}</textarea>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="hr-line-dashed">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- $(function () {
- laydate.render({
- elem: '#start_time'
- ,type: 'time',
- trigger: 'click' ,
- format:'HH:mm',
- });
- laydate.render({
- elem: '#end_time'
- ,type: 'time',
- trigger: 'click' ,
- format:'HH:mm',
- });
- laydate.render({
- elem: '#today_start_time'
- ,type: 'time',
- trigger: 'click' ,
- format:'HH:mm',
- });
- laydate.render({
- elem: '#today_end_time'
- ,type: 'time',
- trigger: 'click' ,
- format:'HH:mm',
- });
- })
- $(document).ready(function(){
- formSetValue("enable", {$info.enable|default=1});
- formSetValue("free", {$info.free|default=0});
- formSetValue("dinner_type_id", {$info.dinner_type_id|default=''});
- });
- </script>
- {/block}
|