|
|
@@ -425,30 +425,35 @@
|
|
|
let accountNm = $('#returnForm input[name=accountNm]').val();
|
|
|
let bankCd = $('#returnForm 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 : '/mypage/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");
|
|
|
- }
|
|
|
- });
|
|
|
+ let chk = false;
|
|
|
+ if (paymentInfo.payMeans == 'G014_20' && paymentInfo.payStat == 'G016_30') {
|
|
|
+ if (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: '/mypage/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;
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ chk = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 추가배송비 PG 처리
|
|
|
@@ -479,20 +484,45 @@
|
|
|
data.shipCompCd = $('#returnForm input[name=shipCompCd]').val();
|
|
|
|
|
|
let jsonData = JSON.stringify(data);
|
|
|
-
|
|
|
- gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
|
|
|
- if (addPayCost > 0) {
|
|
|
- let ordChgSq = result.ordChgSq;
|
|
|
- let ordNo = result.ordNo;
|
|
|
-
|
|
|
- $('#addPaymentForm input[name=ordChgSq]').val(ordChgSq);
|
|
|
- $('#addPaymentForm input[name=ordNo]').val(ordNo);
|
|
|
-
|
|
|
- document.addPaymentForm.submit();
|
|
|
- } else {
|
|
|
- cfnGoToPage(_PAGE_MYPAGE_CRE_LIST);
|
|
|
- }
|
|
|
- }, true);
|
|
|
+
|
|
|
+ // 무통장입금 취소의 경우 계좌인증처리 후 반품 진행
|
|
|
+ if (chk) {
|
|
|
+ // 무통장입금 계좌인증
|
|
|
+ gagajf.ajaxJsonSubmit('/order/account/check', jsonData, function (result) {
|
|
|
+ if (result.isValid) { // 유효하면 true
|
|
|
+ gagajf.ajaxJsonSubmit(url, jsonData, function (result) {
|
|
|
+ if (addPayCost > 0) {
|
|
|
+ let ordChgSq = result.ordChgSq;
|
|
|
+ let ordNo = result.ordNo;
|
|
|
+
|
|
|
+ $('#addPaymentForm input[name=ordChgSq]').val(ordChgSq);
|
|
|
+ $('#addPaymentForm input[name=ordNo]').val(ordNo);
|
|
|
+
|
|
|
+ document.addPaymentForm.submit();
|
|
|
+ } else {
|
|
|
+ cfnGoToPage(_PAGE_MYPAGE_CRE_LIST);
|
|
|
+ }
|
|
|
+ }, true);
|
|
|
+ } else {
|
|
|
+ mcxDialog.alert('환불계좌가 유효하지 않습니다.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ gagajf.ajaxJsonSubmit(url, jsonData, function (result) {
|
|
|
+ if (addPayCost > 0) {
|
|
|
+ let ordChgSq = result.ordChgSq;
|
|
|
+ let ordNo = result.ordNo;
|
|
|
+
|
|
|
+ $('#addPaymentForm input[name=ordChgSq]').val(ordChgSq);
|
|
|
+ $('#addPaymentForm input[name=ordNo]').val(ordNo);
|
|
|
+
|
|
|
+ document.addPaymentForm.submit();
|
|
|
+ } else {
|
|
|
+ cfnGoToPage(_PAGE_MYPAGE_CRE_LIST);
|
|
|
+ }
|
|
|
+ }, true);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 반품 수량 변경 이벤트 처리
|