|
|
@@ -168,7 +168,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- //주문조회 검색 -->
|
|
|
- <th:block th:id="orderList"></th:block>
|
|
|
+ <div class="area_list" id="orderList"></div>
|
|
|
+ <div class="sec_foot">
|
|
|
+ <div class="ui_row">
|
|
|
+ <ul class="pageNav" id="paging">
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!--<div class="sec_body mypage_body">
|
|
|
<!– 주문 경로 –>
|
|
|
@@ -276,13 +282,13 @@
|
|
|
//fnSetSearchPeriod(3);
|
|
|
|
|
|
// Initialize a pagination
|
|
|
- //gagaPaging.init('searchForm', fnSearchOrderList, 'paging', 5);
|
|
|
+ gagaPaging.init('searchForm', fnSearchOrderList, 'paging', 5);
|
|
|
|
|
|
// Load data
|
|
|
- //gagaPaging.load(1);
|
|
|
+ gagaPaging.load(1);
|
|
|
|
|
|
// 주문 리스트 조회
|
|
|
- fnSearchOrderList(1);
|
|
|
+ //fnSearchOrderList(1);
|
|
|
});
|
|
|
|
|
|
// 검색기간 버튼 클릭 이벤트 처리
|
|
|
@@ -332,7 +338,7 @@
|
|
|
gagajf.showProgressbar(true);
|
|
|
},
|
|
|
success : function(result) {
|
|
|
- $('#orderList').html(result);
|
|
|
+ $('#orderList').html(fnCreateOrderList(result));
|
|
|
|
|
|
//let paging = {};
|
|
|
//paging.pageNo = $('#searchForm input[name=pageNo]').val();
|
|
|
@@ -340,8 +346,8 @@
|
|
|
//paging.pageUnit = $('#searchForm input[name=pageUnit]').val();
|
|
|
//
|
|
|
//console.log(result);
|
|
|
- //// Create pagination
|
|
|
- //gagaPaging.createPagination(paging);
|
|
|
+ // Create pagination
|
|
|
+ gagaPaging.createPagination(result.orderInfo.pageable);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -480,64 +486,175 @@
|
|
|
let tag = '';
|
|
|
let imageUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
$.each(param.orderList, function(idx, order) {
|
|
|
- tag += '<div class="part_goods">';
|
|
|
- tag += ' <div class="goods_head">';
|
|
|
+ tag += '<div class="part_goods">\n';
|
|
|
+ tag += ' <div class="goods_head">\n';
|
|
|
if (order.giftPackYn == 'Y') {
|
|
|
- tag += ' <p>주문일 <span>' + order.ordDt + '</span></p>';
|
|
|
+ tag += ' <p>주문일 <span>' + order.ordDt + '</span></p>\n';
|
|
|
} else {
|
|
|
- tag += ' <p>선물일 <span>' + order.ordDt + '</span></p>';
|
|
|
+ tag += ' <p>선물일 <span>' + order.ordDt + '</span></p>\n';
|
|
|
}
|
|
|
- tag += ' <a href="javascript:void(0)" class="btn_detail_view" attr="ordNo=' + order.ordNo + '" onclick="fnGoToOrderDetail(this)">주문상세보기</a>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' <div class="goods_cont">';
|
|
|
+ tag += ' <a href="javascript:void(0)" class="btn_detail_view" ordNo="' + order.ordNo + '" onclick="fnGoToOrderDetail(this)">주문상세보기</a>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="goods_cont">\n';
|
|
|
$.each(item.ordDtlList, function(index, ordDtl) {
|
|
|
- tag += ' <div class="goods_info">';
|
|
|
- tag += ' <div class="order_desc">';
|
|
|
- tag += ' <div class="goods_box">';
|
|
|
- tag += ' <div class="gd_item">';
|
|
|
- tag += ' <a href="">';
|
|
|
- tag += ' <span class="thumb">';
|
|
|
- tag += ' <img src="' + imageUrl + '/' + ordDtl.sysImgNm + '" width="100%" alt="">';
|
|
|
- tag += ' </span>';
|
|
|
- tag += ' <p>';
|
|
|
- tag += ' <span class="brand">' + ordDtl.brandNm + '</span>';
|
|
|
+ tag += ' <div class="goods_info">\n';
|
|
|
+ tag += ' <div class="order_desc">\n';
|
|
|
+ tag += ' <div class="goods_box">\n';
|
|
|
+ tag += ' <div class="gd_item">\n';
|
|
|
+ tag += ' <a href="">\n';
|
|
|
+ tag += ' <span class="thumb">\n';
|
|
|
+ tag += ' <img src="' + imageUrl + '/' + ordDtl.sysImgNm + '" width="100%" alt="">\n';
|
|
|
+ tag += ' </span>\n';
|
|
|
+ tag += ' <p>\n';
|
|
|
+ tag += ' <span class="brand">' + ordDtl.brandNm + '</span>\n';
|
|
|
// 배송 아이콘 처리
|
|
|
if (ordDtl.shotDelvYn == 'Y') {
|
|
|
- tag += ' <span class="tag primary">총알배송</span>';
|
|
|
+ tag += ' <span class="tag primary">총알배송</span>\n';
|
|
|
} else if (ordDtl.selfGoodsYn == 'Y') {
|
|
|
- tag += ' <span class="tag">STYLE24 일반배송</span>';
|
|
|
+ tag += ' <span class="tag">STYLE24 일반배송</span>\n';
|
|
|
+ } else {
|
|
|
+ tag += ' <span class="tag">업체직배송</span>\n';
|
|
|
+ }
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' <p>\n';
|
|
|
+ tag += ' <span class="name">' + ordDtl.goodsNm + '</span>\n';
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' </a>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="gd_opt">\n';
|
|
|
+ tag += ' <div class="option_wrap">\n';
|
|
|
+ tag += ' <span class="title sr-only">주문 옵션</span>\n';
|
|
|
+ tag += ' <span class="option">' + ordDtl.optCd1 + ' / ' + ordDtl.optCd2 + '</span>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="gd_calc">\n';
|
|
|
+ tag += ' <p>\n';
|
|
|
+ tag += ' <span class="count"><em>' + ordDtl.ordQty + '</em>개</span>\n';
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' <p>\n';
|
|
|
+ tag += ' <span class="price_org"><em>' + ordDtl.listPrice.addComma() + '</em>원</span>\n';
|
|
|
+ tag += ' <span class="price_sale"><em>' + ordDtl.ordAmt.addComma() + '</em>원</span>\n';
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="status_box">\n';
|
|
|
+ // 상태값 처리
|
|
|
+ if (ordDtl.giftPackYn == 'Y') {
|
|
|
+ if (gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.giftLimitDay >= 0) {
|
|
|
+ tag += ' <p>주소 입력 대기중</p>\n';
|
|
|
+ } else if (!gagajf.isNull(ordDtl.recipBaseAddr)) {
|
|
|
+ tag += ' <p>선물 완료</p>\n';
|
|
|
+ } else if (ordDtl.ordDtlStat == 'G013_98' || ordDtl.ordDtlStat == 'G013_99' || ordDtl.giftLimitDay < 0) {
|
|
|
+ tag += ' <p>선물 취소</p>\n';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ tag += ' <p>' + ordDtl.ordDtlStatNm + '</p>\n';
|
|
|
+ }
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="button_box">\n';
|
|
|
+ // 버튼 처리
|
|
|
+ if (ordDtl.giftPackYn == 'Y') {
|
|
|
+ // SMS 재발송 버튼
|
|
|
+ if (gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.giftLimitDay >= 0) {
|
|
|
+ tag += ' <p><button type="button" className="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" onClick="fnReSendSms(this);"><span>SMS 재발송</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 리뷰 쓰기 버튼
|
|
|
+ if (!gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.ordDtlStat != 'G013_98' && ordDtl.ordDtlStat != 'G013_99' && ordDtl.reviewableYn == 'Y' && ordDtl.reviewSq == null) {
|
|
|
+ tag += ' <p><button type="button" className="btn btn_primary_line btn_sm" ordNo="' + ordDtl.ordNo + '" onClick="fnCreateReview(this);"><span>리뷰 쓰기</span></button></p>\n';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 주문취소 버튼(입금대기, 결제완료, 상품준비중, 출고처지정, 배송준비중)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_10' || ordDtl.ordDtlStat == 'G013_20' || ordDtl.ordDtlStat == 'G013_30' || ordDtl.ordDtlStat == 'G013_35' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
+ tag += ' <p><button type="button" className="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateChange(this, \'cancel\');"><span>주문 취소</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 교환신청 버튼(배송중, 출고완료, 배송완료)
|
|
|
+ if (ordDtl.changeableYn == 'Y' && (ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60')) {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateChange(this, \'exchange\');"><span>교환 신청</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 반품신청 버튼(배송중, 출고완료, 배송완료)
|
|
|
+ if (ordDtl.returnableYn == 'Y' && (ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60')) {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateChange(this, \'return\');"><span>반품 신청</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송조회 버튼(배송중)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnGoToDelivery(this);"><span>배송 조회</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 구매확정 버튼(배송완료)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnDecideOrder(this);"><span>구매 확정</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 쇼핑백담기 버튼(구매확정)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_70') {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_primary_line btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateCart(this);"><span>쇼핑백 담기</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 리뷰작성 버튼(구매확정)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_70' && ordDtl.reviewableYn == 'Y' && ordDtl.reviewSq == null) {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_primary_line btn_sm" ordNo="' + ordDtl.ordNo + '" onclick="fnCreateReview(this);"><span>리뷰 쓰기</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 1:1문의 버튼(구매확정)
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_70' && (ordDtl.reviewableYn == 'N' || ordDtl.reviewSq > 0)) {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" onclick="cfnGoToPage(_PAGE_ONETOONE_QNA);"><span>1:1 문의</span></button></p>\n';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ // 하단 상태값 배너 처리
|
|
|
+ if (ordDtl.giftPackYn == 'Y') {
|
|
|
+ // 주소 입력 대기중
|
|
|
+ if (gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.giftLimitDay >= 0) {
|
|
|
+ tag += ' <div class="order_text"><p>' + ordDtl.recipNm + '님이 주소를 입력하기 전입니다. (입력기한 ' + ordDtl.giftLimitDt + ')</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 선물 완료
|
|
|
+ if (!gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.ordDtlStat != 'G013_98' && ordDtl.ordDtlStat != 'G013_99') {
|
|
|
+ tag += ' <div class="order_text"><p>' + ordDtl.recipNm + '님께 선물이 발송되었습니다.</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 선물 취소
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_98' && ordDtl.ordDtlStat == 'G013_99') {
|
|
|
+ tag += ' <div class="order_text"><p>주소 입력 기한이 경과되어 선물이 취소 되었습니다.</p></div>\n';
|
|
|
+ }
|
|
|
} else {
|
|
|
- tag += ' <span class="tag">업체직배송</span>';
|
|
|
+ // 주문 접수
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_10') {
|
|
|
+ tag += ' <div class="order_text"><p>주문이 완료되어 결제를 기다리고 있습니다.</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상품준비중
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_30' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
+ tag += ' <div class="order_text"><p>상품 준비가 완료되어 곧 배송될 예정입니다.</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 예약상품 상품준비중
|
|
|
+ //if (ordDtl.ordDtlStat == 'G013_30' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
+ // tag += ' <div class="order_text"><p>상품 준비가 완료되어 곧 배송될 예정입니다.</p></div>\n';
|
|
|
+ //}
|
|
|
+
|
|
|
+ // 배송완료
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <div class="order_text"><p>15일 후 자동으로 구매확정됩니다.</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 구매확정
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_70' && ordDtl.reviewableYn == 'Y' && ordDtl.reviewSq == null) {
|
|
|
+ tag += ' <div class="order_text"><p>리뷰를 작성하면 다른 구매자에게 도움이 될 수 있습니다.</p></div>\n';
|
|
|
+ }
|
|
|
}
|
|
|
- tag += ' </p>';
|
|
|
- tag += ' <p>';
|
|
|
- tag += ' <span class="name">' + ordDtl.goodsNm + '</span>';
|
|
|
- tag += ' </p>';
|
|
|
- tag += ' </a>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' <div class="gd_opt">';
|
|
|
- tag += ' <div class="option_wrap">';
|
|
|
- tag += ' <span class="title sr-only">주문 옵션</span>';
|
|
|
- tag += ' <span class="option">' + ordDtl.optCd1 + ' / ' + ordDtl.optCd2 + '</span>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' <div class="gd_calc">';
|
|
|
- tag += ' <p>';
|
|
|
- tag += ' <span class="count"><em>' + ordDtl.ordQty + '</em>개</span>';
|
|
|
- tag += ' </p>';
|
|
|
- tag += ' <p>';
|
|
|
- tag += ' <span class="price_org"><em>' + ordDtl.listPrice.addComma() + '</em>원</span>';
|
|
|
- tag += ' <span class="price_sale"><em>' + ordDtl.ordAmt.addComma() + '</em>원</span>';
|
|
|
- tag += ' </p>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' <div class="status_box">';
|
|
|
- if ()
|
|
|
- tag += '';
|
|
|
- tag += '';
|
|
|
- tag += '';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += '</div>';
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ return tag;
|
|
|
}
|
|
|
/*]]>*/
|
|
|
</script>
|