Index.html 2.59 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="panel panel-default" style="...">
        <div class="panel-body" style="padding-bottom: 0">
            <a class="btn btn-success" id="add-content"><i class="fa fa-plus"></i> 添加发券</a>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="panel-col2">
                    <input type="text" value="" name="modelName" id="name-filter" placeholder="请输入发券关键字"
                           class="form-control">
                </div>
                <div class="panel-col">
                    <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
                    <a id="filter-all" href="/couponSendManager/queryList" class="btn btn-info">全部</a>
                </div>
                <div class="panel-col2">
                    <a class="btn btn-primary" id="token" href="javascript:;">查看token使用方法>></a>
                </div>
            </div>
        </div>
    </div>
    <div id="content-list"></div>
</div>
<!--编辑模态-->
<script type="text/template" id="template">
    <div class="rows" id="baseform">
        <div class="form-group">
            <label class="col-sm-2 control-label">发券名称<i class="red">*</i></label>

            <div class="col-sm-10">
                <input type="text" value="[[name]]" class="form-control observe" data-field="name" placeholder="发券名称"
                       required="required"/>
            </div>
        </div>
        [[each couponsIds as item index]]
        <div class="form-group">
            <label class="col-sm-2 control-label">优惠券ID<i class="red">*</i></label>

            <div class="col-sm-7">
                <select name="couponsIds" class="col-sm-10 observe select2-offscreen couponsIds"
                        data-field="couponsIds.[[index]].id" data-index="[[index]]">
                    <option value='[[item.id]]'>[[item.text||item.id||'请选择优惠券ID']]</option>
                </select>
            </div>
            <div class="col-sm-2">
                <a class="col-sm-4 btn btn-primary addBtn" data-index="[[index]]">+</a>
                [[if index==0]]
                <a class="col-sm-4 col-sm-offset-2 btn btn-danger delBtn" data-index="[[index]]">-</a>
                [[else]]
                <a class="col-sm-4 col-sm-offset-2 btn btn-danger delBtn" data-index="[[index]]">-</a>
                [[/if]]
            </div>

        </div>
        [[/each]]
    </div>
</script>