<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="mob/common/layout/NoMemberLayoutMob">
<!--
 *******************************************************************************
 * @source  : NoMemberOrderDetailFormMob.html
 * @desc    : 비회원 > 주문상세 Page
 *============================================================================
 * STYLE24
 * Copyright(C) 2021 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.05.16   card007     최초 작성
 *******************************************************************************
 -->
<body>

<th:block layout:fragment="content">
<main role="" id="mypageOrderDetailForm" class="container my">
	<section class="content my_order">
		<div class="inner wide bg_beige">
			<div class="order_number">
				<dl class="clear">
					<dt>주문번호</dt>
					<dd  th:text="${ordNo}"></dd>
				</dl>
				<a href="javascript:void(0);" class="delete" onclick="fnDeleteOrder('noMember')">주문 내역 삭제</a>
			</div>
		</div>
		<div class="inner">
			<th:block th:if="${orderList}" th:each="order, status : ${orderList}">
				<div class="part_goods">
					<div class="goods_top">
						<div class="goods_date">주문일<span class="date" th:text="${order.ordDt}"></span></div>
						<th:block th:if="${order.allCanYn == 'Y' and order.ordReqChgQty == 0}">
							<!-- 2021.09.01 card007 AS-IS Data 취소처리 못하게 처리 -->
							<!-- 2021.09.13 card007 AS-IS Data 취소처리 -->
<!--							<th:block th:if="${#numbers.formatInteger(#strings.replace(order.ordDt, '.', ''), 1)} >= 20210901">-->
							<a href="javascript:void(0);" id="btn_all_delete" class="delete_btn" onclick="fnAllCancel();">주문 전체 취소</a> <!-- 210409_추가 : btn_all_delete id 추가 -->
<!--							</th:block>-->
						</th:block>
						<th:block th:if="${allDecideYn == 'Y' and order.ordReqChgQty == 0}">
							<a href="javascript:void(0)" id="btn_all_confirm" class="purchase_btn" th:attr="ordNo=${ordNo}" onclick="fnAllDecideOrder(this);">전체구매확정</a></li>
						</th:block>
						<!--<a href="javascript:;" id="btn_all_confirm" class="purchase_btn">전체 구매 확정</a> 전체 구매확정 버튼. --> <!-- 210409_추가 : btn_all_confirm id 추가 -->
					</div>
					
					<th:block th:if="${order.ordDtlList}" th:each="ordDtl, status : ${order.ordDtlList}" th:with="imageUrl=${@environment.getProperty('upload.goods.view')}">
						<div class="goods_section">
							<div class="goods_status">
								<th:block th:unless="${order.giftPackYn == 'Y'}">
									<p class="dlvr_staus" th:if="${ordDtl.ordDtlStat == 'G013_10'}">주문접수</p>
									<p class="dlvr_staus" th:if="${ordDtl.ordDtlStat == 'G013_35'}">상품준비중</p>
									<p class="dlvr_staus" th:unless="${ordDtl.ordDtlStat == 'G013_10' or ordDtl.ordDtlStat == 'G013_35'}" th:text="${ordDtl.ordDtlStatNm}"></p>
								</th:block>
							</div>
							<div class="goods_detail">
								<input type="hidden" name="ordDtlNoArr" th:value="${ordDtl.ordDtlNo}"/>
								<input type="hidden" name="cnclRtnReqQtyArr" th:value="${ordDtl.ordQty - ordDtl.cnclRtnQty}"/>
														
								<a href="javascript:void(0)" th:attr="goodsCd=${ordDtl.goodsCd}, optCd1=${ordDtl.goodsType == 'G056_N' ? ordDtl.optCd1 : ''}, ithrCd='IN20_02'" onclick="fnGoToGoodsDetail(this)">
									<div class="thumb_box">
										<img th:src="${imageUrl + '/' + ordDtl.sysImgNm + '?RS=90'}" width="100%" alt="">
									</div>
									<div class="info_box">
										<div class="od_name">
											<div class="brand">
												<span th:text="${ordDtl.brandNm}"></span>
												<div class="badge_wrap">
													<em class="order_badge order_bullet_badge" th:if="${ordDtl.shotDelvYn == 'Y'}">총알배송</em>
													<em class="order_badge" th:if="${ordDtl.shotDelvYn == 'N' and ordDtl.selfGoodsYn == 'Y'}">STYLE24 일반배송</em>
													<em class="order_badge" th:if="${ordDtl.selfGoodsYn == 'N'}">업체직배송</em>
												</div>
											</div>
											<div class="name" th:text="${ordDtl.goodsNm}"></div>
										</div>
										<div class="od_opt">
											<!-- 세트상품 -->
											<th:block th:if="${ordDtl.goodsType == 'G056_S'}">
												<th:block th:each="option, status : ${ordDtl.colorNmArr}">
													<div class="option">
														<em th:text="${option}"></em>
														<em th:text="${ordDtl.optCd2Arr[status.index]}"></em>
													</div>
												</th:block>
											</th:block>
											<!-- //세트상품 -->
											<!-- 일반상품 -->
											<th:block th:unless="${ordDtl.goodsType == 'G056_S'}">
												<th:block th:each="option, status : ${ordDtl.colorNmArr}">
													<div class="option">
														<em th:text="${ordDtl.colorNm}"></em>
														<em th:text="${ordDtl.optCd2}"></em>
													</div>
												</th:block>
											</th:block>
											<!-- //일반상품 -->
										</div>
										<div class="od_calc">
											<p class="sale_price" th:if="${(ordDtl.ordAmt - ordDtl.cnclRtnAmt) > (ordDtl.realOrdAmt + ordDtl.pntDcAmt + ordDtl.gfcdUseAmt)}">
												<del>
													<em th:text="${#numbers.formatInteger(ordDtl.ordAmt - ordDtl.cnclRtnAmt, 1, 'COMMA')}"></em>원
												</del>
											</p>
											<p class="price">
												<span class="selling_price">
													<em th:text="${#numbers.formatInteger(ordDtl.realOrdAmt + ordDtl.pntDcAmt + ordDtl.gfcdUseAmt, 1, 'COMMA')}"></em>원
												</span>
												<span class="count">
													<em th:text="${ordDtl.ordQty - ordDtl.cnclRtnQty}"></em>개
												</span>
											</p>
										</div>
									</div>
								</a>
							</div>
							
							<!-- 주문상태별 버튼기능 정의 -->
							<!-- 일반주문 -->
							<th:block th:unless="${ordDtl.giftPackYn} == 'Y'">
								<!-- 입금대기 (1:1문의, 쇼핑백 담기) -->
								<th:block th:if="${ordDtl.ordDtlStat == 'G013_10'}">
									<div class="goods_btn_wrap btn_group_flex">
										<div><button type="button" class="btn btn_default btn_cart_save" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" onclick="fnCreateCart(this);"><span>쇼핑백 담기</span></button></div>
									</div>
								</th:block>
								<!-- //입금대기 (1:1문의, 쇼핑백 담기) -->

								<!-- 결제완료, 상품준비중, 출고처지정 (주문취소) -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_20' or ${ordDtl.ordDtlStat} == 'G013_30' or ${ordDtl.ordDtlStat} == 'G013_35'">
									<th:block th:if="${ordDtl.ordExchGb == 'O'}">
										<!-- 2021.09.01 card007 AS-IS Data 취소처리 못하게 처리 -->
										<!-- 2021.09.13 card007 AS-IS Data 취소처리 -->
<!--										<th:block th:if="${#numbers.formatInteger(#strings.replace(ordDtl.ordDt, '.', ''), 1)} >= 20210901">-->
										<div class="goods_btn_wrap btn_group_flex">
											<div><button type="button" class="btn btn_default btn_cncl_complete" th:attr="ordNo=${ordDtl.ordNo}, ordDtlNo=${ordDtl.ordDtlNo}, delvFeeCd=${ordDtl.delvFeeCd}, ordCanChgQty=${ordDtl.ordCanChgQty}" onclick="fnCreateChange(this, 'cancel', 'noMember');"><span>주문 취소</span></button></div>
										</div>
<!--										</th:block>-->
									</th:block>
									<th:block th:unless="${ordDtl.ordExchGb == 'O'}">
										<div class="goods_btn_wrap btn_group_flex">
											<div>
												<button type="button" class="btn btn_default btn_cart_save" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" onclick="fnCreateCart(this);">
													<span>쇼핑백 담기</span>
												</button>
											</div>
										</div>
									</th:block>
								</th:block>
								<!-- //결제완료, 상품준비중, 출고처지정 (주문취소) -->
								
								<!-- 배송준비중-->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_40'">
									<div class="goods_btn_wrap btn_group_flex">
										<div>
											<button type="button" class="btn btn_default btn_cart_save" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" onclick="fnCreateCart(this);">
												<span>쇼핑백 담기</span>
											</button>
										</div>
									</div>
								</th:block>
								<!-- //배송준비중-->
								
								<!-- 배송중 (교환가능, 반품가능) -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_50' or ${ordDtl.ordDtlStat} == 'G013_55'">
									<div class="goods_btn_wrap btn_group_flex btn_count">
										<!-- 교환불가 -->
										<th:block th:if="${ordDtl.changeableYn} == 'N' and ${ordDtl.returnableYn} == 'Y'">
										</th:block>
										<!-- //교환불가 -->
										<!-- 교환가능 -->
										<th:block th:if="${ordDtl.changeableYn} == 'Y'">
											<div>
												<button type="button" class="btn btn_default btn_exch_req" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" th:ordCanChgQty="${ordDtl.ordCanChgQty}" th:delvFeeCd="${ordDtl.delvFeeCd}" onclick="fnCreateChange(this, 'exchange');">
													<span>교환 신청</span>
												</button>
											</div>
										</th:block>
										<!-- //교환가능 -->
										<!-- 반품가능 -->
										<th:block th:if="${ordDtl.returnableYn} == 'Y'">
											<div>
												<button type="button" class="btn btn_default btn_rtn_req" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" th:ordCanChgQty="${ordDtl.ordCanChgQty}" th:delvFeeCd="${ordDtl.delvFeeCd}" onclick="fnCreateChange(this, 'return');">
													<span>반품 신청</span>
												</button>
											</div>
										</th:block>
										<!-- 반품가능 -->
										<!-- 반품불가 -->
										<th:block th:if="${ordDtl.changeableYn} == 'Y' and ${ordDtl.returnableYn} == 'N'">
										</th:block>
										<!-- //반품불가 -->

										<!-- 교환불가, 반품불가 -->
										<th:block th:if="${ordDtl.returnableYn} == 'N' and ${ordDtl.changeableYn} == 'N'">
										</th:block>
										<!-- //교환불가, 반품불가 -->

										<div><button type="button" class="btn btn_default btn_delv_sch" th:attr="ordNo=${ordDtl.ordNo}, ordDtlNo=${ordDtl.ordDtlNo}, shipCompCd=${ordDtl.shipCompCd}, invoiceNo=${ordDtl.invoiceNo}" onclick="fnGoToDelivery(this, 'noMember');"><span>배송 조회</span></button></div>
									</div>
								</th:block>
								<!-- //배송중 (교환가능, 반품가능) -->

								<!-- 배송완료 (교환가능, 반품가능) -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_60'">
									<div class="goods_btn_wrap btn_group_flex btn_count">
										<!-- 교환불가 -->
										<th:block th:if="${ordDtl.changeableYn} == 'N' and ${ordDtl.returnableYn} == 'Y'">
										</th:block>
										<!-- //교환불가 -->
										<!-- 교환가능 -->
										<th:block th:if="${ordDtl.changeableYn} == 'Y'">
											<div>
												<button type="button" class="btn btn_default btn_exch_req" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" th:ordCanChgQty="${ordDtl.ordCanChgQty}" th:delvFeeCd="${ordDtl.delvFeeCd}" onclick="fnCreateChange(this, 'exchange');">
													<span>교환 신청</span>
												</button>
											</div>
										</th:block>
										<!-- //교환가능 -->
										<!-- 반품가능 -->
										<th:block th:if="${ordDtl.returnableYn} == 'Y'">
											<div>
												<button type="button" class="btn btn_default btn_rtn_req" th:ordNo="${ordDtl.ordNo}" th:ordDtlNo="${ordDtl.ordDtlNo}" th:ordCanChgQty="${ordDtl.ordCanChgQty}" th:delvFeeCd="${ordDtl.delvFeeCd}" onclick="fnCreateChange(this, 'return');">
													<span>반품 신청</span>
												</button>
											</div>
										</th:block>
										<!-- //반품가능 -->
										<!-- 반품불가 -->
										<th:block th:if="${ordDtl.changeableYn} == 'Y' and ${ordDtl.returnableYn} == 'N'">
										</th:block>
										<!-- //반품불가 -->
										<!-- 교환불가, 반품불가 -->
										<th:block th:if="${ordDtl.returnableYn} == 'N' and ${ordDtl.changeableYn} == 'N'">
										</th:block>
										<!-- //교환불가, 반품불가 -->
									</div>
								</th:block>
								<!-- //배송완료 (교환가능, 반품가능) -->
								
								<!-- 구매확정 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_70'">
									<div class="goods_btn_wrap btn_group_flex">
										<div><button type="button" class="btn btn_default btn_cart_save" th:attr="ordNo=${ordDtl.ordNo}, ordDtlNo=${ordDtl.ordDtlNo}" onclick="fnCreateCart(this);"><span>쇼핑백 담기</span></button></div>
									</div>
								</th:block>
								<!-- //구매확정 -->
							</th:block>
							<!-- //일반주문 -->
							<!-- //주문상태별 버튼기능 정의 -->
							
							<!-- 주문상태별 문구정보 정의 -->
							<th:block th:unless="${ordDtl.giftPackYn} == 'Y'">
								<div class="goods_alert">
									<!-- 배송중, 배송완료 상태 교환, 반품 가능 상태 체크 -->
									<th:block th:if="${ordDtl.ordDtlStat} == 'G013_50' or ${ordDtl.ordDtlStat} == 'G013_55' or ${ordDtl.ordDtlStat} == 'G013_60'">
										<!-- 교환불가능, 반품불가능 -->
										<th:block th:if="${ordDtl.changeableYn} == 'N' and ${ordDtl.returnableYn} == 'N'">
											<p class="cf_txt cf_desc">해당 상품은 교환/반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
										</th:block>
										<!-- //교환불가능, 반품불가능 -->

										<!-- 교환불가능 -->
										<th:block th:if="${ordDtl.changeableYn} == 'N' and ${ordDtl.returnableYn} == 'Y'">
											<p class="cf_txt cf_desc">해당 상품은 교환이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
										</th:block>
										<!-- //교환불가능 -->

										<!-- 반품불가능 -->
										<th:block th:if="${ordDtl.changeableYn} == 'Y' and ${ordDtl.returnableYn} == 'N'">
											<p class="cf_txt cf_desc">해당 상품은 반품이 불가능한 상품입니다.<br>문의사항은 1:1 문의를 이용해 주세요.</p>
										</th:block>
										<!-- //반품불가능 -->

									</th:block>
									<!-- //배송중, 배송완료 상태 -->
								</div>
								
								<!-- 주문접수 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_10'">
									<div class="goods_txt">
										<p class="cf_txt cf_desc">주문 완료 / 결제를 기다리고 있습니다.</p>
										<th:block th:if="${ordDtl.delvResDt} != null">
											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
										</th:block>
									</div>
								</th:block>
								<!-- //주문접수 -->
								
								<!-- 결제완료, 예약배송상품 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_20'">
									<th:block th:if="${ordDtl.delvResDt} != null">
										<div class="goods_txt">
											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
										</div>
									</th:block>
								</th:block>
								<!-- //결제완료, 예약배송상품 -->
								
								<!-- 상품준비중 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_30' or ${ordDtl.ordDtlStat} == 'G013_35'">
									<div class="goods_txt">
										<p class="cf_txt cf_desc">배송할 상품을 준비 중입니다.</p>
										<th:block th:if="${ordDtl.delvResDt} != null">
											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
										</th:block>
									</div>
								</th:block>
								<!-- //상품준비중 -->
								
								<!-- 배송준비중 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_40'">
									<div class="goods_txt">
										<p class="cf_txt cf_desc">상품 준비가 완료되어 곧 배송될 예정입니다.</p>
										<th:block th:if="${ordDtl.delvResDt} != null">
											<p class="cf_txt cf_desc" th:text="|예약판매 상품으로 ${ordDtl.delvResDt} 출고 예정입니다.|"></p>
										</th:block>
									</div>
								</th:block>
								<!-- //배송준비중 -->
								
								<!-- 배송완료 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_60'">
									<div class="goods_txt">
										<p class="cf_txt cf_desc" th:if="${ordDtl.ordReqChgQty == 0}" th:text="|${ordDtl.autoDecideLeftDay}일 후 자동으로 구매확정됩니다.|"></p>
										<p class="cf_txt cf_desc" th:unless="${ordDtl.ordReqChgQty == 0}" th:text="|반품/교환이 진행 중입니다.|"></p>
									</div>
								</th:block>
								<!-- //배송완료 -->
								
								<!-- 구매확정 -->
								<th:block th:if="${ordDtl.ordDtlStat} == 'G013_70'">
									<!-- 리뷰사용가능, 리뷰등록전일때 -->
									<th:block th:if="${ordDtl.reviewableYn} == 'Y' and ${ordDtl.reviewSq} == null">
										<div class="goods_txt">
											<p class="cf_txt cf_desc">리뷰를 작성하면 다른 구매자에게 도움이 될 수 있습니다</p>
										</div>
									</th:block>
									<!-- //리뷰사용가능, 리뷰등록전일때 -->
								</th:block>
								<!-- //구매확정 -->
							</th:block>
							<!-- //주문상태별 문구정보 정의 -->
							
							<!-- 사은품 영역 -->
							<th:block th:if="${#lists.size(order.ordDtlList) == status.count}">
								<th:block th:if="${order.freeGiftList != null and #lists.size(order.freeGiftList) > 0}">
									<div class="goods_gift">
										<div class="gift_wrap">
											<div class="title">사은품</div>
											<div class="li_gift">
												<ul>
													<th:block th:each="freeGift , j : ${order.freeGiftList}">
														<li>
															<span class="gift_name" th:text="${freeGift.goodsNm}"></span> 
															<th:block th:if="${freeGift.usePoint} > 0">
																<span class="deduct_p" th:text="|(-${#numbers.formatInteger(freeGift.usePoint, 1, 'COMMA')}P)|"></span>
															</th:block>
														</li>
													</th:block>
												</ul>
											</div>
										</div>
									</div>
								</th:block>
							</th:block>
							<!-- //사은품 영역 -->
						</div>
					</th:block>
				</div>
				<input type="hidden" name="accountNo" 	th:value="${order.oneData.accountNo}"/>
				<input type="hidden" name="accountNm" 	th:value="${order.oneData.accountNm}"/>
				<input type="hidden" name="bankCd" 		th:value="${order.oneData.bankCd}"/>
				<input type="hidden" name="delvMemo" 	th:value="${deliveryAddrInfo.delvMemo}"/>
			</th:block>
		</div>
		
		<!-- 무통장입금정보 -->
		<th:block th:if="${paymentInfo.payMeans == 'G014_20'}">
			<div class="inner">
				<div class="tbl_wrap">
					<div class="tbl_tit"> 
						<h3>무통장 입금 정보</h3>
					</div>
					<div class="tbl type1">
						<table>
							<colgroup>
								<col width="107">
								<col width="*">
							</colgroup>   
							<tr>
								<th>은행명/명의자</th>
								<td><div><span th:text="${paymentInfo.vaBank}"></span>/<span th:text="|(${paymentInfo.vaNm})|"></span></div></td>
							</tr>
							<tr>
								<th>계좌번호</th>
								<td><div><span th:text="${paymentInfo.vaNo}"></span></div></td>
							</tr>
							<tr>
								<th>입금기한</th>
								<td><div><span th:text="${paymentInfo.vaDeadlineYmd}"></span>&nbsp;<span th:text="${paymentInfo.vaDeadlineHms}"></span> 까지</div></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
		</th:block>
		<!-- //무통장입금정보 -->
		
		<div class="inner wide">
			<!-- 폴딩리스트 -->
			<div class="ui_row">
				<div class="foldGroup customerfold">
					<ul>
						<li>
							<div class="fold_head">
								<a href="javascript:void(0)">
									<div>
										<div class="fold_tit">
											<div class="lap2"><span >주문고객</span></div>
											<span class="fold_txt" th:text="${orderInfo.ordNm}"></span>
										</div>
									</div>
								</a>
							</div>
							<div class="fold_cont">
								<div class="customer_info">
									<dl>
										<div>
											<dt><span class="sr-only">주문자명</span></dt>
											<dd th:text="${orderInfo.ordNm}"></dd>
										</div>
										<div>
											<dt><span class="sr-only">이메일</span></dt>
											<dd th:text="${orderInfo.ordEmail}"></dd>
										</div>
										<div>
											<dt><span class="sr-only">휴대폰 번호</span></dt>
											<dd th:text="${orderInfo.ordPhnno}"></dd>
										</div>
									</dl>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
			<!-- 폴딩리스트 -->
		</div>
		
		<div class="inner wide">
			<!-- 폴딩리스트 -->
			<div class="ui_row">
				<div class="foldGroup shipfold">
					<ul>
						<li>
							<div class="fold_head">
								<a href="javascript:void(0)">
									<div>
										<div class="fold_tit">
											<div class="lap2"><span>배송지 정보</span></div>
											<span class="fold_txt recipNm" th:text="${deliveryAddrInfo.recipNm}"></span>
										</div>
									</div>
								</a>
							</div>
							<div class="fold_cont">
								<div class="ship_info ship_edit">
									<!--  배송비정보변경가능 -->
									<th:block th:if="${canChgAddr == 'Y'}">
										<button type="button" id="btn_adrsChange_pop" class="btn_popup" onclick="fnChangeDeliveryAddr();">
											<span>배송지 변경</span>
										</button>
									</th:block>
									<!--  //배송비정보변경가능 -->
									<dl>
										<div class="company">
											<dt><span class="sr-only">배송지명</span></dt>
											<dd>
												<span th:text="${deliveryAddrInfo.recipNm}" id="recipNm"></span>
												<div class="badge_wrap">
													<th:block th:if="${deliveryAddrInfo.defaultYn} == 'Y'">
														<em class="order_badge defaultYn">기본 배송지</em>
													</th:block>
													<em class="order_badge order_bullet_badge" style="display:none">총알배송</em>
												</div>
											</dd>
										</div>
										<div class="addr">
											<dt><span class="sr-only">배송주소</span></dt>
											<dd th:text="|${deliveryAddrInfo.recipBaseAddr} ${deliveryAddrInfo.recipDtlAddr}|" id="recipAddr"></dd>
										</div>
										<div class="phone">
											<dt><span class="sr-only">휴대폰 번호</span></dt>
											<dd th:text="${deliveryAddrInfo.recipPhnno}" id="recipPhnno"></dd>
										</div>
										<div class="ship_request">
											<dt>배송요청 사항</dt>
											<dd th:text="${deliveryAddrInfo.delvMemo}" id="delvMemo"></dd>
										</div>
									</dl>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
			<!-- 폴딩리스트 -->
		</div>
		<div class="inner">
			<div class="tbl_wrap pay_wrap">
				<div class="tbl_tit"> 
					<h3>결제 정보</h3>
<!--					<strong class="pay"><span th:text="${#numbers.formatInteger(orderAmtInfo.ordAmt - orderAmtInfo.cnclRtnAmt + orderAmtInfo.realDelvAmt, 1, 'COMMA')}"></span>원</strong>-->
					<strong class="pay"><span th:text="${#numbers.formatInteger(orderAmtInfo.payAmt - orderAmtInfo.npayPntAmt - orderAmtInfo.pgCpnAmt, 1, 'COMMA')}"></span>원</strong>
				</div>
				<div class="tbl type1">
					<table>
						<colgroup>
							<col width="227">
							<col width="*">
						</colgroup>   
						<tr>
							<td>
								<dl>
									<div>
										<dt>총주문금액(상품금액+배송비)</dt>
										<dd><div><span th:text="${#numbers.formatInteger((orderAmtInfo.ordAmt + orderAmtInfo.cpn1DcAmt) - orderAmtInfo.cnclRtnAmt + orderAmtInfo.realDelvAmt, 1, 'COMMA')}"></span>원</div></dd>
									</div>
									<th:block th:if="${orderAmtInfo.cpn1DcAmt} > 0">
										<div>
											<dt>즉시할인</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.cpn1DcAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.tmtb1DcAmt} + ${orderAmtInfo.tmtb2DcAmt} > 0">
										<div>
											<dt>다다익선 할인</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.tmtb1DcAmt + orderAmtInfo.tmtb2DcAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.cartCpnDcAmt} + ${orderAmtInfo.goodsCpnDcAmt} > 0">
										<div>
											<dt>쿠폰할인</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.cartCpnDcAmt + orderAmtInfo.goodsCpnDcAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.prePntDcAmt} > 0">
										<div>
											<dt>선 포인트 사용</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.prePntDcAmt, 1, 'COMMA')}|"></span>P</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.pntDcAmt} > 0">
										<div>
											<dt>포인트 사용</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.pntDcAmt, 1, 'COMMA')}|"></span>P</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.gfcdUseAmt} > 0">
										<div>
											<dt>상품권 사용</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.gfcdUseAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.npayPntAmt} > 0">
										<div>
											<dt>마일리지 사용</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.npayPntAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.pgCpnAmt} > 0">
										<div>
											<dt>제휴 할인</dt>
											<dd><div><span th:text="|- ${#numbers.formatInteger(orderAmtInfo.pgCpnAmt, 1, 'COMMA')}|"></span>원</div></dd>
										</div>
									</th:block>
									<th:block th:if="${orderAmtInfo.savePntAmt} > 0">
										<div>
											<dt>적립예정 포인트</dt>
											<dd><div><span th:text="|${#numbers.formatInteger(orderAmtInfo.savePntAmt, 1, 'COMMA')}|"></span>P</div></dd>
										</div>
									</th:block>
									<div>
										<dt>결제수단</dt>
										<dd>
											<div>
												<span th:if="${paymentInfo.pgGb == 'NAVER'}">네이버 페이</span>
												<span th:if="${paymentInfo.pgGb == 'KAKAO'}">카카오 페이</span>
												<span th:if="${paymentInfo.pgGb == 'PAYCO'}">PAYCO</span>
												<span th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_10'}">실시간계좌이체</span>
												<span th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_20'}">무통장입금</span>
												<span th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_30'}" th:text="|${paymentInfo.cardNm}/${paymentInfo.cardMips}|"></span>
												<span th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_60'}">휴대폰결제</span>
											</div>
										</dd>
									</div>
								</dl>
							</td>
						</tr>
					</table>
					<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and paymentInfo.payMeans == 'G014_30'}" onclick="fnReceipt('card')"><span>신용카드 전표</span></button>
					<button type="button" class="btn btn_default btn_sm" th:if="${paymentInfo.pgGb == 'KCP' and not #strings.isEmpty(paymentInfo.cashAuthNo) and (paymentInfo.payMeans == 'G014_10' or paymentInfo.payMeans == 'G014_20')}" onclick="fnReceipt('cash')"><span>현금 영수증</span></button>
					<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and (cashReceiptsInfo == null or #strings.isEmpty(cashReceiptsInfo.authNo))}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
					<!-- 
					<button type="button" class="btn btn_default btn_sm" th:if="${orderAmtInfo.gfcdUseAmt > 0 and #strings.isEmpty(paymentInfo.cashAuthNo)}" th:attr="ordNo=${ordNo}" onclick="fnRequestCashReceipt(this);"><span>상품권 현금 영수증 신청</span></button>
					 -->
				</div>
				<!-- 210415_ 추가 : 결제정보 안내 텍스트 추가 -->
				<p class="txt_ref">NPAY등의 대체결제수단으로 결제 시 해당 결제 플랫폼에서 영수증 확인이 가능합니다.</p>
			</div>
			<div class="btn_group btn_group_flex">
				<div>
					<button type="button" class="btn btn_dark" onclick="cfnGoToPage(_PAGE_NOMEMBER_ORDER_LIST);"><span>확인</span></button>
				</div>
			</div>
		</div>
	</section>
</main>

<script src="/ux/plugins/gaga/gaga.paging.js"></script>
<script th:inline="javascript">
	let ordNo 				= [[${ordNo}]];
	var isLogin 			= [[${isLogin}]];
	let orderList 			= [[${orderList}]];
	let oneData 			= [[${oneData}]];
	let paymentInfo 		= [[${paymentInfo}]];
	let orderAmtInfo 		= [[${orderAmtInfo}]];
	let deliveryAddrInfo 	= [[${deliveryAddrInfo}]];
	//let kcpReceiptUrl 		= [[${@environment.getProperty('pg.kcp.receipt.url')}]];
	let kcpReceiptUrl		= [[${kcpReceiptUrl}]];
	let jsonObj 			= {};
	//let delvMemo			= [[${deliveryAddrInfo.delvMemo}]];

	$(document).ready(function() {
		// 타이틀명
		$('#htopTitle').text('주문상세');
	});
	
	// 2.1 회원 배송지변경 팝업열기
	//$('#btn_adrsChange_pop').on("click", function(){
	//	// 회원인경우
	//	if (isLogin == true) {
	//		$.ajax( {
	//			type		: "POST",
	//			url 		: '/common/delvAddrChangePop',
	//			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) {
	//				$("#adrsChangePop .modal-dialog .modal-content").html(result);
	//				$("#adrsChangePop").modal("show");
	//			}
	//		});
	//	}
	//	// 비회원인경우
	//	else {
	//		$.ajax( {
	//			type		: "POST",
	//			url 		: '/common/delvAddrAddPop',
	//			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) {
	//				$("#adrsAddPop .modal-dialog .modal-content").html(result);
	//				$("#adrsAddPop").modal("show");
	//			}
	//		});
	//	}
	//});
	
	// 전체취소 버튼 클릭 이벤트
	var fnAllCancel = function() {
		// 환불계좌 체크
		let accountNo = $('#mypageOrderDetailForm input[name=accountNo]').val();
		let accountNm = $('#mypageOrderDetailForm input[name=accountNm]').val();
		let bankCd = $('#mypageOrderDetailForm input[name=bankCd]').val();

		if (paymentInfo.payMeans == 'G014_20' && paymentInfo.payStat == 'G016_30' && (gagajf.isNull(accountNo) || gagajf.isNull(accountNm) || gagajf.isNull(bankCd))) {
			let data = {};
			data.ordNo = oneData.ordNo;
			data.accountNm = oneData.accountNm;
			
			let jsonData = JSON.stringify(data);
			
			$.ajax( {
				type		: "POST",
				url 		: '/noMember/refund/account/register/popup/form',
				data		: jsonData,
				dataType 	: 'html',
				beforeSend : function(xhr, settings) {
					xhr.setRequestHeader("AJAX"			, "true");
					xhr.setRequestHeader('Accept'		, 'application/json');
					xhr.setRequestHeader('Content-Type'	, 'application/json');
				},
				success 	: function(result) {
					$("#refundPop .modal-dialog .modal-content").html(result);
					$("#refundPop").modal("show");
				}
			});
			
			return false;
		}

		mcxDialog.confirm('전체취소 처리하시겠습니까?', {
			cancelBtnText: "취소",
			sureBtnText: "확인",
			sureBtnClick: function(){
				// 취소요청 데이터 설정
				let url = '/noMember/cancel';
				
				// 주문상세번호 설정
				let ordDtlNoArr = [];
				$.each($('#mypageOrderDetailForm input[name=ordDtlNoArr]'), function(idx, item) {
					ordDtlNoArr.push($(item).val());
				});
				
				// 취소 수량 설정
				let cnclRtnReqQtyArr = [];
				$.each($('#mypageOrderDetailForm input[name=cnclRtnReqQtyArr]'), function(idx, item) {
					cnclRtnReqQtyArr.push($(item).val());
				});
				
				// 전체 취소 처리
				let data = {};
				data.ordNo = ordNo;
				data.chgReason = 'G686_10';
				data.chgReasonNm = '고객변심';
				data.accountNo = accountNo;
				data.accountNm = accountNm;
				data.bankCd = bankCd;
				data.isCustomer = true;
				data.reqGbn = 'cnclComplete';
				data.ordDtlNoArr = ordDtlNoArr;
				data.cnclRtnReqQtyArr = cnclRtnReqQtyArr;

				let jsonData = JSON.stringify(data);
				
				// 취소 처리 가능 여부 조회
				gagajf.ajaxJsonSubmit('/mypage/wms/cancel/available', jsonData, function(result) {
					let cancelYn = result.cancelYn;
					
					if (cancelYn == 'Y') {
						// 전체취소 처리
						gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
							cfnGoToPage(_PAGE_MYPAGE_CRE_LIST);
						}, true);
					} else {
						mcxDialog.alert('이미 배송처리 되어 전체취소 처리에 실패 하였습니다.');
					}
				});
			}
		});
	}

	// 배송지 정보 설정
	var delvAddrSet = function(delvObj) {
		let delvAddrSq 		= deliveryAddrInfo.delvAddrSq;
		let recipNm 		= delvObj.recipNm;
		let recipPhnno 		= delvObj.recipPhnno;
		let recipZipcode 	= delvObj.recipZipcode;
		let recipBaseAddr 	= delvObj.recipBaseAddr;
		let recipDtlAddr 	= delvObj.recipDtlAddr;
		let delvMemo 		= delvObj.delvMemo;
		
		$('#recipNm').text(recipNm);
		$('#recipPhnno').text(recipPhnno);
		$('#recipAddr').text(recipBaseAddr + ' ' + recipDtlAddr);
		$('#delvMemo').text(delvMemo);
		$('#mypageOrderDetailForm .recipNm').text(recipNm);
		
		let url = '/noMember/change/delvery/addr';
		let data = {};
		data.ordNo			= ordNo;
		data.delvAddrSq 	= delvAddrSq;
		data.recipNm 		= recipNm;
		data.recipPhnno 	= recipPhnno;
		data.recipZipcode 	= recipZipcode;
		data.recipBaseAddr 	= recipBaseAddr;
		data.recipDtlAddr 	= recipDtlAddr;
		data.delvMemo 		= delvMemo;
		
		let jsonData = JSON.stringify(data);
			gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
		})
	}

	// 환불계좌 등록 콜백 처리
	var fnRegisterAccountCallback = function(result) {
		// 환불계좌 정보 설정
		$('#mypageOrderDetailForm input[name=accountNo]').val(result.accountNo);
		$('#mypageOrderDetailForm input[name=accountNm]').val(result.accountNm);
		$('#mypageOrderDetailForm input[name=bankCd]').val(result.bankCd);
		
		// 전체취소 처리
		fnAllCancel();
	}

	// 상품권 현금영수증 신청 처리
	var fnRequestCashReceipt = function(param) {
		let url = '/noMember/cash/receipts/request';
		let ordNo = $(param).attr('ordNo');

		let data = {};
		data.ordNo = ordNo;

		let jsonData = JSON.stringify(data);

		gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
			cfnGoToPage(_PAGE_NOMEMBER_ORDER_DETAIL);
		}, true);
	}
</script>

</th:block>

</body>
</html>
