Jelajahi Sumber

상품리스트 마지막페이지 안내 수정

bin2107 4 tahun lalu
induk
melakukan
1c26f87ff0

+ 17 - 8
src/main/webapp/WEB-INF/views/mob/display/CategoryGoodsListFormMob.html

@@ -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');

+ 17 - 16
src/main/webapp/WEB-INF/views/mob/display/SearchGoodsListFormMob.html

@@ -697,6 +697,7 @@
 		}
 
 		if(dataListLen > 0){
+			idx++;
 			$('#noFilterData').hide();
 			$('#endPage').hide();
 			$('#eventNodata').hide();
@@ -709,27 +710,27 @@
 			gagaInfiniteScroll.draw(htm);
 			//fnImgOnoff();
 		}else{
-			if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
-				if($("#searchGoodsForm input[name=pageNo]").val()==1){
+			if(idx > 1){ // 데이터가 1건 이상
+				if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
+					if($("#searchGoodsForm input[name=pageNo]").val()==1){
+						// 필터 값으로 조회 데이터 없을때
+						$('#noDataFilter').show();
+						// $('.list_content .count_wrap').hide();
+						$('#endPage').hide();
+					}else{
+						// 마지막 페이지 일때
+						$('#endPage').show();
+						$('#noDataFilter').hide();
+					}
+				}else{
 					// 필터 값으로 조회 데이터 없을때
 					$('#noDataFilter').show();
-					// $('.list_content .count_wrap').hide();
 					$('#endPage').hide();
-				}else{
-					// 마지막 페이지 일때
-					$('#endPage').show();
-					$('#noDataFilter').hide();
 				}
 			}else{
-				if($("#searchGoodsForm input[name=pageNo]").val()==1){
-					$('#goodsNodata').show();
-					$('#goodsKeyword').text([[${params.keyword}]]);
-					$('#dataArea').hide();
-				}else{
-					$('#goodsNodata').show();
-					$('#goodsKeyword').text([[${params.keyword}]]);
-					$('#dataArea').hide();
-				}
+				$('#goodsNodata').show();
+				$('#goodsKeyword').text([[${params.keyword}]]);
+				$('#dataArea').hide();
 			}
 			gagaInfiniteScroll.draw('not');
 		}

+ 25 - 10
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -847,6 +847,7 @@ console.log(allCateList);
 
 			// 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')}]];
@@ -856,18 +857,32 @@ console.log(allCateList);
 				gagaInfiniteScroll.draw(htm);
 				fnImgOnoff();
 			}else {
-				if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
-					if($("#searchGoodsForm input[name=pageNo]").val()==1){
-						// 필터 값으로 조회 데이터 없을때
-						$('#noFilterData').show();
-						$('.list_content .count_wrap').hide();
-						$('#endPage').hide();
+				if(idx > 1){ // 데이터가 1건 이상
+					if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
+						if($("#searchGoodsForm input[name=pageNo]").val()==1){
+							// 필터 값으로 조회 데이터 없을때
+							$('#noFilterData').show();
+							$('.list_content .count_wrap').hide();
+							$('#endPage').hide();
+						}else{
+							// 마지막 페이지 일때
+							$('#endPage').show();
+							$('#noFilterData').hide();
+							//$('.list_content .count_wrap').hide();
+						}
 					}else{
-						// 마지막 페이지 일때
-						$('#endPage').show();
-						$('#noFilterData').hide();
-						//$('.list_content .count_wrap').hide();
+						if($("#searchGoodsForm input[name=pageNo]").val()==1){
+							// 필터 값으로 조회 데이터 없을때
+							$('#noFilterData').show();
+							$('.list_content .count_wrap').hide();
+							$('#endPage').hide();
+						}
 					}
+				}else{
+					// 필터 값으로 조회 데이터 없을때
+					$('#noFilterData').show();
+					$('.list_content .count_wrap').hide();
+					$('#endPage').hide();
 				}
 
 				gagaInfiniteScroll.draw('not');

+ 24 - 20
src/main/webapp/WEB-INF/views/web/display/SearchGoodsListFormWeb.html

@@ -611,6 +611,7 @@
 			}
 
 			if(dataListLen > 0){
+				idx++;
 				$('#noFilterData').hide();
 				$('#endPage').hide();
 				$('#goodsNodata').hide();
@@ -625,29 +626,32 @@
 				gagaInfiniteScroll.draw(htm);
 				//fnImgOnoff();
 			}else{
-				if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
-					if($("#searchGoodsForm input[name=pageNo]").val()==1){
-						// 필터 값으로 조회 데이터 없을때
-						$('#noFilterData').show();
-						$('.cont .count_wrap').hide();
-						$('#endPage').hide();
+				// console.log('idx:::'+idx);
+				if(idx > 1){ // 데이터가 1건 이상
+					if(totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
+						if($("#searchGoodsForm input[name=pageNo]").val()==1){
+							// 필터 값으로 조회 데이터 없을때
+							$('#noFilterData').show();
+							$('.cont .count_wrap').hide();
+							$('#endPage').hide();
+						}else{
+							// 마지막 페이지 일때
+							$('#endPage').show();
+							$('#noFilterData').hide();
+						}
 					}else{
-						// 마지막 페이지 일때
-						$('#endPage').show();
-						$('#noFilterData').hide();
+						if($("#searchGoodsForm input[name=pageNo]").val()==1){
+							// 필터 값으로 조회 데이터 없을때
+							$('#noFilterData').show();
+							$('.cont .count_wrap').hide();
+							$('#endPage').hide();
+						}
 					}
 				}else{
-					if($("#searchGoodsForm input[name=pageNo]").val()==1){
-						$('#goodsNodata').show();
-						$('#goodsKeyword').text([[${params.keyword}]]);
-						$('.cont_body .lnb').hide();
-						$('.cont_body .cont').hide();
-					}else{
-						$('#goodsNodata').show();
-						$('#goodsKeyword').text([[${params.keyword}]]);
-						$('.cont_body .lnb').hide();
-						$('.cont_body .cont').hide();
-					}
+					$('#goodsNodata').show();
+					$('#goodsKeyword').text([[${params.keyword}]]);
+					$('.cont_body .lnb').hide();
+					$('.cont_body .cont').hide();
 				}
 				gagaInfiniteScroll.draw('not');
 			}