|
|
@@ -146,20 +146,10 @@
|
|
|
<div class="form_field">
|
|
|
<div class="select_custom order_status">
|
|
|
<div class="combo">
|
|
|
- <input type="hidden" name="ordDtlStat" value=""/>
|
|
|
<div class="select">전체상태</div>
|
|
|
<ul class="list">
|
|
|
- <li class="selected" value="" onclick="fnChangeOrdDtlStat(this);">전체상태</li>
|
|
|
- <li th:if="${ordDtlStatList}" th:each="oneData, status : ${ordDtlStatList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}" onclick="fnChangeOrdDtlStat(this);"></li>
|
|
|
- <!-- 선택처리 class="selected" / 선택불가 aria-disabled="true" 추가 -->
|
|
|
- <!--<li class="selected">전체상태</li>
|
|
|
- <li>주문접수</li>
|
|
|
- <li>결제완료</li>
|
|
|
- <li>상품준비중</li>
|
|
|
- <li>배송준비중</li>
|
|
|
- <li>배송중</li>
|
|
|
- <li>배송완료</li>
|
|
|
- <li>구매확정</li>-->
|
|
|
+ <li class="selected" code="">전체상태</li>
|
|
|
+ <li th:if="${ordDtlStatList}" th:each="oneData, status : ${ordDtlStatList}" th:attr="code=${oneData.cd}" th:text="${oneData.cdNm}"></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -237,11 +227,12 @@
|
|
|
</div>
|
|
|
</div>-->
|
|
|
<form id="searchForm" name="searchForm" th:action="@{'/mypage/order/list'}" th:method="post">
|
|
|
- <input type="hidden" name="pageNo" value ="1"/>
|
|
|
- <input type="hidden" name="pageSize" value ="5"/>
|
|
|
- <input type="hidden" name="pageUnit" value ="10"/>
|
|
|
- <input type="hidden" name="stDate" value =""/>
|
|
|
- <input type="hidden" name="edDate" value =""/>
|
|
|
+ <input type="hidden" name="pageNo" value=1 />
|
|
|
+ <input type="hidden" name="pageSize" value=5 />
|
|
|
+ <input type="hidden" name="pageUnit" value=10 />
|
|
|
+ <input type="hidden" name="ordDtlStat" value="" />
|
|
|
+ <input type="hidden" name="stDate" value="" />
|
|
|
+ <input type="hidden" name="edDate" value="" />
|
|
|
<input type="hidden" name="custNo" th:value ="${customerInfo.custNo}"/>
|
|
|
</form>
|
|
|
<form id="exchangeForm" name="exchangeForm" action="#" th:action="@{'/mypage/exchange/form'}" th:method="post">
|
|
|
@@ -261,6 +252,8 @@
|
|
|
<script th:inline="javascript">
|
|
|
let ordNo = [[${ordNo}]];
|
|
|
let customerInfo = [[${customerInfo}]];
|
|
|
+ let totalCount = 0;
|
|
|
+ let pageSize = 0;
|
|
|
/*<![CDATA[*/
|
|
|
$(document).ready(function() {
|
|
|
// 마이페이지 LNB 설정
|
|
|
@@ -276,19 +269,15 @@
|
|
|
$('.select_custom.order_status').each(function(index) {
|
|
|
var selecter01 = new sCombo($(this));
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 주문 검색 기간 설정
|
|
|
$('#rdi-month2').click();
|
|
|
- //fnSetSearchPeriod(3);
|
|
|
|
|
|
// Initialize a pagination
|
|
|
- gagaPaging.init('searchForm', fnSearchOrderList, 'paging', 5);
|
|
|
+ gagaPaging.init('searchForm', fnSearchCallback, 'paging', 5, 10);
|
|
|
|
|
|
// Load data
|
|
|
gagaPaging.load(1);
|
|
|
-
|
|
|
- // 주문 리스트 조회
|
|
|
- //fnSearchOrderList(1);
|
|
|
});
|
|
|
|
|
|
// 검색기간 버튼 클릭 이벤트 처리
|
|
|
@@ -303,67 +292,20 @@
|
|
|
$('#stDate').val(stDate);
|
|
|
$('#searchForm input[name=stDate]').val(stDate);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 주문 목록 조회
|
|
|
- var fnSearchOrderList = function(pageNo) {
|
|
|
- if (pageNo == null) {
|
|
|
- pageNo = $('#searchForm input[name=pageNo]').val();
|
|
|
- } else {
|
|
|
- pageNo = 0;
|
|
|
- }
|
|
|
- let stDate = $('#stDate').val();
|
|
|
- let edDate = $('#edDate').val();
|
|
|
- //let ordDtlStat = $('#ordDtlStat').val();
|
|
|
+ var fnSearchOrderList = function() {
|
|
|
+ gagaPaging.load(1);
|
|
|
+ }
|
|
|
|
|
|
- let data = {};
|
|
|
- data.pageNo = pageNo;
|
|
|
- data.pageSize = 5;
|
|
|
- data.pageUnit = 10;
|
|
|
- data.stDate = stDate;
|
|
|
- data.edDate = edDate;
|
|
|
- data.custNo = customerInfo.custNo;
|
|
|
- //data.ordDtlStat = ordDtlStat;
|
|
|
-
|
|
|
- let jsonData = JSON.stringify(data)
|
|
|
-
|
|
|
- $.ajax( {
|
|
|
- type : "POST",
|
|
|
- url : '/mypage/order/list',
|
|
|
- data : jsonData,
|
|
|
- dataType : 'html',
|
|
|
- beforeSend : function(xhr, settings) {
|
|
|
- xhr.setRequestHeader("AJAX", "true");
|
|
|
- xhr.setRequestHeader('Accept', 'application/json');
|
|
|
- xhr.setRequestHeader('Content-Type', 'application/json');
|
|
|
- gagajf.showProgressbar(true);
|
|
|
- },
|
|
|
- success : function(result) {
|
|
|
- $('#orderList').html(fnCreateOrderList(result));
|
|
|
+ // 주문 목록 조회 콜백
|
|
|
+ var fnSearchCallback = function(result) {
|
|
|
+ $('#orderList').html(fnCreateOrderList(result));
|
|
|
|
|
|
- //let paging = {};
|
|
|
- //paging.pageNo = $('#searchForm input[name=pageNo]').val();
|
|
|
- //paging.pageSize = $('#searchForm input[name=pageSize]').val();
|
|
|
- //paging.pageUnit = $('#searchForm input[name=pageUnit]').val();
|
|
|
- //
|
|
|
- //console.log(result);
|
|
|
- // Create pagination
|
|
|
- gagaPaging.createPagination(result.orderInfo.pageable);
|
|
|
- }
|
|
|
- });
|
|
|
+ // Create pagination
|
|
|
+ gagaPaging.createPagination(result.orderInfo.pageable);
|
|
|
}
|
|
|
-
|
|
|
- // rowspan 처리
|
|
|
- //var fnMergeRow = function() {
|
|
|
- // $(".merge_row").each(function() {
|
|
|
- // var txt = $(this).text();
|
|
|
- // var rows = $(this).parents("table").find(".merge_row:contains('" + txt + "')");
|
|
|
- // if (rows.length > 1) {
|
|
|
- // rows.eq(0).attr("rowspan", rows.length);
|
|
|
- // rows.not(":eq(0)").remove();
|
|
|
- // }
|
|
|
- // });
|
|
|
- //}
|
|
|
-
|
|
|
+
|
|
|
// 검색기간 설정 체크
|
|
|
var fnCheckPeriod = function(param) {
|
|
|
let stDate = $('#stDate').val();
|
|
|
@@ -378,10 +320,16 @@
|
|
|
mcxDialog.alert('조회기간은 최대 1년을 넘을 수 없습니다.');
|
|
|
if (id == 'stDate') {
|
|
|
sdt.setFullYear(sdt.getFullYear() + 1);
|
|
|
- $('#edDate').val(sdt.getFullYear() + '-' + ('0' + (sdt.getMonth() + 1)).slice(-2) + '-' + ('0' + (sdt.getDate())).slice(-2));
|
|
|
+ let chgEdDate = sdt.getFullYear() + '-' + ('0' + (sdt.getMonth() + 1)).slice(-2) + '-' + ('0' + (sdt.getDate())).slice(-2);
|
|
|
+
|
|
|
+ $('#edDate').val(chgEdDate);
|
|
|
+ $('#searchForm input[name=edDate]').val(chgEdDate);
|
|
|
} else {
|
|
|
edt.setFullYear(edt.getFullYear() - 1);
|
|
|
- $('#stDate').val(edt.getFullYear() + '-' + ('0' + (edt.getMonth() + 1)).slice(-2) + '-' + ('0' + (edt.getDate())).slice(-2));
|
|
|
+ let chgStDate = edt.getFullYear() + '-' + ('0' + (edt.getMonth() + 1)).slice(-2) + '-' + ('0' + (edt.getDate())).slice(-2);
|
|
|
+
|
|
|
+ $('#stDate').val(chgStDate);
|
|
|
+ $('#searchForm input[name=stDate]').val(chgStDate);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -442,11 +390,9 @@
|
|
|
}
|
|
|
|
|
|
// 주문상세상태코드 셀렉트박스 변경 이벤트
|
|
|
- var fnChangeOrdDtlStat = function(param) {
|
|
|
- console.log('before >>> ' + $('input[name=ordDtlStat]').val())
|
|
|
- $(param).parent().parent().find('input[name=ordDtlStat]').val($(param).val());
|
|
|
- console.log('after >>> ' + $('input[name=ordDtlStat]').val())
|
|
|
- }
|
|
|
+ $('.select_custom.order_status').find('li').on('click', function() {
|
|
|
+ $('#searchForm input[name=ordDtlStat]').val($(this).attr('code'));
|
|
|
+ });
|
|
|
|
|
|
// 배송조회 버튼 클릭 이벤트
|
|
|
var fnGoToDelivery = function(param) {
|
|
|
@@ -454,205 +400,217 @@
|
|
|
// 배송조회 페이지 이동
|
|
|
}
|
|
|
|
|
|
- // 페이징 처리
|
|
|
- var fnPaging = function(pageNo, totalPageNo) {
|
|
|
- let startNo = ((pageNo / 10) * 10) + 1;
|
|
|
- let tag = '';
|
|
|
-
|
|
|
- if ((pageNo / 10) > 0 && pageNo != 10) {
|
|
|
- tag += '<li className="disabled"><a href="#">«</a></li>';
|
|
|
- }
|
|
|
-
|
|
|
- if ((pageNo > 1)) {
|
|
|
- tag += '<li className="prev disabled"><a href="#">‹</a></li>';
|
|
|
- }
|
|
|
-
|
|
|
- /*<li><a href="#">1</a></li>
|
|
|
- <li className="active"><a href="#">2</a></li>
|
|
|
- <li><a href="#">3</a></li>
|
|
|
- <li><a href="#">4</a></li>
|
|
|
- <li><a href="#">5</a></li>
|
|
|
- <li><a href="#">6</a></li>
|
|
|
- <li><a href="#">7</a></li>
|
|
|
- <li><a href="#">8</a></li>
|
|
|
- <li><a href="#">9</a></li>
|
|
|
- <li><a href="#">10</a></li>
|
|
|
- <li className="next"><a href="#">›</a></li>
|
|
|
- <li><a href="#">»</a></li>*/
|
|
|
- }
|
|
|
-
|
|
|
// 주문내역 리스트 처리
|
|
|
var fnCreateOrderList = function(param) {
|
|
|
let tag = '';
|
|
|
let imageUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
- $.each(param.orderList, function(idx, order) {
|
|
|
- tag += '<div class="part_goods">\n';
|
|
|
- tag += ' <div class="goods_head">\n';
|
|
|
- if (order.giftPackYn == 'Y') {
|
|
|
- tag += ' <p>주문일 <span>' + order.ordDt + '</span></p>\n';
|
|
|
- } else {
|
|
|
- tag += ' <p>선물일 <span>' + order.ordDt + '</span></p>\n';
|
|
|
- }
|
|
|
- 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">\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>\n';
|
|
|
- } else if (ordDtl.selfGoodsYn == 'Y') {
|
|
|
- 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';
|
|
|
- }
|
|
|
+ if (param.orderList != null && param.orderList.length > 0) {
|
|
|
+ $.each(param.orderList, function (idx, order) {
|
|
|
+ tag += '<div class="part_goods">\n';
|
|
|
+ tag += ' <div class="goods_head">\n';
|
|
|
+ if (order.giftPackYn == 'Y') {
|
|
|
+ tag += ' <p>선물일 <span>' + order.ordDt + '</span></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';
|
|
|
+ tag += ' <p>주문일 <span>' + order.ordDt + '</span></p>\n';
|
|
|
+ }
|
|
|
+ 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(order.ordDtlList, function (index, ordDtl) {
|
|
|
+ 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>\n';
|
|
|
+ } else if (ordDtl.selfGoodsYn == 'Y') {
|
|
|
+ tag += ' <span class="tag">STYLE24 일반배송</span>\n';
|
|
|
+ } else {
|
|
|
+ tag += ' <span class="tag">업체직배송</span>\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';
|
|
|
+ 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" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" onClick="fnReSendSms(this);"><span>SMS 재발송</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';
|
|
|
- }
|
|
|
+ // 리뷰 쓰기 버튼
|
|
|
+ if (!gagajf.isNull(ordDtl.recipBaseAddr) && ordDtl.ordDtlStat != 'G013_98' && ordDtl.ordDtlStat != 'G013_99' && 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';
|
|
|
+ }
|
|
|
+ } 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" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateChange(this, \'cancel\');"><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 (ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ // 교환/반품 가능한 상품
|
|
|
+ if (ordDtl.changeableYn == 'Y' && ordDtl.returnableYn == 'Y') {
|
|
|
+ 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';
|
|
|
+ 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';
|
|
|
+ }
|
|
|
+ // 교환 신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'N' && ordDtl.returnableYn == 'Y') {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" onclick="cfnGoToPage(_PAGE_ONETOONE_QNA);"><span>1:1 문의</span></button></p>\n';
|
|
|
+ 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';
|
|
|
+ }
|
|
|
+ // 반품 신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'Y' && ordDtl.returnableYn == 'N') {
|
|
|
+ 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';
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" onclick="cfnGoToPage(_PAGE_ONETOONE_QNA);"><span>1:1 문의</span></button></p>\n';
|
|
|
+ }
|
|
|
+ // 교환/반품 신청 불가 상품
|
|
|
+ else {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" onclick="cfnGoToPage(_PAGE_ONETOONE_QNA);"><span>1:1 문의</span></button></p>\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_50' || ordDtl.ordDtlStat == 'G013_55') {
|
|
|
+ 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_98' && ordDtl.ordDtlStat == 'G013_99') {
|
|
|
- tag += ' <div class="order_text"><p>주소 입력 기한이 경과되어 선물이 취소 되었습니다.</p></div>\n';
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 주문 접수
|
|
|
- if (ordDtl.ordDtlStat == 'G013_10') {
|
|
|
- tag += ' <div class="order_text"><p>주문이 완료되어 결제를 기다리고 있습니다.</p></div>\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_30' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
- tag += ' <div class="order_text"><p>상품 준비가 완료되어 곧 배송될 예정입니다.</p></div>\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_30' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
- // tag += ' <div class="order_text"><p>상품 준비가 완료되어 곧 배송될 예정입니다.</p></div>\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';
|
|
|
+ }
|
|
|
|
|
|
- // 배송완료
|
|
|
- if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
- tag += ' <div class="order_text"><p>15일 후 자동으로 구매확정됩니다.</p></div>\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 {
|
|
|
+ // 주문 접수
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_10') {
|
|
|
+ tag += ' <div class="order_text"><p>주문이 완료되어 결제를 기다리고 있습니다.</p></div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상품준비중
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_30' || ordDtl.ordDtlStat == 'G013_40') {
|
|
|
+ // 예약 상품 준비중
|
|
|
+ if (!gagajf.isNull(ordDtl.delvResDt)) {
|
|
|
+ tag += ' <div class="order_text"><p>예약판매 상품으로' + ordDtl.delvResDt + ' 출고 예정입니다.</p></div>\n';
|
|
|
+ }
|
|
|
+ // 상품 준비중
|
|
|
+ else {
|
|
|
+ tag += ' <div class="order_text"><p>상품 준비가 완료되어 곧 배송될 예정입니다.</p></div>\n';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송중, 배송완료
|
|
|
+ if ((ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60') && (ordDtl.changeableYn == 'N' || ordDtl.returnableYn == 'N')) {
|
|
|
+ // 교환신청 불가 상품
|
|
|
+ tag += ' <div class="order_text">\n';
|
|
|
+ if (ordDtl.changeableYn == 'N' && ordDtl.returnableYn == 'Y') {
|
|
|
+ tag += ' <p>해당 상품은 교환이 불가능한 상품입니다. 문의사항은 1:1문의를 이용해주세요.</p>\n';
|
|
|
+ }
|
|
|
+ // 반품신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'Y' && ordDtl.returnableYn == 'N') {
|
|
|
+ tag += ' <p>해당 상품은 반품이 불가능한 상품입니다. 문의사항은 1:1문의를 이용해주세요.</p>\n';
|
|
|
+ }
|
|
|
+ // 교환/반품신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'N' && ordDtl.returnableYn == 'N') {
|
|
|
+ tag += ' <p>해당 상품은 교환/반품이 불가능한 상품입니다. 문의사항은 1:1문의를 이용해주세요.</p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송완료
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <p>15일 후 자동으로 구매확정됩니다.</p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ tag += ' </div>';
|
|
|
+ }
|
|
|
|
|
|
- // 구매확정
|
|
|
- if (ordDtl.ordDtlStat == 'G013_70' && ordDtl.reviewableYn == 'Y' && ordDtl.reviewSq == null) {
|
|
|
- tag += ' <div class="order_text"><p>리뷰를 작성하면 다른 구매자에게 도움이 될 수 있습니다.</p></div>\n';
|
|
|
+ // 구매확정
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_70' && ordDtl.reviewableYn == 'Y' && ordDtl.reviewSq == null) {
|
|
|
+ tag += ' <div class="order_text"><p>리뷰를 작성하면 다른 구매자에게 도움이 될 수 있습니다.</p></div>\n';
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- tag += ' </div>';
|
|
|
- tag += ' </div>';
|
|
|
- tag += '</div>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += '</div>';
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ // 데이터 없음 표시
|
|
|
+ }
|
|
|
|
|
|
return tag;
|
|
|
}
|