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

<div class="contentpanel">
    

    <a href="javascript:;" id="add-root-category" class="btn btn-success"  style="margin:10px 0;"><i class="fa fa-plus"></i> 添加根分类</a>
    <div class="panel-body">
        <div class="row">
            <div class="panel-col2">
                <select name="state" id="state" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
                    <option value="-1">未选择</option>
                    <option value="1">开启</option>
                    <option value="0">关闭</option>
                </select>
            </div>
            <div class="panel-col">
                <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
                <a id="filter-all" href="/sale/category/index" class="btn btn-info">全部</a>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="panel-body nopadding">
            
            <div class="sale-category-table dataTables_wrapper no-footer" id="basicTable"></div>
        </div>
    </div>
    
    
</div>

<input type="hidden" id="gridurl" value="<%gridurl%>">

<script type="text/template" id="editTemp">
    <div class="panel">
        <div class="panel-body nopadding">
            <form id="basicForm" role="form" action="[[action]]" class="form-horizontal form-bordered">
                <div class="form-group" style="padding-top: 0">
                    <label class="col-sm-2 control-label">父分类:</label>
                     <div class="col-sm-8 height40">[[parentName]]</div>
                </div> 
                <div class="form-group">
                     <label class="col-sm-2 control-label">是否BLK:</label>

                [[if parentId==0]]
                        <div class="col-sm-8">
                          <select class="form-control" id="appType" value="[[appType]]">
                             <option value="0"></option>
                             <option value="1"></option>
                         </select>
                        </div>
                 [[/if]]
                [[if  parentId>0]]
                    <div class="col-sm-8">
                          <select class="form-control" id="appType" value="[[appType]]" disabled>
                             <option value="0"></option>
                             <option value="1"></option>
                         </select>
                     </div>
                [[/if]]
                </div>     
                <div class="form-group">
                    <label class="col-sm-2 control-label">分类名称:</label>
                    <div class="col-sm-8">
                        <div class="form-inline">
                            <input type="text" id="categoryName" name="categoryName" class="form-control" placeholder="分类名称" value="[[categoryName]]" style="width: 450px">
                            <label style="color: #ff0000; line-height: 40px; margin-left: 15px"> * 必填</label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">分类图标:</label>
                    <div class="col-sm-8"><input type="file" id="icon" name="icon" value="[[icon]]" placeholder="分别图标"></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">SKN</label>
                    <div class="col-sm-8"><input type="text" id="productSkn" name="productSkn" class="form-control" placeholder="SKN" value="[[productSkn]]" data-type="number"></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">url地址</label>
                    <div class="col-sm-4">
                        <select id="goTo" name="goTo" class="form-control" value="[[goTo]]">
                            <option value="" selected="selected">选择跳转目的</option>
                            <option value="go.brand">品牌列表页</option>
                            <option value="go.productDetail">商品详情页</option>
                            <option value="go.coupon">优惠券页</option>
                            <option value="go.fav">收藏列表页</option>
                            <option value="go.mine">我的页面</option>
                            <option value="go.list">列表或搜索页</option>
                            <option value="go.attention">关注页</option>
                            <option value="go.plus">plus</option>
                            <option value="go.star">star</option>
                            <option value="go.new">新品到着页</option>
                            <option value="go.sale">折扣页</option>
                            <option value="go.share">分享</option>
                            <option value="go.h5">h5网页</option>
                            <option value="go.weblogin">h5网页调用本地登录</option>
                            <option value="go.guangchannel">逛频道</option>
                            <option value="go.gender">男女首页</option>
                            <option value="go.activity">app活动页</option>
                            <option value="go.home">频道首页</option>
                            <option value="go.yohood">YOHOOD</option>
                            <option value="go.top100">热销排行</option>
                            <option value="go.activitytemplate">活动模板</option>
                            <option value="go.globalpurchase">全球购</option>
                            <option value="go.subchannel">二级频道</option>
                            <option value="go.shuichannel">二级频道()</option>
                            <option value="go.guangchannel">逛频道或SHOW晒单页</option>
                            <option value="go.showgoods">去晒单</option>
                            <option value="go.limitpurchase">尖货频道</option>
                            <option value="go.vippro">会员商品</option>
                            <option value="go.shortsize">断码页</option>
                            <option value="go.discountmarket">折扣专区</option>
                            <option value="go.discountmarketpro">折扣专区详情页</option>
                            <option value="go.signin">签到页</option>
                            <option value="go.playvideo">视频播放</option>
                            <option value="go.shop">店铺</option>
                            <option value="go.outletactivity">奥莱活动详情页</option>
                            <option value="go.newoutlet">奥莱频道页</option>
                            <option value="go.category">选择一级品类</option>
                            <option value="go.comm.postdetail">社区帖子详情页</option>
                            <option value="go.comm.forum">社区版块首页</option>
                            <option value="go.comm.h5">社区H5</option>
                            <option value="go.comm.productDetail">社区商品详情页</option>
                            <option value="go.videolive">直播详情页</option>
                            <option value="go.videoreplay">重播详情页</option>
                            <option value="go.newyohood">new YOHOOD</option>
                            <option value="go.myInstalment">分期</option>
                            <option value="go.blkbrandcategory">BLK品牌品类页</option>
                            <option value="go.findgoodgoods">发现好货</option>
                            <option value="go.poollist">商品列表页</option>
                            <option value="go.ufo">UFO</option>

                        </select>
                    </div>
                    <div class="col-sm-4">
                        <input type="text" id="url" name="url" value="[[url]]" class="form-control" placeholder="URL地址"/>
                        <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
                    </div>
                </div>
                <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>
                <input id="categoryId" type="hidden" value="[[categoryId]]">
                <input id="parentId" type="hidden" value="[[parentId]]">
                <input id="orderBy" type="hidden" value="[[orderBy]]">
            </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="tableHdTemp">
    <div class="level-hd clearfix">
        <span class="folder" style="width: 8%"></span>
        <span style="width: 5%">ID</span>
        <span style="width: 5%">BLK商品</span>
        <span style="width: 15%">品类名称</span>
        <span style="width: 6%">所属分类</span>
        <span class="orderby">排序</span>
        <span class="status">状态</span>
        <span class="operate">操作</span>
    </div>
</script>
<script type="text/template" id="tableTemp">

    <div class="level-1-wrap">
        <div class="level-wrap clearfix">
            <span class="folder"></span>
            <span>[[categoryId]]</span>
            <span>[[categoryName]]</span>
            <span>一级分类</span>
            <span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
            <span class="status">
                [[if state=="1"]]
                开启
                [[/if]]
                [[if state=="0"]]
                关闭
                [[/if]]
            </span>
            <span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]">
                <a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
                <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/resource/[[categoryId]]">直通车管理</a>
                <!--<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>-->
                <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/searchLabel/[[categoryId]]">标签管理新</a>
                <a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
                [[if state=="1"]]
                <a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
                [[/if]]
                [[if state=="0"]]
                <a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>
                [[/if]]
            </span>
            [[if items]]
            <div class="level-2-wrap">
                [[each items as a index]]
                <div class="level-wrap clearfix">
                    <span class="folder"></span>
                    <span>[[a.categoryId]]</span>
                    <span>[[a.categoryName]]</span>
                    <span>二级分类</span>
                    <span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[a.orderBy]]" categoryId="[[a.categoryId]]" /></span>
                    <span class="status">
                        [[if a.state=="1"]]
                        开启
                        [[/if]]
                        [[if a.state=="0"]]
                        关闭
                        [[/if]]
                    </span>
                    <span class="operate" data-id="[[a.categoryId]]" data-name="[[a.categoryName]]">
                        <a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
                        <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/resource/[[categoryId]]">直通车管理</a>
                        <!--<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[a.categoryId]]">标签管理</a>-->
                        <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/searchLabel/[[a.categoryId]]">标签管理新</a>
                        <a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
                        [[if a.state=="1"]]
                        <a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
                        [[/if]]
                        [[if a.state=="0"]]
                        <a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>
                        [[/if]]
                    </span>
                    [[if a.items]]
                    <div class="level-3-wrap">
                        [[each a.items as b index]]
                        <div class="level-wrap clearfix">
                            <span class="folder"></span>
                            <span>[[b.categoryId]]</span>
                            <span>[[b.categoryName]]</span>
                            <span>三级分类</span>
                            <span class="orderby"><input type="text" class="form-control saleCategoryNumInput" value="[[b.orderBy]]" categoryId="[[b.categoryId]]" /></span>
                            <span class="status">
                                [[if b.state=="1"]]
                                开启
                                [[/if]]
                                [[if b.state=="0"]]
                                关闭
                                [[/if]]
                            </span>
                            <span class="operate" data-id="[[b.categoryId]]" data-name="[[b.categoryName]]">
                                <a class="btn btn-info btn-xs edit-btn"  href="javascript:;">编辑</a>
                                <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/resource/[[categoryId]]">直通车管理</a>
                                <!--<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[b.categoryId]]">标签管理</a>-->
                                <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/searchLabel/[[b.categoryId]]">标签管理新</a>
                                <a class="btn btn-info btn-xs add-sub-category" href="javascript:;">添加子分类</a>
                                [[if b.state=="1"]]
                                <a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
                                [[/if]]
                                [[if b.state=="0"]]
                                <a class="btn btn-warning btn-xs open-category" href="javascript:;">开启[[b.canDelFlag]]</a>
                                [[/if]]
                                [[if b.canDelFlag]]
                                <a class="btn btn-warning btn-xs del-category" href="javascript:;">删除</a>
                                [[/if]]
                            </span>
                        </div>
                        [[/each]]
                    </div>
                    [[/if]]
                </div>
                
                [[/each]]
            </div>
            [[/if]]
        </div>
        
    </div>
</script>

<script type="text/template" id="tableTemp2">
    <span class="folder" style="width: 8%"></span>
    <span style="width: 5%">[[categoryId]]</span>
    <span style="width: 5%">[[if appType=="1"]][[/if]][[if appType=="0"]]否[[/if]]</span>
    <span style="width: 15%">[[categoryName]]</span>
    <span style="width: 6%">[[levelNumber]]级分类</span>
    <span class="orderby"> <input type="text" class="form-control saleCategoryNumInput" value="[[orderBy]]" categoryId="[[categoryId]]" /></span>
    <span class="status">[[if state=="1"]]<b style="color: #449d44">开启</b>[[/if]][[if state=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
    <span class="operate" data-id="[[categoryId]]" data-name="[[categoryName]]" style="width: auto !important;">
        <a class="btn btn-info btn-xs edit-btn" href="javascript:;">编辑</a>
        <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/resource/[[categoryId]]">直通车管理</a>
        <!--<a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/tag/[[categoryId]]">标签管理</a>-->
        <a class="btn btn-success btn-xs tagmgmt-btn" href="/sale/category/searchLabel/[[categoryId]]">标签管理新</a>
        <a class="btn btn-primary btn-xs add-sub-category" href="javascript:;">添加子分类</a>
        <b class="openAndClose" data-id="[[categoryId]]" data-name="[[categoryName]]">
        [[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]]
        [[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]]
        [[if canDelFlag]]<a class="btn btn-danger btn-xs del-category" href="javascript:;">删除</a>[[/if]]
        </b>
    </span>
</script>