|
@@ -170,9 +170,9 @@
|
|
|
</div>
|
|
</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">
|
|
<script th:inline="javascript">
|
|
|
// 변수설정
|
|
// 변수설정
|
|
@@ -239,8 +239,7 @@ $(document).ready(function() {
|
|
|
if (scrollTemp) {
|
|
if (scrollTemp) {
|
|
|
var tempPage = parseInt($("#searchForm input[name=pageNo]").val());
|
|
var tempPage = parseInt($("#searchForm input[name=pageNo]").val());
|
|
|
tempPage = tempPage + 1;
|
|
tempPage = tempPage + 1;
|
|
|
- console.log(totalPage);
|
|
|
|
|
- console.log(tempPage)
|
|
|
|
|
|
|
+
|
|
|
if (totalPage > tempPage) {
|
|
if (totalPage > tempPage) {
|
|
|
scrollTemp = false;
|
|
scrollTemp = false;
|
|
|
fnGetInfiniteScrollDataList(tempPage);
|
|
fnGetInfiniteScrollDataList(tempPage);
|
|
@@ -275,6 +274,8 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
// 초기화설정
|
|
// 초기화설정
|
|
|
fnGetInfiniteScrollDataList(1);
|
|
fnGetInfiniteScrollDataList(1);
|
|
|
|
|
+ //fnOrderListInfiniteScrollInit();
|
|
|
|
|
+ //fnOrderListSearch();
|
|
|
|
|
|
|
|
// 팝업닫기
|
|
// 팝업닫기
|
|
|
$(".popup_close").trigger("click");
|
|
$(".popup_close").trigger("click");
|
|
@@ -300,28 +301,64 @@ var fnGetInfiniteScrollDataList = function(pageNo) {
|
|
|
jsonObj.pageNo = pageNo;
|
|
jsonObj.pageNo = pageNo;
|
|
|
jsonObj.stDate = $("#searchForm input[name=stDate]").val();
|
|
jsonObj.stDate = $("#searchForm input[name=stDate]").val();
|
|
|
jsonObj.edDate = $("#searchForm input[name=edDate]").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);
|
|
fnGetInfiniteScrollDataList(1);
|
|
|
|
|
+ //fnOrderListInfiniteScrollInit();
|
|
|
|
|
+ //fnOrderListSearch();
|
|
|
|
|
|
|
|
$("#odDatePop .popup_con button").removeClass("on");
|
|
$("#odDatePop .popup_con button").removeClass("on");
|
|
|
|
|
|
|
@@ -470,6 +509,27 @@ $(function() { gagaInfiniteScroll.getHistory(); });
|
|
|
var fnGoToCustomerBenefit = function() {
|
|
var fnGoToCustomerBenefit = function() {
|
|
|
cfnGoToPage(_PAGE_CUSTOMER_GRADE_BENEFIT);
|
|
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>
|
|
</script>
|
|
|
</th:block>
|
|
</th:block>
|
|
|
</body>
|
|
</body>
|