|
|
@@ -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 표기
|