|
|
@@ -1182,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}]];
|
|
|
@@ -1221,6 +1199,7 @@
|
|
|
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){
|
|
|
@@ -1242,6 +1221,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));
|
|
|
}
|
|
|
@@ -1260,7 +1242,9 @@
|
|
|
leafTag += ');">'+item5.cate5Nm+'</a>';
|
|
|
});
|
|
|
}
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
}
|
|
|
tag += '<li ';
|
|
|
if(item4.cate4No == cate4No){
|
|
|
@@ -1269,7 +1253,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>';
|
|
|
});
|
|
|
@@ -1279,8 +1263,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){
|
|
|
@@ -1302,6 +1362,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 + ' ';
|
|
|
@@ -1339,13 +1402,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'){
|
|
|
@@ -1362,6 +1488,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));
|
|
|
}
|
|
|
@@ -1379,7 +1508,9 @@
|
|
|
}
|
|
|
leafTag += ');">'+item3.cate3Nm+'</a>';
|
|
|
});
|
|
|
- $('#leafCateList').append(leafTag);
|
|
|
+ if(leaf_Yn == 'N'){
|
|
|
+ $('#leafCateList').append(leafTag);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(idx<1) {
|
|
|
@@ -1397,7 +1528,79 @@
|
|
|
});
|
|
|
tag += '</ul>\n';
|
|
|
});
|
|
|
- $("#cateDepth").append(tag);
|
|
|
+ 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 + '\',' + allItem.cate1No + ' ';
|
|
|
+ if(formalGb=='G009_20'){
|
|
|
+ tag += ' ,\'\',\'\',\'\',\'\',\''+formalGb+'\'';
|
|
|
+ }
|
|
|
+ tag += ');">'+allItem.cate1Nm+'</a></li>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ 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(formalGb=='G009_20'){
|
|
|
tag += '<a class="daps1" href="javascript:void(0);" onclick="cfnGoToGoodsList(' + brandGroupNo + ',\'' + cateGb + '\',\'\',\'\',\'\',\'\',\'\',\''+formalGb+'\')";>전체</a>\n';
|