Explorar o código

Merge remote-tracking branch 'origin/develop' into jsh77b

jsh77b %!s(int64=4) %!d(string=hai) anos
pai
achega
686fb5fef7

+ 28 - 0
src/main/java/com/style24/admin/biz/service/TsaOrderChangeService.java

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.gagaframework.web.parameter.GagaMap;
+import com.style24.core.biz.dao.TscOrderChangeDao;
 import com.style24.core.biz.service.TscOrderChangeService;
 import com.style24.core.biz.service.TscOrderRefundService;
 import com.style24.core.biz.service.TscWmsService;
@@ -44,6 +45,9 @@ public class TsaOrderChangeService {
 	
 	@Autowired
 	private TscOrderRefundService coreOrderRefundService;
+	
+	@Autowired
+	private TscOrderChangeDao coreOrderChangeDao;
 
 	/**
 	 * 반품 TO 교환 처리
@@ -253,4 +257,28 @@ public class TsaOrderChangeService {
 
 		return result;
 	}
+
+	/**
+	 * 네이버페이 주문형 교환접수 승인대기 목록 수 조회
+	 *
+	 * @param OrderChange
+	 * @return int
+	 * @author card007
+	 * @since 2021. 08. 18
+	 */
+	public int getExchangeApprovalTargetListCount(OrderChange orderChange) {
+		return coreOrderChangeDao.getExchangeApprovalTargetListCount(orderChange);
+	}
+
+	/**
+	 * 네이버페이 주문형 교환접수 승인대기 목록 조회
+	 *
+	 * @param OrderChange
+	 * @return Collection<OrderChange>
+	 * @author card007
+	 * @since 2021. 08. 18
+	 */
+	public Collection<OrderChange> getExchangeApprovalTargetList(OrderChange orderChange) {
+		return coreOrderChangeDao.getExchangeApprovalTargetList(orderChange);
+	}
 }

+ 62 - 0
src/main/java/com/style24/admin/biz/web/TsaOrderChangeController.java

@@ -34,6 +34,7 @@ import com.style24.core.biz.service.TscOrderRefundService;
 import com.style24.core.biz.service.TscOrderService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.message.TscMessageByLocale;
+import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.CustAccount;
 import com.style24.persistence.domain.Order;
 import com.style24.persistence.domain.OrderChange;
@@ -1077,6 +1078,67 @@ public class TsaOrderChangeController extends TsaBaseController {
 
 		return result;
 	}
+
+	/**
+	 * 네이버페이 교환접수 승인 대상 목록 화면
+	 *
+	 * @return ModelAndView
+	 * @author card007
+	 * @since 2021. 08. 18
+	 */
+	@GetMapping("/exchange/approval/form")
+	public ModelAndView exchangeApprovalForm() {
+		ModelAndView mav = new ModelAndView();
+
+		mav.setViewName("order/ExchangeApprovalListForm");
+
+		return mav;
+	}
+
+	/**
+	 * 네이버페이 교환접수 승인 대상 목록
+	 * 
+	 * @param OrderChange
+	 * @return GagaMap
+	 * @author card007
+	 * @since 2021. 08. 18
+	 */
+	@PostMapping("/exchange/approval/list")
+	@ResponseBody
+	public GagaMap exchangeApprovalList(@RequestBody OrderChange orderChange) {
+		GagaMap result = new GagaMap();
+
+		orderChange.setPageable(new TscPageRequest(orderChange.getPageNo() - 1, orderChange.getPageSize()));
+
+		// 주문전체건수 조회
+		int totalCount = orderChangeService.getExchangeApprovalTargetListCount(orderChange);
+		orderChange.getPageable().setTotalCount(totalCount);
+
+		// 주문목록 페이지 조회
+		Collection<OrderChange> dataList = orderChangeService.getExchangeApprovalTargetList(orderChange);
+		
+		result.set("pageing", orderChange);
+		result.set("dataList", dataList);
+		
+		return result;
+	}
+
+	/**
+	 * 네이버페이 교환접수 승인
+	 *
+	 * @param OrderChange
+	 * @return GagaMap
+	 * @author card007
+	 * @since 2021. 08. 18
+	 */
+	@PostMapping("/exchange/approval")
+	@ResponseBody
+	public GagaMap exchangeApproval(@RequestBody OrderChange orderChange) {
+		Integer userNo = TsaSession.getInfo().getUserNo();
+		orderChange.setRegNo(userNo);
+		orderChange.setUpdNo(userNo);
+		return coreOrderChangeService.exchangeApproval(orderChange);
+	}
 }
 
 

+ 239 - 0
src/main/webapp/WEB-INF/views/order/ExchangeApprovalListForm.html

@@ -0,0 +1,239 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : ExchangeApprovalListForm.html
+ * @desc    : 교환접수 승인 목록 Page
+ *=============================================================
+ * ISTYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *=============================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  ==================================
+ * 1.0  2021.08.18   card007     최초 작성
+ *******************************************************************************
+ -->
+ 	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
+		<!-- 검색조건 영역 -->
+		<form id="searchForm" name="searchForm" action="#" th:action="@{'/orderChange/exchange/approval/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+		<div class="panelStyle">
+			<!-- TITLE -->
+<!--			<div class="panelTitle">-->
+<!--				<h3><i class="fa fa-info-circle"></i>아래 검색조건  <font color="red">주문번호,주문변경번호,회수요청일</font>중 하나를 꼭 입력해 주세요.</h3>-->
+<!--				<span class="panelControl">-->
+<!--					<i class="fa fa-chevron-up"></i>-->
+<!--				</span>-->
+<!--			</div>-->
+			<!-- //TITLE -->
+			<div class="panelContent">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:8%;"/>
+							<col style="width:12%;"/>
+							<col style="width:8%;"/>
+							<col style="width:12%;"/>
+							<col style="width:8%;"/>
+							<col style="width:12%;"/>
+						</colgroup>
+						<tr>
+							<th>주문자명</th>
+							<td>
+								<input type="text" class="w40p" name="ordNm" placeholder="" maxlength="20"/>
+							</td>
+							<th>주문번호</th>
+							<td>
+								<input type="text" class="w40p" name="ordNo" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="" maxlength="20"/>
+							</td>
+							<th>주문변경번호</th>
+							<td>
+								<input type="text" class="w40p" name="ordChgSq" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="" maxlength="20"/>
+							</td>
+						</tr>
+						<tr>
+							<th>조회일자</th>
+							<td colspan="5" id="terms">
+							</td>
+						</tr>
+					</table>
+
+					<ul class="panelBar">
+						<li class="center">
+							<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
+							<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset(); fnInitCalendar();">초기화</button>
+						</li>
+					</ul>
+
+				</div>
+		</div>
+		<!-- //검색조건 영역 -->
+
+		<!-- 리스트 영역 -->
+		<div class="panelStyle">
+			<ul class="panelBar">
+				<li class="right">
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="10" >10개씩 보기</option>
+						<option value="20" selected="selected">20개씩 보기</option>
+						<option value="50">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+			</ul>
+			<div id="gridList" style="width:100%; height: 500px;justify-content: center" class="ag-theme-balham lh60"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="exchangeApprovalListPagination"></div>
+				</li>
+			</ul>
+		</div>
+		</form>
+		<!-- //리스트 영역 -->
+	</div>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=20210114"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+// 사이트목록
+var columnDefs = [
+	{headerName: "주문번호"		, field: "ordNo"			, width: 100	, cellClass: "text-center"},
+	{headerName: "주문상세번호"		, field: "ordDtlNo"			, width: 100	, cellClass: "text-center"},
+	{headerName: "주문변경번호"		, field: "ordChgSq"			, width: 100	, cellClass: "text-center"},
+	{headerName: "교환승인"		, field: "approval"			, width: 100	, cellClass: 'text-center',
+		cellRenderer: function(params) {
+			var btnText 	= '';
+			var paramData 	= params.data.ordNo;
+			paramData 		+= '@' + params.data.ordChgSq;
+			paramData 		+= '@' + params.data.delvFeeCd;
+
+			if (params.data.rowspanRank == 1) {
+				btnText 	= '<a href="javascript:void(0);" class="btn btn-success btn-ssm" onclick="fnExchangeRequest(\'' + paramData + '\');">교환승인</a>';
+			}
+
+			return btnText;
+		}
+	},
+	{headerName: "주문자"			, field: "maskingOrdNm"		, width: 140	, cellClass: "text-left"},
+	{headerName: "휴대폰번호"		, field: "maskingOrderPhnno", width: 140	, cellClass: "text-left"},
+	{
+		headerName		: "주문일시"
+		, field			: "ordDt"
+		, width			: 140
+		, cellClass		: 'text-center'
+		, valueGetter	: function (params) {
+			return gagaAgGrid.toDateTimeFormat(params.data.ordDt);
+		}
+	},
+	{
+		headerName		: "이미지"
+		, field			: "sysImgNm"
+		, width			: 100
+		, height		: 60
+		, cellClass		: 'text-center'
+		,cellRenderer	: function(params) {
+			return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+		}
+	},
+	{headerName: "상품코드"		, field: "goodsCd"			, width: 100	, cellClass: 'text-center'	, sortable: true},
+	{headerName: "브랜드"			, field: "brandGroupNm"		, width: 150	, cellClass: 'text-center'	, sortable: true},
+	{headerName: "구성유형"		, field: "goodsTypeNm"		, width: 80		, cellClass: 'text-center'	, sortable: true},
+	{headerName: "상품명"			, field: "goodsNm"			, width: 300	, cellClass: 'text-left'	, sortable: true},
+];
+
+var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+gridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+
+// 셀 클릭 이벤트
+gridOptions.onCellClicked = function(event) {
+	
+};
+
+// 조회 버튼 클릭 이벤트
+$('#btnSearch').on('click', function() {
+	$("#searchForm input[name=pageNo]").val('1');
+	fnSearchList();
+});
+
+// 조회 처리
+var fnSearchList = function() {
+	//var searchChk = "N";
+	//
+	//if ($('#searchForm input[name=ordNo]').val() != '' || $('#searchForm input[name=ordChgSq]').val() != '') {
+	//	searchChk = "Y";
+	//}
+	//
+	//if(searchChk == "N"){
+	//	if($('#stDate').val() == ''){
+	//		mcxDialog.alert('시작 기간을 입력하세요.');
+	//		return;
+	//	}
+	//
+	//	if($('#edDate').val() == ''){
+	//		mcxDialog.alert('종료 기간을 입력하세요.');
+	//		return;
+	//	}
+	//	// 날짜 유효성 체크
+	//	if (Number($('#stDate').val().replaceAll("-", "")) > Number($('#edDate').val().replaceAll("-", ""))) {
+	//		mcxDialog.alert("시작일은 종료일보다 클 수 없습니다.");
+	//		return;
+	//	}
+	//}
+
+	gagaPaging.init('searchForm', fnSearchCallBack, 'exchangeApprovalListPagination', $('#searchForm').find('#pageSize').val());
+	gagaPaging.load($("#searchForm input[name=pageNo]").val());
+}
+
+// 조회 콜백
+var fnSearchCallBack = function(result){
+	$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+	$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+	$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+	$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+	gridOptions.api.setRowData(result.dataList);
+	gagaPaging.createPagination(result.pageing.pageable);
+}
+
+// 페이징
+$('#searchForm select[name=pageSize]').on('change', function() {
+	$("#searchForm input[name=pageNo]").val('1');
+	fnSearchList();
+});
+
+$(document).ready(function() {
+	gagaAgGrid.createGrid('gridList', gridOptions);
+	//var hideList = ["btnThisWeek", "btnYesterWeek", "btnThisMonth", "btnYesterMonth", "btnRecent3Month"];
+	cfnCreateCalendar('#terms', 'stDate', 'edDate', true, '','');
+	gagajf.setDate('#terms', 'stDate', 'edDate', '7d');
+
+});
+
+// 교환승인 버튼 클릭 이벤트
+var fnExchangeRequest = function (paramData) {
+	var paramArr 	= paramData.split("@");
+	var param 		= "";
+	param 			+= "&ordNo=" 		+ paramArr[0];
+	param 			+= "&ordChgSq=" 	+ paramArr[1];
+	param 			+= "&delvFeeCd="	+ paramArr[2];
+	param 			+= "&delvFeeCdGrp="	+ paramArr[2];
+	
+	var actionUrl = "/orderChange/exchange/request/form?" + param;
+	cfnOpenModalPopup(actionUrl, 'popupExchangeRequestForm');
+};
+
+/*]]>*/
+</script>
+
+</html>

+ 51 - 17
src/main/webapp/WEB-INF/views/order/ExchangeRequestForm.html

@@ -40,12 +40,16 @@
 					<th:block th:if="${wdBfSendYn == 'N'}">
 						<!-- 2021.07.22 택배사 회수 불가 시 회수요청상태에서 교환철회 처리 -->
 						<!-- <button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or (recallExceptionInfo != null and (chgStat == 'G685_30' or chgStat == 'G685_31'))}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button> -->
-						<button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or (chgStat == 'G685_30' and (canRequestCancelYn == 'Y' or recallExceptionInfo != null)) or (chgStat == 'G685_31' and recallExceptionInfo != null)}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button>
+						<button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or chgStat == 'G685_22' or (chgStat == 'G685_30' and (canRequestCancelYn == 'Y' or recallExceptionInfo != null)) or (chgStat == 'G685_31' and recallExceptionInfo != null)}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button>
 					</th:block>
 					<th:block th:if="${ordChgSq > 0 and (ordChgGb == 'G681_20' or ordChgGb == 'G681_40')}">
 						<!-- 선발송 처리 시 교TO교 접수 불가 처리 -->
 						<button type="button" class="btn btn-success" th:unless="${ordChgGb == 'G681_20' and wdBfSendYn == 'Y'}" id="fnReturnToExchangeSubmit" onclick="fnExchange()">교환변경</button>
 					</th:block>
+					<th:block th:if="${ordChgSq > 0 and chgStat == 'G685_22'}">
+						<!-- 네이버페이 주문형 교환승인 버튼 -->
+						<button type="button" class="btn btn-success" id="fnExchangeApprovalSubmit" onclick="fnExchange()">교환승인</button>
+					</th:block>
 				</div>
 				
 				<table class="frmStyle">
@@ -95,7 +99,8 @@
 				</table>
 				
 				<h4 class="chger">회수지 정보</h4>
-				<button style="float: right" type="button" class="btn btn-success" th:if="${(#strings.isEmpty(ordChgGb) or ordChgGb == 'G681_50') and ordChgSq > 0 and wdGb == 'W' and (chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnChangeChgerInfo();">회수지 수정</button>
+				<button style="float: right" type="button" class="btn btn-success chger" id="chgerButton" onclick="fnChangeChgerInfo();">회수지 수정</button>
+<!--				<button style="float: right" type="button" class="btn btn-success chger" id="chgerButton" th:if="${(#strings.isEmpty(ordChgGb) or ordChgGb == 'G681_50') and ordChgSq > 0 and wdGb == 'W' and (chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnChangeChgerInfo();">회수지 수정</button>-->
 				<table class="frmStyle chger">
 					<colgroup>
 						<col style="width:160px;" />
@@ -112,7 +117,8 @@
 							<th>회수지주소 <i class="star"></i></th>
 							<td colspan="3">
 								<input type="text" name ="chgerZipcode" class="w100" readonly="readonly"/>
-								<button type="button" class="btn btn-info" th:if="${#strings.isEmpty(ordChgGb) and (ordChgSq == 0 or chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>
+<!--								<button type="button" class="btn btn-info" th:if="${#strings.isEmpty(ordChgGb) and (ordChgSq == 0 or chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>-->
+								<button type="button" class="btn btn-info" id="chgerFindAddr" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>
 								<input type="text" name ="chgerBaseAddr" class="w300" readonly="readonly"/>
 								<input type="text" name ="chgerDtlAddr" class="w300"/>
 							</td>
@@ -147,7 +153,8 @@
 				</table>
 
 				<h4>교환지 정보</h4>
-				<button style="float: right" type="button" class="btn btn-success" th:unless="${ordChgSq == 0 or ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35'))}" onclick="fnChangeRecipInfo();">교환지 수정</button>
+				<button style="float: right" type="button" class="btn btn-success" id="recipButton" onclick="fnChangeRecipInfo();">교환지 수정</button>
+<!--				<button style="float: right" type="button" class="btn btn-success" th:unless="${ordChgSq == 0 or ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35'))}" onclick="fnChangeRecipInfo();">교환지 수정</button>-->
 				<table class="frmStyle">
 					<colgroup>
 						<col style="width:160px;" />
@@ -164,7 +171,8 @@
 						<th>교환지주소 <i class="star"></i></th>
 						<td colspan="3">
 							<input type="text" name ="recipZipcode" class="w100" readonly="readonly"/>
-							<button type="button" class="btn btn-info" th:unless="${ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35'))}" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>
+<!--							<button type="button" class="btn btn-info" th:unless="${ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35')) or chgStat == 'G685_22'}" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>-->
+							<button type="button" class="btn btn-info" id="recipFindAddr" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>
 							<input type="text" name ="recipBaseAddr" class="w300" readonly="readonly"/>
 							<input type="text" name ="recipDtlAddr" class="w300"/>
 						</td>
@@ -211,6 +219,7 @@ var ordChgSq 				= [[${ordChgSq}]];								// 주문변경번호
 var chgStat					= [[${chgStat}]];								// 변경상태
 var orderInfoList 			= [[${orderInfoList}]];							// 주문기본정보
 var payMeans 				= orderInfoList[0].payMeans;					// 결제수단
+var pgGb	 				= orderInfoList[0].pgGb;						// PG구분
 var orderDelvAddrInfo		= [[${orderDelvAddrInfo}]];						// 회수지정보
 var recallExceptionInfo		= [[${recallExceptionInfo}]];					// 회수 예외 정보
 var rtnLocInfo				= [[${rtnLocInfo}]];							// 반송지주소정보
@@ -332,7 +341,7 @@ var columnExchangeReqList = [
 				, width			: 100
 				, cellClass		: "text-center"
 				, cellRenderer	: function (params) {
-					if (ordChgSq > 0 && ordChgGb != 'G681_40') {
+					if (ordChgSq > 0 && ordChgGb != 'G681_40' && chgStat != 'G685_22') {
 						$.each(exchangeInfoList, function(idx, item) {
 							if (params.data.itemCd == item.itemCd && params.data.optCd1 == item.optCd1) {
 								strVal = item.optCd2;
@@ -347,24 +356,24 @@ var columnExchangeReqList = [
 						var cnclRtnQty = parseInt(params.data.cnclRtnQty);
 						var ordReqChgQty = parseInt(params.data.ordReqChgQty);
 						var ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
-						
-						if (ordChgGb == 'G681_40') {
+
+						if (ordChgGb == 'G681_40' || chgStat == 'G685_22') {
 							ordCanChgQty = params.data.chgQty;
 						}
-						
+
 						var strVal = '';
 						if (ordCanChgQty == 0) {
 							strVal += '<select class="ordChgOpt" name="ordChgOpt" ordDtlNo="' + params.data.ordDtlNo + '" ordDtlItemSq="' + params.data.ordDtlItemSq + '" onchange="fnChangeOption(this)" disabled="disabled">';
 						} else {
 							strVal += '<select class="ordChgOpt" name="ordChgOpt" ordDtlNo="' + params.data.ordDtlNo + '" ordDtlItemSq="' + params.data.ordDtlItemSq + '" onchange="fnChangeOption(this)">';
 						}
-						
+
 						if (gagajf.isNull(ordChgOpt)) {
 							strVal += '<option value="">선택</option>';
 						} else {
 							strVal += '<option value="" selected>선택</option>';
 						}
-						
+
 						$.each(optCdArr, function (idx, item) {
 							// 2021.07.26 교환옵션 optCd2 -> optCd로 변경 처리
 							if (ordChgOpt == item) {
@@ -721,7 +730,7 @@ var fnExchange = function () {
 	// 2. 교환사유 체크
 	var chgReason = $("#exchangeRequestFrm select[name=selectChgReason]").val();
 	
-	if (ordChgGb == 'G681_20') {
+	if (ordChgGb == 'G681_20' || chgStat == 'G685_22') {
 		chgReason = $('#exchangeRequestFrm input[name=chgReason]').val();
 	}
 	//var chgReason = $('#exchangeRequestFrm input[name=chgReason]').val();
@@ -878,6 +887,8 @@ var fnExchange = function () {
 		url = '/orderChange/return/to/exchange/';
 	} else if (ordChgGb == 'G681_20') {
 		url = '/orderChange/exchange/to/exchange/';
+	} else if (chgStat == 'G685_22') {
+		url = '/orderChange/exchange/approval/';
 	} else {
 		url = '/orderChange/exchange/request/';
 	}
@@ -890,9 +901,14 @@ var fnExchange = function () {
 				url
 				, jsonData
 				, function() {
-					uifnPopupClose('popupOrderDetail');
-					fnReOpenOrderDetailPopup();
-					uifnPopupClose('popupExchangeRequestForm');
+					if (chgStat == 'G685_22') {
+						uifnPopupClose('popupExchangeRequestForm');
+						fnSearchList();
+					} else {
+						uifnPopupClose('popupOrderDetail');
+						fnReOpenOrderDetailPopup();
+						uifnPopupClose('popupExchangeRequestForm');
+					}
 				}
 			);
 		}
@@ -1126,6 +1142,10 @@ var fnChangeWdGb = function(param) {
 	} else {
 		$('.chger').css('display', '');
 		$('#delvCdList').css('display', 'none');
+		
+		if (ordChgSq == 0) {
+			$('#chgerButton').css('display', 'none');
+		}
 	}
 
 	// 추가배송비 계산
@@ -1190,6 +1210,7 @@ var fnChangeChgerInfo = function() {
 	});
 }
 
+// 교환지 정보 수정
 var fnChangeRecipInfo = function() {
 	let url				= '/order/deliver/addr/update';
 	var recipNm			= $("#exchangeRequestFrm input[name=recipNm]").val();
@@ -1249,6 +1270,7 @@ var fnChangeRecipInfo = function() {
 		
 	});
 }
+
 $(document).ready(function() {
 	// 1. 그리드생성
 	gagaAgGrid.createGrid('gridOrderCancelRequestList'		, gridOptionsExchangeReqList);			// 주문정보
@@ -1308,7 +1330,7 @@ $(document).ready(function() {
 		$('#chgMemo').attr('readOnly', true);							// 8-2. 요청메모
 		
 		// 2021.06.25 교환접수, 교환대기 상태에서는 회수지 정보 수정 가능
-		if (!gagajf.isNull(ordChgGb) || (chgStat != 'G685_20' && chgStat != 'G685_21')) {
+		if (!gagajf.isNull(ordChgGb) || (chgStat != 'G685_20' && chgStat != 'G685_21') || pgGb == 'NAVER_ORDER') {
 			$('input[name=chgerNm]').attr('readOnly', true);				// 8-3. 회수지정보 > 보내는사람
 			$('input[name=chgerDtlAddr]').attr('readOnly', true);			// 8-5. 회수지정보 > 상세주소
 			$('select[name=chgerTelno1]').attr('disabled', true);			// 8-6. 회수지정보 > 일반전화
@@ -1318,10 +1340,12 @@ $(document).ready(function() {
 			$('input[name=chgerPhnno2]').attr('readOnly', true);			// 8-7. 회수지정보 > 휴대전화
 			$('input[name=chgerPhnno3]').attr('readOnly', true);			// 8-7. 회수지정보 > 휴대전화
 			$('#chgerRtnMemo').attr('readOnly', true);						// 8-8. 회수지정보 > 반품메모
+			$('#chgerButton').css('display', 'none');						// 회수지 수정 버튼
+			$('#chgerFindAddr').css('display', 'none');						// 회수지 우편번호 찾기 버튼
 		}
 		
 		// 2021.06.25 교환상품 배송중 상태 전까지 정보 수정 가능
-		if (ordChgGb == 'G681_20' || (chgStat == 'G685_40' && (chgOrdDtlStat != 'G013_20' && chgOrdDtlStat != 'G013_30' && chgOrdDtlStat != 'G013_35'))) {
+		if (ordChgGb == 'G681_20' || (chgStat == 'G685_40' && (chgOrdDtlStat != 'G013_20' && chgOrdDtlStat != 'G013_30' && chgOrdDtlStat != 'G013_35')) || chgStat == 'G685_22' || pgGb == 'NAVER_ORDER') {
 			$('input[name=recipNm]').attr('readOnly', true);				// 8-9. 교환지정보 > 받는사람
 			$('input[name=recipDtlAddr]').attr('readOnly', true);			// 8-11. 교환지정보 > 상세주소
 			$('select[name=recipTelno1]').attr('disabled', true);			// 8-12. 교환지정보 > 일반전화
@@ -1331,7 +1355,17 @@ $(document).ready(function() {
 			$('input[name=recipPhnno2]').attr('readOnly', true);			// 8-13. 교환지정보 > 휴대전화
 			$('input[name=recipPhnno3]').attr('readOnly', true);			// 8-13. 교환지정보 > 휴대전화
 			$('#delvMemo').attr('readOnly', true);							// 8-14. 교환지정보 > 배송메모
+			$('#recipButton').css('display', 'none');						// 교환지 수정 버튼
+			$('#recipFindAddr').css('display', 'none');						// 교환지 우편번호 찾기 버튼
 		}
+
+		// 반품TO교환
+		if (ordChgGb == 'G681_40') {
+			$('#recipButton').css('display', 'none');						// 교환지 수정 버튼
+		}
+	} else {
+		$('#chgerButton').css('display', 'none');						// 회수지 수정 버튼
+		$('#recipButton').css('display', 'none');						// 교환지 수정 버튼
 	}
 	
 	// 글자수 제한 byte 표기

+ 11 - 0
src/main/webapp/WEB-INF/views/settle/SettleConfirmForm.html

@@ -87,6 +87,7 @@
 					<button type="button" class="btn btn-info btn-lg" id="btnSaveReceivableAmt">미수금저장</button>
 					<button type="button" class="btn btn-warning btn-lg" id="btnDownloadTaxBillExcel">세금계산서용 엑셀다운로드</button>
 					<a href="javascript:void(0);" id="taxBillExcel" style="display: none;">세금계산서엑셀</a>
+					<button type="button" class="btn btn-default btn-lg" id="btnExcel">엑셀다운로드</button>
 				</li>
 			</ul>
 			<!-- //버튼 배치 영역 -->
@@ -294,6 +295,16 @@
 		});
 	});
 	
+	// 엑셀다운로드
+	$('#btnExcel').on('click', function() {
+		if (gridOptions.api.getDisplayedRowCount() <= 0) {
+			mcxDialog.alert("조회된 데이터가 없습니다. 조회 후 다운로드 하세요.");
+			return false;
+		}
+		
+		gagaAgGrid.exportToExcel('정산확정 목록', gridOptions);
+	});
+	
 	$(document).ready(function() {
 		$('#settleYm').val((new Date()).before(0, 1, 0).format("YYYY-MM"));