|
@@ -555,7 +555,7 @@ var columnDefsDeliveryInfo = [
|
|
|
, width : 200
|
|
, width : 200
|
|
|
, cellClass : 'text-left'
|
|
, cellClass : 'text-left'
|
|
|
, cellRenderer : function (params) {
|
|
, cellRenderer : function (params) {
|
|
|
- return params.value + "<button type=\"button\" style=\"margin-left:10px\" class=\"btn btn-info\" onclick=\"cfnOpenPostFindPopup('grid');\">우편번호찾기</button>";
|
|
|
|
|
|
|
+ return params.value + "<button type=\"button\" style=\"margin-left:10px\" class=\"btn btn-info\" onclick=\"fnOpenDaumAddr('grid');\">우편번호찾기</button>";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{headerName: "주소(기본)" , field: "recipBaseAddr" , width: 350, cellClass: 'text-left'},
|
|
{headerName: "주소(기본)" , field: "recipBaseAddr" , width: 350, cellClass: 'text-left'},
|
|
@@ -934,28 +934,17 @@ $(document).ready(function () {
|
|
|
gridOptionsGoodsInfo.api.forEachNode(function (rowNode, index) {
|
|
gridOptionsGoodsInfo.api.forEachNode(function (rowNode, index) {
|
|
|
|
|
|
|
|
// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
|
|
// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
|
|
|
- if (rowNode.data.ordDtlStat == 'G013_10'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_20'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_30'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_40') {
|
|
|
|
|
|
|
+ if (rowNode.data.ordDtlStat == 'G013_10' || rowNode.data.ordDtlStat == 'G013_20' || rowNode.data.ordDtlStat == 'G013_30' || rowNode.data.ordDtlStat == 'G013_40') {
|
|
|
$("#btnCancel").removeClass("off"); //취소요청
|
|
$("#btnCancel").removeClass("off"); //취소요청
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 배송중, 출고완료, 배송완료 일때 반품, 교환 가능
|
|
// 배송중, 출고완료, 배송완료 일때 반품, 교환 가능
|
|
|
- if ((rowNode.data.ordDtlStat == 'G013_50'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_55'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_60'
|
|
|
|
|
- )
|
|
|
|
|
- //&& rowNode.data.ordQty > rowNode.data.chgSumQty
|
|
|
|
|
- ) {
|
|
|
|
|
|
|
+ if ((rowNode.data.ordDtlStat == 'G013_50' || rowNode.data.ordDtlStat == 'G013_55' || rowNode.data.ordDtlStat == 'G013_60') && rowNode.data.ordQty > rowNode.data.ordReqChgQty) {
|
|
|
$("#btnReturn, #btnExchange").removeClass("off");
|
|
$("#btnReturn, #btnExchange").removeClass("off");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
|
|
// 입금대기, 결제완료, 상품준비중, 배송준비중 일때 취소가능
|
|
|
- if (rowNode.data.ordDtlStat == 'G013_10'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_20'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_30'
|
|
|
|
|
- || rowNode.data.ordDtlStat == 'G013_40') {
|
|
|
|
|
|
|
+ if (rowNode.data.ordDtlStat == 'G013_10' || rowNode.data.ordDtlStat == 'G013_20' || rowNode.data.ordDtlStat == 'G013_30' || rowNode.data.ordDtlStat == 'G013_40') {
|
|
|
addrBtnChkCnt++;
|
|
addrBtnChkCnt++;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -998,358 +987,400 @@ $(document).ready(function () {
|
|
|
|
|
|
|
|
<!-- function -->
|
|
<!-- function -->
|
|
|
<script>
|
|
<script>
|
|
|
- var gridOrderChangeInfoSelectedIdx = '';
|
|
|
|
|
-
|
|
|
|
|
- // 배송지변경
|
|
|
|
|
- var fnUpdateOrderAddr = function () {
|
|
|
|
|
- gridOptionsDeliveryInfo.api.stopEditing();
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(gridOptionsDeliveryInfo.api.getRowNode(0).data);
|
|
|
|
|
- mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- "/order/deliver/addr/update"
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function () {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+var gridOrderChangeInfoSelectedIdx = '';
|
|
|
|
|
|
|
|
- // 반품요청
|
|
|
|
|
- var fnReturnRequest = function () {
|
|
|
|
|
- var actionUrl = "/orderChange/return/request/form?ordNo=" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupReturnRequestForm');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 배송지변경
|
|
|
|
|
+var fnUpdateOrderAddr = function () {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.stopEditing();
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(gridOptionsDeliveryInfo.api.getRowNode(0).data);
|
|
|
|
|
+ mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ "/order/deliver/addr/update"
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- // 교환요청
|
|
|
|
|
- var fnExchangeRequest = function () {
|
|
|
|
|
- var actionUrl = "/orderChange/exchange/request/form?ordNo=" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupExchangeRequestForm');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 취소요청
|
|
|
|
|
+var fnCancelRequest = function () {
|
|
|
|
|
+ var actionUrl = "/orderChange/cancel/request/form?ordNo=" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCancelRequestForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 반품요청
|
|
|
|
|
+var fnReturnRequest = function () {
|
|
|
|
|
+ var actionUrl = "/orderChange/return/request/form?ordNo=" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupReturnRequestForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 교환요청
|
|
|
|
|
+var fnExchangeRequest = function () {
|
|
|
|
|
+ var actionUrl = "/orderChange/exchange/request/form?ordNo=" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupExchangeRequestForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 취소승인
|
|
|
|
|
+var fnCancelConfirmRequest = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 취소승인 처리를 하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo; //전역변수
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/orderChange/cancel/confirm'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 취소요청철회
|
|
|
|
|
+var fnCancelConfirmRequestCancel = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 요청철회 처리를 하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/orderChange/cancel/wait/cancel'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- // 취소요청
|
|
|
|
|
- var fnCancelRequest = function () {
|
|
|
|
|
- var actionUrl = "/orderChange/cancel/request/form?ordNo=" + ordNo + "&cncWait=N";
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupCancelRequestForm');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 취소승인
|
|
|
|
|
- var fnCancelConfirmRequest = function (ordChgSq) {
|
|
|
|
|
- mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 취소승인 처리를 하시겠습니까?", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordNo = ordNo; //전역변수
|
|
|
|
|
- data.ordChgSq = ordChgSq;
|
|
|
|
|
|
|
+// 주문상품 상세 변경 이력 팝업
|
|
|
|
|
+var fnOrderDetailChangeHst = function (ordDtlNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/change/hst/form/" + ordDtlNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailChangeHstForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 쿠폰내역 팝업
|
|
|
|
|
+var fnOrderCouponHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/coupon/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailCouponHstForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 다다익선내역 팝업
|
|
|
|
|
+var fnOrderTmtbHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/tmtb/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailTmtbHstForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 포인트내역 팝업
|
|
|
|
|
+var fnOrderPointHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/point/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailPointHstForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 상품권내역 팝업
|
|
|
|
|
+var fnOrderGiftcardHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/giftcard/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailGiftcardHstForm');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 관리자메모 등록
|
|
|
|
|
+var fnCreateOrderMemo = function (ordNo, seq, mode) {
|
|
|
|
|
+ var actionUrl = "/order/memo/create/form?ordNo=" + ordNo + "&seq=" + seq + "&mode=" + mode;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCreateOrderMemo');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 환불계좌 등록
|
|
|
|
|
+var fnCreateOrderRfAccount = function (ordNo, custNo) {
|
|
|
|
|
+ var actionUrl = "/order/refund/account/create/form?ordNo=" + ordNo + "&custNo="+custNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCreateRefundAccount');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 주문메모 삭제
|
|
|
|
|
+var fnDeleteOrderMemo = function (ordNo, orderMemoSq) {
|
|
|
|
|
+ mcxDialog.confirm('삭제하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.seq = orderMemoSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/memo/delete'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+ fnBindOrderMemo();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/orderChange/cancel/confirm'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- fnReOpenOrderDetailPopup();
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 주문메모 바인딩
|
|
|
|
|
+var fnBindOrderMemo = function() {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/admin/memo/list/" + ordNo
|
|
|
|
|
+ , gridOptionsOrderMemoInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 주문 변경요청정보 바인딩
|
|
|
|
|
+var fnBindOrderChangeInfo = function() {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/return/info/list/" + ordNo
|
|
|
|
|
+ , gridOptionsOrderChangeInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ $('#gridOrderChangeInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 환불계좌 정보
|
|
|
|
|
+var fnBindOrderRfAccountInfo = function () {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/refund/account/info/list?ordNo=" + ordNo+"&custNo="+custNo
|
|
|
|
|
+ , gridOptionsRefundAccountInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ $('#gridOptionsRefundAccountInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 배송비 DATA 바인딩
|
|
|
|
|
+var fnBindDeliveryAddr = function(delvAddrSq) {
|
|
|
|
|
+ if (typeof (delvAddrSq) != 'undefined') {
|
|
|
|
|
+ var strLink = '/order/deliver/addr/info/' + delvAddrSq;
|
|
|
|
|
+ var jsonData = JSON.stringify([]);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(strLink, jsonData, fnBindDeliveryAddrCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 배송정보
|
|
|
|
|
+var fnBindDeliveryAddrCallBack = function(result) {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.setRowData(result);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 우편번호 찾기관련
|
|
|
|
|
+var fnSetPostValue = function(zipNo, baseRoadAddr1, baseRoadAddr2, etcAddr, postPosition) {
|
|
|
|
|
+ if (postPosition == 'grid') {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipPostNo = zipNo;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipBaseAddr = baseRoadAddr1;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipDtlAddr = baseRoadAddr2;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.refreshCells();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (postPosition == 'returnRequest') {
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerPostNo]").val(zipNo);
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerBaseAddr]").val(baseRoadAddr1);
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerDtlAddr]").val(baseRoadAddr2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (postPosition == 'updateOrderChangeAddr') {
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerPostNo = zipNo;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerBaseAddr = baseRoadAddr1;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerDtlAddr = baseRoadAddr2;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.refreshCells();
|
|
|
|
|
|
|
|
- // 취소요청철회
|
|
|
|
|
- var fnCancelConfirmRequestCancel = function (ordChgSq) {
|
|
|
|
|
- mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 요청철회 처리를 하시겠습니까?", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordChgSq = ordChgSq;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/orderChange/cancel/wait/cancel'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- fnReOpenOrderDetailPopup();
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- // 주문상품 상세 변경 이력 팝업
|
|
|
|
|
- var fnOrderDetailChangeHst = function (ordDtlNo) {
|
|
|
|
|
- var actionUrl = "/order/detail/change/hst/form/" + ordDtlNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupOrderDetailChangeHstForm');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 쿠폰내역 팝업
|
|
|
|
|
- var fnOrderCouponHst = function (ordNo) {
|
|
|
|
|
- var actionUrl = "/order/detail/coupon/hst/form/" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupOrderDetailCouponHstForm');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 변경요청 > 우편번호찾기
|
|
|
|
|
+var fnOpenPostFindPopup = function (idx) {
|
|
|
|
|
+ gridOrderChangeInfoSelectedIdx = idx;
|
|
|
|
|
+ cfnOpenPostFindPopup('updateOrderChangeAddr');
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 변경요청 > 회수지정보 저장
|
|
|
|
|
+var fnSaveChgerAddr = function (rowIdx) {
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.stopEditing();
|
|
|
|
|
|
|
|
- // 다다익선내역 팝업
|
|
|
|
|
- var fnOrderTmtbHst = function (ordNo) {
|
|
|
|
|
- var actionUrl = "/order/detail/tmtb/hst/form/" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupOrderDetailTmtbHstForm');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 포인트내역 팝업
|
|
|
|
|
- var fnOrderPointHst = function (ordNo) {
|
|
|
|
|
- var actionUrl = "/order/detail/point/hst/form/" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupOrderDetailPointHstForm');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ var jsonData = JSON.stringify(gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data);
|
|
|
|
|
|
|
|
- // 상품권내역 팝업
|
|
|
|
|
- var fnOrderGiftcardHst = function (ordNo) {
|
|
|
|
|
- var actionUrl = "/order/detail/giftcard/hst/form/" + ordNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupOrderDetailGiftcardHstForm');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 관리자메모 등록
|
|
|
|
|
- var fnCreateOrderMemo = function (ordNo, seq, mode) {
|
|
|
|
|
- var actionUrl = "/order/memo/create/form?ordNo=" + ordNo + "&seq=" + seq + "&mode=" + mode;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupCreateOrderMemo');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ "/order/change/info/addr/update"
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- // 환불계좌 등록
|
|
|
|
|
- var fnCreateOrderRfAccount = function (ordNo, custNo) {
|
|
|
|
|
- var actionUrl = "/order/refund/account/create/form?ordNo=" + ordNo + "&custNo="+custNo;
|
|
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupCreateRefundAccount');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 주문메모 삭제
|
|
|
|
|
- var fnDeleteOrderMemo = function (ordNo, orderMemoSq) {
|
|
|
|
|
- mcxDialog.confirm('삭제하시겠습니까?', {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordNo = ordNo;
|
|
|
|
|
- data.seq = orderMemoSq;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/order/memo/delete'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function () {
|
|
|
|
|
- fnBindOrderMemo();
|
|
|
|
|
|
|
+// 반품요청 철회
|
|
|
|
|
+var fnReturnReqeustCancel = function (ordChgSq, ordDtlNo, rowIdx) {
|
|
|
|
|
+ mcxDialog.confirm('반품요청을 철회하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/return/request/cancel'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ if (result.message != '회수컨펌 된 내역이 있습니다.') {
|
|
|
|
|
+ var selectedRow = gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.updateRowData({remove: [selectedRow]});
|
|
|
}
|
|
}
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 주문메모 바인딩
|
|
|
|
|
- var fnBindOrderMemo = function() {
|
|
|
|
|
- gagaAgGrid.fetch(
|
|
|
|
|
- "/order/admin/memo/list/" + ordNo
|
|
|
|
|
- , gridOptionsOrderMemoInfo
|
|
|
|
|
- , null
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 주문 변경요청정보 바인딩
|
|
|
|
|
- var fnBindOrderChangeInfo = function() {
|
|
|
|
|
- gagaAgGrid.fetch(
|
|
|
|
|
- "/order/return/info/list/" + ordNo
|
|
|
|
|
- , gridOptionsOrderChangeInfo
|
|
|
|
|
- , null
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- $('#gridOrderChangeInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 환불계좌 정보
|
|
|
|
|
- var fnBindOrderRfAccountInfo = function () {
|
|
|
|
|
- gagaAgGrid.fetch(
|
|
|
|
|
- "/order/refund/account/info/list?ordNo=" + ordNo+"&custNo="+custNo
|
|
|
|
|
- , gridOptionsRefundAccountInfo
|
|
|
|
|
- , null
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- $('#gridOptionsRefundAccountInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 배송비 DATA 바인딩
|
|
|
|
|
- var fnBindDeliveryAddr = function(delvAddrSq) {
|
|
|
|
|
- if (typeof (delvAddrSq) != 'undefined') {
|
|
|
|
|
- var strLink = '/order/deliver/addr/info/' + delvAddrSq;
|
|
|
|
|
- var jsonData = JSON.stringify([]);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(strLink, jsonData, fnBindDeliveryAddrCallBack);
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 배송정보
|
|
|
|
|
- var fnBindDeliveryAddrCallBack = function(result) {
|
|
|
|
|
- gridOptionsDeliveryInfo.api.setRowData(result);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 우편번호 찾기관련
|
|
|
|
|
- var fnSetPostValue = function(zipNo, baseRoadAddr1, baseRoadAddr2, etcAddr, postPosition) {
|
|
|
|
|
- if (postPosition == 'grid') {
|
|
|
|
|
- gridOptionsDeliveryInfo.api.getRowNode(0).data.recipPostNo = zipNo;
|
|
|
|
|
- gridOptionsDeliveryInfo.api.getRowNode(0).data.recipBaseAddr = baseRoadAddr1;
|
|
|
|
|
- gridOptionsDeliveryInfo.api.getRowNode(0).data.recipDtlAddr = baseRoadAddr2;
|
|
|
|
|
- gridOptionsDeliveryInfo.api.refreshCells();
|
|
|
|
|
- }
|
|
|
|
|
- else if (postPosition == 'returnRequest') {
|
|
|
|
|
- $("#returnRequestFrm input[name=chgerPostNo]").val(zipNo);
|
|
|
|
|
- $("#returnRequestFrm input[name=chgerBaseAddr]").val(baseRoadAddr1);
|
|
|
|
|
- $("#returnRequestFrm input[name=chgerDtlAddr]").val(baseRoadAddr2);
|
|
|
|
|
- }
|
|
|
|
|
- else if (postPosition == 'updateOrderChangeAddr') {
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerPostNo = zipNo;
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerBaseAddr = baseRoadAddr1;
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerDtlAddr = baseRoadAddr2;
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.refreshCells();
|
|
|
|
|
-
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 교환요청 철회
|
|
|
|
|
+var fnExchangeReqeustCancel = function (ordChgSq, ordNo, ordDtlNo, rowIdx) {
|
|
|
|
|
+ mcxDialog.confirm('교환요청을 취소하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/exchange/request/cancel'
|
|
|
|
|
+ , jsonData, function () {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
- // 변경요청 > 우편번호찾기
|
|
|
|
|
- var fnOpenPostFindPopup = function (idx) {
|
|
|
|
|
- gridOrderChangeInfoSelectedIdx = idx;
|
|
|
|
|
- cfnOpenPostFindPopup('updateOrderChangeAddr');
|
|
|
|
|
|
|
+// LMS 전송
|
|
|
|
|
+var fnOpenLmsForm = function (orderPhnno, custNo) {
|
|
|
|
|
+ if (gagajf.isNull(custNo) && gagajf.isNull(orderPhnno)) {
|
|
|
|
|
+ mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 변경요청 > 회수지정보 저장
|
|
|
|
|
- var fnSaveChgerAddr = function (rowIdx) {
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.stopEditing();
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data);
|
|
|
|
|
-
|
|
|
|
|
- mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- "/order/change/info/addr/update"
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function () {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderPhnno]').val(orderPhnno);
|
|
|
|
|
+ $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
|
|
|
- // 반품요청 철회
|
|
|
|
|
- var fnReturnReqeustCancel = function (ordChgSq, ordDtlNo, rowIdx) {
|
|
|
|
|
- mcxDialog.confirm('반품요청을 철회하시겠습니까?', {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordChgSq = ordChgSq;
|
|
|
|
|
- data.ordDtlNo = ordDtlNo;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/order/return/request/cancel'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- if (result.message != '회수컨펌 된 내역이 있습니다.') {
|
|
|
|
|
- var selectedRow = gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data;
|
|
|
|
|
- gridOptionsOrderChangeInfo.api.updateRowData({remove: [selectedRow]});
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ var param = {};
|
|
|
|
|
+ param.elementCellPhnno = '#orderDetailInfo input[name=orderPhnno]';
|
|
|
|
|
+ param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
+ cfnOpenLmsPopup(param);
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
- // 교환요청 철회
|
|
|
|
|
- var fnExchangeReqeustCancel = function (ordChgSq, ordNo, ordDtlNo, rowIdx) {
|
|
|
|
|
- mcxDialog.confirm('교환요청을 취소하시겠습니까?', {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordNo = ordNo;
|
|
|
|
|
- data.ordDtlNo = ordDtlNo;
|
|
|
|
|
- data.ordChgSq = ordChgSq;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/order/exchange/request/cancel'
|
|
|
|
|
- , jsonData, function () {
|
|
|
|
|
- uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- fnReOpenOrderDetailPopup();
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // LMS 전송
|
|
|
|
|
- var fnOpenLmsForm = function (orderPhnno, custNo) {
|
|
|
|
|
- if (gagajf.isNull(custNo) && gagajf.isNull(orderPhnno)) {
|
|
|
|
|
- mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+// EMAIL 전송
|
|
|
|
|
+var fnOpenEmailForm = function (orderEmail, orderNm, custNo) {
|
|
|
|
|
+ if (gagajf.isNull(orderEmail) && gagajf.isNull(orderNm) && gagajf.isNull(custNo)) {
|
|
|
|
|
+ mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderEmail]').val(orderEmail);
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderNm]').val(orderNm);
|
|
|
|
|
+ $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
+
|
|
|
|
|
+ var param = {};
|
|
|
|
|
+ param.elementRecipEmail = '#orderDetailInfo input[name=orderEmail]';
|
|
|
|
|
+ param.elementCustNm = '#orderDetailInfo input[name=orderNm]';
|
|
|
|
|
+ param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
+
|
|
|
|
|
+ cfnOpenEmailPopup(param);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 송장조회
|
|
|
|
|
+var fnSearchDelivery = function (url, invoiceNo) {
|
|
|
|
|
+ var fullUrl = url + invoiceNo;
|
|
|
|
|
+ window.open(fullUrl, '_blank');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 카드전표 영수증 조회
|
|
|
|
|
+var fnReceiptPage = function (tid) {
|
|
|
|
|
+ var fullUrl = "https://npg.nicepay.co.kr/issue/IssueLoader.do?TID=" + tid + "&type=0";
|
|
|
|
|
+ window.open(fullUrl, '_blank');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 수동 회수 지시
|
|
|
|
|
+var fnWdinvocieSend = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 회수지시 처리 하시겠습니까? <br> 시스템에서 회수지시를 보내지는않습니다.", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/wdinvoice/send/save'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
- $('#orderDetailInfo input[name=orderPhnno]').val(orderPhnno);
|
|
|
|
|
- $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
-
|
|
|
|
|
- var param = {};
|
|
|
|
|
- param.elementCellPhnno = '#orderDetailInfo input[name=orderPhnno]';
|
|
|
|
|
- param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
- cfnOpenLmsPopup(param);
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 구매확정철회
|
|
|
|
|
+var fnChangedCompleteDelivery = function (ordNo, ordDtlNo, ordDtlStat) {
|
|
|
|
|
+ if ('70' !== ordDtlStat) {
|
|
|
|
|
+ mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // EMAIL 전송
|
|
|
|
|
- var fnOpenEmailForm = function (orderEmail, orderNm, custNo) {
|
|
|
|
|
- if (gagajf.isNull(orderEmail) && gagajf.isNull(orderNm) && gagajf.isNull(custNo)) {
|
|
|
|
|
- mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- $('#orderDetailInfo input[name=orderEmail]').val(orderEmail);
|
|
|
|
|
- $('#orderDetailInfo input[name=orderNm]').val(orderNm);
|
|
|
|
|
- $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
-
|
|
|
|
|
- var param = {};
|
|
|
|
|
- param.elementRecipEmail = '#orderDetailInfo input[name=orderEmail]';
|
|
|
|
|
- param.elementCustNm = '#orderDetailInfo input[name=orderNm]';
|
|
|
|
|
- param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
-
|
|
|
|
|
- cfnOpenEmailPopup(param);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 송장조회
|
|
|
|
|
- var fnSearchDelivery = function (url, invoiceNo) {
|
|
|
|
|
- var fullUrl = url + invoiceNo;
|
|
|
|
|
- window.open(fullUrl, '_blank');
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 카드전표 영수증 조회
|
|
|
|
|
- var fnReceiptPage = function (tid) {
|
|
|
|
|
- var fullUrl = "https://npg.nicepay.co.kr/issue/IssueLoader.do?TID=" + tid + "&type=0";
|
|
|
|
|
- window.open(fullUrl, '_blank');
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ var data = {};
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
|
|
|
- // 수동 회수 지시
|
|
|
|
|
- var fnWdinvocieSend = function (ordChgSq) {
|
|
|
|
|
- mcxDialog.confirm("요청번호 [" + ordChgSq + "] 회수지시 처리 하시겠습니까? <br> 시스템에서 회수지시를 보내지는않습니다.", {
|
|
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/order/check/status', jsonData, fnChangedCompleteDeliveryCallback);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+var fnChangedCompleteDeliveryCallback = function (result) {
|
|
|
|
|
+ // 구매확정 처리 가능 하지 않으면 얼럿 노출 끝
|
|
|
|
|
+ if (!result.isPossible) {
|
|
|
|
|
+ mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mcxDialog.confirm("구매확정 철회 하시겠습니까? <br> 지급된 포인트에 대한 처리는 별도로 하셔야 합니다. ", {
|
|
|
cancelBtnText : "취소",
|
|
cancelBtnText : "취소",
|
|
|
sureBtnText : "확인",
|
|
sureBtnText : "확인",
|
|
|
sureBtnClick : function () {
|
|
sureBtnClick : function () {
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordChgSq = ordChgSq;
|
|
|
|
|
|
|
+ var data = {};
|
|
|
|
|
+ data.ordDtlNo = result.ordDtlNo;
|
|
|
|
|
+ data.ordNo = result.ordNo;
|
|
|
|
|
|
|
|
var jsonData = JSON.stringify(data);
|
|
var jsonData = JSON.stringify(data);
|
|
|
gagajf.ajaxJsonSubmit(
|
|
gagajf.ajaxJsonSubmit(
|
|
|
- '/order/wdinvoice/send/save'
|
|
|
|
|
|
|
+ '/order/complete/delivery/changed'
|
|
|
, jsonData
|
|
, jsonData
|
|
|
, function (result) {
|
|
, function (result) {
|
|
|
uifnPopupClose('popupOrderDetail');
|
|
uifnPopupClose('popupOrderDetail');
|
|
@@ -1358,84 +1389,55 @@ $(document).ready(function () {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 주문상세 상태값 변경
|
|
|
|
|
+var fnChangOrdDtlStat = function (obj) {
|
|
|
|
|
+ var ordNo = $(obj).attr("ordNo");
|
|
|
|
|
+ var ordDtlNo = $(obj).attr("ordDtlNo");
|
|
|
|
|
+ var ordDtlStat = $(obj).val();
|
|
|
|
|
+ var ordDtlStatNm = $(obj).children("option:selected").text();
|
|
|
|
|
+ var strConfirm = "주문상태를 " + ordDtlStatNm + "(으)로 변경 하시겠습니까?"
|
|
|
|
|
|
|
|
- // 구매확정철회
|
|
|
|
|
- var fnChangedCompleteDelivery = function (ordNo, ordDtlNo, ordDtlStat) {
|
|
|
|
|
- if ('70' !== ordDtlStat) {
|
|
|
|
|
- mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var data = {};
|
|
|
|
|
- data.ordDtlNo = ordDtlNo;
|
|
|
|
|
- data.ordNo = ordNo;
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
-
|
|
|
|
|
- gagajf.ajaxJsonSubmit('/order/check/status', jsonData, fnChangedCompleteDeliveryCallback);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- var fnChangedCompleteDeliveryCallback = function (result) {
|
|
|
|
|
- // 구매확정 처리 가능 하지 않으면 얼럿 노출 끝
|
|
|
|
|
- if (!result.isPossible) {
|
|
|
|
|
- mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- } else {
|
|
|
|
|
- mcxDialog.confirm("구매확정 철회 하시겠습니까? <br> 지급된 포인트에 대한 처리는 별도로 하셔야 합니다. ", {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = {};
|
|
|
|
|
- data.ordDtlNo = result.ordDtlNo;
|
|
|
|
|
- data.ordNo = result.ordNo;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/order/complete/delivery/changed'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- fnReOpenOrderDetailPopup();
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ mcxDialog.confirm(strConfirm, {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+ data.ordDtlStat = ordDtlStat;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/detail/ordDtlStat/changed'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 주문상세 상태값 변경
|
|
|
|
|
- var fnChangOrdDtlStat = function (obj) {
|
|
|
|
|
- var ordNo = $(obj).attr("ordNo");
|
|
|
|
|
- var ordDtlNo = $(obj).attr("ordDtlNo");
|
|
|
|
|
- var ordDtlStat = $(obj).val();
|
|
|
|
|
- var ordDtlStatNm = $(obj).children("option:selected").text();
|
|
|
|
|
- var strConfirm = "주문상태를 " + ordDtlStatNm + "(으)로 변경 하시겠습니까?"
|
|
|
|
|
-
|
|
|
|
|
- mcxDialog.confirm(strConfirm, {
|
|
|
|
|
- cancelBtnText : "취소",
|
|
|
|
|
- sureBtnText : "확인",
|
|
|
|
|
- sureBtnClick : function () {
|
|
|
|
|
- var data = new Object();
|
|
|
|
|
- data.ordNo = ordNo;
|
|
|
|
|
- data.ordDtlNo = ordDtlNo;
|
|
|
|
|
- data.ordDtlStat = ordDtlStat;
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit(
|
|
|
|
|
- '/order/detail/ordDtlStat/changed'
|
|
|
|
|
- , jsonData
|
|
|
|
|
- , function (result) {
|
|
|
|
|
- uifnPopupClose('popupOrderDetail');
|
|
|
|
|
- fnReOpenOrderDetailPopup();
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// DAUM을 이용한 우편번호 팝업 레이어
|
|
|
|
|
+var fnOpenDaumAddr = function() {
|
|
|
|
|
+ let daumZip = new daum.Postcode({
|
|
|
|
|
+ oncomplete: function(data) {
|
|
|
|
|
+ // 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
|
|
|
+ $('#detailForm input[name=bizZipcode]').val(data.zonecode);
|
|
|
|
|
+ $('#detailForm input[name=bizBaseAddr]').val(cfnGetDaumRoadAddr(data));
|
|
|
|
|
+ $('#detailForm input[name=bizDtlAddr]').focus();
|
|
|
|
|
+
|
|
|
|
|
+ cfnCloseDaumAddr();
|
|
|
|
|
+ },
|
|
|
|
|
+ width: '100%'
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
+ cfnOpenDaumAddr(daumZip);
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
</html>
|
|
</html>
|