Parcourir la source

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

jsh77b il y a 5 ans
Parent
commit
c2170f9dac

+ 48 - 4
src/main/java/com/style24/admin/biz/web/TsaOrderChangeController.java

@@ -454,12 +454,13 @@ public class TsaOrderChangeController extends TsaBaseController {
 	 * @since 2021. 01. 14
 	 */
 	@GetMapping("/exchange/request/form")
-	public ModelAndView exchangeRequestFrom(@RequestParam(value = "ordNo") int ordNo) {
+	public ModelAndView exchangeRequestFrom(@RequestParam(value = "ordNo") int ordNo, @RequestParam(value = "ordChgSq") int ordChgSq) {
 
 		Order order = new Order();
 		ModelAndView mav = new ModelAndView();
 
 		order.setOrdNo(ordNo);
+		order.setOrdChgSq(ordChgSq);
 
 		// 교환가능 주문상세상탭값 설정
 		String[] ordDtlStatArr = new String[3];
@@ -469,13 +470,18 @@ public class TsaOrderChangeController extends TsaBaseController {
 		order.setOrdDtlStatArr(ordDtlStatArr);
 
 		Collection<Order> cancelRequestTargetList = orderChangeService.getCancelRequestTargetList(order);
-
 		Collection<Order> orderInfoList = orderService.getOrderInfoList(order);
 
+		if (ordChgSq > 0) {
+			Collection<Order> exchangeInfoList = orderChangeService.getExchangeInfo(order);
+			mav.addObject("exchangeInfoList"		, exchangeInfoList);								// 교환정보
+		}
+
 		mav.addObject("chgReasonList"				, rendererService.getAvailCommonCodeList("G689"));	// 교환사유
 		mav.addObject("cancelRequestTargetList"		, cancelRequestTargetList);							// 교환요청대상 목록
 		mav.addObject("orderInfoList"				, orderInfoList);									// 주문정보
-		mav.addObject("ordNo"						, ordNo);
+		mav.addObject("ordNo"						, ordNo);											// 주문번호
+		mav.addObject("ordChgSq"					, ordChgSq);										// 주문변경번호
 		mav.addObject("orderDelvAddrInfo"			, orderService.getDeliveryAddrList(order));			// 배송정보
 		mav.addObject("TelExcNoList"				, rendererService.getAvailCommonCodeList("G095"));	// 전화번호국번
 		mav.addObject("PhnExcNoList"				, rendererService.getAvailCommonCodeList("G096"));	// (휴대전화)번호국번
@@ -490,7 +496,7 @@ public class TsaOrderChangeController extends TsaBaseController {
 	 *
 	 * @param Collection<OrderChange>
 	 * @return
-	 * @author card007
+	 * @author card007rtn
 	 * @since 2021. 01. 22
 	 */
 	@PostMapping("/exchangeRequest")
@@ -523,6 +529,44 @@ public class TsaOrderChangeController extends TsaBaseController {
 		return result;
 	}
 
+	/**
+	 * 교환신청 (관리자)
+	 *
+	 * @param Collection<OrderChange>
+	 * @return
+	 * @author card007rtn
+	 * @since 2021. 01. 22
+	 */
+	@PostMapping("/exchangeCancelRequest")
+	@ResponseBody
+	public GagaMap orderExchangeCancelRequest(@RequestBody OrderChange excReq) {
+		GagaMap result = new GagaMap();
+		result.set("status", GagaResponseStatus.FAIL.getCode());
+
+		// 교환요청 데이터 확인
+		if (excReq == null) {
+			result.set("message", message.getMessage("FAIL_1001"));
+			return result;
+		}
+
+		// 세션 회원번호 설정
+		int userNo = TsaSession.getInfo().getUserNo();
+		excReq.setUpdNo(userNo);
+		excReq.setRegNo(userNo);
+
+		// 교환처리
+		result = orderChangeService.exchangeCancel(excReq);
+
+		// 처리 결과 코드에 따른 메세지 설정
+		if (result.get("status").equals(GagaResponseStatus.SUCCESS.getCode())) {
+			result.set("message", message.getMessage("SUCC_0004"));
+		} else {
+			result.set("message", message.getMessage("FAIL_0004"));
+		}
+
+		return result;
+	}
+
 	/**
 	 * 취소요청 (ADMIN, NAPY, 외부몰) (배치) (사용안함)
 	 * 

+ 199 - 55
src/main/webapp/WEB-INF/views/order/ExchangeRequestForm.html

@@ -33,7 +33,8 @@
 				<div id="gridDelvCdList" style="width:100%; height: 140px;" class="ag-theme-balham"></div>
 				
 				<div style="text-align:right; padding-bottom:5px; padding-top:5px;">
-					<button type="button" class="btn btn-success" id="fnExchangeRequestSubmit" onclick="fnExchange()">요청</button>
+					<button type="button" class="btn btn-success" th:unless="${ordChgSq > 0}" id="fnExchangeRequestSubmit" onclick="fnExchange()">교환요청</button>
+					<button type="button" class="btn btn-success" th:if="${ordChgSq > 0}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button>
 				</div>
 				
 				<table class="frmStyle">
@@ -46,20 +47,21 @@
 					<tbody>
 						<tr>
 							<th>교환사유 <i class="star"></i></th>
-							<td>
+							<td th:unless="${ordChgSq > 0}">
 								<select name="selectChgReason" onchange="fnChangeChgReason($(this).val());">
 									<option value="">[선택하세요]</option>
 									<option th:if="${chgReasonList}" th:each="oneData, status : ${chgReasonList}" th:value="|${oneData.cd}:${oneData.cdNm}|" th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
 								</select>
 							</td>
+							<td th:if="${ordChgSq > 0}" th:id="chgReason"></td>
 							<th>귀책사유</th>
 							<td><span id="imputeReason"></span></td>
 						</tr>
 						<tr>
 							<th>회수방법</th>
 							<td>
-								<label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="W" onclick="fnChangeQty()" checked="checked"/>회수요청<span></span></label>
-								<label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="D" onclick="fnChangeQty()"/>직접발송<span></span></label>
+								<label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="W" onclick="fnChangeWdGb(this)"/>회수요청<span></span></label>
+								<label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="D" onclick="fnChangeWdGb(this)"/>직접발송<span></span></label>
 							</td>
 							<th>추가배송비</th>
 							<td id="addDelvFee"></td>
@@ -73,8 +75,8 @@
 					</tbody>
 				</table>
 				
-				<h4>회수지 정보</h4>
-				<table class="frmStyle">
+				<h4 class="chger">회수지 정보</h4>
+				<table class="frmStyle chger">
 					<colgroup>
 						<col style="width:160px;" />
 						<col style="width:320px;" />
@@ -90,7 +92,7 @@
 							<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" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>
+								<button type="button" class="btn btn-info" th:unless="${ordChgSq > 0}" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>
 								<input type="text" name ="chgerBaseAddr" class="w300"/>
 								<input type="text" name ="chgerDtlAddr" class="w300"/>
 							</td>
@@ -102,8 +104,8 @@
 									<option value="">[선택하세요]</option>
 									<option th:if="${TelExcNoList}" th:each="oneData, status : ${TelExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
 								</select>
-								- <input type="text" name ="chgerTelno2" class="w60" value="0000" />
-								- <input type="text" name ="chgerTelno3" class="w60" value="0000" />
+								- <input type="text" name ="chgerTelno2" class="w60"/>
+								- <input type="text" name ="chgerTelno3" class="w60"/>
 							</td>
 							<th>휴대전화 <i class="star"></i></th>
 							<td>
@@ -111,8 +113,8 @@
 									<option value="">[선택하세요]</option>
 									<option th:if="${PhnExcNoList}" th:each="oneData, status : ${PhnExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
 								</select>
-								- <input type="text" name ="chgerPhnno2" class="w60" value="0000" />
-								- <input type="text" name ="chgerPhnno3" class="w60" value="0000" />
+								- <input type="text" name ="chgerPhnno2" class="w60"/>
+								- <input type="text" name ="chgerPhnno3" class="w60"/>
 							</td>
 						</tr>
 						<tr>
@@ -141,7 +143,7 @@
 						<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" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>
+							<button type="button" class="btn btn-info" th:unless="${ordChgSq > 0}" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>
 							<input type="text" name ="recipBaseAddr" class="w300"/>
 							<input type="text" name ="recipDtlAddr" class="w300"/>
 						</td>
@@ -153,8 +155,8 @@
 								<option value="">[선택하세요]</option>
 								<option th:if="${TelExcNoList}" th:each="oneData, status : ${TelExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
 							</select>
-							- <input type="text" name ="recipTelno2" class="w60" value="0000" />
-							- <input type="text" name ="recipTelno3" class="w60" value="0000" />
+							- <input type="text" name ="recipTelno2" class="w60"/>
+							- <input type="text" name ="recipTelno3" class="w60"/>
 						</td>
 						<th>휴대전화 <i class="star"></i></th>
 						<td>
@@ -162,8 +164,8 @@
 								<option value="">[선택하세요]</option>
 								<option th:if="${PhnExcNoList}" th:each="oneData, status : ${PhnExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
 							</select>
-							- <input type="text" name ="recipPhnno2" class="w60" value="0000" />
-							- <input type="text" name ="recipPhnno3" class="w60" value="0000" />
+							- <input type="text" name ="recipPhnno2" class="w60"/>
+							- <input type="text" name ="recipPhnno3" class="w60"/>
 						</td>
 					</tr>
 					<tr>
@@ -184,16 +186,32 @@
 /*<![CDATA[*/
 var cancelRequestTargetList = [[${cancelRequestTargetList}]];				// 교환대상목록
 var ordNo 					= [[${ordNo}]];									// 주문번호
+var ordChgSq 				= [[${ordChgSq}]];								// 주문변경번호
 var orderInfoList 			= [[${orderInfoList}]];							// 주문기본정보
 var payMeans 				= orderInfoList[0].payMeans;					// 결제수단
 var orderDelvAddrInfo		= [[${orderDelvAddrInfo}]];						// 회수지정보
 var addDelvFee				= 0;											// 추가배송비
 var addDelvFeeList			= [];											// 추가배송비정보
 var exchangeRequestList		= [];											// 교환요청목록
+var exchangeInfoList;														// 교환정보
+var wdGb;																	// 회수방법
+var chgerRtnMemo;															// 반품메모
+var delvMemo;																// 배송메모
 
 var temp1 = true;
 var temp2 = true;
 
+// 변경요청정보 승인, 철회
+if (ordChgSq > 0) {
+	exchangeInfoList		= [[${exchangeInfoList}]];						// 교환정보
+	chgReason				= exchangeInfoList[0].chgReason;				// 변경사유코드
+	chgReasonNm				= exchangeInfoList[0].chgReasonNm;				// 변경사유코드명
+	chgMemo					= exchangeInfoList[0].chgMemo;					// 변경사유메모
+	chgerRtnMemo			= exchangeInfoList[0].chgerRtnMemo;				// 반품메모
+	delvMemo				= exchangeInfoList[0].delvMemo;					// 배송메모
+	wdGb					= exchangeInfoList[0].wdGb;						// 회수방법
+}
+
 // 1. 주문정보(교환대상)
 var columnExchangeReqList = [
 	{
@@ -274,26 +292,33 @@ var columnExchangeReqList = [
 				, width			: 100
 				, cellClass		: "text-center"
 				, cellRenderer	: function (params) {
-					var optArr			= params.data.optCd2s.split(',');
-					var ordChgOpt = params.data.ordChgOpt;
-
-					var strVal			= '';
-					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>';
+					if (ordChgSq > 0) {
+						$.each(exchangeInfoList, function(idx, item) {
+							if (params.data.itemCd == item.itemCd && params.data.optCd1 == item.optCd1) {
+								strVal = item.optCd2;
+							}
+						});
 					} else {
-						strVal += '<option value="" selected>선택</option>';
-					}
-
-					$.each(optArr, function(idx,item){
-						if (ordChgOpt == item) {
-							strVal += '<option value="' + item + '" selected>' + item + '</option>';
+						var optArr = params.data.optCd2s.split(',');
+						var ordChgOpt = params.data.ordChgOpt;
+						
+						var strVal = '';
+						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="' + item + '">' + item + '</option>';
+							strVal += '<option value="" selected>선택</option>';
 						}
-					});
-
+						
+						$.each(optArr, function (idx, item) {
+							if (ordChgOpt == item) {
+								strVal += '<option value="' + item + '" selected>' + item + '</option>';
+							} else {
+								strVal += '<option value="' + item + '">' + item + '</option>';
+							}
+						});
+					}
 					return strVal;
 				}
 			},
@@ -304,23 +329,31 @@ var columnExchangeReqList = [
 				, width			: 100
 				, cellClass		: 'text-center'
 				, cellRenderer	: function (params) {
-					var ordQty 			= parseInt(params.data.ordQty);
-					var cnclRtnQty 		= parseInt(params.data.cnclRtnQty);
-					var ordReqChgQty 	= parseInt(params.data.ordReqChgQty);
-					var ordCanChgQty 	= ordQty - (cnclRtnQty +  ordReqChgQty);
-					
-					var strVal 			= "";
-					strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="'+params.data.ordDtlNo+'" onchange="fnChangeQty(this)">';
-					
-					for (i=0 ; i<=ordCanChgQty ; i++) {
-						if (i == params.data.chgQty) {
-							strVal += "	<option value='"+i+"' selected>"+i+"</option>";
-						} else {
-							strVal += "	<option value='"+i+"'>"+i+"</option>";
+					if (ordChgSq > 0) {
+						$.each(exchangeInfoList, function(idx, item) {
+							if (params.data.itemCd == item.itemCd && params.data.optCd1 == item.optCd1) {
+								strVal = item.chgQty;
+							}
+						});
+					} else {
+						var ordQty = parseInt(params.data.ordQty);
+						var cnclRtnQty = parseInt(params.data.cnclRtnQty);
+						var ordReqChgQty = parseInt(params.data.ordReqChgQty);
+						var ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
+						
+						var strVal = "";
+						strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="' + params.data.ordDtlNo + '" onchange="fnChangeQty(this)">';
+						
+						for (i = 0; i <= ordCanChgQty; i++) {
+							if (i == params.data.chgQty) {
+								strVal += "	<option value='" + i + "' selected>" + i + "</option>";
+							} else {
+								strVal += "	<option value='" + i + "'>" + i + "</option>";
+							}
 						}
+						
+						strVal += "</select>";
 					}
-				
-					strVal += "</select>";
 					return strVal;
 				}
 			}
@@ -521,7 +554,7 @@ var gridOptionsDelvCdList = gagaAgGrid.getGridOptions(columnDelvCdList);
 //현재 사유는 회사 입니다.
 var isCustomer = false;
 
-//  사유
+//  사유 변경
 var fnChangeChgReason = function(reasonCd){
 	var arrReasonCd = reasonCd.split(":");
 	var customerReasonArr = ['G689_10', 'G689_30'];
@@ -620,8 +653,13 @@ var fnExchange = function () {
 		}
 	
 		var chgerPhnno 		= chgerPhnno1 + '-' + chgerPhnno2 + '-' + chgerPhnno3;
-		var chgerTelno 		= chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
 		var chgerEmail 		= orderInfoList[0].ordEmail;
+		var chgerTelno;
+		if (gagajf.isNull(chgerTelno1) && gagajf.isNull(chgerTelno2) && gagajf.isNull(chgerTelno3)) {
+			chgerTelno 		= '';
+		} else {
+			chgerTelno 		= chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
+		}
 	}
 
 	// 교환지정보 설정
@@ -657,10 +695,15 @@ var fnExchange = function () {
 	if (gagajf.isNull(recipPhnno3)) {
 		mcxDialog.alert("휴대전화를 입력하세요."); return;
 	}
-	
+
 	var recipPhnno 		= recipPhnno1 + '-' + recipPhnno2 + '-' + recipPhnno3;
-	var recipTelno 		= recipTelno1 + '-' + recipTelno2 + '-' + recipTelno3;
 	var recipEmail 		= orderInfoList[0].ordEmail;
+	var recipTelno;
+	if (gagajf.isNull(recipTelno1) && gagajf.isNull(recipTelno2) && gagajf.isNull(recipTelno3)) {
+		recipTelno 		= '';
+	} else {
+		recipTelno 		= recipTelno1 + '-' + recipTelno2 + '-' + recipTelno3;
+	}
 	
 	var jsonObj = {
 		"ordNo"				: $('#exchangeRequestFrm input[name=ordNo]').val()
@@ -708,6 +751,31 @@ var fnExchange = function () {
 	});
 }
 
+// 교환철회 처리
+var fnExchangeCancel = function() {
+	let data = {};
+	data.ordChgSq = ordChgSq;
+	data.ordNo = ordNo;
+
+	let jsonData = JSON.stringify(data);
+
+	mcxDialog.confirm('요청번호 [' + ordChgSq + '] 에 대한 요청철회 처리를 하시겠습니까?', {
+		cancelBtnText		: "취소",
+		sureBtnClick		: function(){
+			// 교환 실행
+			gagajf.ajaxJsonSubmit(
+				'/orderChange/exchangeCancelRequest/'
+				, jsonData
+				, function() {
+					uifnPopupClose('popupOrderDetail');
+					fnReOpenOrderDetailPopup();
+					uifnPopupClose('popupExchangeRequestForm');
+				}
+			);
+		}
+	});
+}
+
 // 우편번호 DAUM을 이용한 우편번호 팝업 레이어
 var fnOpenDaumAddr = function(loc) {
 	let daumZip = new daum.Postcode({
@@ -734,7 +802,14 @@ var fnOpenDaumAddr = function(loc) {
 
 // 회수지정보 설정
 var fnSetChger = function(){
-	var data = orderDelvAddrInfo[0];
+	var data;
+	
+	if (ordChgSq > 0) {
+		data = exchangeInfoList[0];
+	} else {
+		data = orderDelvAddrInfo[0];
+	}
+	
 	var spRecipPhnno = (data.recipPhnno != null) ? data.recipPhnno.split('-') : null;
 	var spRecipTelno = (data.recipTelno != null) ? data.recipTelno.split('-') : null;
 	
@@ -742,6 +817,7 @@ var fnSetChger = function(){
 	$("#exchangeRequestFrm input[name=chgerZipcode]").val(data.recipZipcode);
 	$("#exchangeRequestFrm input[name=chgerBaseAddr]").val(data.recipBaseAddr);
 	$("#exchangeRequestFrm input[name=chgerDtlAddr]").val(data.recipDtlAddr);
+	$("#exchangeRequestFrm textarea[name=chgerRtnMemo]").val(data.chgerRtnMemo);
 	
 	if (spRecipPhnno) {
 		$("#exchangeRequestFrm select[name=chgerPhnno1]").val(spRecipPhnno[0]);
@@ -758,7 +834,14 @@ var fnSetChger = function(){
 
 // 교환지정보 설정
 var fnSetExchangeAddr = function(){
-	var data = orderDelvAddrInfo[0];
+	var data;
+	
+	if (ordChgSq > 0) {
+		data = exchangeInfoList[0];
+	} else {
+		data = orderDelvAddrInfo[0];
+	}
+	
 	var spRecipPhnno = (data.recipPhnno != null) ? data.recipPhnno.split('-') : null;
 	var spRecipTelno = (data.recipTelno != null) ? data.recipTelno.split('-') : null;
 	
@@ -821,6 +904,8 @@ var fnChangeQty = function(param) {
 			}
 		} else if (item.chgQty > 0) {
 			exchangeRequestTargetList.push(item);
+		} else if (ordChgSq > 0 && item.ordCanChgQty > 0) {
+			exchangeRequestTargetList.push(item);
 		}
 	});
 
@@ -867,7 +952,22 @@ var fnAddDelvFee = function (exchangeRequestTargetList) {
 		gridOptionsDelvCdList.api.setRowData();
 	}
 	
-	$('#addDelvFee').text(addDelvFee + '원');
+	$('#addDelvFee').text(addDelvFee.addComma() + '원');
+}
+
+// 회수방법 라디오 클릭 이벤트
+var fnChangeWdGb = function(param) {
+	let wdGb = $(param).val();
+
+	// 회수지정보 히든 처리
+	if (wdGb == 'D') {
+		$('.chger').css('display', 'none');
+	} else {
+		$('.chger').css('display', '');
+	}
+
+	// 추가배송비 계산
+	fnChangeQty();
 }
 
 $(document).ready(function() {
@@ -886,6 +986,50 @@ $(document).ready(function() {
 	
 	// 4. 교환지정보설정
 	fnSetExchangeAddr();
+	
+	// 5. 회수방법 라디오 체크 처리
+	if (wdGb == 'D') {
+		$('input:radio[name="wdGb"]:radio[value="D"]').prop('checked', true);
+	} else {
+		$('input:radio[name="wdGb"]:radio[value="W"]').prop('checked', true);
+	}
+	
+	// 교환철회 처리
+	if (ordChgSq > 0) {
+		// 5. 교환사유설정
+		$('#chgReason').text(chgReasonNm);
+		
+		// 6. 교환요청메모설정
+		$('#chgMemo').text(chgMemo);
+		
+		// 7. 귀책사유 설정
+		fnChangeChgReason(chgReason);
+		
+		// 8. 데이터 Disabled 처리
+		$('input:radio[name=wdGb]').attr('disabled', true);				// 8-1. 회수방법
+		$('#chgMemo').attr('readOnly', true);							// 8-2. 요청메모
+		$('input[name=chgerNm]').attr('readOnly', true);				// 8-3. 회수지정보 > 보내는사람
+		$('input[name=chgerBaseAddr]').attr('readOnly', true);			// 8-4. 회수지정보 > 기본주소
+		$('input[name=chgerDtlAddr]').attr('readOnly', true);			// 8-5. 회수지정보 > 상세주소
+		$('select[name=chgerTelno1]').attr('disabled', true);			// 8-6. 회수지정보 > 일반전화
+		$('input[name=chgerTelno2]').attr('readOnly', true);			// 8-6. 회수지정보 > 일반전화
+		$('input[name=chgerTelno3]').attr('readOnly', true);			// 8-6. 회수지정보 > 일반전화
+		$('select[name=chgerPhnno1]').attr('disabled', true);			// 8-7. 회수지정보 > 휴대전화
+		$('input[name=chgerPhnno2]').attr('readOnly', true);			// 8-7. 회수지정보 > 휴대전화
+		$('input[name=chgerPhnno3]').attr('readOnly', true);			// 8-7. 회수지정보 > 휴대전화
+		$('#chgerRtnMemo').attr('readOnly', true);						// 8-8. 회수지정보 > 반품메모
+		$('input[name=recipNm]').attr('readOnly', true);				// 8-9. 교환지정보 > 받는사람
+		$('input[name=recipBaseAddr]').attr('readOnly', true);			// 8-10. 교환지정보 > 기본주소
+		$('input[name=recipDtlAddr]').attr('readOnly', true);			// 8-11. 교환지정보 > 상세주소
+		$('select[name=recipTelno1]').attr('disabled', true);			// 8-12. 교환지정보 > 일반전화
+		$('input[name=recipTelno2]').attr('readOnly', true);			// 8-12. 교환지정보 > 일반전화
+		$('input[name=recipTelno3]').attr('readOnly', true);			// 8-12. 교환지정보 > 일반전화
+		$('select[name=recipPhnno1]').attr('disabled', true);			// 8-13. 교환지정보 > 휴대전화
+		$('input[name=recipPhnno2]').attr('readOnly', true);			// 8-13. 교환지정보 > 휴대전화
+		$('input[name=recipPhnno3]').attr('readOnly', true);			// 8-13. 교환지정보 > 휴대전화
+		$('#delvMemo').prop('readOnly', true);							// 8-14. 교환지정보 > 배송메모
+		
+	}
 });
 </script>
 </html>

+ 9 - 2
src/main/webapp/WEB-INF/views/order/OrderDetailForm.html

@@ -618,7 +618,7 @@ var columnDefsOrderChangeInfo = [
 				rtnStr = '<a href="javascript:void(0);" onclick="fnCancelRequest(\'' + params.value + '\');">' + params.value + '</a>';
 			} else if (params.data.chgStat == 'G685_40') {
 				rtnStr = '<a href="javascript:void(0);" onclick="fnReturnRequest(\'' + params.value + '\');">' + params.value + '</a>';
-			} else if (params.data.chgStat == 'G685_30') {
+			} else if (params.data.chgStat == 'G685_30' || params.data.chgStat == 'G685_33') {
 				rtnStr = '<a href="javascript:void(0);" onclick="fnExchangeRequest(\'' + params.value + '\');">' + params.value + '</a>';
 			} else {
 				rtnStr = params.value;
@@ -644,6 +644,13 @@ var columnDefsOrderChangeInfo = [
 		}
 	},
 	{headerName: "변경사유"		, field: "chgReasonNm"	, width: 100	, cellClass: 'text-center'},
+	{
+		headerName: "회수구분", field: "wdGb", width: 100, cellClass: 'text-center',
+		cellRenderer: function (params) {
+			console.log(params);
+			return params.value == 'W' ? '회수요청' : '직접배송'; 
+		}
+	},
 	{headerName: "요청메모"		, field: "chgMemo"		, width: 150	, cellClass: 'text-center'},
 	{headerName: "변경자명"		, field: "chgerNm"		, width: 100	, cellClass: 'text-center'},
 	{headerName: "변경자핸드폰"		, field: "chgerPhnno"	, width: 120	, cellClass: 'text-center', editable: true},
@@ -656,7 +663,7 @@ var columnDefsOrderChangeInfo = [
 			var rtnStr = ""
 			
 			// 회수지수정가능(교환요청, 반품요청)
-			if (!params.data.wdGb != 'D' && (params.data.chgStat == 'G685_30' || params.data.chgStat == 'G685_40')) {
+			if (params.data.wdGb != 'D' && (params.data.chgStat == 'G685_30' || params.data.chgStat == 'G685_33' || params.data.chgStat == 'G685_40')) {
 				
 				rtnStr += params.value;			
 				rtnStr += "<button type=\"button\" style=\"margin-left:10px\" class=\"btn btn-info\" onclick=\"fnOpenDaumAddr('" + params.node.rowIndex + "', 'CLAIM');\">POST</button>";