add.html 8.45 KB
<div class="pageheader">
    <div class="media">
        <div class="pageicon pull-left">
            <i class="fa fa-th-list"></i>
        </div>
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li> 
                <li><a href="#">限购商品管理</a></li>
                <li>限购商品管理</li>
            </ul>
            <h4>限购商品管理</h4>
        </div>
    </div>
    <!-- media -->
</div>

<div class="contentpanel">
    
    <form id="limit-add-form" class="form-horizontal form-bordered" type="{{type}}" action="{{action}}">
    {{# data}}
        <div class="panel-group">
            <div class="pannel">
                <div class="panel-heading">
                    <h4>限购商品基本信息</h4>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
                            <div class="col-sm-8">
                                <input type="text"  id="productName" placeholder="商品名称"  class="form-control" required maxlength="30" value="{{productName}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">限购码批次<span class="red">*</span></label>
                            <div class="col-sm-8">
                                <input type="text" id="batchNo" data-id="{{id}}" placeholder="限购码批次"  class="form-control" required maxlength="30" value="{{batchNo}}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">发售日期<span class="red">*</span></label>
                            <div class="col-sm-4">
                                <input id="saleTime" data-time="{{saleTime}}" value="" type="text" class="form-control" placeholder="发售日期" readonly required>
                            </div>
                            <div class="col-md-3">
                                <label>是否显示日期:</label>
                                <label class="radio-inline"><input type="radio" name="dayFlag" value="1"></label>
                                <label class="radio-inline"><input type="radio" name="dayFlag" value="0"></label>
                                <input type="hidden" value="{{dayFlag}}" id="dayFlag" for="radio"> 
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pannel">
                <div class="panel-heading">
                    <h4>限购商品排序</h4>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-3">
                            <label>是否热门:</label>
                            <label class="radio-inline"><input type="radio" name="hotFlag" value="1"></label>
                            <label class="radio-inline"><input type="radio" name="hotFlag" value="0"></label>
                            <input type="hidden" value="{{hotFlag}}" id="hotFlag" for="radio"> 
                        </div>
                        <div class="col-md-3 height60">
                            <label>热门发售排序:</label>
                            <label><input id="orderBy" value="{{orderBy}}" type="text" class="form-control" placeholder=""></label>
                            <p>(提示:数字越大越靠前)</p>
                        </div>
                        <div class="col-md-3">
                            <label>未发售排序:</label>
                            <label><input id="notSaleOrderBy" value="{{notSaleOrderBy}}" type="text" class="form-control" placeholder=""></label>
                        </div>
                    </div>
                </div>
            </div>


            <div class="pannel">
                <div class="panel-heading">
                    <h4>限量详情内容</h4>
                </div>
                <div class="panel-body">
                    
                    <div class="row mb20">
                        <label class="col-sm-2 control-label">封面图<span class="red">*</span></label>
                        <div class="col-md-1" id="coverImgBox"> 
                            {{# attachment}}
                            {{#if isDefault}}
                            <input type="file" name="coverImg" id="coverImg" value="{{attachUrl}}" placeholder="封面图" required/>

                            {{/if}}
                            {{/ attachment}}

                            {{^ attachment}}
                            <input type="file" name="coverImg" id="coverImg" placeholder="封面图" required/>
                            {{/ attachment}}

                        </div>
                    </div>
                    
                    <div class="row mb20">
                        <div id="editor" class="col-md-12" value="{{#attachment}}{{attachType}}{{/attachment}}"> 
                            <!-- <div class="quota-text"></div>
                            <div class="quota-img"></div>
                            <div class="quota-video"></div> -->
                            {{# attachment}}
                                {{#if attachUrl}}
                                {{#unless isDefault}}
                                <div class="quota-content quota-img" data-type="1"><img src="{{attachUrl}}" alt=""><a href="javascript:;" class="editor-delete btn btn-default">删除</a><a href="javascript:;" class="editor-update btn btn-default">编辑</a></div>
                                {{/unless}}
                                {{/if}}

                                {{#if intro}}
                                <div class="quota-content quota-text" data-type="3"><span>{{intro}}</span><a href="javascript:;" class="editor-delete btn btn-default">删除</a><a href="javascript:;" class="editor-update btn btn-default">编辑</a></div>
                                {{/if}}
                            {{/ attachment}}
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <button class="btn btn-primary mr5" id="textDialog">文本</button>
                            <button class="btn btn-primary mr5" id="picDialog">图片</button>
                            <button class="btn btn-primary mr5" id="videoDialog">视频</button>
                        </div>
                    </div>
                    <!-- <div class="row mb20" style="width: 800px;">
                        <h6><label>限量详情页内容:</label></h6>
                        <div id="editor-container" class="editor-container" style="height:200px"></div>
                    </div> -->
                    <div class="mt20">
                        <input id="limit-add-btn" class="btn btn-primary limit-add-btn" type="button" value="保存"></input>
                    </div>
                </div>
            </div>
        </div>
        <input type="hidden" id="id" value="{{id}}">
    </form>
    {{/ data}}
</div>


<script type="text/template" id="picDialogTemp">
    <div class="row">
        <div id="upload-wrapper" class="col-md-3">
            <input id="{fileId}" type="file" class="btn btn-primary ml10" value="">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">{name}链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" type="text" placeholder="{name}链接">
                </div>
                
            </div>
            <div class="row">
                <label class="pull-left control-label height40">{name}描述</label>
                <div class="pull-left ml10">
                    <input class="form-control" type="text" placeholder="{name}描述">
                </div>
            </div>
        </div>
    </div>
</script>