Files
order/web/templates/food/set.html

102 lines
5.0 KiB
HTML
Raw Normal View History

2019-07-18 08:59:26 +08:00
{% extends "common/layout_main.html" %}
{% block content %}
2019-08-02 18:24:04 +08:00
{% include "common/tab_food.html" %}
2019-07-18 08:59:26 +08:00
<div class="row mg-t20 wrap_food_set" style="">
<div class="col-lg-12" style="">
<h2 class="text-center">设置</h2>
<div class="form-horizontal m-t" style="">
<div class="form-group">
<label class="col-lg-2 control-label">分类:</label>
<div class="col-lg-10">
<select name="cat_id" class="form-control select2-hidden-accessible" tabindex="-1"
aria-hidden="true">
<option value="0">请选择分类</option>
2019-08-02 18:24:04 +08:00
{% for item in cat_list %}
<option value="{{ item.id }}" {% if item.id == info.cat_id %} selected {% endif %}>{{ item.name }}</option>
{% endfor %}
2019-07-18 08:59:26 +08:00
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-lg-2 control-label">名称:</label>
<div class="col-lg-10">
2019-08-02 18:24:04 +08:00
<input type="text" class="form-control" placeholder="请输入名称" name="name" value="{{ info.name }}">
2019-07-18 08:59:26 +08:00
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-lg-2 control-label">价格:</label>
<div class="col-lg-10">
2019-08-02 18:24:04 +08:00
<input type="text" class="form-control" placeholder="请输入售价" name="price" value="{{ info.price }}">
2019-07-18 08:59:26 +08:00
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-lg-2 control-label">封面图:</label>
<div class="col-lg-10">
<form class="upload_pic_wrap" target="upload_file" enctype="multipart/form-data" method="POST" action="{{ buildUrl('/upload/pic') }}">
<div class="upload_wrap pull-left">
<i class="fa fa-upload fa-2x"></i>
<input type="file" name="pic" accept="image/png, image/jpeg, image/jpg,image/gif">
</div>
2019-08-02 18:24:04 +08:00
{% if info and info.main_image %}
<span class="pic-each">
<img src="{{ buildImageUrl( info.main_image ) }}"/>
<span class="fa fa-times-circle del del_image" data="{{ info.main_image }}"></span>
</span>
{% endif %}
2019-07-18 08:59:26 +08:00
</form>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group" style="">
<label class="col-lg-2 control-label">描述:</label>
<div class="col-lg-10">
2019-08-02 18:24:04 +08:00
<textarea id="editor" name="summary" style="height: 300px;">{{ info.summary }}</textarea>
2019-07-18 08:59:26 +08:00
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-lg-2 control-label">库存:</label>
<div class="col-lg-2">
2019-08-02 18:24:04 +08:00
<input type="text" name="stock" class="form-control" value="{{ info.stock }}">
2019-07-18 08:59:26 +08:00
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label class="col-lg-2 control-label">标签:</label>
<div class="col-lg-10">
2019-08-02 18:24:04 +08:00
<input type="text" class="form-control" name="tags" value="{{ info.tags }}">
2019-07-18 08:59:26 +08:00
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-lg-4 col-lg-offset-2">
2019-08-02 18:24:04 +08:00
<input type="hidden" name="id" value="{{ info.id }}">
2019-07-18 08:59:26 +08:00
<button class="btn btn-w-m btn-outline btn-primary save">保存</button>
</div>
</div>
</div>
</div>
</div>
2019-08-02 18:24:04 +08:00
<iframe name="upload_file" class="hide"></iframe>
{% endblock %}
{% block css %}
<link href="{{ buildStaticUrl( '/plugins/select2/select2.min.css' ) }}" rel="stylesheet">
<link href="{{ buildStaticUrl( '/plugins/tagsinput/jquery.tagsinput.min.css' ) }}" rel="stylesheet">
2019-07-18 08:59:26 +08:00
{% endblock %}
2019-08-02 18:24:04 +08:00
{% block js %}
<script src="{{ buildStaticUrl( '/plugins/ueditor/ueditor.config.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/ueditor/ueditor.all.min.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/ueditor/lang/zh-cn/zh-cn.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/select2/select2.pinyin.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/select2/zh-CN.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/select2/pinyin.core.js' ) }}"></script>
<script src="{{ buildStaticUrl( '/plugins/tagsinput/jquery.tagsinput.min.js' ) }}"></script>
2019-08-02 14:39:05 +08:00
2019-08-02 18:24:04 +08:00
<script src="{{ buildStaticUrl( '/js/food/set.js' ) }}"></script>
{% endblock %}