Преглед изворни кода

마이페이지 오류 수정

card007 пре 5 година
родитељ
комит
2f0a20eef4

+ 44 - 0
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -2397,6 +2397,50 @@ public class TsfMypageController extends TsfBaseController {
 
 		return result;
 	}
+
+	/**
+	 * 마이페이지 주문목록 사전 정보 조회 (모바일)
+	 * 
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/order/list/pre/info")
+	public GagaMap getOrderListPreInfo(@RequestBody Order order) {
+		GagaMap result = new GagaMap();
+
+		// 페이징 처리 설정
+		TscPageRequest pageable = new TscPageRequest((order.getPageNo() > 0 ? order.getPageNo() - 1 : 0), order.getPageSize(), order.getPageUnit());
+		pageable.setTotalCount(orderService.getPagingOrdNoListCount(order));
+		order.setPageable(pageable);
+
+		result.set("paging"		, pageable);
+		result.set("ordNoList"	, orderService.getPagingOrdNoList(order));
+
+		return result;
+	}
+
+	/**
+	 * 마이페이지 주문목록 조회 (모바일)
+	 *
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/order/list/info")
+	public ModelAndView getOrderListInfo3(@RequestBody Order order) {
+		// 주문목록조회
+		ModelAndView mav = new ModelAndView();
+
+		mav.addObject("orderList", orderService.getOrderListForMypage(order));
+		mav.setViewName(super.getDeviceViewName("mypage/MypageOrderListInfo"));
+
+		return mav;
+	}
 	
 	/**
 	 * 마이페이지 취반교 목록 조회

+ 44 - 0
src/main/java/com/style24/front/biz/web/TsfNoMemberController.java

@@ -1306,6 +1306,50 @@ public class TsfNoMemberController extends TsfBaseController {
 		return mav;
 	}
 
+	/**
+	 * 마이페이지 주문목록 사전 정보 조회 (모바일)
+	 *
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/order/list/pre/info")
+	public GagaMap getOrderListPreInfo(@RequestBody Order order) {
+		GagaMap result = new GagaMap();
+
+		// 페이징 처리 설정
+		TscPageRequest pageable = new TscPageRequest((order.getPageNo() > 0 ? order.getPageNo() - 1 : 0), order.getPageSize(), order.getPageUnit());
+		pageable.setTotalCount(orderService.getPagingOrdNoListCount(order));
+		order.setPageable(pageable);
+
+		result.set("paging"		, pageable);
+		result.set("ordNoList"	, orderService.getPagingOrdNoList(order));
+
+		return result;
+	}
+
+	/**
+	 * 마이페이지 주문목록 조회 (모바일)
+	 *
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/order/list/info")
+	public ModelAndView getOrderListInfo3(@RequestBody Order order) {
+		// 주문목록조회
+		ModelAndView mav = new ModelAndView();
+
+		mav.addObject("orderList", orderService.getOrderListForMypage(order));
+		mav.setViewName(super.getDeviceViewName("mypage/NoMemberOrderListInfo"));
+
+		return mav;
+	}
+
 	/**
 	 * 마이페이지 취반교 목록 조회
 	 *

+ 3 - 3
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderDetailFormMob.html

@@ -540,7 +540,7 @@
 
 										<!-- 반품불가능 -->
 										<th:block th:if="${ordDtl.changeableYn} == 'Y' and ${ordDtl.returnableYn} == 'N'">
-											<p class="cf_txt cf_desc">해당 상품은 교환이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
+											<p class="cf_txt cf_desc">해당 상품은 반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
 										</th:block>
 										<!-- //반품불가능 -->
 
@@ -560,7 +560,7 @@
 								<!-- //주문접수 -->
 								
 								<!-- 결제완료, 예약배송상품 -->
-								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_10'">
+								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_20'">
 									<th:block th:if="${ordDtl.delvResDt} != null">
 										<div class="goods_txt">
 											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
@@ -847,7 +847,7 @@
 									</div>
 									<th:block th:if="${orderAmtInfo.cpn1DcAmt} > 0">
 										<div>
-											<dt>상품할인(즉시할인)</dt>
+											<dt>즉시할인</dt>
 											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.cpn1DcAmt, 1, 'COMMA')}|"></span>원</div></dd>
 										</div>
 									</th:block>

+ 85 - 25
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderListFormMob.html

@@ -170,9 +170,9 @@
 </div>
 <!-- //주문상태 선택 팝업 -->
 
-<!-- <script src="/ux/plugins/jquery/jquery.history.min.js"></script> -->
-<!-- <script src="/ux/plugins/gaga/gaga.infinite.scrollLayer.js"></script> -->
-<!-- <script src="/ux/plugins/gaga/gaga.paging.js"></script> -->
+<!--<script src="/ux/plugins/jquery/jquery.history.min.js"></script> -->
+<!--<script src="/ux/plugins/gaga/gaga.infinite.scrollLayer.js"></script> -->
+<!--<script src="/ux/plugins/gaga/gaga.paging.js"></script> -->
 
 <script th:inline="javascript">
 // 변수설정
@@ -239,8 +239,7 @@ $(document).ready(function() {
 				if (scrollTemp) {
 					var tempPage 	= parseInt($("#searchForm input[name=pageNo]").val());
 					tempPage 		= tempPage + 1;
-					console.log(totalPage);
-					console.log(tempPage)
+					
 					if (totalPage > tempPage) {
 						scrollTemp = false;
 						fnGetInfiniteScrollDataList(tempPage);
@@ -275,6 +274,8 @@ $(document).ready(function() {
 		
 		// 초기화설정
 		fnGetInfiniteScrollDataList(1);
+		//fnOrderListInfiniteScrollInit();
+		//fnOrderListSearch();
 
 		// 팝업닫기
 		$(".popup_close").trigger("click");
@@ -300,28 +301,64 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 	jsonObj.pageNo = pageNo;
 	jsonObj.stDate = $("#searchForm input[name=stDate]").val();
 	jsonObj.edDate = $("#searchForm input[name=edDate]").val();
+	jsonObj.ordDtlStat = $('#searchForm input[name=ordDtlStat]').val();
 	
-	$.ajax( {
-		type		: "POST",
-		url 		: '/mypage/order/listInfo',
-		data		: JSON.stringify(jsonObj),
-		dataType 	: 'html',
-		beforeSend : function(xhr, settings) {
-			xhr.setRequestHeader("AJAX"			, "true");
-			xhr.setRequestHeader('Accept'		, 'application/json');
-			xhr.setRequestHeader('Content-Type'	, 'application/json');
-		},
-		success 	: function(result) {
-			if (result != null) {
-				$("#listBox").css("display", "block");
-				$("#listBox").append(result);
-				scrollTemp = true;
-				
-				// 인피니티 스크롤 기억기능
-				//gagaInfiniteScroll.draw(result);
-				//gagaInfiniteScroll.draw('not');
+	//$.ajax( {
+	//	type		: "POST",
+	//	url 		: '/mypage/order/listInfo',
+	//	data		: JSON.stringify(jsonObj),
+	//	dataType 	: 'html',
+	//	beforeSend : function(xhr, settings) {
+	//		xhr.setRequestHeader("AJAX"			, "true");
+	//		xhr.setRequestHeader('Accept'		, 'application/json');
+	//		xhr.setRequestHeader('Content-Type'	, 'application/json');
+	//	},
+	//	success 	: function(result) {
+	//		if (result != null) {
+	//			$("#listBox").css("display", "block");
+	//			$("#listBox").append(result);
+	//			scrollTemp = true;
+	//			
+	//			// 인피니티 스크롤 기억기능
+	//			//gagaInfiniteScroll.draw(result);
+	//			//gagaInfiniteScroll.draw('not');
+	//
+	//		}
+	//	}
+	//});
+	
+	gagajf.ajaxJsonSubmit('/mypage/order/list/pre/info', JSON.stringify(jsonObj), function(result) {
+		let totalCount = result.paging.totalCount;
+		totalCnt = totalCount;
+		getTotalPage(totalCount);
+		//gagaInfiniteScroll.pageStatus.totalCount = totalCount;
+		
+		let ordNoList = []; 
+		$.each(result.ordNoList, function(idx, item) {
+			ordNoList.push(item.ordNo);
+		});
 
-			}
+		jsonObj.ordNoList = ordNoList;
+		
+		if (ordNoList.length > 0) {
+			$.ajax({
+				type: "POST",
+				url: '/mypage/order/list/info',
+				data: JSON.stringify(jsonObj),
+				dataType: 'html',
+				beforeSend: function (xhr, settings) {
+					xhr.setRequestHeader("AJAX", "true");
+					xhr.setRequestHeader('Accept', 'application/json');
+					xhr.setRequestHeader('Content-Type', 'application/json');
+				},
+				success: function (result) {
+					if (result != null) {
+						$("#listBox").css("display", "block");
+						$("#listBox").append(result);
+						scrollTemp = true;
+					}
+				}
+			});
 		}
 	});
 }
@@ -341,6 +378,8 @@ var fnSetSearchPeriod = function(period) {
 	
 	// 초기화설정
 	fnGetInfiniteScrollDataList(1);
+	//fnOrderListInfiniteScrollInit();
+	//fnOrderListSearch();
 	
 	$("#odDatePop .popup_con button").removeClass("on");
 	
@@ -470,6 +509,27 @@ $(function() { gagaInfiniteScroll.getHistory(); });
 	var fnGoToCustomerBenefit = function() {
 		cfnGoToPage(_PAGE_CUSTOMER_GRADE_BENEFIT);
 	}
+	
+	// 인피니티 스크롤 초기화
+	var fnOrderListInfiniteScrollInit = function (){
+		sessionStorage.removeItem(document.location.href);
+		$("#listBox").html("");
+	}
+	
+	var fnOrderListSearch = function (){
+		gagaInfiniteScroll.getHistory();
+	}
+	
+	var getTotalPage = function(param) {
+		// 전체페이지 구하기
+		totalPage 	= parseInt(param / 10);
+		remainList 	= param % 10;
+		
+		// 나머지가 있으면 전체 페이지 + 1
+		if (remainList > 0) {
+			totalPage = totalPage + 1;
+		}
+	}
 </script>
 </th:block>
 </body>

+ 10 - 2
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderListInfoMob.html

@@ -376,8 +376,8 @@
 								<!-- //교환불가능 -->
 
 								<!-- 반품불가능 -->
-								<th:block th:if="${ordDtl.returnableYn} == 'N'and ${ordDtl.returnableYn} == 'Y'">
-									<p class="cf_txt cf_desc">해당 상품은 교환이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
+								<th:block th:if="${ordDtl.returnableYn} == 'N' and ${ordDtl.changeableYn} == 'Y'">
+									<p class="cf_txt cf_desc">해당 상품은 반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
 								</th:block>
 								<!-- //반품불가능 -->
 								</div>
@@ -395,6 +395,14 @@
 							</th:block>
 							<!-- //주문접수 -->
 							
+							<!-- 결제완료 -->
+							<th:block th:if="${ordDtl.ordDtlStat == 'G013_20' and !#strings.isEmpty(ordDtl.delvResDt)}">
+								<div class="goods_txt">
+									<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
+								</div>
+							</th:block>
+							<!-- //결제완료 -->
+							
 							<!-- 상품준비중 -->
 							<th:block th:if="${ordDtl.ordDtlStat} == 'G013_30'">
 								<div class="goods_txt">

+ 3 - 3
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberOrderDetailFormMob.html

@@ -246,7 +246,7 @@
 
 										<!-- 반품불가능 -->
 										<th:block th:if="${ordDtl.changeableYn} == 'Y' and ${ordDtl.returnableYn} == 'N'">
-											<p class="cf_txt cf_desc">해당 상품은 교환이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
+											<p class="cf_txt cf_desc">해당 상품은 반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
 										</th:block>
 										<!-- //반품불가능 -->
 
@@ -266,7 +266,7 @@
 								<!-- //주문접수 -->
 								
 								<!-- 결제완료, 예약배송상품 -->
-								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_10'">
+								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_20'">
 									<th:block th:if="${ordDtl.delvResDt} != null">
 										<div class="goods_txt">
 											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
@@ -506,7 +506,7 @@
 									</div>
 									<th:block th:if="${orderAmtInfo.cpn1DcAmt} > 0">
 										<div>
-											<dt>상품할인(즉시할인)</dt>
+											<dt>즉시할인</dt>
 											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.cpn1DcAmt, 1, 'COMMA')}|"></span>원</div></dd>
 										</div>
 									</th:block>

+ 66 - 20
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberOrderListFormMob.html

@@ -216,26 +216,61 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 	jsonObj.stDate = $("#searchForm input[name=stDate]").val();
 	jsonObj.edDate = $("#searchForm input[name=edDate]").val();
 	
-	$.ajax( {
-		type		: "POST",
-		url 		: '/noMember/order/listInfo',
-		data		: JSON.stringify(jsonObj),
-		dataType 	: 'html',
-		beforeSend : function(xhr, settings) {
-			xhr.setRequestHeader("AJAX"			, "true");
-			xhr.setRequestHeader('Accept'		, 'application/json');
-			xhr.setRequestHeader('Content-Type'	, 'application/json');
-		},
-		success 	: function(result) {
-			if (result != null) {
-				$("#listBox").css("display", "block");
-				$("#listBox").append(result);
-				scrollTemp = true;
-				
-				// 인피니티 스크롤 기억기능
-				//gagaInfiniteScroll.draw(result);
-				//gagaInfiniteScroll.draw('not');
-			}
+	//$.ajax( {
+	//	type		: "POST",
+	//	url 		: '/noMember/order/listInfo',
+	//	data		: JSON.stringify(jsonObj),
+	//	dataType 	: 'html',
+	//	beforeSend : function(xhr, settings) {
+	//		xhr.setRequestHeader("AJAX"			, "true");
+	//		xhr.setRequestHeader('Accept'		, 'application/json');
+	//		xhr.setRequestHeader('Content-Type'	, 'application/json');
+	//	},
+	//	success 	: function(result) {
+	//		if (result != null) {
+	//			$("#listBox").css("display", "block");
+	//			$("#listBox").append(result);
+	//			scrollTemp = true;
+	//			
+	//			// 인피니티 스크롤 기억기능
+	//			//gagaInfiniteScroll.draw(result);
+	//			//gagaInfiniteScroll.draw('not');
+	//		}
+	//	}
+	//});
+	
+	gagajf.ajaxJsonSubmit('/noMember/order/list/pre/info', JSON.stringify(jsonObj), function(result) {
+		let totalCount = result.paging.totalCount;
+		totalCnt = totalCount;
+		getTotalPage(totalCount);
+		//gagaInfiniteScroll.pageStatus.totalCount = totalCount;
+		
+		let ordNoList = [];
+		$.each(result.ordNoList, function(idx, item) {
+			ordNoList.push(item.ordNo);
+		});
+		
+		jsonObj.ordNoList = ordNoList;
+		
+		if (ordNoList.length > 0) {
+			$.ajax({
+				type: "POST",
+				url: '/mypage/order/list/info',
+				data: JSON.stringify(jsonObj),
+				dataType: 'html',
+				beforeSend: function (xhr, settings) {
+					xhr.setRequestHeader("AJAX", "true");
+					xhr.setRequestHeader('Accept', 'application/json');
+					xhr.setRequestHeader('Content-Type', 'application/json');
+				},
+				success: function (result) {
+					if (result != null) {
+						$("#listBox").css("display", "block");
+						$("#listBox").append(result);
+						scrollTemp = true;
+					}
+				}
+			});
 		}
 	});
 }
@@ -332,6 +367,17 @@ $(function() { gagaInfiniteScroll.getHistory(); });
 		$('.popup_box').hide().removeClass('active');
 		$("body").css({"overflow":"visible"});
 	});
+
+	var getTotalPage = function(param) {
+		// 전체페이지 구하기
+		totalPage 	= parseInt(param / 10);
+		remainList 	= param % 10;
+		
+		// 나머지가 있으면 전체 페이지 + 1
+		if (remainList > 0) {
+			totalPage = totalPage + 1;
+		}
+	}
 </script>
 </th:block>
 </body>

+ 9 - 1
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberOrderListInfoMob.html

@@ -191,7 +191,7 @@
 
 							<!-- 반품불가능 -->
 							<th:block th:if="${ordDtl.returnableYn} == 'N'">
-								<p class="cf_txt cf_desc">해당 상품은 교환이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
+								<p class="cf_txt cf_desc">해당 상품은 반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
 							</th:block>
 							<!-- //반품불가능 -->
 							</div>
@@ -209,6 +209,14 @@
 						</th:block>
 						<!-- //주문접수 -->
 
+						<!-- 결제완료 -->
+						<th:block th:if="${ordDtl.ordDtlStat == 'G013_20' and !#strings.isEmpty(ordDtl.delvResDt)}">
+							<div class="goods_txt">
+								<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
+							</div>
+						</th:block>
+						<!-- //결제완료 -->
+
 						<!-- 상품준비중 -->
 						<th:block th:if="${ordDtl.ordDtlStat} == 'G013_30'">
 							<div class="goods_txt">

+ 6 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageOrderDetailFormWeb.html

@@ -218,6 +218,12 @@
 													<!-- 예약 상품 -->
 													<p th:if="${!#strings.isEmpty(ordDtl.delvResDt)}" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
 												</div>
+
+												<!-- 결제 완료 -->
+												<div class="order_text" th:if="${ordDtl.ordDtlStat == 'G013_20' and !#strings.isEmpty(ordDtl.delvResDt)}">
+													<!-- 예약 상품 -->
+													<p th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
+												</div>
 												
 												<!-- 상품준비중 -->
 												<div class="order_text" th:if="${ordDtl.ordDtlStat == 'G013_30'}">

+ 6 - 0
src/main/webapp/WEB-INF/views/web/mypage/NoMemberOrderDetailFormWeb.html

@@ -140,6 +140,12 @@
 												<!-- 예약 상품 -->
 												<p th:if="${!#strings.isEmpty(ordDtl.delvResDt)}" th:text="|예약판매 상품으로${ordDtl.delvResDt} 출고 예정입니다.|"></p>
 											</div>
+
+											<!-- 결제 완료 -->
+											<div class="order_text" th:if="${ordDtl.ordDtlStat == 'G013_20' and !#strings.isEmpty(ordDtl.delvResDt)}">
+												<!-- 예약 상품 -->
+												<p th:text="|예약판매 상품으로${ordDtl.delvResDt} 출고 예정입니다.|"></p>
+											</div>
 											
 											<!-- 상품준비중 -->
 											<div class="order_text" th:if="${ordDtl.ordDtlStat == 'G013_30'}">