AddOrUpdate.html 19.6 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]]" [[if isNew===0]] disabled [[/if]]>
                    </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">
                        <select id="filter-department" placeholder="申请部门" tabindex="-1"
                                class="select2-offscreen brandBtn-group observe"
                                value="[[department]]" data-field="department" required>
                            <option value="-1">申请部门</option>
                            <option value="20">潮流资源中心-资源发展部</option>
                            <option value="21">潮流资源中心-广告部</option>
                            <option value="22">潮流资源中心-招商部</option>
                            <option value="23">自有媒体中心-男生媒体部</option>
                            <option value="24">自有媒体中心-女生媒体部</option>
                            <option value="25">自有媒体中心-流程运营部</option>
                            <option value="26">自有媒体中心-发行设计部</option>
                            <option value="27">自有媒体中心-设计部</option>
                            <option value="28">商品商家中心-商品一部(羊头+轻奢)</option>
                            <option value="29">商品商家中心-商品二部(男装)</option>
                            <option value="30">商品商家中心-商品三部(女装)</option>
                            <option value="31">商品商家中心-商品四部(户外运动)</option>
                            <option value="32">商品商家中心-商品五部(自主)</option>
                            <option value="33">商品商家中心-商品六部(明星/KOL</option>
                            <option value="34">商品商家中心-商品七部(童装)</option>
                            <option value="35">商品商家中心-商品八部(创意生活+玩具)</option>
                            <option value="36">商品商家中心-商品九部(彩妆)</option>
                            <option value="37">商品商家中心-商品十部(全球购)</option>
                            <option value="38">商品商家中心-运营支持部</option>
                            <option value="39">平台运营中心-类目及活动运营部</option>
                            <option value="40">平台运营中心-内容运营部</option>
                            <option value="41">平台运营中心-营销策划部</option>
                            <option value="42">平台运营中心-设计部</option>
                            <option value="43">平台运营中心-售后服务部</option>
                            <option value="44">客户服务中心-客户关系部</option>
                            <option value="45">客户服务中心-运营部</option>
                            <option value="46">泛渠道中心-泛渠道部</option>
                            <option value="47">线下渠道中心-运营统筹部</option>
                            <option value="48">线下渠道中心-南京艾尚店</option>
                            <option value="49">仓储物流中心-仓储部</option>
                            <option value="50">仓储物流中心-物流部</option>
                            <option value="51">仓储物流中心-运营部</option>
                            <option value="52">活动中心-公关部</option>
                            <option value="53">活动中心-运营部</option>
                            <option value="54">自控品牌中心-生产部</option>
                            <option value="55">自控品牌中心-商品部</option>
                            <option value="56">自控品牌中心-销售部</option>
                            <option value="57">自控品牌中心-市场部</option>
                            <option value="58">自控品牌中心-运营部</option>
                            <option value="59">自控品牌中心-人事部</option>
                            <option value="60">自控品牌中心-财务部</option>
                            <option value="61">代理品牌中心-陈列部</option>
                            <option value="62">会员中心-会员数据部</option>
                            <option value="63">会员中心-会员营销部</option>
                            <option value="64">会员中心-会员运营部</option>
                            <option value="65">市场中心-品牌营销部</option>
                            <option value="66">市场中心-效果营销部</option>
                            <option value="67">市场中心-PR营销部</option>
                            <option value="68">设计中心-设计部</option>
                            <option value="69">产品中心-零售产品部</option>
                            <option value="70">产品中心-媒体产品部</option>
                            <option value="71">产品中心-设计部</option>
                            <option value="72">技术中心-前端系统部</option>
                            <option value="73">技术中心-核心系统部</option>
                            <option value="74">技术中心-后台系统部</option>
                            <option value="75">技术中心-测试部</option>
                            <option value="76">技术中心-研究发展部</option>
                            <option value="77">技术中心-大数据部</option>
                            <option value="78">技术中心-运维部</option>
                            <option value="79">财务中心-财务部</option>
                            <option value="80">财务中心-内审部</option>
                            <option value="81">行政中心-行政部</option>
                            <option value="82">数据中心-数据部</option>
                            <option value="83">公共关系中心-公共关系部</option>
                            <option value="84">人力资源中心-人力资源部</option>
                            <option value="85">总裁中心-总裁办</option>
                            <option value="86">火星项目中心-火星项目部</option>

                            <option value="1">渠道二部</option>
                            <option value="2">渠道一部</option>
                            <option value="3">零售部</option>
                            <option value="4">品牌资源部</option>
                            <option value="5">店铺运营部</option>
                            <option value="6">类目运营部</option>
                            <option value="7">营销部</option>
                            <option value="8">市场部</option>
                            <option value="9">会员部</option>
                            <option value="10">客服部</option>
                            <option value="11">内容营销部</option>
                        </select>
                    </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="面额">
                        </div>
                        <label class="col-sm-1 control-label"></label>
                    </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>
        </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-4"> 学生
                        </label>
                    </div>

                    <input type="hidden" value="[[customType]]" id="customType" 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>
<%include '../../common/__ui/footer'%>