<!-- 취소,반품,교환목록 있을때 -->
<th:block th:if="${#lists.size(creList) > 0}">
	<!-- 취소,반품,교환목록 -->
	<th:block th:each="creList , i : ${creList}">
		<div class="inner">
			<div class="part_goods">
				<div class="goods_top">
					<!-- 선물주문여부체크 -->
					<th:block th:if="${creList.giftPackYn} == 'Y'">
						<div class="goods_date">선물일<span class="date" th:text="${creList.ordDt}"></span></div>
					</th:block>'
					<th:block th:unless="${creList.giftPackYn} == 'Y'">
						<div class="goods_date">주문일<span class="date" th:text="${creList.ordDt}"></span></div>
					</th:block>
					<!-- //선물주문여부체크 -->
					<a href="javascript:void(0);" th:ordChgSq="${creList.ordChgSq}" th:chgGb="${creList.oneData.chgGb}" th:ordNo="${creList.oneData.ordNo}" onclick="fnGoToCreDetail(this);" class="detail_btn">상세보기</a>
				</div>
				
				<th:block th:each="cre , i : ${creList.creList}" th:with="imageUrl=${@environment.getProperty('upload.goods.view')}">
					<div class="goods_section">
						<div class="goods_status">
							<!-- 상태값 처리 -->
							<th:block th:if="${cre.chgStat == 'G685_17' or cre.chgStat == 'G685_18'}">
								<!-- 2021.07.01 선물하기 기간완료 처리 -->
								<p class="dlvr_staus" th:if="${cre.giftPackYn == 'Y' and cre.giftAddrInpYn == 'N' and cre.giftCancelDay >= 3}">선물취소</p>
								<p class="dlvr_staus" th:if="${cre.giftPackYn != 'Y' and cre.chgReason == 'G686_30'}">품절취소</p>
								<p class="dlvr_staus" th:if="${cre.giftPackYn != 'Y' and cre.chgReason != 'G686_30'}">주문취소</p>
							</th:block>
							<th:block th:if="${cre.chgStat == 'G685_40'}" th:each="exchange, index : ${creList.exchangeOptionList}">
								<p class="dlvr_staus" th:if="${cre.chgOrdDtlNo == exchange.ordDtlNo && (exchange.ordDtlStat == 'G013_20' or exchange.ordDtlStat == 'G013_30' or exchange.ordDtlStat == 'G013_35' or exchange.ordDtlStat == 'G013_40' or exchange.ordDtlStat == 'G013_50')}">교환진행중</p>
								<p class="dlvr_staus" th:if="${cre.chgOrdDtlNo == exchange.ordDtlNo && (exchange.ordDtlStat == 'G013_60' or exchange.ordDtlStat == 'G013_70')}">교환완료</p>
							</th:block>
							<p class="dlvr_staus" th:if="${cre.chgStat == 'G685_33'}">환불진행중</p>
							<p class="dlvr_staus" th:if="${cre.chgStat == 'G685_21' or cre.chgStat == 'G685_51'}">결제대기</p>
							<p class="dlvr_staus" th:if="${cre.chgStat == 'G685_49' or cre.chgStat == 'G685_69'}">접수취소</p>
							<p class="dlvr_staus" th:unless="${cre.chgStat == 'G685_17' or cre.chgStat == 'G685_18' or cre.chgStat == 'G685_40' or cre.chgStat == 'G685_33' or cre.chgStat == 'G685_21' or cre.chgStat == 'G685_51' or cre.chgStat == 'G685_49' or cre.chgStat == 'G685_69'}" th:text="${cre.chgStatNm}"></p>
							<!-- //상태값 처리 -->

							<!-- 상태값 변경 일시 -->
							<p class="dlvr_desc" th:text="|${cre.chgDate} ${cre.chgTime}|"></p>
							<!-- //상태값 변경 일시 -->
						</div>
						<div class="goods_detail">
							<a href="javascript:void(0)" th:attr="goodsCd=${cre.goodsCd}, optCd1=${cre.goodsType == 'G056_N' ? cre.optCd1 : ''}, ithrCd='IN21_01'" onclick="fnGoToGoodsDetail(this)">
								<div class="thumb_box">
									<img th:src="${imageUrl + '/' + cre.sysImgNm + '?RS=90'}" src="/" width="100%" alt="">
								</div>
								<div class="info_box">
									<div class="od_name">
										<div class="brand">
											<span th:text="${cre.brandNm}"></span>
											<div class="badge_wrap">
												<th:block th:if="${cre.shotDelvYn} == 'Y'">
													<em class="order_badge order_bullet_badge">총알배송</em>
												</th:block>
												<th:block th:if="${cre.selfGoodsYn} == 'Y' and ${cre.shotDelvYn} == 'N'">
													<em class="order_badge">STYLE24 일반배송</em>
												</th:block>
												<th:block th:if="${cre.selfGoodsYn} == 'N' and ${cre.shotDelvYn} == 'N'">
													<em class="order_badge">업체직배송</em>
												</th:block>
											</div>
										</div>
										<div class="name" th:text="${cre.goodsNm}"></div>
									</div>
									<div class="od_opt">
										<!-- 세트상품일때 -->
										<th:block th:if="${cre.goodsType} == 'G056_S'">
											<th:block th:each="option , index2 : ${cre.colorNmArr}">
												<div class="option">
													<em th:text="${cre.itemNmArr[index2.index]}"></em>
													<em th:text="${option}"></em>
													<em th:text="${cre.optCd2Arr[index2.index]}"></em>
												</div>
											</th:block>
										</th:block>
										<!-- //세트상품일때 -->
										<!-- 단품상품일때 -->
										<th:block th:unless="${cre.goodsType} == 'G056_S'">
											<div class="option">
												<em th:text="${cre.colorNm}"></em>
												<em th:text="${cre.optCd2}"></em>
											</div>
										</th:block>
										<!-- //단품상품일때 -->
									</div>
									
									<!-- 교환일때 -->
									<th:block th:if="${cre.chgGb} == 'G680_40'">
										<div class="od_exchange_opt">
											<span>교환옵션</span>
											<th:block th:each="exchange, index : ${creList.exchangeOptionList}">
												<th:block th:if="${cre.chgOrdDtlNo} == ${exchange.ordDtlNo}">
													<!-- 세트상품일때 -->
													<th:block th:if="${cre.goodsType} == 'G056_S'">
														<th:block th:each="option, index2 : ${exchange.colorNmArr}">
															<div class="option">
																<em th:text="${exchange.itemNmArr[index2.index]}"></em>
																<em th:text="${option}"></em>
																<em th:text="${exchange.optCd2Arr[index2.index]}"></em>
															</div>
														</th:block>
													</th:block>
													<!-- //세트상품일때 -->
													<!-- 일반상품일때 -->
													<th:block th:unless="${cre.goodsType} == 'G056_S'">
														<div class="option">
															<em th:text="${exchange.colorNm}"></em>
															<em th:text="${exchange.optCd2}"></em>
														</div>
													</th:block>
													<!-- //일반상품일때 -->
												</th:block>
											</th:block>
										</div>
									</th:block>
									<!-- //교환일때 -->
									
									<div class="od_calc">
										<p class="price">
											<span class="count"><em th:text="${cre.chgQty}"></em>개</span>
										</p>
									</div>
								</div>
							</a>
						</div>
						<!-- 취소,반품,교환 상태별 버튼기능정의 -->
						<div class="goods_btn_wrap btn_group_flex">
							<!-- 신청취소 -->
<!--							<th:block th:if="${cre.chgStat} == 'G685_20' or ${cre.chgStat} == 'G685_21' or ${cre.chgStat} == 'G685_50' or ${cre.chgStat} == 'G685_51'">-->
<!--								<div>-->
<!--									<button type="button" class="btn btn_default" th:ordNo="${cre.ordNo}" th:ordChgSq="${cre.ordChgSq}" th:cancelGb="${cre.chgGb}" onclick="fnCreCancel(this);">-->
<!--										<span>신청취소</span>-->
<!--									</button>-->
<!--								</div>-->
<!--							</th:block>-->
							<!-- //신청취소 -->
							<!-- 결제하기 -->
							<th:block th:if="${cre.chgStat} == 'G685_21' or ${cre.chgStat} == 'G685_51' or ${cre.chgStat} == 'G685_32'">
								<div>
									<button type="button" class="btn btn_default" th:ordNo="${cre.ordNo}" th:ordChgSq="${cre.ordChgSq}" onclick="fnCrePayAddCost(this);">
										<span>결제하기</span>
									</button>
								</div>
							</th:block>
							<!-- //결제하기 -->
							<!-- 배송조회 -->
							<th:block th:if="${cre.chgStat} == 'G685_40'">
								<th:block th:each="exchange, index : ${creList.exchangeOptionList}">
									<th:block th:if="${cre.chgOrdDtlNo} == ${exchange.ordDtlNo} and ${exchange.ordDtlStat} == 'G013_50'">
										<div>
											<button type="button" class="btn btn_default" th:attr="ordNo=${cre.ordNo}, ordDtlNo=${exchange.ordDtlNo}, shipCompCd=${exchange.shipCompCd}, invoiceNo=${exchange.invoiceNo}" onclick="fnGoToDelivery(this);">
												<span>배송조회</span>
											</button>
										</div>
									</th:block>
								</th:block>
							</th:block>
							<!-- //배송조회 -->
							<div><button type="button" class="btn btn_default" onclick="fnGoToOneToOnePage()"><span>1:1 문의</span></button></div>
						</div>
						<!-- //취소,반품,교환 상태별 버튼기능정의 -->
						
						<!-- 취소,반품,교환 상태별 문구정의 -->
						<!-- 선물취소 -->
						<!-- 2021.07.01 선물하기 기간완료 처리 -->
						<th:block th:if="${cre.giftPackYn == 'Y' and cre.giftAddrInpYn == 'N' and cre.giftCancelDay >= 3 and cre.chgStat == 'G685_18'}">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">주소 입력 기한이 경과되어 선물이 취소 되었습니다.</p>
							</div>
						</th:block>
						<!-- //선물취소 -->
						<!-- 교환접수 -->
						<th:block th:if="${cre.chgStat} == 'G685_20'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">교환 신청이 접수 되었습니다.<br>신속하게 처리하여 드리겠습니다.</p>
							</div>
						</th:block>
						<!-- //교환접수 -->
						<!-- 회수요청 -->
						<th:block th:if="${cre.chgStat} == 'G685_30'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">고객님이 요청하신 회수지로 상품을 회수 중에 있습니다.</p></p>
							</div>
						</th:block>
						<!-- //회수요청 -->
						<!-- 상품검수중(교환) -->
						<th:block th:if="${cre.chgStat} == 'G685_31' and ${cre.chgGb} == 'G680_40'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">고객님이 교환하신 상품을 검수 중에 있습니다.</p>
							</div>
						</th:block>
						<!-- //상품검수중(교환) -->
						<!-- 결제대기(교환) -->
						<th:block th:if="${cre.chgStat == 'G685_21' or (cre.chgGb == 'G680_40' and cre.chgStat == 'G685_32')}">
							<div class="goods_txt">
								<p class="cf_txt cf_desc" th:text="|${#numbers.formatInteger(cre.addPayCost, 1, 'COMMA')}원 결제 후 교환 가능합니다.|"></p>
							</div>
						</th:block>
						<!-- //결제대기(교환) -->
						<!-- 교환완료 -->
						<th:block th:if="${cre.chgStat} == 'G685_40'">
							<th:block th:each="exchange, index : ${creList.exchangeOptionList}">
								<th:block th:if="${cre.chgOrdDtlNo} == ${exchange.ordDtlNo} and (${exchange.ordDtlStat} == 'G013_60' or ${exchange.ordDtlStat} == 'G013_70')">
									<div class="goods_txt">
										<p class="cf_txt cf_desc">교환이 완료되었습니다.</p>
									</div>
								</th:block>
							</th:block>
						</th:block>
						<!-- //교환완료 -->
						<!-- 교환철회 -->
						<th:block th:if="${cre.chgStat} == 'G685_49'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">요청하신 교환을 취소하였습니다.</p>
							</div>
						</th:block>
						<!-- //교환철회 -->
						
						<!-- 반품접수 -->
						<th:block th:if="${cre.chgStat} == 'G685_50'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">반품 신청이 접수 되었습니다.<br>신속하게 처리하여 드리겠습니다.</p>
							</div>
						</th:block>
						<!-- //반품접수 -->
						<!-- 반품대기 -->
						<th:block th:if="${cre.chgStat} == 'G685_51'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc" th:text="|${#numbers.formatInteger(cre.addPayCost, 1, 'COMMA')}원 결제 후 반품 가능합니다.|"></p>
							</div>
						</th:block>
						<!-- //반품대기 -->
						<!-- 상품검수중(반품) -->
						<th:block th:if="${cre.chgStat} == 'G685_31' AND ${cre.chgGb} == 'G680_30'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">고객님이 반품하신 상품을 검수 중에 있습니다.</p>
							</div>
						</th:block>
						<!-- //상품검수중(반품) -->	
						<!-- 결제대기(반품) -->
						<th:block th:if="${cre.chgStat} == 'G685_32' AND ${cre.chgGb} == 'G680_30'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc" th:text="|${#numbers.formatInteger(cre.addPayCost, 1, 'COMMA')}원 결제 후 반품 가능합니다.|"></p>
							</div>
						</th:block>
						<!-- //결제대기(반품) -->
						<!-- 환불진행중 -->
						<th:block th:if="${cre.chgStat} == 'G685_33'">
							<div class="goods_txt">
<!--								<p class="cf_txt cf_desc" th:text="|${#numbers.formatInteger(cre.addPayCost, 1, 'COMMA')} 원 환불을 진행하고 있습니다.(영업일 최대 3일 내 환불 예정)|"></p>-->
								<p class="cf_txt cf_desc" th:text="|환불을 진행하고 있습니다.(영업일 최대 3일 내 환불 예정)|"></p>
							</div>
						</th:block>
						<!-- //환불진행중 -->
						<!-- 반품완료 -->
						<th:block th:if="${cre.chgStat} == 'G685_60'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">반품이 완료되었습니다.</p>
							</div>
						</th:block>
						<!-- //반품완료 -->
						<!-- 반품철회 -->
						<th:block th:if="${cre.chgStat} == 'G685_69'">
							<div class="goods_txt">
								<p class="cf_txt cf_desc">요청하신 반품을 취소하였습니다.</p>
							</div>
						</th:block>
						<!-- //반품철회 -->
						<!-- //취소,반품,교환 상태별 문구정의 -->
					</div>
				</th:block>
			</div>
		</div>
	</th:block>
</th:block>
<!-- //취소,반품,교환목록 있을때 -->
<!-- 취소,반품,교환목록 없을때 -->
<th:block th:if="${#lists.size(creList) < 1}">
	<div class="inner">
		<div class="part_goods">
			<div class="nodata">
				<div class="txt_box">
					<p>취소/반품/교환내역이 없습니다.<br/></p>
				</div>
			</div>
		</div>
	</div>
</th:block>
<!-- //취소,반품,교환목록 없을때 -->

<script th:inline="javascript">
	$(document).ready(function() {
		if ([[${pageNo}]] > 1) {
			$('.part_goods').css('border-top', '1px solid #eee');
		}
	});
</script>

