|
|
@@ -0,0 +1,565 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org"
|
|
|
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
+ layout:decorator="web/common/layout/MypageLayoutWeb">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : NoMemberOrderListFormWeb.html
|
|
|
+ * @desc : 비회원 > 주문확인/배송조회 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2021 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2021.04.27 card007 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+<body>
|
|
|
+
|
|
|
+<th:block layout:fragment="content">
|
|
|
+ <div class="content myOrderList">
|
|
|
+ <div class="cont_body">
|
|
|
+ <!-- CONT-BODY -->
|
|
|
+ <div class="lnb">
|
|
|
+ <div class="lnb_tit">
|
|
|
+ <h2>마이페이지</h2>
|
|
|
+ </div>
|
|
|
+ <div class="lnb_list">
|
|
|
+ <ul id="mypageLnbList"></ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="cont">
|
|
|
+ <div class="sec_head">
|
|
|
+ <div class="my_order_progress">
|
|
|
+ <div class="progress">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">주문접수</p>
|
|
|
+ <p class="count"><span id="orderReceiptCount" th:text="${orderCount.depositWaitingCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">결제완료</p>
|
|
|
+ <p class="count"><span id="paymentCompleteCount" th:text="${orderCount.paymentCompleteCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">상품 준비 중</p>
|
|
|
+ <p class="count"><span id="goodsPrepareCount" th:text="${orderCount.goodsPrepareCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">배송 준비 중</p>
|
|
|
+ <p class="count"><span id="shipPrepareCount" th:text="${orderCount.shipPrepareCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">배송 중</p>
|
|
|
+ <p class="count"><span id="shippingCount" th:text="${orderCount.shippingCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div>
|
|
|
+ <p class="txt">배송 완료</p>
|
|
|
+ <p class="count"><span id="shipCompleteCount" th:text="${orderCount.shipCompleteCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="invalid">
|
|
|
+ <p class="txt">취소/교환/반품</p>
|
|
|
+ <p class="count"><span id="orderCreCount" th:text="${orderCount.cancelCount + orderCount.returnCount + orderCount.exchangeCount + orderCount.confirmCount}">0</span></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sec_body">
|
|
|
+ <h3 class="subH2 mb40">주문확인/배송조회</h3>
|
|
|
+ <!-- 주문조회 검색 -->
|
|
|
+ <div class="area_filter">
|
|
|
+ <div class="select_month_box">
|
|
|
+ <div class="form_field">
|
|
|
+ <div>
|
|
|
+ <input type="radio" name="rdi-month" id="rdi-month1" onclick="fnSetSearchPeriod(1);">
|
|
|
+ <label for="rdi-month1"><span>최근 1개월</span></label>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input type="radio" name="rdi-month" id="rdi-month2" onclick="fnSetSearchPeriod(3);">
|
|
|
+ <label for="rdi-month2"><span>최근 3개월</span></label>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input type="radio" name="rdi-month" id="rdi-month3" onclick="fnSetSearchPeriod(6);">
|
|
|
+ <label for="rdi-month3"><span>최근 6개월</span></label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="select_period_box">
|
|
|
+ <form class="form_wrap">
|
|
|
+ <div class="form_field">
|
|
|
+ <label class="input_label sr-only">선택기간 시작</label>
|
|
|
+ <div class="input_wrap">
|
|
|
+ <input type="text" class="form_control period_datepicker" value="" id="stDate" onchange="fnCheckPeriod(this);">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form_field">
|
|
|
+ <label class="input_label sr-only">선택기간 끝</label>
|
|
|
+ <div class="input_wrap">
|
|
|
+ <input type="text" class="form_control n_input period_datepicker" value="" id="edDate" onchange="fnCheckPeriod(this);">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <button type="button" class="btn btn_dark btn_sm" onclick="fnSearchOrderList();"><span>조회</span></button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="select_status_box">
|
|
|
+ <form class="form_wrap">
|
|
|
+ <div class="form_field">
|
|
|
+ <div class="select_custom order_status">
|
|
|
+ <div class="combo">
|
|
|
+ <div class="select">전체상태</div>
|
|
|
+ <ul class="list">
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- //주문조회 검색 -->
|
|
|
+ <div class="area_list" id="orderList"></div>
|
|
|
+ <div class="sec_foot">
|
|
|
+ <div class="ui_row">
|
|
|
+ <ul class="pageNav" id="paging">
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form id="searchForm" name="searchForm" th:action="@{'/mypage/order/list'}" th:method="post">
|
|
|
+ <input type="hidden" name="ordNo" th:value="${ordNo}" />
|
|
|
+ <input type="hidden" name="ordNm" th:value="${ordNm}" />
|
|
|
+ <input type="hidden" name="ordPhnno" th:value="${ordPhnno}" />
|
|
|
+ <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="" />
|
|
|
+ </form>
|
|
|
+ <form id="exchangeForm" name="exchangeForm" action="#" th:action="@{'/mypage/exchange/form'}" th:method="post">
|
|
|
+ <input type="hidden" name="ordNo" th:value="${ordNo}" />
|
|
|
+ <input type="hidden" name="ordNm" th:value="${ordNm}" />
|
|
|
+ <input type="hidden" name="ordPhnno" th:value="${ordPhnno}" />
|
|
|
+ <input type="hidden" name="ordNo"/>
|
|
|
+ <input type="hidden" name="ordDtlNo"/>
|
|
|
+ <input type="hidden" name="delvFeeCd"/>
|
|
|
+ </form>
|
|
|
+ <form id="returnForm" name="returnForm" action="#" th:action="@{'/mypage/return/form'}" th:method="post">
|
|
|
+ <input type="hidden" name="ordNo" th:value="${ordNo}" />
|
|
|
+ <input type="hidden" name="ordNm" th:value="${ordNm}" />
|
|
|
+ <input type="hidden" name="ordPhnno" th:value="${ordPhnno}" />
|
|
|
+ <input type="hidden" name="ordNo"/>
|
|
|
+ <input type="hidden" name="ordDtlNo"/>
|
|
|
+ <input type="hidden" name="delvFeeCd"/>
|
|
|
+ </form>
|
|
|
+ <form id="cancelForm" name="cancelForm" th:action="@{'/mypage/cancel/form'}" th:method="post">
|
|
|
+ <input type="hidden" name="ordNo" th:value="${ordNo}" />
|
|
|
+ <input type="hidden" name="ordNm" th:value="${ordNm}" />
|
|
|
+ <input type="hidden" name="ordPhnno" th:value="${ordPhnno}" />
|
|
|
+ <input type="hidden" name="ordNo"/>
|
|
|
+ <input type="hidden" name="ordDtlNo"/>
|
|
|
+ <input type="hidden" name="delvFeeCd"/>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <!-- // CONT-BODY -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+<script src="/ux/plugins/gaga/gaga.paging.js"></script>
|
|
|
+<script th:inline="javascript">
|
|
|
+ let ordNo = [[${ordNo}]];
|
|
|
+ let totalCount = 0;
|
|
|
+ let pageSize = 0;
|
|
|
+/*<![CDATA[*/
|
|
|
+ $(document).ready(function() {
|
|
|
+ // 비회원 LNB 설정
|
|
|
+ fnSetNoMemberLnbList(1);
|
|
|
+
|
|
|
+ // 비회원 location 설정
|
|
|
+ fnSetMypageLocation('주문확인/배송조회');
|
|
|
+
|
|
|
+ // datepicker 설정
|
|
|
+ $('.period_datepicker').datepicker();
|
|
|
+
|
|
|
+ // 셀렉트박스 활성화
|
|
|
+ $('.select_custom.order_status').each(function(index) {
|
|
|
+ new sCombo($(this));
|
|
|
+ });
|
|
|
+
|
|
|
+ // 주문 검색 기간 설정
|
|
|
+ $('#rdi-month2').click();
|
|
|
+
|
|
|
+ // Initialize a pagination
|
|
|
+ gagaPaging.init('searchForm', fnSearchCallback, 'paging', 5, 10);
|
|
|
+
|
|
|
+ // Load data
|
|
|
+ gagaPaging.load(1);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 검색기간 버튼 클릭 이벤트 처리
|
|
|
+ var fnSetSearchPeriod = function(period) {
|
|
|
+ let date = new Date();
|
|
|
+ let edDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
|
|
|
+ date.setMonth(date.getMonth() - period);
|
|
|
+ let stDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + (date.getDate())).slice(-2);
|
|
|
+
|
|
|
+ $('#edDate').val(edDate);
|
|
|
+ $('#searchForm input[name=edDate]').val(edDate);
|
|
|
+ $('#stDate').val(stDate);
|
|
|
+ $('#searchForm input[name=stDate]').val(stDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문 목록 조회
|
|
|
+ var fnSearchOrderList = function() {
|
|
|
+ gagaPaging.load(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문 목록 조회 콜백
|
|
|
+ var fnSearchCallback = function(result) {
|
|
|
+ $('#orderList').html(fnCreateOrderList(result));
|
|
|
+
|
|
|
+ // Create pagination
|
|
|
+ gagaPaging.createPagination(result.orderInfo.pageable);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 검색기간 설정 체크
|
|
|
+ var fnCheckPeriod = function(param) {
|
|
|
+ let id = $(param).attr('id');
|
|
|
+ let stDate = $('#stDate').val();
|
|
|
+ let edDate = $('#edDate').val();
|
|
|
+ let chgDate;
|
|
|
+
|
|
|
+ $('#searchForm input[name=stDate]').val(stDate);
|
|
|
+ $('#searchForm input[name=edDate]').val(edDate);
|
|
|
+
|
|
|
+ let sdt = new Date(stDate);
|
|
|
+ let edt = new Date(edDate);
|
|
|
+ let today = new Date();
|
|
|
+
|
|
|
+ // 검색기간 버튼 처리
|
|
|
+ $.each($('.select_month_box input:radio'), function(idx, item) {
|
|
|
+ if ($(item).is(':checked')) {
|
|
|
+ $(item).prop('checked', false);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 오늘 이후 날짜 선택 처리
|
|
|
+ chgDate = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + (today.getDate())).slice(-2);
|
|
|
+ if (id == 'stDate' && Math.ceil((sdt.getTime() - today.getTime()) / (1000 * 3600 * 24)) > 0) {
|
|
|
+ mcxDialog.alert('조회기간을 확인해주세요.');
|
|
|
+ $('#stDate').val(chgDate);
|
|
|
+ $('#searchForm input[name=stDate]').val(chgDate);
|
|
|
+
|
|
|
+ return false;
|
|
|
+ } else if (id == 'edDate' && Math.ceil((edt.getTime() - today.getTime()) / (1000 * 3600 * 24)) > 0) {
|
|
|
+ mcxDialog.alert('조회기간을 확인해주세요.');
|
|
|
+ $('#edDate').val(chgDate);
|
|
|
+ $('#searchForm input[name=edDate]').val(chgDate);
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 시작 종료일자 확인
|
|
|
+ if (sdt > edt) {
|
|
|
+ mcxDialog.alert('조회기간을 확인해주세요.');
|
|
|
+
|
|
|
+ if (id == 'stDate') {
|
|
|
+ chgDate = sdt.getFullYear() + '-' + ('0' + (sdt.getMonth() + 1)).slice(-2) + '-' + ('0' + (sdt.getDate())).slice(-2);
|
|
|
+ } else {
|
|
|
+ chgDate = edt.getFullYear() + '-' + ('0' + (edt.getMonth() + 1)).slice(-2) + '-' + ('0' + (edt.getDate())).slice(-2);
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#stDate').val(chgDate);
|
|
|
+ $('#edDate').val(chgDate);
|
|
|
+ $('#searchForm input[name=stDate]').val(chgDate);
|
|
|
+ $('#searchForm input[name=edDate]').val(chgDate);
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 기간 1년 확인
|
|
|
+ let dateDiff = Math.ceil((edt.getTime() - sdt.getTime()) / (1000 * 3600 * 24));
|
|
|
+
|
|
|
+ if (dateDiff > 366) {
|
|
|
+ mcxDialog.alert('조회기간은 최대 1년을 넘을 수 없습니다.');
|
|
|
+ if (id == 'stDate') {
|
|
|
+ sdt.setFullYear(sdt.getFullYear() + 1);
|
|
|
+ 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);
|
|
|
+ let chgStDate = edt.getFullYear() + '-' + ('0' + (edt.getMonth() + 1)).slice(-2) + '-' + ('0' + (edt.getDate())).slice(-2);
|
|
|
+
|
|
|
+ $('#stDate').val(chgStDate);
|
|
|
+ $('#searchForm input[name=stDate]').val(chgStDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상태값 별 수량 업데이트 처리
|
|
|
+ var fnReloadStatusCount = function() {
|
|
|
+ let url = '/mypage/status/count';
|
|
|
+
|
|
|
+ let data = {};
|
|
|
+
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
|
|
|
+ $('#orderReceiptCount').text(result.orderCount.orderReceiptCount);
|
|
|
+ $('#paymentCompleteCount').text(result.orderCount.paymentCompleteCount);
|
|
|
+ $('#goodsPrepareCount').text(result.orderCount.goodsPrepareCount);
|
|
|
+ $('#shipPrepareCount').text(result.orderCount.shipPrepareCount);
|
|
|
+ $('#shippingCount').text(result.orderCount.shippingCount);
|
|
|
+ $('#shipCompleteCount').text(result.orderCount.shipCompleteCount);
|
|
|
+ $('#orderCreCount').text(result.orderCount.cancelCount + result.orderCount.returnCount + result.orderCount.exchangeCount);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문상세상태코드 셀렉트박스 변경 이벤트
|
|
|
+ $('.select_custom.order_status').find('li').on('click', function() {
|
|
|
+ $('#searchForm input[name=ordDtlStat]').val($(this).attr('code'));
|
|
|
+ });
|
|
|
+
|
|
|
+ // 배송조회 버튼 클릭 이벤트
|
|
|
+ var fnGoToDelivery = function(param) {
|
|
|
+ // TODO
|
|
|
+ // 배송조회 페이지 이동
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문내역 리스트 처리
|
|
|
+ var fnCreateOrderList = function(param) {
|
|
|
+ let tag = '';
|
|
|
+ let imageUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
+
|
|
|
+ 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';
|
|
|
+ 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="javascript:void(0)" goodsCd="' + ordDtl.goodsCd + '" onclick="fnGoToGoodsDetail(this)">\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';
|
|
|
+ // 세트아이템 옵션 처리
|
|
|
+ if (ordDtl.goodsType == 'G056_S') {
|
|
|
+ $.each(ordDtl.colorNmArr, function (index2, option) {
|
|
|
+ tag += ' <span class="option">' + ordDtl.itemNmArr[index2] + ' / ' + option + ' / ' + ordDtl.optCd2Arr[index2] + '</span>\n';
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ tag += ' <span class="option">' + ordDtl.colorNm + ' / ' + 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 - ordDtl.cnclRtnQty) + '</em>개</span>\n';
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' <p>\n';
|
|
|
+ if ((ordDtl.ordAmt - ordDtl.cnclRtnAmt - ordDtl.cpn1DcAmt) > (ordDtl.realOrdAmt + ordDtl.pntDcAmt + ordDtl.gfcdUseAmt)) {
|
|
|
+ tag += ' <span class="price_org"><em>' + (ordDtl.ordAmt - ordDtl.cnclRtnAmt - ordDtl.cpn1DcAmt).addComma() + '</em>원</span>\n';
|
|
|
+ }
|
|
|
+ tag += ' <span class="price_sale"><em>' + (ordDtl.realOrdAmt + ordDtl.pntDcAmt + ordDtl.gfcdUseAmt).addComma() + '</em>원</span>\n';
|
|
|
+ tag += ' </p>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="status_box">\n';
|
|
|
+ tag += ' <p>' + ordDtl.ordDtlStatNm + '</p>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' <div class="button_box">\n';
|
|
|
+
|
|
|
+ // 버튼 처리
|
|
|
+ // 주문취소 버튼(입금대기, 결제완료, 상품준비중, 출고처지정, 배송준비중)
|
|
|
+ if (ordDtl.payStat != 'G016_00' && (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 + '" ordCanChgQty="' + ordDtl.ordCanChgQty + '" delvFeeCd="' + ordDtl.delvFeeCd + '" onclick="fnCreateChange(this, \'cancel\');"><span>주문 취소</span></button></p>\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 + '" delvFeeCd="' + ordDtl.delvFeeCd + '" ordCanChgQty="' + ordDtl.ordCanChgQty + '" 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 + '" delvFeeCd="' + ordDtl.delvFeeCd + '" ordCanChgQty="' + ordDtl.ordCanChgQty + '" 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" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" delvFeeCd="' + ordDtl.delvFeeCd + '" ordCanChgQty="' + ordDtl.ordCanChgQty + '" 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 + '" delvFeeCd="' + ordDtl.delvFeeCd + '" ordCanChgQty="' + ordDtl.ordCanChgQty + '" onclick="fnCreateChange(this, \'exchange\');"><span>교환 신청</span></button></p>\n';
|
|
|
+ }
|
|
|
+ // 교환/반품 신청 불가 상품
|
|
|
+ else {
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송조회 버튼(배송중)
|
|
|
+ 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_70') {
|
|
|
+ tag += ' <p><button type="button" class="btn btn_default btn_sm" ordNo="' + ordDtl.ordNo + '" ordDtlNo="' + ordDtl.ordDtlNo + '" onclick="fnCreateCart(this);"><span>쇼핑백 담기</span></button></p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ tag += ' </div>\n';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ // 하단 상태값 배너 처리
|
|
|
+ // 주문 접수
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_10') {
|
|
|
+ tag += ' <div class="order_text">';
|
|
|
+ tag += ' <p>주문이 완료되어 결제를 기다리고 있습니다.</p>';
|
|
|
+ // 예약상품
|
|
|
+ if (!gagajf.isNull(ordDtl.delvResDt)) {
|
|
|
+ tag += ' <p>예약판매 상품으로' + ordDtl.delvResDt + ' 출고 예정입니다.</p>';
|
|
|
+ }
|
|
|
+ tag += ' </div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 결제완료
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_20' && !gagajf.isNull(ordDtl.delvResDt)) {
|
|
|
+ tag += ' <div class="order_text">';
|
|
|
+ tag += ' <p>예약판매 상품으로' + ordDtl.delvResDt + ' 출고 예정입니다.</p>';
|
|
|
+ tag += ' </div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상품준비중
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_30') {
|
|
|
+ tag += ' <div class="order_text">';
|
|
|
+ tag += ' <p>배송할 상품을 준비 중입니다.</p>';
|
|
|
+ // 예약상품
|
|
|
+ if (!gagajf.isNull(ordDtl.delvResDt)) {
|
|
|
+ tag += ' <p>예약판매 상품으로' + ordDtl.delvResDt + ' 출고 예정입니다.</p>';
|
|
|
+ }
|
|
|
+ tag += ' </div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송준비중
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_40') {
|
|
|
+ tag += ' <div class="order_text">';
|
|
|
+ tag += ' <p>상품 준비가 완료되어 곧 배송될 예정입니다.</p>';
|
|
|
+ // 예약상품
|
|
|
+ if (!gagajf.isNull(ordDtl.delvResDt)) {
|
|
|
+ tag += ' <p>예약판매 상품으로' + ordDtl.delvResDt + ' 출고 예정입니다.</p>';
|
|
|
+ }
|
|
|
+ tag += ' </div>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송중, 배송완료
|
|
|
+ if ((ordDtl.ordDtlStat == 'G013_50' || ordDtl.ordDtlStat == 'G013_55' || ordDtl.ordDtlStat == 'G013_60')) {
|
|
|
+ // 교환/반품 신청 불가 상품 처리
|
|
|
+ if (ordDtl.changeableYn == 'N' || ordDtl.returnableYn == 'N') {
|
|
|
+ // 교환신청 불가 상품
|
|
|
+ tag += ' <div class="order_text">\n';
|
|
|
+ if (ordDtl.changeableYn == 'N' && ordDtl.returnableYn == 'Y') {
|
|
|
+ tag += ' <p>해당 상품은 교환이 불가능한 상품입니다.</p>\n';
|
|
|
+ }
|
|
|
+ // 반품신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'Y' && ordDtl.returnableYn == 'N') {
|
|
|
+ tag += ' <p>해당 상품은 반품이 불가능한 상품입니다.</p>\n';
|
|
|
+ }
|
|
|
+ // 교환/반품신청 불가 상품
|
|
|
+ else if (ordDtl.changeableYn == 'N' && ordDtl.returnableYn == 'N') {
|
|
|
+ tag += ' <p>해당 상품은 교환/반품이 불가능한 상품입니다.</p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송완료
|
|
|
+ if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <p>15일 후 자동으로 구매확정됩니다.</p>\n';
|
|
|
+ }
|
|
|
+
|
|
|
+ tag += ' </div>';
|
|
|
+ } else if (ordDtl.ordDtlStat == 'G013_60') {
|
|
|
+ tag += ' <div class="order_text"><p>15일 후 자동으로 구매확정됩니다.</p></div>\n';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tag += ' </div>';
|
|
|
+ });
|
|
|
+ tag += ' </div>';
|
|
|
+ //사은품 처리
|
|
|
+ if (order.freeGiftList != null && order.freeGiftList.length > 0) {
|
|
|
+ tag += ' <div class="goods_foot">';
|
|
|
+ tag += ' <div class="order_gift">';
|
|
|
+ tag += ' <span class="title">사은품</span>';
|
|
|
+ tag += ' <ul>';
|
|
|
+ $.each(order.freeGiftList, function(index, freeGift) {
|
|
|
+ // 2021.04.20 무료 사은품일때 - 처리 삭제
|
|
|
+ if (freeGift.usePoint > 0) {
|
|
|
+ tag += ' <li>' + freeGift.goodsNm + ' ' + '<span>(-' + freeGift.usePoint.addComma() + 'P)</span></li>';
|
|
|
+ } else {
|
|
|
+ tag += ' <li>' + freeGift.goodsNm + ' ' + '<span></li>';
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ tag += ' </ul>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' </div>';
|
|
|
+ }
|
|
|
+ tag += ' </div>';
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 데이터 없음 표시
|
|
|
+ tag += ' <div class="nodata">';
|
|
|
+ tag += ' <div class="txt_box">';
|
|
|
+ tag += ' <p>';
|
|
|
+ tag += ' 주문내역이 없습니다.<br>';
|
|
|
+ tag += ' </p>';
|
|
|
+ tag += ' </div>';
|
|
|
+ tag += ' </div>';
|
|
|
+ }
|
|
|
+ return tag;
|
|
|
+ }
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+</th:block>
|
|
|
+
|
|
|
+</body>
|
|
|
+</html>
|