Index.html 8.26 KB
<%include '../../common/__ui/header'%>

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

<div class="contentpanel">
    <div class="panel panel-default" style="margin-bottom:10px;">
        <div class="panel-body" style="padding-bottom: 0">
            <a class="btn btn-success " id="addPool"><i class="fa fa-plus"></i> 添加商品池</a>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="panel-col">
                    <input type="text" class="form-control" id="search-id" placeholder="输入编号"
                           onkeyup="this.value=this.value.replace(/\D/gi,'')"/>
                </div>
                <div class="panel-col">
                    <input type="text" class="form-control" id="search-name" placeholder="输入名称"/>
                </div>
                <div class="panel-col">
                    <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
                    <a id="filter-all" href="/market/productPool/index" class="btn btn-info">全部</a>
                </div>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="panel-body nopadding">
            <div id="product-pool"></div>
        </div>
    </div>
</div>

<script type="text/template" id="template">
    <div class="form-horizontal" id="productEdit">
        <input type="hidden" value="[[id]]" id="id"/>

        <div class="form-group">
            <label for="poolName" class="col-sm-3 control-label">商品池名称:</label>
            <div class="col-sm-5">
                <input type="text" id="poolName" value="[[poolName]]" class="form-control"/>
            </div>
            <div class="col-sm-2"><label style="color: #ff0000; line-height: 40px"> * 必填</label></div>
        </div>

        <div class="form-group">
            <label for="comment" class="col-sm-3 control-label">说明:</label>
            <div class="col-sm-5">
                <input type="text" id="comment" value="[[comment]]" class="form-control"/>
            </div>
        </div>

        <div class="form-group">
            <label for="producttype" class="col-sm-3 control-label">商品:</label>
            <div class="col-sm-5">
                <select id="producttype" class="form-control">
                    <option value="-1">-- 请选择添加商品类型 --</option>
                    <option value="1">SKN</option>
                    <option value="2" disabled>SKU(暂不支持)</option>
                    <option value="3" disabled>SKC(暂不支持)</option>
                </select>
            </div>
            <div class="col-sm-4"><label style="color: #ff0000; line-height: 40px"> * 必选(当前只支持SKN</label></div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">上传:</label>
            <div class="col-sm-9">
                <div class="row">
                    <div class="col-sm-7">
                        <input id="path" class="form-control" type="text" disabled="disabled"
                               style="cursor:default; width: 218px">
                    </div>
                    <div class="col-sm-4" style="position: relative; padding-left: 0;">
                        <input id="productSkn" name="productSkn" class="btn btn-default excel-upload" type="file"
                               style="position: absolute; top: 0;left: 10px; height:37px">
                        <div class="file-name btn btn-info">请选择文件</div>
                        <input type="hidden" id="sknVal"/>
                        <input type="hidden" id="productDetailInfo1"/>
                    </div>
                </div>
                <div style="margin: 10px 0 0; color:#f0ad4e">
                    1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
                    2<a href="/ajax/link/productpool" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
                </div>
            </div>
        </div>
        
        <div class="form-group" id="productEditBanner">
            <label for="bannerUrl" class="col-sm-3 control-label">头部banner</label>
            <div class="col-sm-9">
                <input type="file" id="bannerUrl" name="bannerUrl" value="[[bannerUrl]]" required extend="gif,png,jpg,jpeg,pdf" placeholder="头部banner" bucket="brandBanner" />
                顶部Banner图(非必填),尺寸:640*200
            </div>
        </div>

        <div class="form-group" id="productEditCouponTokens">
            <label for="" class="col-sm-3 control-label">优惠券Token</label>
            <div class="col-sm-9">
                <input type="text" id="couponTokens" name="couponTokens" value="[[tokens]]" class="form-control">
            </div>
        </div>
        
        <div class="form-group" id="productEditBackImage">
            <label for="backImageUrl" class="col-sm-3 control-label">活动价背景图:</label>
            <div class="col-sm-9">
                <input type="file" id="backImageUrl" name="backImageUrl" value="[[backImageUrl]]" required extend="gif,png,jpg,jpeg,pdf" placeholder="活动价背景图" bucket="brandBanner" />
                列表页活动背景图(非必填),尺寸:640*200
            </div>
        </div>
    </div>
</script>


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

    <div class="panel panel-default">
        <div class="panel-body">
            <div class="form-group">
                <div class="col-sm-9">
                    <div class="row">
                        <div class="col-sm-7">
                            <input id="bathcPath" class="form-control" type="text" disabled="disabled"
                                   style="cursor:default; width: 218px">
                        </div>
                        <div class="col-sm-4" style="position: relative; padding-left: 0;">
                            <input id="batchProductSkn" name="productSkn" class="btn btn-default excel-upload"
                                   type="file"
                                   style="position: absolute; top: 0;left: 10px; height:37px">
                            <div class="file-name btn btn-info">请选择文件</div>
                            <input type="hidden" id="sknVal2"/>
                            <input type="hidden" id="productDetailInfo2"/>
                        </div>
                    </div>
                    <div style="margin: 10px 0 0; color:#f0ad4e">
                        1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
                        2<a href="/ajax/link/productpool" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
                    </div>
                </div>
            </div>
        </div>
    </div>

</script>
<script type="text/template" id="detailPoolTemplate">
    <div class="form-group">
        <label class="col-sm-2 control-label">添加SKN到商品池: </label>
        <div class="col-sm-3">
            <input type="text" id="addSknText" class="form-control input-form" placeholder="输入SKN">
            <input type="hidden" id="addSknType" value="[[producttype]]">
            <input type="hidden" id="addSknPoolId" value="[[id]]">
        </div>
        <div class="col-sm-1">
            <a href="javascript:;" id="addSknBtn" class="btn btn-info">+添加</a>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-2">
            <input type="text" id="productSkn" class="form-control input-form" placeholder="查询SKN">
        </div>
        <div class="col-sm-2">
            <select name="brandId" id="brandId" class="form-control">
                <option value="-1">请选择品牌</option>
            </select>
        </div>
        <div class="col-sm-3">
            <div id="sortTree" class="form-control height40" style="border: 0px; padding: 0px;"></div>
        </div>

        <div class="panel-col">
            <a href="javascript:;" id="queryBtn" class="btn btn-info">查询</a>
            <a href="javascript:;"id="queryAllBtn" class="btn btn-info">全部</a>
        </div>

        <div class="col-sm-2">
            <a href="javascript:;" id="batchAddPool" class="btn btn-primary">批量导入</a>
        </div>
    </div>

    <div id="faGrid"></div>
</script>