瀏覽代碼

Merge branch 'develop' into bin2107

bin2107 5 年之前
父節點
當前提交
ef77ade8ed

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

@@ -2489,4 +2489,57 @@ public class TsfMypageController extends TsfBaseController {
 		return mav;
 	}
 
+	/**
+	 * 마이페이지 주문목록 사전 정보 조회 (모바일)
+	 *
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/cre/list/pre/info")
+	public GagaMap getCreListPreInfo(@RequestBody OrderChange orderChange) {
+		GagaMap result = new GagaMap();
+		
+		orderChange.setCustNo(TsfSession.getInfo().getCustNo());
+
+		// 페이징 처리 설정
+		TscPageRequest pageable = new TscPageRequest((orderChange.getPageNo() > 0 ? orderChange.getPageNo() - 1 : 0), orderChange.getPageSize(), orderChange.getPageUnit());
+		pageable.setTotalCount(orderChangeService.getPagingCreListCount(orderChange));
+		orderChange.setPageable(pageable);
+
+		result.set("paging"		, pageable);
+		result.set("creList"	, orderChangeService.getPagingCreList(orderChange));
+
+		return result;
+	}
+
+	/**
+	 * 마이페이지 주문목록 조회 (모바일)
+	 *
+	 * @param Order
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 05. 27
+	 */
+	@ResponseBody
+	@PostMapping("/cre/list/info")
+	public ModelAndView getCreListInfo2(@RequestBody OrderChange orderChange) {
+		// 주문목록조회
+		ModelAndView mav = new ModelAndView();
+
+		orderChange.setCustNo(TsfSession.getInfo().getCustNo());
+
+		Collection<GagaMap> creList = orderChangeService.getCreList(orderChange);
+
+		mav.addObject("creList"			, 	creList);
+		mav.addObject("creListCnt"		, 	creList.size());
+		mav.addObject("pageNo"			, 	orderChange.getPageNo());
+
+		mav.setViewName(super.getDeviceViewName("mypage/MypageCreListInfo"));
+
+		return mav;
+	}
+
 }

+ 179 - 113
src/main/webapp/WEB-INF/views/mob/mypage/MypageCreListFormMob.html

@@ -91,10 +91,17 @@
 </div>		
 <!-- //주문상태 선택 팝업 -->
 
+<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
+<script src="/ux/plugins/jquery/jquery.history.min.js"></script>
+
 <script th:inline="javascript">
 //AJAX 로드를 위한 변수 설정
 let custNo 		= [[${custNo}]];
 let totalCnt 	= [[${totalCnt}]];
+var jsonObj 	= {};
+var totalPage	= 0;
+var remainList	= 0;
+var pageNo		= 0;
 
 /*<![CDATA[*/
 $(document).ready(function() {
@@ -108,124 +115,155 @@ $(document).ready(function() {
 		, "chgStat" 		: ""
 		, "stDate" 			: ""
 		, "edDate" 			: ""
-		, "custNo"			: custNo
 	}
 	
 	// AJAX 변수 설정
-	jsonData = JSON.stringify(jsonObj);
+	//jsonData = JSON.stringify(jsonObj);
 	
 	// 전체페이지 구하기
-	totalPage 	= parseInt(totalCnt / 10);
-	remainList 	= totalCnt % 10; 
+	//totalPage 	= parseInt(totalCnt / 10);
+	//remainList 	= totalCnt % 10; 
 	
 	// 나머지가 있으면 전체 페이지 + 1
-	if (remainList > 0) {
-		totalPage = totalPage + 1;
-	}
+	//if (remainList > 0) {
+	//	totalPage = totalPage + 1;
+	//}
 	
-	fnSetSearchPeriod(3);
+	//fnSetSearchPeriod(3);
 	
-	var win = $(window);
+	//var win = $(window);
 	 
 	// Each time the user scrolls
-	win.scroll(function() {
+	//win.scroll(function() {
 		// End of the document reached?
-		if ($(document).height() - win.height() == win.scrollTop()) {
-			if (scrollTemp) {
-				var tempPage 	= parseInt($("#searchForm input[name=pageNo]").val());
-				tempPage 		= tempPage + 1;
-				
-				if (totalPage > tempPage) {
-					scrollTemp = false;
-					fnGetInfiniteScrollDataList(tempPage);
-				}
-			}
-		}
-	});
+		//if ($(document).height() - win.height() == win.scrollTop()) {
+		//	if (scrollTemp) {
+		//		var tempPage 	= parseInt($("#searchForm input[name=pageNo]").val());
+		//		tempPage 		= tempPage + 1;
+		//
+		//		if (totalPage > tempPage) {
+		//			scrollTemp = false;
+		//			fnGetInfiniteScrollDataList(tempPage);
+		//		}
+		//	}
+		//}
+	//});
 	
-	// 주문상세상태코드 셀렉트박스 변경 이벤트
-	$('#odStatusPop .popup_con .button_list .ordDtlStat').on('click', function() {
-		let code = $(this).attr('code');
-		$('#searchForm input[name=chgStat]').val(code);
-		jsonObj.chgStat = code;
-
-		$("#odStatusPop .popup_con button").removeClass("on");
-
-		// 상태값설정
-		$("#odStatusPop .popup_con button").each(function() {
-			var tempCode = $(this).attr("code");
-			if (tempCode == code) {
-				$(this).addClass("on");
-
-				// 상태값 명칭
-				var ordDtlStatNm = $(this).find("span").text();
-				$(".container .my_return .od_status_btn").text(ordDtlStatNm);
-			}
-		});
-
-		// 리헷
-		$("#listBox").html("");
-
-		// 초기화설정
-		fnGetInfiniteScrollDataList(1);
+	
+});
 
-		// 팝업닫기
-		$(".popup_close").trigger("click");
-	});
+//사파리 - event.persisted || 크롬 - window.performance.navigation.type 이 1이면 새로고침, 2면 페이지 이동을 통한 캐쉬페이징
+$(window).on("pageshow", function(event) {
+	if ((event.originalEvent && event.originalEvent.persisted) || (window.performance && window.performance.navigation.type == 2)) {
+		var historyData = sessionStorage.getItem(document.location.href);
+		if (historyData != null) {
+			historyData = JSON.parse(historyData);
+		} else {
+			historyData = {};
+		}
+	} else {
+		// 2021.05.28 인피니티스크롤 초기화
+		fnMypageCreListInfiniteScrollInit();
+		fnGetInfiniteScrollDataList();
+	}
 });
 
 //취소,반품,교환목록조회
-var fnGetInfiniteScrollDataList = function(pageNo) {
-
-	// 페이지번호가 없으면 1페이지 설정
-	if (pageNo == null || pageNo == 0) {
-		pageNo = 1;
+var fnGetInfiniteScrollDataList = function() {
+	
+	// 2021.05.28 페이지 기능 수정
+	if (pageNo <= totalPage) {
+		pageNo++;
+	} else {
+		return false;
 	}
 	
 	// 페이지설정
 	$("#searchForm input[name=pageNo]").val(pageNo);
 	
-	jsonObj.pageNo = pageNo;
-	jsonObj.stDate = $("#searchForm input[name=stDate]").val();
-	jsonObj.edDate = $("#searchForm input[name=edDate]").val();
+	jsonObj.pageNo	= pageNo;
+	jsonObj.stDate	= $("#searchForm input[name=stDate]").val();
+	jsonObj.edDate	= $("#searchForm input[name=edDate]").val();
+	jsonObj.chgStat	= $('#searchForm input[name=chgStat]').val();
 	
-	$.ajax( {
-		type		: "POST",
-		url 		: '/mypage/cre/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;
-				
-			}
+	gagajf.ajaxJsonSubmit('/mypage/cre/list/pre/info', JSON.stringify(jsonObj), function(result) {
+		let totalCount 	= result.paging.totalCount;
+		totalCnt 		= totalCount;
+		
+		getTotalPage(totalCount);
+		
+		gagaInfiniteScroll.pageStatus.totalCount = totalCount;
+		
+		let ordChgSqArr = [];
+		$.each(result.creList, function(idx, item) {
+			ordChgSqArr.push(item.ordChgSq);
+		});
+		
+		jsonObj.ordChgSqArr = ordChgSqArr;
+		
+		if (ordChgSqArr.length > 0) {
+			$.ajax({
+				type: "POST",
+				url: '/mypage/cre/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) {
+						// 2021.05.28
+						$("#listBox").css("display", "block");
+						gagaInfiniteScroll.draw(result);
+					}
+				}
+			});
 		}
-	});
+	}, true);
+	//$.ajax( {
+	//	type		: "POST",
+	//	url 		: '/mypage/cre/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;
+	//			
+	//		}
+	//	}
+	//});
 }
 
 //검색기간 버튼 클릭 이벤트 처리
 var fnSetSearchPeriod = function(period) {
 	let date 		= new Date();
-	let edDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let edDate 		= getFormatDate(date);
+	
+	let day = date.getDate();
+	let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+	
+	if (day - lastDay > 0) {
+		date.setDate(date.getDate() - (day - lastDay));
+	}
+	
 	date.setMonth(date.getMonth() - period);
-	let stDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let stDate 		= getFormatDate(date);
 
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);
 	
-	// 리헷
-	$("#listBox").html("");
-	
-	// 초기화설정
-	fnGetInfiniteScrollDataList(1);
+	// 인피니티스크롤 초기화
+	fnMypageOrderListInfiniteScrollInit();
 	
 	$("#odDatePop .popup_con button").removeClass("on");
 	
@@ -240,13 +278,57 @@ var fnSetSearchPeriod = function(period) {
 			$(".container .my_return .od_date_btn").text(periodStr);
 		}
 	});
+	
+	fnGetInfiniteScrollDataList();
+	
+	// 팝업닫기
+	$(".popup_close").trigger("click");
+}
 
+// 주문상세상태코드 셀렉트박스 변경 이벤트
+$('#odStatusPop .popup_con .button_list .ordDtlStat').on('click', function() {
+	let code = $(this).attr('code');
+	$('#searchForm input[name=chgStat]').val(code);
+	jsonObj.chgStat = code;
+	
+	$("#odStatusPop .popup_con button").removeClass("on");
+	
+	// 상태값설정
+	$("#odStatusPop .popup_con button").each(function() {
+		var tempCode = $(this).attr("code");
+		if (tempCode == code) {
+			$(this).addClass("on");
+			
+			// 상태값 명칭
+			var ordDtlStatNm = $(this).find("span").text();
+			$(".container .my_return .od_status_btn").text(ordDtlStatNm);
+		}
+	});
+	
+	// 인피니티스크롤 초기화
+	fnMypageOrderListInfiniteScrollInit();
+	fnGetInfiniteScrollDataList();
+	
 	// 팝업닫기
 	$(".popup_close").trigger("click");
+});
+
+// 2021.04.21 인피니티 스크롤 기능 구현전 추후 수정
+var fnMypageCreListInfiniteScrollInit = function(){
+	sessionStorage.removeItem(document.location.href);
+	
+	pageNo = 0;
+	
+	// History 초기화
+	$("#listBox").html("");
 }
 
 // 취반교 상세 페이지 이동
 var fnGoToCreDetail = function(param) {
+	// 2021.05.27 인피니스크롤위치이동
+	let scrollpos = $(window).scrollTop();
+	localStorage.setItem('scrollpos', scrollpos);
+	
 	let ordNo = $(param).attr('ordNo');
 	let ordChgSq = $(param).attr('ordChgSq');
 	let chgGb = $(param).attr('chgGb');
@@ -266,6 +348,19 @@ var fnGoToCreDetail = function(param) {
 
 	cfnGoToPage(_frontUrl + url);
 }
+
+var getTotalPage = function(param) {
+	// 전체페이지 구하기
+	totalPage 	= parseInt(param / 10);
+	remainList 	= param % 10;
+	
+	// 나머지가 있으면 전체 페이지 + 1
+	if (remainList > 0) {
+		totalPage = totalPage + 1;
+	}
+}
+
+$(function() { gagaInfiniteScroll.getHistory(); });
 /*]]>*/
 </script>
 
@@ -313,35 +408,6 @@ var fnGoToCreDetail = function(param) {
 		});
 	});
 	/* //210409_추가 : alert 모음 */
-	
-	// 등급쿠폰 다운 클릭 이벤트
-	var fnDownloadCoupon = function() {
-		let url = '/mypage/coupon/download/all';
-
-		let data = {};
-		data.custNo = customerInfo.custNo;
-
-		let jsonData = JSON.stringify(data);
-
-		gagajf.ajaxJsonSubmit(url, jsonData, function() {
-			fnReloadCouponCount();
-		});
-	}
-	
-	// 보유쿠폰 수량 업데이트 처리
-	var fnReloadCouponCount = function() {
-		let url = '/mypage/coupon/count';
-		
-		let data = {};
-		data.custNo = customerInfo.custNo;
-		
-		let jsonData = JSON.stringify(data);
-		
-		gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
-			$('#couponCnt').text(result.couponCnt);
-			$('#expiredSoonCouponCnt').text(result.expiredSoonCouponCnt);
-		});
-	}
 </script>
 
 </th:block>

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

@@ -23,7 +23,7 @@
 							<p class="dlvr_desc"><th:block th:text="|${cre.chgDate} ${cre.chgTime}|"></p>
 						</div>
 						<div class="goods_detail">
-							<a href="javascript:void(0);">
+							<a href="javascript:void(0)" th:attr="goodsCd=${cre.goodsCd}" onclick="fnGoToGoodsDetail(this)">
 								<div class="thumb_box">
 									<img th:src="${imageUrl + '/' + cre.sysImgNm}" src="/" width="100%" alt="">
 								</div>

+ 44 - 35
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderListFormMob.html

@@ -209,34 +209,6 @@ $(document).ready(function() {
 		$('#htopTitle').text('주문확인/배송조회');
 	}
 	
-	// 주문상세상태코드 셀렉트박스 변경 이벤트
-	$('#odStatusPop .popup_con .button_list .ordDtlStat').on('click', function() {
-		let code = $(this).attr('code');
-		$('#searchForm input[name=ordDtlStat]').val(code);
-		jsonObj.ordDtlStat = code;
-
-		$("#odStatusPop .popup_con button").removeClass("on");
-
-		// 상태값설정
-		$("#odStatusPop .popup_con button").each(function() {
-			var tempCode = $(this).attr("code");
-			if (tempCode == code) {
-				$(this).addClass("on");
-
-				// 상태값 명칭
-				var ordDtlStatNm = $(this).find("span").text();
-				$(".container .my_order .od_status_btn").text(ordDtlStatNm);
-			}
-		});
-		
-		// 인피니티스크롤 초기화
-		fnMypageOrderListInfiniteScrollInit();
-		fnGetInfiniteScrollDataList();
-
-		// 팝업닫기
-		$(".popup_close").trigger("click");
-	});
-
 	// GNB Background Color 변경
 	if (mypageMainYn == 'Y') {
 		$('#htopSub').addClass('my_main');
@@ -331,22 +303,27 @@ var fnGetInfiniteScrollDataList = function() {
 				}
 			});
 		}
-	});
+	}, true);
 }
 
 // 검색기간 버튼 클릭 이벤트 처리
 var fnSetSearchPeriod = function(period) {
 	let date 		= new Date();
-	let edDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let edDate 		= getFormatDate(date);
+	
+	let day = date.getDate();
+	let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+	
+	if (day - lastDay > 0) {
+		date.setDate(date.getDate() - (day - lastDay));
+	}
+	
 	date.setMonth(date.getMonth() - period);
-	let stDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let stDate 		= getFormatDate(date);
 
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);
 	
-	// 리헷
-	$("#listBox").html("");
-	
 	// 인피니티스크롤 초기화
 	fnMypageOrderListInfiniteScrollInit();
 	
@@ -363,15 +340,47 @@ var fnSetSearchPeriod = function(period) {
 			$(".container .my_order .od_date_btn").text(periodStr);
 		}
 	});
-
+	
+	fnGetInfiniteScrollDataList();
+	
 	// 팝업닫기
 	$(".popup_close").trigger("click");
 }
 
+// 주문상세상태코드 셀렉트박스 변경 이벤트
+$('#odStatusPop .popup_con .button_list .ordDtlStat').on('click', function() {
+	let code = $(this).attr('code');
+	$('#searchForm input[name=ordDtlStat]').val(code);
+	jsonObj.ordDtlStat = code;
+	
+	$("#odStatusPop .popup_con button").removeClass("on");
+	
+	// 상태값설정
+	$("#odStatusPop .popup_con button").each(function() {
+		var tempCode = $(this).attr("code");
+		if (tempCode == code) {
+			$(this).addClass("on");
+			
+			// 상태값 명칭
+			var ordDtlStatNm = $(this).find("span").text();
+			$(".container .my_order .od_status_btn").text(ordDtlStatNm);
+		}
+	});
+	
+	// 인피니티스크롤 초기화
+	fnMypageOrderListInfiniteScrollInit();
+	fnGetInfiniteScrollDataList();
+	
+	// 팝업닫기
+	$(".popup_close").trigger("click");
+});
+
 // 2021.04.21 인피니티 스크롤 기능 구현전 추후 수정
 var fnMypageOrderListInfiniteScrollInit = function(){
 	sessionStorage.removeItem(document.location.href);
 	
+	pageNo = 0;
+	
 	// History 초기화
 	$("#listBox").html("");
 }

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

@@ -328,9 +328,17 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 //검색기간 버튼 클릭 이벤트 처리
 var fnSetSearchPeriod = function(period) {
 	let date 		= new Date();
-	let edDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let edDate 		= getFormatDate(date);
+	
+	let day = date.getDate();
+	let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+	
+	if (day - lastDay > 0) {
+		date.setDate(date.getDate() - (day - lastDay));
+	}
+	
 	date.setMonth(date.getMonth() - period);
-	let stDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let stDate 		= getFormatDate(date);
 
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);

+ 14 - 2
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberCreListFormMob.html

@@ -233,9 +233,17 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 //검색기간 버튼 클릭 이벤트 처리
 var fnSetSearchPeriod = function(period) {
 	let date 		= new Date();
-	let edDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let edDate 		= getFormatDate(date);
+	
+	let day = date.getDate();
+	let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+	
+	if (day - lastDay > 0) {
+		date.setDate(date.getDate() - (day - lastDay));
+	}
+	
 	date.setMonth(date.getMonth() - period);
-	let stDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let stDate 		= getFormatDate(date);
 
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);
@@ -266,6 +274,10 @@ var fnSetSearchPeriod = function(period) {
 
 // 취반교 상세 페이지 이동
 var fnGoToCreDetail = function(param) {
+	// 2021.05.27 인피니스크롤위치이동
+	let scrollpos = $(window).scrollTop();
+	localStorage.setItem('scrollpos', scrollpos);
+	
 	let ordChgSq = $(param).attr('ordChgSq');
 	let chgGb = $(param).attr('chgGb');
 	let url = '';

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

@@ -278,9 +278,17 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
 //검색기간 버튼 클릭 이벤트 처리
 var fnSetSearchPeriod = function(period) {
 	let date 		= new Date();
-	let edDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let edDate 		= getFormatDate(date);
+	
+	let day = date.getDate();
+	let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+	
+	if (day - lastDay > 0) {
+		date.setDate(date.getDate() - (day - lastDay));
+	}
+	
 	date.setMonth(date.getMonth() - period);
-	let stDate 		= date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate() + 1)).slice(-2);
+	let stDate 		= getFormatDate(date);
 
 	$('#searchForm input[name=edDate]').val(edDate);
 	$('#searchForm input[name=stDate]').val(stDate);

+ 5 - 1
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -1104,7 +1104,11 @@ $(document).ready(function(){
         $("body").css({"overflow":"hidden"});
     });
 	
-	
+    $('#replyText').bind('input paste', function() {
+		  $(this).trigger('keyup');
+	});
+
+    
   //팝업_닫기
     $('.popup_close').on("click",function(){
         $('.popup_box').hide().removeClass('active');

+ 15 - 3
src/main/webapp/WEB-INF/views/web/mypage/MypageCreListFormWeb.html

@@ -200,10 +200,18 @@
 	
 	// 검색기간 버튼 클릭 이벤트 처리
 	var fnSetSearchPeriod = function(period) {
-		let date = new Date();
-		let edDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let date 		= new Date();
+		let edDate 		= getFormatDate(date);
+		
+		let day = date.getDate();
+		let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+		
+		if (day - lastDay > 0) {
+			date.setDate(date.getDate() - (day - lastDay));
+		}
+		
 		date.setMonth(date.getMonth() - period);
-		let stDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let stDate 		= getFormatDate(date);
 
 		$('#edDate').val(edDate);
 		$('#searchForm input[name=edDate]').val(edDate);
@@ -535,6 +543,10 @@
 	
 	// 취반교 상세 페이지 이동
 	var fnGoToCreDetail = function(param) {
+		// 2021.05.27 인피니스크롤위치이동
+		let scrollpos = $(window).scrollTop();
+		localStorage.setItem('scrollpos', scrollpos);
+		
 		let ordNo = $(param).attr('ordNo');
 		let ordChgSq = $(param).attr('ordChgSq');
 		let chgGb = $(param).attr('chgGb');

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

@@ -409,11 +409,11 @@
 											</div>
 											<div class="include_item" th:if="${orderAmtInfo.prePntDcAmt > 0}">
 												<dt>선포인트 할인</dt>
-												<dd><em th:text="|- ${#numbers.formatInteger(orderAmtInfo.prePntDcAmt, 1, 'COMMA')}|"></em></dd>
+												<dd><em th:text="|- ${#numbers.formatInteger(orderAmtInfo.prePntDcAmt, 1, 'COMMA')}|"></em>P</dd>
 											</div>
 											<div class="include_item" th:if="${orderAmtInfo.pntDcAmt > 0}">
 												<dt>포인트 사용</dt>
-												<dd><em th:text="|- ${#numbers.formatInteger(orderAmtInfo.pntDcAmt, 1, 'COMMA')}|"></em></dd>
+												<dd><em th:text="|- ${#numbers.formatInteger(orderAmtInfo.pntDcAmt, 1, 'COMMA')}|"></em>P</dd>
 											</div>
 											<div class="include_item" th:if="${orderAmtInfo.gfcdUseAmt > 0}">
 												<dt>상품권 사용</dt>

+ 11 - 3
src/main/webapp/WEB-INF/views/web/mypage/MypageOrderListFormWeb.html

@@ -222,10 +222,18 @@
 	
 	// 검색기간 버튼 클릭 이벤트 처리
 	var fnSetSearchPeriod = function(period) {
-		let date = new Date();
-		let edDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let date 		= new Date();
+		let edDate 		= getFormatDate(date);
+		
+		let day = date.getDate();
+		let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+		
+		if (day - lastDay > 0) {
+			date.setDate(date.getDate() - (day - lastDay));
+		}
+		
 		date.setMonth(date.getMonth() - period);
-		let stDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let stDate 		= getFormatDate(date);
 
 		$('#edDate').val(edDate);
 		$('#searchForm input[name=edDate]').val(edDate);

+ 15 - 3
src/main/webapp/WEB-INF/views/web/mypage/NoMemberCreListFormWeb.html

@@ -203,10 +203,18 @@
 	
 	// 검색기간 버튼 클릭 이벤트 처리
 	var fnSetSearchPeriod = function(period) {
-		let date = new Date();
-		let edDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let date 		= new Date();
+		let edDate 		= getFormatDate(date);
+		
+		let day = date.getDate();
+		let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+		
+		if (day - lastDay > 0) {
+			date.setDate(date.getDate() - (day - lastDay));
+		}
+		
 		date.setMonth(date.getMonth() - period);
-		let stDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let stDate 		= getFormatDate(date);
 
 		$('#edDate').val(edDate);
 		$('#searchForm input[name=edDate]').val(edDate);
@@ -533,6 +541,10 @@
 	
 	// 취반교 상세 페이지 이동
 	var fnGoToCreDetail = function(param) {
+		// 2021.05.27 인피니스크롤위치이동
+		let scrollpos = $(window).scrollTop();
+		localStorage.setItem('scrollpos', scrollpos);
+		
 		let ordChgSq = $(param).attr('ordChgSq');
 		let chgGb = $(param).attr('chgGb');
 		let url = '';

+ 11 - 3
src/main/webapp/WEB-INF/views/web/mypage/NoMemberOrderListFormWeb.html

@@ -194,10 +194,18 @@
 	
 	// 검색기간 버튼 클릭 이벤트 처리
 	var fnSetSearchPeriod = function(period) {
-		let date = new Date();
-		let edDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let date 		= new Date();
+		let edDate 		= getFormatDate(date);
+		
+		let day = date.getDate();
+		let lastDay = (new Date(date.getFullYear(), (date.getMonth() + 1) - period, 0)).getDate();
+		
+		if (day - lastDay > 0) {
+			date.setDate(date.getDate() - (day - lastDay));
+		}
+		
 		date.setMonth(date.getMonth() - period);
-		let stDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
+		let stDate 		= getFormatDate(date);
 
 		$('#edDate').val(edDate);
 		$('#searchForm input[name=edDate]').val(edDate);

+ 18 - 0
src/main/webapp/biz/mypage.js

@@ -506,3 +506,21 @@ var fnGoToWithdrawDelivery = function(param) {
 		}
 	});
 }
+
+// 날짜 포멧 처리
+function getFormatDate(date) {
+	let year = date.getFullYear();
+	let month = (1 + date.getMonth());
+	let day = date.getDate();
+	let lastDay = (new Date(year, month, 0)).getDate();
+
+	if (day > lastDay) {
+		day = lastDay;
+	}
+	
+	month = month >= 10 ? month : '0' + month;
+	
+	day = day >= 10 ? day : '0' + day;
+	
+	return year + '-' + month + '-' + day;
+}

+ 30 - 25
src/main/webapp/ux/pc/css/common.css

@@ -1246,37 +1246,42 @@ input[type="file"] {
 
 /* datePicker */
 /* jquery ui datepicker month year picker */
+.ui-icon {display: none;}
 .ui-datepicker { font-family:arial,verdana,sans-serif }
+.ui-datepicker .ui-datepicker-header { height: 40px}
 .ui-datepicker .ui-datepicker-select-month td ,
-.ui-datepicker .ui-datepicker-select-year td {
-	line-height: 3.4em;
-}
+.ui-datepicker .ui-datepicker-select-year td {line-height: 3.4em;}
 .ui-datepicker .ui-datepicker-select-month td span,
 .ui-datepicker .ui-datepicker-select-month td a,
 .ui-datepicker .ui-datepicker-select-year td span,
-.ui-datepicker .ui-datepicker-select-year td a  {
-	font-size: 1.5em;
-	text-align: center;
-}
-.ui-datepicker .ui-datepicker-select-year td.outoffocus {
-	opacity: 0.5;
-}
-.ui-datepicker .ui-datepicker-prev { left: 15px;cursor: pointer;  }
-.ui-datepicker .ui-datepicker-next { right: 15px;cursor: pointer;  }
-.ui-datepicker .ui-datepicker-header { height: 40px  }
-.ui-widget.ui-widget-content { width: 300px;padding:5px 8px;border-radius: 0   }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active{
-	border-color: #fff;background: #fff;font-size: 14px;padding: .6em 0.5em;color:#454545;text-align: center; 
-}
+.ui-datepicker .ui-datepicker-select-year td a {font-size: 1.5em;text-align: center;}
+.ui-datepicker .ui-datepicker-select-year td.outoffocus {opacity: 0.5;}
+.ui-datepicker .ui-datepicker-prev { left: 15px;cursor: pointer;}
+.ui-datepicker .ui-datepicker-next { right: 15px;cursor: pointer;}
+.ui-state-hover, 
+.ui-widget-content .ui-state-hover, 
+.ui-widget-header .ui-state-hover, 
+.ui-state-focus, 
+.ui-widget-content .ui-state-focus, 
+.ui-widget-header .ui-state-focus, 
+.ui-button:hover, .ui-button:focus {border: 0;top:3px;}
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next{top:3px;}
+.ui-datepicker-prev:hover, .ui-datepicker-next:hover {border-width:0;top:3px;}
+.ui-datepicker-prev:before, .ui-datepicker-next:before {content: "";position:absolute;top:50%;left:50%;transform: translate3d(-50%,-50%,0);width: 8px;height: 16px;vertical-align: middle; background: url(/images/pc/slide_prev.png) no-repeat;background-size: 8px 16px;}
+.ui-datepicker-next:before {background: url(/images/pc/slide_next.png) no-repeat;background-size: 8px 16px;}
+
+
+.ui-widget.ui-widget-content { width: 300px;padding:5px 8px;border-radius: 0;}
+.ui-state-default, 
+.ui-widget-content .ui-state-default, 
+.ui-widget-header .ui-state-default, 
+.ui-button, 
+html .ui-button.ui-state-disabled:hover, 
+html .ui-button.ui-state-disabled:active{border-color: #fff;background: #fff;font-size: 14px;padding: .6em 0.5em;color:#454545;text-align: center;}
 .ui-datepicker-today a.ui-state-active, .ui-datepicker-current-day a.ui-state-active{  background-color:rgba(159,121,82,1);   }
-.ui-state-default:hover { background-color:rgba(159,121,82,0.6);color:#fff;   }
-.ui-widget-header {  font-size: 18px;font-weight: normal;line-height: 40px;background: transparent;border-width: 0;border-radius: 0;   }
-.ui-datepicker th {  border-bottom:1px #9f7952 solid;color:#9f7952; font-weight: normal;font-size: 14px }
-
-.ui-datepicker-prev:hover, .ui-datepicker-next:hover { border-width:0 ;background: transparent;  }
-.ui-datepicker-prev:before, .ui-datepicker-next:before { content: "";position:absolute;top:50%;left:50%;transform: translate3d(-50%,-50%,0);width: 8px;height: 16px;vertical-align: middle;background:url(../images/icon_bg.png) no-repeat -81px 0;   }
-.ui-icon {display: none;}
-.ui-datepicker-next:before {background-position: -95px 0}
+.ui-state-default:hover {background-color:rgba(159,121,82,0.6);color:#fff;   }
+.ui-widget-header {font-size: 18px;font-weight: normal;line-height: 40px;background: transparent;border-width: 0;border-radius: 0;   }
+.ui-datepicker th {border-bottom:1px #9f7952 solid;color:#9f7952; font-weight: normal;font-size: 14px }
 
 
 /* tab */