AddOrUpdate.html 15.5 KB
<%include '../../common/__ui/header'%>

<%include '../../common/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="row">
        <div class="col-md-12">
            <div id="basicForm" role="<%type%>" data-action="<%action%>" class="form-horizontal form-bordered">

            </div>
        </div>
    </div>
</div>
<script type="text/template" id="template5">
    <div class="row" id="brandForm">
        <div class="form-group">
            [[each Brands as brand index]]
            <a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
            [[/each]]
            <input type="text" class="form-control" placeholder="搜索" id="brandsearch"/>
        </div>

        <div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
            [[each Brands as brand index]]
            <div class="form-group" name="[[brand.name]]">
                [[each brand.items as item __index ]]
                <a class="btn">
                    <input type="checkbox" value="[[item.id]]" data-name="[[item.brand_name]]" name="brandCheckBox">
                    <label>[[item.brand_name]]</label>
                </a>
                [[/each]]
            </div>
            [[/each]]
            <div class="form-group" id="brandsearchwrap" name="brandsearch">
            </div>
        </div>
        <input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
    </div>
</script>
<script type="text/template" id="couponListAdd-template">
    <div class="panel panel-default">
        <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" >
                        <select id="filter-couponType" tabindex="-1" class="select2-offscreen brandBtn-group observe"
                                value="[[couponType]]" data-field="couponType" required [[if status==1]] disabled [[/if]]>
                            <option value="-1">优惠券类型</option>
                            <option value="1">A</option>
                            <option value="2">B</option>
                            <option value="3">公开券</option>
                            <option value="4">生日券</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel-heading">
            <h4 class="panel-title">基本信息</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" placeholder="名称建议30字以内" prompt="名称" class="form-control observe"
                               data-field="couponName" required maxlength="30" value="[[couponName]]">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">数量<i class="red">*</i></label>

                    <div class="col-sm-8">
                        <input type="text" placeholder="数量" prompt="数量" class="form-control observe number"
                               data-field="couponNum"
                               required value="[[couponNum]]" >
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">使用次数<i class="red">*</i></label>

                    <div class="col-sm-8">
                        <input type="text" placeholder="使用次数" class="form-control observe number" data-field="useNum"
                               required value="[[useNum]]">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">申请部门<i class="red">*</i></label>

                    <div class="col-sm-8" id="departments">

                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">领取开始时间</label>

                    <div class="col-sm-6">
                     <div class="col-sm-4">
                            <input type="text" class="form-control observe" data-field="limitStartTime" id="limitStartTime"
                                   placeholder="领取开始时间" value="[[limitStartTime]]"  >
                      </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>

                    <div class="col-sm-6">
                        <div class="col-sm-4">
                            <input type="text" class="form-control observe" data-field="startTime" id="startTime"
                                   placeholder="开始时间" value="[[startTime]]" readonly required>
                        </div>
                        <div class="col-sm-1">
                            <label class="control-label"></label>
                        </div>
                        <div class="col-sm-4">
                            <input type="text" class="form-control observe" data-field="endTime" id="endTime"
                                   placeholder="结束时间" value="[[endTime]]" readonly required>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">优惠券说明</label>

                    <div class="col-sm-8">
                        <textarea class="form-control observe" prompt="优惠券说明" data-field="explains" maxlength="100"
                                  placeholder="优惠券使用条件简介" style="resize: none">[[explains]]</textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel-heading">
            <h4 class="panel-title">使用条件</h4>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="form-group">
                    <label class="col-sm-2 control-label">优惠条件<i class="red">*</i></label>&emsp;
                    <select value="[[useLimitType]]" id="useLimitType" class="form-control input-form observe"
                            data-field="useLimitType">
                        <option value="0">无限制</option>
                        <option value="1">件数</option>
                        <option value="2">金额</option>
                    </select>&emsp;&emsp;
                    [[if useLimitType=='2']]
                    <label class="control-label">金额满</label>
                    <input value="[[useLimit]]" id="useLimit" class="form-control input-form observe number"
                           data-field="useLimit">
                    [[/if]]
                    [[if useLimitType=='1']]
                    <label class="control-label">件数满</label>
                    <input value="[[useLimit]]" class="form-control input-form observe number" data-field="useLimit">
                    [[/if]]
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">优惠结果<i class="red">*</i></label>

                    <div class="col-sm-4">
                        <label class="col-sm-2 control-label">面额</label>

                        <div class="col-sm-4">
                            <input type="text" match="numbers" class="form-control observe " data-field="couponAmount"
                                   value="[[couponAmount]]" required placeholder="面额" [[if status==1]] disabled [[/if]]>
                        </div>
                        <label class="col-sm-2 control-label">&nbsp;&nbsp;&nbsp;&nbsp;倍数</label>
                        <div class="col-sm-4">
                            <input type="text" match="numbers" class="form-control observe " data-field="multipleNum"
                                   value="[[multipleNum]]" required placeholder="倍数" [[if status==1]] disabled [[/if]]>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">适用范围</label>

                    <div class="col-sm-4">
                        <div class="col-sm-10">
                            <select id="useRange" class="form-control input-form" value="[[useRange]]">
                                <option value="0">分类</option>
                                <option value="1">品牌</option>
                            </select>&emsp;&emsp;
                            [[if useRange==1]]
                            <a class="btn btn-primary btn-xs" href="javascript:;" id="addBrands">添加品牌</a>
                            [[else]]
                            <a class="btn btn-primary btn-xs" href="javascript:;" id="addSorts">添加分类</a>
                            [[/if]]
                        </div>
                    </div>
                </div>
                [[if brandList]]
                <div class="form-group">
                    <label class="col-sm-2 control-label">品牌限制</label>
                    <div class="col-sm-8">
                        <p class="form-control" style="border: 0px">[[brandList]]</p>
                    </div>
                </div>
                [[/if]]
                [[if sortsList]]
                <div class="form-group">
                    <label class="col-sm-2 control-label">分类限制</label>

                    <div class="col-sm-8">
                        <p class="form-control" style="border: 0px">[[sortsList]]</p>
                    </div>
                </div>
                [[/if]]

                <div class="form-group">
                    <label class="col-sm-2 control-label">SKN除外</label>
                    <div class="col-sm-4">
                        <textarea class="form-control observe" prompt="SKN除外" data-field="sknExclude"
                                  placeholder="skn用换行或英文逗号分隔" style="resize: none" [[if status==1]] disabled [[/if]]>[[sknExclude]]</textarea>
                    </div>
                </div>

            </div>
        </div>
        <div>

        </div>

        <div class="panel-heading">
            <h4 class="panel-title">领券条件</h4>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="form-group">
                    <label class="col-sm-2 control-label">会员身份</label>

                    <div class="col-sm-10">
                        <label class="checkbox-inline">
                            <input type="checkbox" value="1" name="customType" class="custom-1"> 新客户 (注册未购买)
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="5" name="customType" class="custom-5"> 普通会员 (不包含新客户)
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="2" name="customType" class="custom-2"> 银卡会员
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="3" name="customType" class="custom-3"> 金卡会员
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="4" name="customType" class="custom-4"> 白金会员
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="9" name="customType" class="custom-9"> 学生
                        </label>
                    </div>

                    <input type="hidden" value="[[customType]]" id="customType" for="checkbox"
                           placeholder="会员身份">
                </div>
            </div>
        </div>
        <div class="panel-heading">
            <h4 class="panel-title">互斥配置</h4>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-10">
                        <label class="checkbox-inline">
                            <input type="checkbox" value="1" name="shopPriceLimits" class="pricelimit-1"> 成交价低于吊牌价三折
                        </label>
                        <label class="checkbox-inline">
                            <input type="checkbox" value="2" name="shopPriceLimits" class="pricelimit-2"> 限量商品
                        </label>
                    </div>

                    <input type="hidden" value="[[shopPriceLimits]]" id="shopPriceLimits" for="checkbox"
                           placeholder="券限制条件">
                </div>
            </div>
        </div>

        <div class="panel-footer">
            <div class="row">
                <div class="col-sm-4 col-sm-offset-4">

                    <button id="save_brand" type="button" class="btn btn-primary">提交</button>
                    <a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/template" id="editTemp">
    <div class="panel">
        <div class="panel-body nopadding">
            <form id="basicForm1" role="form" class="form-horizontal form-bordered">
                <div class="form-group" style="margin-bottom: 40px">
                    <label class="col-sm-2 control-label">分类关联:</label>
                    <div class="col-sm-8 sort-wrap">
                        <div class="row">
                            <div class="col-sm-10">
                                <div class="sortTree"></div>
                            </div>
                            <div class="col-sm-2 height40">
                                <a class="btn btn-danger btn-xs del-sort-btn" href="javascript:;">-</a>
                                <a class="btn btn-info btn-xs add-sort-btn" href="javascript:;">+</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</script>
<script type="text/template" id="sortWrap">
    <div class="row">
        <div class="col-sm-10">
            <div class="sortTree"></div>
        </div>
        <div class="col-sm-2 height40">
            <a class="btn btn-danger btn-xs del-sort-btn" href="javascript:;">-</a>
            <a class="btn btn-info btn-xs add-sort-btn" href="javascript:;">+</a>
        </div>
    </div>
</script>
<script type="text/template" id="department">
    <select id="filter-department" required placeholder="申请部门" tabindex="-1" class="select2-offscreen brandBtn-group observe"  value="[[department]]" data-field="department" >
        [[each data as item index]]
        <option value="[[item.department]]" [[if item.department==department]] selected [[/if]]>[[item.departmentName]]</option>
        [[/each]]
    </select>
</script>
<%include '../../common/__ui/footer'%>