|
@@ -313,7 +313,7 @@ var columnExchangeReqList = [
|
|
|
strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="'+params.data.ordDtlNo+'" onchange="fnChangeQty(this)">';
|
|
strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="'+params.data.ordDtlNo+'" onchange="fnChangeQty(this)">';
|
|
|
|
|
|
|
|
for (i=0 ; i<=ordCanChgQty ; i++) {
|
|
for (i=0 ; i<=ordCanChgQty ; i++) {
|
|
|
- if (i == params.data.ordCanChgQty) {
|
|
|
|
|
|
|
+ if (i == params.data.chgQty) {
|
|
|
strVal += " <option value='"+i+"' selected>"+i+"</option>";
|
|
strVal += " <option value='"+i+"' selected>"+i+"</option>";
|
|
|
} else {
|
|
} else {
|
|
|
strVal += " <option value='"+i+"'>"+i+"</option>";
|
|
strVal += " <option value='"+i+"'>"+i+"</option>";
|
|
@@ -543,8 +543,8 @@ var fnChangeChgReason = function(reasonCd){
|
|
|
$("#imputeReason").text("회사");
|
|
$("#imputeReason").text("회사");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $('#cancelRequestFrm input[name=chgReason]').val(arrReasonCd[0]);
|
|
|
|
|
- $('#cancelRequestFrm input[name=chgReasonDesc]').val(arrReasonCd[1]);
|
|
|
|
|
|
|
+ $('#exchangeRequestFrm input[name=chgReason]').val(arrReasonCd[0]);
|
|
|
|
|
+ $('#exchangeRequestFrm input[name=chgReasonDesc]').val(arrReasonCd[1]);
|
|
|
|
|
|
|
|
// 추가배송비 설정
|
|
// 추가배송비 설정
|
|
|
fnChangeQty();
|
|
fnChangeQty();
|
|
@@ -552,14 +552,13 @@ var fnChangeChgReason = function(reasonCd){
|
|
|
|
|
|
|
|
// 교환요청
|
|
// 교환요청
|
|
|
var fnExchange = function () {
|
|
var fnExchange = function () {
|
|
|
- console.log('a');
|
|
|
|
|
var qty = false;
|
|
var qty = false;
|
|
|
var opt = false;
|
|
var opt = false;
|
|
|
var wdGb = $('#wdGb:checked').val();
|
|
var wdGb = $('#wdGb:checked').val();
|
|
|
|
|
|
|
|
// 1. 교환수량 체크
|
|
// 1. 교환수량 체크
|
|
|
$.each(cancelRequestTargetList, function(idx, item) {
|
|
$.each(cancelRequestTargetList, function(idx, item) {
|
|
|
- if (item.ordCanChgQty > 0) {
|
|
|
|
|
|
|
+ if (item.chgQty > 0) {
|
|
|
qty = true;
|
|
qty = true;
|
|
|
|
|
|
|
|
if (!gagajf.isNull(item.ordChgOpt)) {
|
|
if (!gagajf.isNull(item.ordChgOpt)) {
|
|
@@ -679,6 +678,7 @@ var fnExchange = function () {
|
|
|
,"chgerDtlAddr" : chgerDtlAddr
|
|
,"chgerDtlAddr" : chgerDtlAddr
|
|
|
,"chgerPhnno" : chgerPhnno
|
|
,"chgerPhnno" : chgerPhnno
|
|
|
,"chgerTelno" : chgerTelno
|
|
,"chgerTelno" : chgerTelno
|
|
|
|
|
+ ,"chgerRtnMemo" : $("#exchangeRequestFrm textarea[name=chgerRtnMemo]").val()
|
|
|
,"recipNm" : recipNm
|
|
,"recipNm" : recipNm
|
|
|
,"recipEmail" : recipEmail
|
|
,"recipEmail" : recipEmail
|
|
|
,"recipZipcode" : recipZipcode
|
|
,"recipZipcode" : recipZipcode
|
|
@@ -686,6 +686,7 @@ var fnExchange = function () {
|
|
|
,"recipDtlAddr" : recipDtlAddr
|
|
,"recipDtlAddr" : recipDtlAddr
|
|
|
,"recipPhnno" : recipPhnno
|
|
,"recipPhnno" : recipPhnno
|
|
|
,"recipTelno" : recipTelno
|
|
,"recipTelno" : recipTelno
|
|
|
|
|
+ ,"delvMemo" : $("#exchangeRequestFrm textarea[name=delvMemo]").val()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 주문번호, 교환사유, 교환메모, (취소, 반품, 교환 신청 정보 목록)
|
|
// 주문번호, 교환사유, 교환메모, (취소, 반품, 교환 신청 정보 목록)
|
|
@@ -699,9 +700,9 @@ var fnExchange = function () {
|
|
|
'/orderChange/exchangeRequest/'
|
|
'/orderChange/exchangeRequest/'
|
|
|
, jsonData
|
|
, jsonData
|
|
|
, function() {
|
|
, function() {
|
|
|
- //uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- //fnReOpenOrderDetailPopup();
|
|
|
|
|
- //uifnPopupClose('popupReturnRequestForm');
|
|
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ uifnPopupClose('popupExchangeRequestForm');
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
@@ -802,7 +803,7 @@ var fnChangeOption = function(param) {
|
|
|
|
|
|
|
|
// 교환수량 변경 이벤트
|
|
// 교환수량 변경 이벤트
|
|
|
var fnChangeQty = function(param) {
|
|
var fnChangeQty = function(param) {
|
|
|
- var ordCanChgQty = $(param).val();
|
|
|
|
|
|
|
+ var chgQty = $(param).val();
|
|
|
var ordDtlNo = $(param).attr('ordDtlNo');
|
|
var ordDtlNo = $(param).attr('ordDtlNo');
|
|
|
var exchangeRequestTargetList = [];
|
|
var exchangeRequestTargetList = [];
|
|
|
|
|
|
|
@@ -813,12 +814,12 @@ var fnChangeQty = function(param) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- item.ordCanChgQty = ordCanChgQty;
|
|
|
|
|
|
|
+ item.chgQty = chgQty;
|
|
|
|
|
|
|
|
- if (ordCanChgQty > 0) {
|
|
|
|
|
|
|
+ if (chgQty > 0) {
|
|
|
exchangeRequestTargetList.push(item);
|
|
exchangeRequestTargetList.push(item);
|
|
|
}
|
|
}
|
|
|
- } else if (item.ordCanChgQty > 0) {
|
|
|
|
|
|
|
+ } else if (item.chgQty > 0) {
|
|
|
exchangeRequestTargetList.push(item);
|
|
exchangeRequestTargetList.push(item);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|