|
|
@@ -981,6 +981,7 @@
|
|
|
|
|
|
// result.dataList != null && result.dataList.length > 0
|
|
|
if (dataListLen > 0) {
|
|
|
+ idx++;
|
|
|
$('.list_content .list_defult').hide();
|
|
|
//$('.list_content .count_wrap').show();
|
|
|
var goodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
@@ -989,16 +990,24 @@
|
|
|
var htm = fnCreateGoodsList(result, ithrCd, contentLoc, goodsUrl, lastPage, endRow, 'Mob');
|
|
|
gagaInfiniteScroll.draw(htm);
|
|
|
}else {
|
|
|
- if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
|
|
|
- if($("#searchGoodsForm input[name=pageNo]").val()==1){
|
|
|
- // 필터 값으로 조회 데이터 없을때
|
|
|
- $('.list_content .list_defult').show();
|
|
|
- //$('.list_content .count_wrap').hide();
|
|
|
+ if(idx > 1) { // 데이터가 1건 이상
|
|
|
+ if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
|
|
|
+ if($("#searchGoodsForm input[name=pageNo]").val()==1){
|
|
|
+ // 필터 값으로 조회 데이터 없을때
|
|
|
+ $('.list_content .list_defult').show();
|
|
|
+ }else{
|
|
|
+ // 마지막 페이지 일때
|
|
|
+ $('#endPage').show();
|
|
|
+ }
|
|
|
}else{
|
|
|
- // 마지막 페이지 일때
|
|
|
- $('#endPage').show();
|
|
|
- //$('.list_content .count_wrap').hide();
|
|
|
+ if($("#searchGoodsForm input[name=pageNo]").val()==1){
|
|
|
+ // 필터 값으로 조회 데이터 없을때
|
|
|
+ $('.list_content .list_defult').show();
|
|
|
+ }
|
|
|
}
|
|
|
+ }else{
|
|
|
+ // 필터 값으로 조회 데이터 없을때
|
|
|
+ $('.list_content .list_defult').show();
|
|
|
}
|
|
|
|
|
|
gagaInfiniteScroll.draw('not');
|
|
|
@@ -1173,28 +1182,6 @@
|
|
|
return tag;
|
|
|
}
|
|
|
|
|
|
- var fnTest = function (){
|
|
|
- let actionUrl = '/display/brand/cate/list?brandGroupNo=' + [[${cateInfo.brandGroupNo}]];
|
|
|
- let brandGroupNo = [[${cateInfo.brandGroupNo}]];
|
|
|
- let cate1No = [[${cateInfo.cate1No}]];
|
|
|
- let allCate = [[${cateList}]];
|
|
|
- let tag = '';
|
|
|
- $.getJSON(actionUrl, function(result, status){
|
|
|
- $.each(allCate, function(allCateIdx, allCateItem) {
|
|
|
- if (item.cate1No == allCateItem.cate1No) {
|
|
|
- $.each(allCate, function(allCateIdx, allCateItem) {
|
|
|
- if (item.cate1No == allCateItem.cate1No) {
|
|
|
- tag += '<li>';
|
|
|
- tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList('+brandGroupNo+',\'' + cateGb + '\',' + item.cate1No + ',' + item.cate2No + ',' + item.cate3No + ',' + item.cate4No + ',' + item.cate5No + ')">'+item.cate1Nm+'</a>';
|
|
|
- tag += '</li>\n';
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- $('#cateDepth').append(tag);
|
|
|
- }
|
|
|
-
|
|
|
var fnGetSameDepthList = function (){
|
|
|
var brandGroupNo = [[${cateInfo.brandGroupNo}]];
|
|
|
var cateGb = [[${cateInfo.cateGb}]];
|
|
|
@@ -1208,10 +1195,14 @@
|
|
|
let allCateList = [[${allCateList}]];
|
|
|
let tag = '';
|
|
|
let html = '';
|
|
|
+ if(brandGroupNo>0){
|
|
|
+ var brandCateList = [[${brandCateList}]];
|
|
|
+ }
|
|
|
|
|
|
if(!gagajf.isNull(cate5No)){
|
|
|
|
|
|
}else if(!gagajf.isNull(cate4No)){
|
|
|
+ var leaf_Yn = 'N';
|
|
|
$.each(cateList, function(idx,item){
|
|
|
let cate2 = item.cate2List;
|
|
|
$.each(cate2, function(idx2, item2){
|
|
|
@@ -1233,6 +1224,9 @@
|
|
|
tag += '</li>\n';
|
|
|
$.each(item3.cate4List, function(idx4, item4){
|
|
|
if(item4.cate4No == cate4No){
|
|
|
+ if(item4.leafYn == 'Y'){
|
|
|
+ leaf_Yn = 'Y';
|
|
|
+ }
|
|
|
if(idx<1) {
|
|
|
$("#htopTitle").append(fnDisplayTitle(item4.cate4Nm));
|
|
|
}
|
|
|
@@ -1251,7 +1245,9 @@
|
|
|
leafTag += ');">'+item5.cate5Nm+'</a>';
|
|
|
});
|
|
|
}
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
}
|
|
|
tag += '<li ';
|
|
|
if(item4.cate4No == cate4No){
|
|
|
@@ -1260,7 +1256,7 @@
|
|
|
tag += '>\n';
|
|
|
tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item4.cate1No + ', ' + item4.cate2No + ', ' + item4.cate3No + ', ' + item4.cate4No + ' ';
|
|
|
if(formalGb=='G009_20'){
|
|
|
- leafTag += ' ,\'\',\''+formalGb+'\'';
|
|
|
+ tag += ' ,\'\',\''+formalGb+'\'';
|
|
|
}
|
|
|
tag += ' );">'+item4.cate4Nm+'</a></li>';
|
|
|
});
|
|
|
@@ -1270,8 +1266,84 @@
|
|
|
});
|
|
|
tag += '</ul>\n';
|
|
|
});
|
|
|
- $("#cateDepth").append(tag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }else{
|
|
|
+ tag = '';
|
|
|
+ $.each(cateList, function(idx,item){
|
|
|
+ let cate2 = item.cate2List;
|
|
|
+ $.each(cate2, function (idx2,item2){
|
|
|
+ if(item2.cate2No == cate2No){
|
|
|
+ tag += '<a href="javascript:void(0);" class="daps1" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ' ,' + item2.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ' )">'+item2.cate2Nm+'</a>';
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ tag += '<li>';
|
|
|
+ tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ' ,' + item2.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ' )">전체</a>';
|
|
|
+ tag += '</li>\n';
|
|
|
+ $.each(item2.cate3List, function (idx3, item3){
|
|
|
+ if(idx<1) {
|
|
|
+ tag += '<li';
|
|
|
+ if(item3.cate3No == cate3No){
|
|
|
+ if(item3.leafYn == 'Y'){
|
|
|
+ leaf_Yn = 'Y';
|
|
|
+ }
|
|
|
+ tag += ' class="on"';
|
|
|
+ }
|
|
|
+ tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ', ' + item2.cate2No + ', ' + item3.cate3No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ');">'+item3.cate3Nm+'</a></li>';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $.each(cate2, function (idx2,item2){
|
|
|
+ let leafTag = '';
|
|
|
+ if(item2.cate2No == cate2No){
|
|
|
+ leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ', ' + item2.cate2No + ', ' + cate3No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">전체</a>';
|
|
|
+ $.each(item2.cate3List, function(idx3, item3){
|
|
|
+ if(item3.cate3No == cate3No){
|
|
|
+ if(idx<1) {
|
|
|
+ $("#htopTitle").append(fnDisplayTitle(item3.cate3Nm));
|
|
|
+ }
|
|
|
+ if(item3.cate4List != null && item3.cate4List.length > 0){
|
|
|
+ $.each(item3.cate4List, function (idx4, item4){
|
|
|
+ leafTag += '<a href="javascript:void(0);"';
|
|
|
+ if(item4.cate4No == cate4No){
|
|
|
+ leafTag += ' class="on"';
|
|
|
+ }
|
|
|
+ leafTag += ' onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item4.cate1No + ' , ' + item4.cate2No + ', ' + item4.cate3No + ' , ' + item4.cate4No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">'+item4.cate4Nm+'</a>';
|
|
|
+ });
|
|
|
+ // $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ tag += '</ul>\n';
|
|
|
+ });
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }
|
|
|
}else if(!gagajf.isNull(cate3No)){
|
|
|
+ var leaf_Yn = 'N';
|
|
|
$.each(cateList, function(idx,item){
|
|
|
let cate2 = item.cate2List;
|
|
|
$.each(cate2, function (idx2,item2){
|
|
|
@@ -1293,6 +1365,9 @@
|
|
|
if(idx<1) {
|
|
|
tag += '<li';
|
|
|
if(item3.cate3No == cate3No){
|
|
|
+ if(item3.leafYn == 'Y'){
|
|
|
+ leaf_Yn = 'Y';
|
|
|
+ }
|
|
|
tag += ' class="on"';
|
|
|
}
|
|
|
tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ', ' + item2.cate2No + ', ' + item3.cate3No + ' ';
|
|
|
@@ -1330,13 +1405,76 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
tag += '</ul>\n';
|
|
|
});
|
|
|
- $("#cateDepth").append(tag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }else{
|
|
|
+ tag = '';
|
|
|
+ $.each(cateList, function(idx,item){
|
|
|
+ tag += '<a href="javascript:void(0);" class="daps1" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ' )">'+item.cate1Nm+'</a>';
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ tag += '<li>';
|
|
|
+ tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ' )">전체</a>';
|
|
|
+ tag += '</li>\n';
|
|
|
+ $.each(item.cate2List, function (idx2,item2){
|
|
|
+ if(item2.cate2No == cate2No){
|
|
|
+ if(idx<1) {
|
|
|
+ $("#htopTitle").append(fnDisplayTitle(item2.cate2Nm));
|
|
|
+ }
|
|
|
+ if(item2.cate3List != null && item2.cate3List.length > 0){
|
|
|
+ let leafTag = '';
|
|
|
+ leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ', ' + item2.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">전체</a>';
|
|
|
+ $.each(item2.cate3List, function (idx3, item3){
|
|
|
+ leafTag += '<a href="javascript:void(0);" ';
|
|
|
+ if(cate3No == item3.cate3No){
|
|
|
+ leafTag += 'class="on"';
|
|
|
+ }
|
|
|
+ leafTag += 'onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item3.cate1No + ' , ' + item3.cate2No + ', ' + item3.cate3No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">'+item3.cate3Nm+'</a>';
|
|
|
+ });
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(idx<1) {
|
|
|
+ tag += '<li';
|
|
|
+ if(item2.cate2No == cate2No){
|
|
|
+ tag += ' class="on"';
|
|
|
+ }
|
|
|
+ tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item2.cate1No + ', ' + item2.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ');">'+item2.cate2Nm+'</a></li>';
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ tag += '</ul>\n';
|
|
|
+ });
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }
|
|
|
}else if(!gagajf.isNull(cate2No)){
|
|
|
+ var leaf_Yn = 'N';
|
|
|
$.each(cateList, function(idx,item){
|
|
|
tag += '<a href="javascript:void(0);" class="daps1" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
if(formalGb=='G009_20'){
|
|
|
@@ -1353,6 +1491,9 @@
|
|
|
tag += '</li>\n';
|
|
|
$.each(item.cate2List, function (idx2,item2){
|
|
|
if(item2.cate2No == cate2No){
|
|
|
+ if(item2.leafYn == 'Y'){
|
|
|
+ leaf_Yn = 'Y';
|
|
|
+ }
|
|
|
if(idx<1) {
|
|
|
$("#htopTitle").append(fnDisplayTitle(item2.cate2Nm));
|
|
|
}
|
|
|
@@ -1370,7 +1511,9 @@
|
|
|
}
|
|
|
leafTag += ');">'+item3.cate3Nm+'</a>';
|
|
|
});
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(idx<1) {
|
|
|
@@ -1388,32 +1531,127 @@
|
|
|
});
|
|
|
tag += '</ul>\n';
|
|
|
});
|
|
|
- $("#cateDepth").append(tag);
|
|
|
- }else if(!gagajf.isNull(cate1No)){
|
|
|
- if(formalGb=='G009_20'){
|
|
|
- tag += '<a class="daps1" href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\')";>전체</a>\n';
|
|
|
- tag += '<ul class="daps2">\n';
|
|
|
- }
|
|
|
- $.each(cateList, function(idx,item){
|
|
|
- $.each(allCateList, function (allIdx, allItem){
|
|
|
- if(brandGroupNo > 0){
|
|
|
- if(item.cate1No==allItem.cate1No){
|
|
|
- if(idx<1) {
|
|
|
- $("#htopTitle").append(fnDisplayTitle(item.cate1Nm));
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }else{
|
|
|
+ tag = '';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += '<a class="daps1" href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\')";>전체</a>\n';
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ }
|
|
|
+ $.each(cateList, function(idx,item){
|
|
|
+ $.each(allCateList, function (allIdx, allItem){
|
|
|
+ if(brandGroupNo > 0){
|
|
|
+ if(item.cate1No==allItem.cate1No){
|
|
|
+ if(idx<1) {
|
|
|
+ $("#htopTitle").append(fnDisplayTitle(item.cate1Nm));
|
|
|
+ }
|
|
|
+ if(idx<1) {
|
|
|
+ tag += '<li';
|
|
|
+ if(item.cate1No==allItem.cate1No){
|
|
|
+ tag += ' class="on"';
|
|
|
+ }
|
|
|
+ tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ');">'+item.cate1Nm+'</a></li>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(item.cate1No==allItem.cate1No){
|
|
|
+ if(idx<1) {
|
|
|
+ $("#htopTitle").append(fnDisplayTitle(item.cate1Nm));
|
|
|
+ }
|
|
|
}
|
|
|
if(idx<1) {
|
|
|
tag += '<li';
|
|
|
if(item.cate1No==allItem.cate1No){
|
|
|
tag += ' class="on"';
|
|
|
}
|
|
|
- tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
+ tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + allItem.cate1No + ' ';
|
|
|
if(formalGb=='G009_20'){
|
|
|
tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
}
|
|
|
- tag += ');">'+item.cate1Nm+'</a></li>';
|
|
|
+ tag += ');">'+allItem.cate1Nm+'</a></li>';
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ });
|
|
|
+
|
|
|
+ if(item.cate2List != null && item.cate2List.length > 0){
|
|
|
+ let leafTag = '';
|
|
|
+ leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\', \'\' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">전체</a>';
|
|
|
+ $.each(item.cate2List, function (idx, item){
|
|
|
+ leafTag += '<a href="javascript:void(0);"';
|
|
|
+ if(item.cate2No == cate2No){
|
|
|
+ leafTag += ' class="on"';
|
|
|
+ }
|
|
|
+ leafTag += ' onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item.cate1No + ' , ' + item.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">'+item.cate2Nm+'</a>';
|
|
|
+ });
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += '</ul>\n';
|
|
|
+ }
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }
|
|
|
+ }else if(!gagajf.isNull(cate1No)){
|
|
|
+ if(brandGroupNo > 0){
|
|
|
+ tag += '<a class="daps1" href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\'\')";>전체</a>\n';
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ }
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += '<a class="daps1" href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\')";>전체</a>\n';
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ if(brandGroupNo > 0){
|
|
|
+ $.each(brandCateList, function(idx,item){
|
|
|
+ $.each(allCateList, function (allIdx, allItem){
|
|
|
+ if(item.cate1No==allItem.cate1No){
|
|
|
+ if(idx<1) {
|
|
|
+ $("#htopTitle").append(fnDisplayTitle(item.cate1Nm));
|
|
|
+ }
|
|
|
+ tag += '<li';
|
|
|
+ if(item.cate1No==cate1No){
|
|
|
+ tag += ' class="on"';
|
|
|
+ }
|
|
|
+ tag += '><a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',' + item.cate1No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ');">'+item.cate1Nm+'</a></li>';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(item.cate2List != null && item.cate2List.length > 0){
|
|
|
+ let leafTag = '';
|
|
|
+ leafTag += '<a href="javascript:void(0);" class="on" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\', \'\' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">전체</a>';
|
|
|
+ $.each(item.cate2List, function (idx, item){
|
|
|
+ leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item.cate1No + ' , ' + item.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">'+item.cate2Nm+'</a>';
|
|
|
+ });
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ $.each(cateList, function(idx,item){
|
|
|
+ $.each(allCateList, function (allIdx, allItem){
|
|
|
if(item.cate1No==allItem.cate1No){
|
|
|
if(idx<1) {
|
|
|
$("#htopTitle").append(fnDisplayTitle(item.cate1Nm));
|
|
|
@@ -1430,32 +1668,46 @@
|
|
|
}
|
|
|
tag += ');">'+allItem.cate1Nm+'</a></li>';
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
|
|
|
- if(item.cate2List != null && item.cate2List.length > 0){
|
|
|
- let leafTag = '';
|
|
|
- leafTag += '<a href="javascript:void(0);" class="on" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\', \'\' ';
|
|
|
- if(formalGb=='G009_20'){
|
|
|
- leafTag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
- }
|
|
|
- leafTag += ');">전체</a>';
|
|
|
- $.each(item.cate2List, function (idx, item){
|
|
|
- leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item.cate1No + ' , ' + item.cate2No + ' ';
|
|
|
+ if(item.cate2List != null && item.cate2List.length > 0){
|
|
|
+ let leafTag = '';
|
|
|
+ leafTag += '<a href="javascript:void(0);" class="on" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\', \'\' ';
|
|
|
if(formalGb=='G009_20'){
|
|
|
- leafTag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
}
|
|
|
- leafTag += ');">'+item.cate2Nm+'</a>';
|
|
|
- });
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
- }
|
|
|
- });
|
|
|
+ leafTag += ');">전체</a>';
|
|
|
+ $.each(item.cate2List, function (idx, item){
|
|
|
+ leafTag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + [[${cateInfo.cateGb}]] + '\', ' + item.cate1No + ' , ' + item.cate2No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ leafTag += ' ,\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ leafTag += ');">'+item.cate2Nm+'</a>';
|
|
|
+ });
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
if(formalGb=='G009_20'){
|
|
|
tag += '</ul>\n';
|
|
|
}
|
|
|
$("#cateDepth").append(tag);
|
|
|
}else{
|
|
|
let tag = '';
|
|
|
+ if(brandGroupNo > 0 ){
|
|
|
+ $("#htopTitle").text('전체');
|
|
|
+ tag += '<ul class="daps2">\n';
|
|
|
+ tag += '<li>';
|
|
|
+ tag += '<a href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\'';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ' )">전체</a>';
|
|
|
+ tag += '</li>\n';
|
|
|
+ tag += '</ul>\n';
|
|
|
+ $("#cateDepth").append(tag);
|
|
|
+ }
|
|
|
if(formalGb == 'G009_20'){
|
|
|
$("#htopTitle").text('아울렛');
|
|
|
tag += '<ul class="daps2">\n';
|