add.html 9.56 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="panel-group" id="editor-group">
                <input type="hidden" id="id" value="{{id}}">
                <input type="hidden" id="showFlag" value="{{showFlag}}">
                <input type="hidden" id="status" value="{{status}}">
                <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 value="{{productName}}">
                                </div>
                            </div>
                             <div class="form-group">
                                    <label class="col-sm-2 control-label"></label>
                                    <div class="col-sm-8">
                                        <label class="radio-inline"><input type="radio" name="limitProductType" value="1" checked="checked">分享得限购码</label>
                                        <label class="radio-inline"><input type="radio" name="limitProductType" value="2">排队得限购码</label>
                                        <input type="hidden" value="{{limitProductType}}" id="limitProductType" for="radio"> 
                                    </div>
                                </div>
                            
                            <div class="form-group limitProductType" id="limitProductType_2" style="display: none;">
                                 <label class="col-sm-2 control-label">排队限购ID:<span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <input id="activityId" type="text" class="form-control" value="{{activityId}}" placeholder="排队限购ID" />
                                </div>
                            </div>

                            <div class="form-group limitProductType" id="limitProductType_1">
                                <label class="col-sm-2 control-label">限购码批次<span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <input type="text" id="batchNo" placeholder="限购码批次"  class="form-control" maxlength="30" value="{{batchNo}}" required>
                                </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="saleTimeStr" data-time="" value="{{saleTimeStr}}" type="text" class="form-control" jsaction="time" 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 order-by">
                                <label>排序<span class="red" style="display: none;">*</span></label>
                                <label><input id="orderBy" value="{{orderBy}}" type="text" class="form-control" placeholder="排序"></label>
                                <p>(提示:数字越大越靠前)</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pannel">
                <div class="panel-heading">
                    <h4>限量详情内容</h4>
                </div>
                <div id="baseTable"></div>
                <input type="hidden" value="{{attachmentContent}}" id="attachmentContent" />
                 <div class="row">
                        <div class="col-md-12">
                            <button class="btn btn-info  mr5" id="textDialog">文本</button>
                            <button class="btn btn-info  mr5" id="picDialog">图片</button>
                            <button class="btn btn-info  mr5" id="videoDialog">视频</button>
                        </div>
                    </div>
            </div>

            
            <div class="pannel">
            <div class="col-md-10"></div>
            <div class="col-md-2">
                            <input id="limit-add-btn" class="btn btn-success limit-add-btn" type="button" value="保存"></input>
            </div>
            </div>
        </div>
    </form>
    {{/ data}}
</div>


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

<script type="text/template" id="vidioDialogTemp">

<!-- Mov avi rmvb mp4  -->
    <div class="row">
        <div id="upload-wrapper1" class="col-md-3">
            <input id="videofile" name="videofile" type="file" bucket="goodsvideo" extend="mp4,rmvb,avi,mov" class="btn btn-primary ml10" value="{attachUrl}">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">视频链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" id="videoText"  type="text" placeholder="视频链接" value="{attachUrl}" required>
                </div>
                
            </div>
            <div class="row">
                <label class="pull-left control-label height40">视频描述</label>
                <div class="pull-left ml10">
                    <input class="form-control" type="text" id="attachName" value="{attachName}" placeholder="视频描述">
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div id="upload-wrapper2" class="col-md-3">
            <input id="imgfile" name="imgfile" type="file" class="btn btn-primary ml10" value="{intro}">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">图片链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" id="imgText"  type="text" placeholder="图片链接" value="{intro}" required>
                </div>
                
            </div>
        </div>
    </div>
</script>