|
|
@@ -0,0 +1,1574 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : CnclReqForm.html
|
|
|
+ * @desc : 취소요청 화면
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2019 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2020.12.12 jsh77b 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+<div class="modalPopup" data-width="1400" data-height="600">
|
|
|
+ <div class="panelStyle">
|
|
|
+ <div class="panelTitle">
|
|
|
+ <h2>취소요청</h2>
|
|
|
+ <button type="button" class="close" onclick="uifnPopupClose('popupCancelRequestForm');"><i class="fa fa-times"></i></button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="panelContent" style="height:90%; overflow-y:auto; padding:0px 20px !important; ">
|
|
|
+ <form id="cancelRequestFrm" name="cancelRequestFrm" action="/orderChange/cancel" method="post" target="hdFrameForOrderCancel">
|
|
|
+ <input type="hidden" name="ordNo" th:value="${ordNo}"/>
|
|
|
+ <input type="hidden" name="ordChgSq" th:value="${ordChgSq}"/>
|
|
|
+ <input type="hidden" name="delvFeeCd" th:value="${delvFeeCd}"/>
|
|
|
+ <input type="hidden" name="chgReason" th:value="${ordChgSq > 0 && chgStat != 'G685_40' ? orderChangeDetailList[0].chgReason : ''}"/>
|
|
|
+ <input type="hidden" name="chgReasonDesc" value=""/>
|
|
|
+
|
|
|
+ <div id="orderInfoList" style="display:none;">
|
|
|
+ <h4>기본정보</h4>
|
|
|
+ <!-- TABLE -->
|
|
|
+ <table class="tableStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>사이트</th>
|
|
|
+ <th>몰구분</th>
|
|
|
+ <th>웹구분</th>
|
|
|
+ <th>외부몰</th>
|
|
|
+ <th>주문일시</th>
|
|
|
+ <th>주문자</th>
|
|
|
+ <th>고객번호</th>
|
|
|
+ <th>주문번호</th>
|
|
|
+ <th>이메일</th>
|
|
|
+ <th>핸드폰번호</th>
|
|
|
+ <th>회원구분</th>
|
|
|
+ <th>관리대상</th>
|
|
|
+ <th>등급</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td th:text="${orderInfoList[0].siteCdNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].mallGbNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].frontGbNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].extmallNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].ordDt}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].ordNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].custNo}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].ordNo}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].ordEmail}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].ordPhnno}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].custGbNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].managedRsnNm}"></td>
|
|
|
+ <td th:text="${orderInfoList[0].custGradeNm}"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <!-- //TABLE -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h4 id="orderInfoTitle">주문정보</h4>
|
|
|
+ <div id="gridOrderCancelRequestList" style="width:100%; height: 200px;" class="ag-theme-balham"></div>
|
|
|
+
|
|
|
+ <h4 id="h4OrderCancelRequestToBeList">취소정보</h4>
|
|
|
+ <div id="gridOrderCancelRequestToBeList" style="width:100%; height: 200px;" class="ag-theme-balham"></div>
|
|
|
+
|
|
|
+ <h4 id="h4DelvCdList">배송비정보</h4>
|
|
|
+ <div id="gridDelvCdList" style="width:100%; height: 140px;" class="ag-theme-balham"></div>
|
|
|
+
|
|
|
+ <div style="text-align:right; padding-bottom:5px; padding-top:5px;">
|
|
|
+ <th:block th:if="${userId} == 'jsh77b'">
|
|
|
+ <button type="button" class="btn btn-success" id="cnclReqBtn" onclick="fnCnclReq('cnclReq');">취소접수</button>
|
|
|
+ </th:block>
|
|
|
+ <button type="button" class="btn btn-success" id="cnclCompleteBtn" onclick="fnCnclReq('cnclComplete');">취소완료</button>
|
|
|
+ <button type="button" class="btn btn-success" id="cnclReqCancelBtn" onclick="fnCnclReq('cnclReqCancel');">취소철회</button>
|
|
|
+ <button type="button" class="btn btn-success" id="cnclReqCompleteBtn" onclick="fnCnclReq('cnclReqComplete');">취소승인</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:140px;" />
|
|
|
+ <col style="width:180px;" />
|
|
|
+ <col style="width:140px;" />
|
|
|
+ <col style="width:180px;" />
|
|
|
+ <col style="width:140px;" />
|
|
|
+ <col style="width:180px;" />
|
|
|
+ <col style="width:140px;" />
|
|
|
+ <col />
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>취소사유 <i class="star"></i></th>
|
|
|
+ <td>
|
|
|
+ <select name="selectChgReason" onchange="fnChangeChgReason($(this).val());">
|
|
|
+ <option value="">[선택하세요]</option>
|
|
|
+ <th:block th:each="oneData, status : ${chgReasonList}">
|
|
|
+ <th:block th:if="${ordChgSq > 0} or ${oneData.cd} == G686_10 or ${oneData.cd} == G686_20 or ${oneData.cd} == G686_30">
|
|
|
+ <option th:if="${chgReasonList}" th:value="|${oneData.cd}|" th:text="|${oneData.cdNm}|"></option>
|
|
|
+ </th:block>
|
|
|
+ </th:block>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>귀책사유</th>
|
|
|
+ <td colspan="5"><span id="imputeReason"></span></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>PG점프</th>
|
|
|
+ <td>
|
|
|
+ <label class="chkBox">
|
|
|
+ <input type="checkbox" name="pgStat" id="pgStat" onclick="fnChangePgStat();"/>
|
|
|
+ </label>
|
|
|
+ </td>
|
|
|
+ <th>입금액(원)</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="depositAmt" id="depositAmt" value="0" readonly="readonly"/>
|
|
|
+ </td>
|
|
|
+ <th>알림톡미전송여부</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <label class="chkBox">
|
|
|
+ <input type="checkbox" name="msgStat" id="msgStat" checked/>
|
|
|
+ </label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>요청메모<br/><span id="dpLocAnsContent">0</span>/1,000Byte</th>
|
|
|
+ <td colspan="7">
|
|
|
+ <textarea id="chgMemo" name="chgMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#dpLocAnsContent'));"></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <h4>환불예정금액</h4>
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th style="height:30px;">구분</th>
|
|
|
+ <th style="height:30px;">항목</th>
|
|
|
+ <th style="height:30px;">합계</th>
|
|
|
+ <th style="height:30px;">내역</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td style="height:25px;">상품금액</td>
|
|
|
+ <td>취소상품금액</td>
|
|
|
+ <td class="spanCnclRtnAmt">0원</td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td rowspan="2">할인금액차감</td>
|
|
|
+ <td>쿠폰할인차감</td>
|
|
|
+ <td class="spanCpnDcAmt">0원</td>
|
|
|
+ <td style="line-height:25px;">
|
|
|
+ <div style="height:25px;"><span>즉시할인쿠폰 : </span><span class="spanCpn1DcAmt">0원</span></div>
|
|
|
+ <div style="height:25px;"><span>주문서상품쿠폰 : </span><span class="spanGoodsCpnDcAmt">0원</span></div>
|
|
|
+ <div style="height:25px;"><span>장바구니쿠폰 : </span><span class="spanCartCpnDcAmt">0원</span></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>상품할인차감</td>
|
|
|
+ <td class="goodsDcSumAmt">0원</td>
|
|
|
+ <td style="line-height:25px;">
|
|
|
+ <div style="height:25px;"><span>선포인트할인 : </span><span class="spanPrePntDcAmt">0원</span></div>
|
|
|
+ <div style="height:25px;"><span>다다익선할인 : </span><span class="spanTmtbDcAmt">0원</span></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>배송비</td>
|
|
|
+ <td>환불배송비</td>
|
|
|
+ <td class="spanRealDelvAmt">0원</td>
|
|
|
+ <td style="line-height:25px;">
|
|
|
+ <div style="height:25px;"><span>배송비쿠폰 : </span><span class="delvCpnAmt">0원</span></div>
|
|
|
+ <div style="height:25px;"><span>추가금결제 : </span><span class="addDelvFee">0원</span></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td rowspan="4">환불금액</td>
|
|
|
+ <td style="height:25px;">총환불금액</td>
|
|
|
+ <td class="totalRefundAmt">0원</td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="height:25px;">결제수단환불</td>
|
|
|
+ <td class="spanRefundAmt">0원</td>
|
|
|
+ <td>
|
|
|
+ <span class="pgGbNm">신용카드</span><span class="cardNm"></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="height:25px;">상품권환불</td>
|
|
|
+ <td class="spanGfcdUseAmt">0원</td>
|
|
|
+ <td></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="height:25px;">포인트환불</td>
|
|
|
+ <td class="spanPntDcAmt">0P</td>
|
|
|
+ <td>
|
|
|
+ <span>적립예정포인트환수 : </span><span class="spanSavePntAmt">0P</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ <h4>환불예정금액</h4>
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:20%;"/>
|
|
|
+ <col style="width:30%;"/>
|
|
|
+ <col style="width:20%;"/>
|
|
|
+ <col style="width:30%;"/>
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>총 결제 금액</th>
|
|
|
+ <td colspan="3"><span id="spanPayAmt"></span>원 (상품 실결제 금액 : <span id="spanSumRealOrdAmt"></span>원, 배송금액 : <span id="spanSumDeliveryFee"></span>원) </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>상품 주문 금액</th>
|
|
|
+ <td><span id="spanOrdAmt"></span>원</td>
|
|
|
+ <th>상품 취소 금액</th>
|
|
|
+ <td><span id="spanCnclRtnAmt"></span>원</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>포인트 취소 금액</th>
|
|
|
+ <td colspan="3"><span id="spanTotPntDcAmt"></span>원 (고객 포인트 : <span id="spanPntDcAmt"></span>원 + 상품 선포인트 : <span id="spanPrePntDcAmt"></span>원) </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>쿠폰 취소 금액</th>
|
|
|
+ <td colspan="3"><span id="spanCpnDcAmt"></span>원 (즉시할인쿠폰 : <span id="spanCpn1DcAmt"></span>원 + 상품쿠폰 : <span id="spanGoodsCpnDcAmt"></span>원 + 장바구니쿠폰 : <span id="spanCartCpnDcAmt"></span>원 + 배송비쿠폰 : <span id="spanDelvCpnDcAmt"></span>원)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>다다익선 취소 금액</th>
|
|
|
+ <td colspan="3"><span id="spanTmtbDcAmt"></span>원 (수량할인 : <span id="spanTmtb1DcAmt"></span>원 + 금액할인 : <span id="spanTmtb2DcAmt"></span>원)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>상품권 취소 금액</th>
|
|
|
+ <td colspan="3"><span id="spanGfcdUseAmt"></span>원</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>상품 실결제 취소 금액</th>
|
|
|
+ <td><span id="spanRealCnclRtnAmt"></span>원</td>
|
|
|
+ <th>환불 배송비 금액</th>
|
|
|
+ <td><span id="spanRealDelvAmt"></span>원</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>환불 예정 금액</th>
|
|
|
+ <td colspan="3"><span id="spanRefundAmt"></span>원</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <div id="refundAccount" style="width:100%">
|
|
|
+ <h4>환불계좌정보</h4>
|
|
|
+ <button type="button" id="btnSaveAccount" class="btn btnRight btn-base btn-sm" style="margin-left:10px;" onclick="fnCreateOrderRfAccount();">등록</button>
|
|
|
+
|
|
|
+ <!-- TABLE -->
|
|
|
+ <table class="tableStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ <col width="">
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>은행명</th>
|
|
|
+ <th>은행코드</th>
|
|
|
+ <th>계좌번호</th>
|
|
|
+ <th>예금주</th>
|
|
|
+ <th>기본여부</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr style="height:30px;">
|
|
|
+ <td class="bankNm"></td>
|
|
|
+ <td class="bankCd"></td>
|
|
|
+ <td class="accountNo"></td>
|
|
|
+ <td class="accountNm"></td>
|
|
|
+ <td class="defaultYn"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<!-- data -->
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+var cancelRequestTargetList = [[${cancelRequestTargetList}]]; // 취소대상목록
|
|
|
+var cancelRequestTargetCnt = [[${cancelRequestTargetList.size()}]]; // 취소대상건수
|
|
|
+var ordNo = [[${ordNo}]]; // 주문번호
|
|
|
+var ordChgSq = [[${ordChgSq}]]; // 주문변경번호
|
|
|
+var delvFeeCd = [[${delvFeeCd}]]; // 배송정책코드
|
|
|
+var orderInfoList = [[${orderInfoList}]]; // 주문기본정보
|
|
|
+var orderChangeDetailList = [[${orderChangeDetailList}]]; // 취소/반품/교환요청 정보
|
|
|
+var payGb = orderInfoList[0].payGb; // 결제수단
|
|
|
+var payMeans = orderInfoList[0].payMeans; // 결제방법
|
|
|
+var payStat = orderInfoList[0].payStat; // 결제상태
|
|
|
+var chgReason = ""; // 변경사유코드
|
|
|
+var chgMemo = ""; // 변경사유메모
|
|
|
+var chgStat = cancelRequestTargetList[0].chgStat // 변경상태(교환출고실패 취소처리)
|
|
|
+var wdGb = cancelRequestTargetList[0].wdGb // 회수구분(교환출고실패 취소처리)
|
|
|
+var addPayCost = cancelRequestTargetList[0].addPayCost // 추가결제비용(교환출고실패 취소처리)
|
|
|
+var canDeliveryCancelYn = [[${canDeliveryCancelYn}]]; // 교환배송비 취소가능여부
|
|
|
+var delvPayMeans = [[${payMeans}]]; // 교환배송비 결제수단
|
|
|
+
|
|
|
+// 변경요청정보 승인, 철회
|
|
|
+if (ordChgSq > 0 && chgStat != 'G685_40') {
|
|
|
+ chgReason = orderChangeDetailList[0].chgReason; // 변경사유코드
|
|
|
+ chgMemo = orderChangeDetailList[0].chgMemo; // 변경사유메모
|
|
|
+}
|
|
|
+
|
|
|
+// 교환배송미출고대상
|
|
|
+if (ordChgSq > 0 && chgStat == 'G685_40') {
|
|
|
+ $("#orderInfoList").show();
|
|
|
+}
|
|
|
+
|
|
|
+var temp1 = true;
|
|
|
+var temp2 = false;
|
|
|
+var temp3 = true;
|
|
|
+
|
|
|
+// 1. 주문정보(변경요청가능대상)
|
|
|
+var columnCancelReqList = [
|
|
|
+ {headerName: "주문번호" , field: "ordNo" , width: 80 , cellClass: 'text-center' , hide: temp1},
|
|
|
+ {headerName: "주문상세" , field: "ordDtlNo" , width: 80 , cellClass: 'text-center'},
|
|
|
+ {headerName: "주문상세" , field: "ordDtlStat" , width: 80 , cellClass: 'text-center' , hide: temp1},
|
|
|
+ {headerName: "주문상세상태" , field: "ordDtlStatNm" , width: 100 , cellClass: 'text-center' , hide: temp1},
|
|
|
+ {headerName: "상품코드" , field: "goodsCd" , width: 100 , cellClass: 'text-left' , hide: temp2},
|
|
|
+ {headerName: "SKUCODE" , field: "optCd" , width: 100 , cellClass: 'text-center' , hide: temp2},
|
|
|
+ {headerName: "상품명" , field: "goodsNm" , width: 200 , cellClass: 'text-left' , hide: temp2},
|
|
|
+ {headerName: "상품타입" , field: "goodsTypeNm" , width: 100, cellClass: 'text-center',
|
|
|
+ cellRenderer: function (params) {
|
|
|
+ var option;
|
|
|
+ if (params.data.goodsType == 'G056_S') {
|
|
|
+ option = "<a href=\"javascript:void(0);\" onclick=\"fnOrderDetailItemForm('" + params.data.ordDtlNo + "');\">" + params.value + "</a>";
|
|
|
+ } else {
|
|
|
+ option = params.value
|
|
|
+ }
|
|
|
+ return option;
|
|
|
+ },
|
|
|
+ hide: temp2
|
|
|
+ },
|
|
|
+ {headerName: "옵션1" , field: "colorNm" , width: 80 , cellClass: 'text-center' , hide: temp2},
|
|
|
+ {headerName: "옵션2" , field: "optCd2" , width: 80 , cellClass: 'text-center' , hide: temp2},
|
|
|
+ {
|
|
|
+ headerName : "옵션금액"
|
|
|
+ , field : "optAddPrice"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문"
|
|
|
+ , field : "ordQty"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소/요청"
|
|
|
+ , field : "cnclRtnQty"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ var cnclRtnReqQty = parseInt(params.data.cnclRtnQty) + parseInt(params.data.ordReqChgQty);
|
|
|
+ return cnclRtnReqQty;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소/반품"
|
|
|
+ , field : "ordCanChgQty"
|
|
|
+ , 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 = parseInt(params.value);
|
|
|
+ var rtnStr = "";
|
|
|
+
|
|
|
+ // 취소신청가능수량있으면 수량만 표시 (취소,반품,교환 신청정보 처리)
|
|
|
+ if (ordChgSq > 0 && chgStat != 'G685_40') {
|
|
|
+ rtnStr = ordCanChgQty;
|
|
|
+ } else {
|
|
|
+ ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
|
|
|
+
|
|
|
+ rtnStr += "<select class='ordCanChgQty' name='ordCanChgQty' ordDtlNo='"+params.data.ordDtlNo+"' onChange='fnCalculateRefundAmt(this);'>";
|
|
|
+
|
|
|
+ for (i=0 ; i<=ordCanChgQty ; i++) {
|
|
|
+ if (i == params.data.ordCanChgQty) {
|
|
|
+ rtnStr += " <option value='"+i+"' selected>"+i+"</option>";
|
|
|
+ } else {
|
|
|
+ rtnStr += " <option value='"+i+"'>"+i+"</option>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ rtnStr += "</select>";
|
|
|
+ }
|
|
|
+
|
|
|
+ return rtnStr;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문"
|
|
|
+ , field : "ordAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소"
|
|
|
+ , field : "cnclRtnAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "즉시할인"
|
|
|
+ , field : "cpn1DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "다다익선1"
|
|
|
+ , field : "tmtb1DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "다다익선2"
|
|
|
+ , field : "tmtb2DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "상품쿠폰"
|
|
|
+ , field : "goodsCpnDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "장바구니쿠폰"
|
|
|
+ , field : "cartCpnDcAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "포인트"
|
|
|
+ , field : "pntDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "선포인트"
|
|
|
+ , field : "prePntDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "상품권"
|
|
|
+ , field : "gfcdUseAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "실결제금액"
|
|
|
+ , field : "realOrdAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "배송비"
|
|
|
+ , field : "delvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {headerName: "업체" , field: "supplyCompCd" , width: 100 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {
|
|
|
+ headerName : "무료배송비"
|
|
|
+ , field : "minOrdAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "기본배송비"
|
|
|
+ , field : "orgDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "반품배송비"
|
|
|
+ , field : "rtnDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "교환배송비"
|
|
|
+ , field : "excDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp1
|
|
|
+ },
|
|
|
+ {headerName: "전체취소가능" , field: "allCanYn" , width: 100 , cellClass: 'text-center', hide: temp1}
|
|
|
+];
|
|
|
+var gridOptionsCancelReqList = gagaAgGrid.getGridOptions(columnCancelReqList);
|
|
|
+
|
|
|
+// Add on options
|
|
|
+gridOptionsCancelReqList.suppressRowClickSelection = true;
|
|
|
+gridOptionsCancelReqList.rowSelection = 'multiple';
|
|
|
+
|
|
|
+// 2. 취소정보(환불정보)
|
|
|
+var columnCancelReqToBeList = [
|
|
|
+ {
|
|
|
+ headerName : "주문상세정보",
|
|
|
+ children : [
|
|
|
+ {headerName: "주문번호" , field: "ordNo" , width: 80 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "주문상세" , field: "ordDtlNo" , width: 80 , cellClass: 'text-center'},
|
|
|
+ {headerName: "주문상세" , field: "ordDtlStat" , width: 80 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "주문상세상태" , field: "ordDtlStatNm" , width: 100 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "상품코드" , field: "goodsCd" , width: 100 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "상품명" , field: "goodsNm" , width: 200 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "상품타입" , field: "goodsTypeNm" , width: 100 , cellClass: 'text-center', hide: temp2}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문상세단품정보",
|
|
|
+ children : [
|
|
|
+ {headerName: "단품번호" , field: "ordDtlItemSq" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {headerName: "단품코드" , field: "itemCd" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {headerName: "단품명" , field: "itemNm" , width: 200 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {headerName: "칼라코드" , field: "optCd1" , width: 80 , cellClass: 'text-center', hide: temp1},
|
|
|
+ {headerName: "사이즈코드" , field: "optCd2" , width: 80 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {
|
|
|
+ headerName : "단품수량"
|
|
|
+ , field : "itemQty"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "단품금액"
|
|
|
+ , field : "itemPrice"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "단품옵션금액"
|
|
|
+ , field : "optAddPrice"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문상세수량",
|
|
|
+ children : [
|
|
|
+ {
|
|
|
+ headerName : "주문"
|
|
|
+ , field : "ordQty"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소/요청"
|
|
|
+ , field : "cnclRtnQty"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ var cnclRtnReqQty = parseInt(params.data.cnclRtnQty) + parseInt(params.data.ordReqChgQty);
|
|
|
+ return cnclRtnReqQty;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소/반품"
|
|
|
+ , field : "ordCanChgQty"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-center'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문단품금액",
|
|
|
+ children : [
|
|
|
+ {
|
|
|
+ headerName : "주문"
|
|
|
+ , field : "ordAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소"
|
|
|
+ , field : "cnclRtnAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "즉시할인"
|
|
|
+ , field : "cpn1DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "다다익선1"
|
|
|
+ , field : "tmtb1DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "다다익선2"
|
|
|
+ , field : "tmtb2DcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "상품쿠폰"
|
|
|
+ , field : "goodsCpnDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "장바구니쿠폰"
|
|
|
+ , field : "cartCpnDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "포인트"
|
|
|
+ , field : "pntDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "선포인트"
|
|
|
+ , field : "prePntDcAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "상품권"
|
|
|
+ , field : "gfcdUseAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "환불금액"
|
|
|
+ , field : "realOrdAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "주문배송비정보",
|
|
|
+ children : [
|
|
|
+ {
|
|
|
+ headerName : "배송비"
|
|
|
+ , field : "delvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {headerName: "업체" , field: "supplyCompCd" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {
|
|
|
+ headerName : "무료배송비"
|
|
|
+ , field : "minOrdAmt"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "기본배송비"
|
|
|
+ , field : "orgDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "반품배송비"
|
|
|
+ , field : "rtnDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "교환배송비"
|
|
|
+ , field : "excDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {headerName: "전체취소가능" , field: "allCanYn" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ ]
|
|
|
+ }
|
|
|
+];
|
|
|
+var gridOptionsCancelReqToBeList = gagaAgGrid.getGridOptions(columnCancelReqToBeList);
|
|
|
+
|
|
|
+// 3. 배송비정보(환불정보)
|
|
|
+var columnDelvCdList = [
|
|
|
+ {
|
|
|
+ headerName : "배송코드기준금액",
|
|
|
+ children : [
|
|
|
+ {headerName: "업체" , field: "supplyCompCd" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {
|
|
|
+ headerName : "주문"
|
|
|
+ , field : "ordAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "취소"
|
|
|
+ , field : "cnclRtnAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "환불"
|
|
|
+ , field : "realOrdAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "배송비정보",
|
|
|
+ children : [
|
|
|
+ {
|
|
|
+ headerName : "배송비"
|
|
|
+ , field : "delvFee"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "무료배송비"
|
|
|
+ , field : "minOrdAmt"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "기본배송비"
|
|
|
+ , field : "orgDelvFee"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "반품배송비"
|
|
|
+ , field : "rtnDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName : "교환배송비"
|
|
|
+ , field : "excDelvFee"
|
|
|
+ , width : 80
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {headerName: "추가배송비여부" , field: "addDelvFeeYn" , width: 140 , cellClass: 'text-center', hide: temp2},
|
|
|
+ {
|
|
|
+ headerName : "추가배송비"
|
|
|
+ , field : "addDelvFee"
|
|
|
+ , width : 100
|
|
|
+ , cellClass : 'text-right'
|
|
|
+ , cellRenderer : function (params) {
|
|
|
+ return params.value.addComma();
|
|
|
+ }
|
|
|
+ , hide : temp2
|
|
|
+ },
|
|
|
+ {headerName: "전체취소가능" , field: "allCanYn" , width: 100 , cellClass: 'text-center', hide: temp2},
|
|
|
+ ]
|
|
|
+ }
|
|
|
+];
|
|
|
+var gridOptionsDelvCdList = gagaAgGrid.getGridOptions(columnDelvCdList);
|
|
|
+</script>
|
|
|
+
|
|
|
+<script>
|
|
|
+// 현재 사유는 고객 입니다.
|
|
|
+var isCustomer = true;
|
|
|
+var pgGb = orderInfoList[0].pgGb;
|
|
|
+var payMeans = orderInfoList[0].payMeans;
|
|
|
+var payMeansNm = orderInfoList[0].payMeansNm;
|
|
|
+var cardNm = orderInfoList[0].cardNm;
|
|
|
+var addDelvFee = 0;
|
|
|
+
|
|
|
+//0원이하이면 '-' 처리 삭제 함수
|
|
|
+var getZeroMinusDelAmt = function(tempAmt) {
|
|
|
+ var rtnAmtStr = "";
|
|
|
+
|
|
|
+ if (tempAmt > 0) {
|
|
|
+ rtnAmtStr = "-" + tempAmt.addComma();
|
|
|
+ } else {
|
|
|
+ rtnAmtStr = tempAmt.addComma();
|
|
|
+ }
|
|
|
+
|
|
|
+ return rtnAmtStr;
|
|
|
+}
|
|
|
+
|
|
|
+// 환불예상금액계산
|
|
|
+var fnCalculateRefundAmt = function (obj) {
|
|
|
+ // 변경신청목록
|
|
|
+ var cancelRequestTargetToBeList = [];
|
|
|
+
|
|
|
+ if (obj != null) {
|
|
|
+ for (i=0 ; i<cancelRequestTargetList.length ; i++) {
|
|
|
+ var orDtlNo = $(obj).attr("ordDtlNo");
|
|
|
+ var ordCanChgQty = $(obj).val();
|
|
|
+
|
|
|
+ if (cancelRequestTargetList[i].ordDtlNo == orDtlNo) {
|
|
|
+ cancelRequestTargetList[i].ordCanChgQty = ordCanChgQty;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 주문변경대상정보 재설정
|
|
|
+ gridOptionsCancelReqList.api.setRowData(cancelRequestTargetList);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cancelRequestTargetList.length == 0) {
|
|
|
+ alert("요청 대상정보가 존재 하지 않습니다.");
|
|
|
+ uifnPopupClose('popupCancelRequestForm');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.05.25 수정
|
|
|
+ var ordDtlNoArr = [];
|
|
|
+ var cnclRtnReqQtyArr = [];
|
|
|
+
|
|
|
+ // 1. 반품신청수량 체크
|
|
|
+ for (i=0 ; i<cancelRequestTargetList.length ; i++) {
|
|
|
+ if (cancelRequestTargetList[i].ordCanChgQty > 0) {
|
|
|
+ // 반품신청값설정
|
|
|
+ ordDtlNoArr.push(cancelRequestTargetList[i].ordDtlNo);
|
|
|
+ cnclRtnReqQtyArr.push(cancelRequestTargetList[i].ordCanChgQty);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. 추가정보설정
|
|
|
+ var chgerNm = orderInfoList[0].ordNm;
|
|
|
+ var chgerEmail = orderInfoList[0].ordEmail;
|
|
|
+ var chgerPhnno = orderInfoList[0].ordPhnno;
|
|
|
+ var chgerTelno = orderInfoList[0].ordTelno;
|
|
|
+ var custNo = orderInfoList[0].custNo;
|
|
|
+ var delvFeeCd = orderInfoList[0].delvFeeCd;
|
|
|
+
|
|
|
+ // 환불금액계산호출
|
|
|
+ var jsonObj = {
|
|
|
+ "ordNo" : ordNo
|
|
|
+ ,"ordDtlNoArr" : ordDtlNoArr
|
|
|
+ ,"cnclRtnReqQtyArr" : cnclRtnReqQtyArr
|
|
|
+ ,"isCustomer" : isCustomer
|
|
|
+ ,"chgerNm" : chgerNm
|
|
|
+ ,"chgerEmail" : chgerEmail
|
|
|
+ ,"chgerPhnno" : chgerPhnno
|
|
|
+ ,"custNo" : custNo
|
|
|
+ ,"ordNm" : chgerNm
|
|
|
+ ,"ordPhnno" : chgerPhnno
|
|
|
+ ,"delvFeeCd" : delvFeeCd
|
|
|
+ }
|
|
|
+
|
|
|
+ var jsonData = JSON.stringify(jsonObj);
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ '/orderChange/cancel/refundAmt'
|
|
|
+ , jsonData
|
|
|
+ , function(result) {
|
|
|
+ gridOptionsCancelReqToBeList.api.setRowData(result.cancelOrderRefundList);
|
|
|
+ gridOptionsDelvCdList.api.setRowData(result.cancelDelvRefundList);
|
|
|
+
|
|
|
+ let spanPntDcAmt = Number(result.spanPntDcAmt); // 환불 포인트 금액
|
|
|
+ let spanSavePntAmt = Number(result.spanSavePntAmt); // 적립 예정 포인트 환수 금액
|
|
|
+ let spanGfcdUseAmt = Number(result.spanGfcdUseAmt); // 환불 상품권 금액
|
|
|
+ let spanDelvGfcdUseAmt = Number(result.spanDelvGfcdUseAmt); // 환불 배송비 상품권 금액
|
|
|
+ let spanCnclRtnAmt = Number(result.spanCnclRtnAmt); // 환불 상품 금액
|
|
|
+ let spanCpn1DcAmt = Number(result.spanCpn1DcAmt); // 즉시할인 쿠폰 차감 금액
|
|
|
+ let spanGoodsCpnDcAmt = Number(result.spanGoodsCpnDcAmt); // 상품 쿠폰 차감 금액
|
|
|
+ let spanCartCpnDcAmt = Number(result.spanCartCpnDcAmt); // 장바구니 쿠폰 차감 금액
|
|
|
+ let spanDelvCpnDcAmt = Number(result.spanDelvCpnDcAmt); // 배송비 쿠폰 차감 금액
|
|
|
+ let spanTmtbDcAmt = Number(result.spanTmtbDcAmt); // 다다익선 할인 차감 금액
|
|
|
+ let spanPrePntDcAmt = Number(result.spanPrePntDcAmt); // 선포인트 할인 차감 금액
|
|
|
+ let sumDeliveryFee = Number(result.sumDeliveryFee); // 원주문배송비
|
|
|
+ let spanTotDeliveryFee = Number(result.spanTotDeliveryFee); // 추가배송비 (무료배송비 허들 깨져서 발생한 배송비)
|
|
|
+ let spanRealCnclRtnAmt = Number(result.spanRealCnclRtnAmt); // 환불 상품 실결제 금액 (환불상품금액 - 할인차감금액)
|
|
|
+ let goodsCancelAmt = spanCnclRtnAmt + spanCpn1DcAmt; // 상품취소금액
|
|
|
+ let spanRefundAmt = spanRealCnclRtnAmt + sumDeliveryFee; // 환불예정금액 (환불상품실결제금액 + 원주문배송비)
|
|
|
+ let goodsDcSumAmt = spanPrePntDcAmt + spanTmtbDcAmt; // 상품 할인 차감 금액
|
|
|
+ let spanCpnDcAmt = spanCpn1DcAmt + spanGoodsCpnDcAmt + spanCartCpnDcAmt; // 쿠폰 할인 차감 금액
|
|
|
+
|
|
|
+ // 결제방식
|
|
|
+ let pgGbNm = "";
|
|
|
+ let cardGbNm = "";
|
|
|
+
|
|
|
+ if (pgGb == 'KCP') {
|
|
|
+ pgGbNm = payMeansNm;
|
|
|
+ cardGbNm = "(" + cardNm + ")";
|
|
|
+ } else if (pgGb == 'NAVER') {
|
|
|
+ pgGbNm = "네이버페이";
|
|
|
+ } else if (pgGb == 'NAVER_ORDER') {
|
|
|
+ pgGbNm = "네이버페이주문형";
|
|
|
+ } else if (pgGb == 'KAKAO') {
|
|
|
+ pgGbNm = "카카오페이";
|
|
|
+ } else if (pgGb == 'PAYCO') {
|
|
|
+ pgGbNm = "페이코";
|
|
|
+ } else if (pgGb == 'ISTYLE') {
|
|
|
+ pgGbNm = "상품권";
|
|
|
+ } else {
|
|
|
+ pgGbNm = "외부몰입금";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.08.10 card007 상품권100% 결제 로직 수정
|
|
|
+ // 회사사유 시 추가배송비 0
|
|
|
+ if (!isCustomer) {
|
|
|
+ spanTotDeliveryFee = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let refundAmt = spanRefundAmt + spanGfcdUseAmt;
|
|
|
+ let leftAddDelvFee = spanTotDeliveryFee;
|
|
|
+
|
|
|
+ if (refundAmt < spanTotDeliveryFee) {
|
|
|
+ addDelvFee = spanTotDeliveryFee;
|
|
|
+ } else {
|
|
|
+ if (leftAddDelvFee > spanRefundAmt) {
|
|
|
+ leftAddDelvFee -= spanRefundAmt;
|
|
|
+ spanRefundAmt = 0;
|
|
|
+ } else {
|
|
|
+ spanRefundAmt -= leftAddDelvFee;
|
|
|
+ leftAddDelvFee = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (leftAddDelvFee > 0) {
|
|
|
+ spanGfcdUseAmt -= leftAddDelvFee;
|
|
|
+ leftAddDelvFee = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ addDelvFee = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let refundPayAmt = spanRefundAmt - spanDelvGfcdUseAmt - leftAddDelvFee; // 결제금액 환불 (환불예정금액 - 환불 배송비 상품권 금액 - 추가배송비)
|
|
|
+ let deliveryFee = sumDeliveryFee - spanTotDeliveryFee; // 배송비 (마지막 취소 시 돌려줘야할 원주문 배송비 - 추가배송비)
|
|
|
+ let spanTotGfcdUseAmt = spanGfcdUseAmt + spanDelvGfcdUseAmt; // 환불 상품권 금액 합계
|
|
|
+ let totalRefundAmt = spanRefundAmt + spanTotGfcdUseAmt + spanPntDcAmt; // 총 환불 금액
|
|
|
+
|
|
|
+ // 상품금액
|
|
|
+ $(".spanCnclRtnAmt").text(goodsCancelAmt.addComma()+"원"); // 취소상품금액
|
|
|
+
|
|
|
+ // 할인금액차감
|
|
|
+ $(".spanCpnDcAmt").text(spanCpnDcAmt.addComma()+"원"); // 쿠폰할인차감 > 합계
|
|
|
+ $(".spanCpn1DcAmt").text(spanCpn1DcAmt.addComma()+"원"); // 쿠폰할인차감 > 즉시할인쿠폰
|
|
|
+ $(".spanGoodsCpnDcAmt").text(spanGoodsCpnDcAmt.addComma()+"원"); // 쿠폰할인차감 > 주문서상품쿠폰
|
|
|
+ $(".spanCartCpnDcAmt").text(spanCartCpnDcAmt.addComma()+"원"); // 쿠폰할인차감 > 장바구니쿠폰
|
|
|
+ $(".goodsDcSumAmt").text(goodsDcSumAmt.addComma()+"원"); // 상품할인차감 > 합계
|
|
|
+ $(".spanPrePntDcAmt").text(spanPrePntDcAmt.addComma()+"원"); // 상품할인차감 > 선포인트할인
|
|
|
+ $(".spanTmtbDcAmt").text(spanTmtbDcAmt.addComma()+"원"); // 상품할인차감 > 다다익선할인
|
|
|
+
|
|
|
+ // 배송비
|
|
|
+ $(".spanRealDelvAmt").text(deliveryFee.addComma()+"원"); // 환불배송비 > 합계
|
|
|
+ $(".addDelvFee").text(addDelvFee.addComma()+"원"); // 환불배송비 > 추가금결제
|
|
|
+ $(".delvCpnAmt").text(spanDelvCpnDcAmt.addComma()+"원"); // 환불배송비 > 배송비쿠폰
|
|
|
+
|
|
|
+ // 환불금액
|
|
|
+ $(".totalRefundAmt").text(totalRefundAmt.addComma()+"원"); // 총환불금액
|
|
|
+ $(".spanRefundAmt").text(refundPayAmt.addComma()+"원"); // 결제수단환불
|
|
|
+ $(".pgGbNm").text(pgGbNm); // 결제수단환불 > 결제수단
|
|
|
+ $(".cardNm").text(cardGbNm); // 결제수단환불 > 카드명
|
|
|
+ $(".spanGfcdUseAmt").text(spanTotGfcdUseAmt.addComma()+"원"); // 상품권환불
|
|
|
+ $(".spanPntDcAmt").text(spanPntDcAmt.addComma()+"원"); // 포인트환불
|
|
|
+ $(".spanSavePntAmt").text(spanSavePntAmt.addComma()+"P"); // 포인트환불 > 적립예정포인트환수
|
|
|
+
|
|
|
+ /*
|
|
|
+ // 2021.08.10 card007 상품권100% 결제 로직 수정 기존 소스 백업
|
|
|
+ // 2021.07.01 배송비 수정(마지막취소에만 배송비 환불)
|
|
|
+ let spanSumDeliveryFee = result.spanSumDeliveryFee - result.spanDelvCpnDcAmt;
|
|
|
+ let sumDeliveryFee = result.sumDeliveryFee - result.spanRefundDelvCpnAmt;
|
|
|
+
|
|
|
+ // 2021.08.04 취소금액수정
|
|
|
+ var spanRealDelvAmt = 0;
|
|
|
+ var addDelvFee = 0;
|
|
|
+
|
|
|
+ if (result.spanRealCnclRtnAmt > 0) {
|
|
|
+ // 고객사유 : 환불금액계산 = (취소금액 + 배송비) - 추가배송비
|
|
|
+ if (isCustomer) {
|
|
|
+ result.spanRefundAmt = (result.spanRealCnclRtnAmt + sumDeliveryFee) - result.spanTotDeliveryFee;
|
|
|
+
|
|
|
+ // 2021.07.01
|
|
|
+ // @ 마이너스금액이면 허들깨지면서 배송비 발생
|
|
|
+ // @ 플러스금액이면 마지막취소시 배송금액 환불
|
|
|
+ spanRealDelvAmt = sumDeliveryFee - result.spanTotDeliveryFee;
|
|
|
+ addDelvFee = result.spanTotDeliveryFee;
|
|
|
+ }
|
|
|
+ // 회사사유 : 환불금액계산 = (취소금액 + 배송비)
|
|
|
+ else {
|
|
|
+ result.spanRefundAmt = (result.spanRealCnclRtnAmt + sumDeliveryFee);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $(".spanCnclRtnAmt").text(result.spanCnclRtnAmt.addComma()+"원");
|
|
|
+ $(".spanCpn1DcAmt").text(result.spanCpn1DcAmt.addComma()+"원");
|
|
|
+ $(".spanGoodsCpnDcAmt").text(result.spanGoodsCpnDcAmt.addComma()+"원");
|
|
|
+ $(".spanCartCpnDcAmt").text(result.spanCartCpnDcAmt.addComma()+"원");
|
|
|
+
|
|
|
+ var spanCpnDcAmt = result.spanCpn1DcAmt + result.spanGoodsCpnDcAmt + result.spanGoodsCpnDcAmt;
|
|
|
+ $(".spanCpnDcAmt").text(spanCpnDcAmt.addComma()+"원");
|
|
|
+
|
|
|
+ $(".spanPrePntDcAmt").text(result.spanPrePntDcAmt.addComma()+"원");
|
|
|
+ $(".spanTmtbDcAmt").text(result.spanTmtbDcAmt.addComma()+"원");
|
|
|
+
|
|
|
+ var goodsDcSumAmt = result.spanPrePntDcAmt + result.spanTmtbDcAmt;
|
|
|
+ $(".goodsDcSumAmt").text(goodsDcSumAmt.addComma()+"원");
|
|
|
+
|
|
|
+ $(".delvCpnAmt").text(result.spanDelvCpnDcAmt.addComma()+"원");
|
|
|
+ $(".addDelvFee").text(addDelvFee.addComma()+"원");
|
|
|
+ $(".spanRealDelvAmt").text(spanSumDeliveryFee.addComma()+"원");
|
|
|
+
|
|
|
+ var totalRefundAmt = result.spanRefundAmt + result.spanGfcdUseAmt + result.spanPntDcAmt;
|
|
|
+
|
|
|
+ $(".totalRefundAmt").text(totalRefundAmt.addComma()+"원");
|
|
|
+ $(".spanRefundAmt").text(result.spanRefundAmt.addComma()+"원");
|
|
|
+ $(".spanGfcdUseAmt").text(result.spanGfcdUseAmt.addComma()+"원");
|
|
|
+ $(".spanPntDcAmt").text(result.spanPntDcAmt.addComma()+"원");
|
|
|
+ $(".spanSavePntAmt").text(result.spanSavePntAmt.addComma()+"P");
|
|
|
+ */
|
|
|
+ }
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+// 사유
|
|
|
+var fnChangeChgReason = function(reasonCd){
|
|
|
+ var customerReasonArr = ['G686_10'];
|
|
|
+
|
|
|
+ isCustomer = false;
|
|
|
+
|
|
|
+ // 귀책사유체크(취소,반품,교환)
|
|
|
+ for (i=0 ; i<customerReasonArr.length ; i++) {
|
|
|
+ if (customerReasonArr[i] == reasonCd) {
|
|
|
+ isCustomer = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 귀책사유설정
|
|
|
+ if (isCustomer) {
|
|
|
+ $("#imputeReason").text("고객");
|
|
|
+ } else {
|
|
|
+ $("#imputeReason").text("회사");
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#cancelRequestFrm input[name=chgReason]').val(reasonCd);
|
|
|
+
|
|
|
+ // 환불예상금액계산
|
|
|
+ fnCalculateRefundAmt();
|
|
|
+}
|
|
|
+
|
|
|
+// 취소신청/완료
|
|
|
+var fnCnclReq = function (reqGbn) {
|
|
|
+ var temp = false;
|
|
|
+ var custNo = cancelRequestTargetList[0].custNo;
|
|
|
+ var ordDtlStat = cancelRequestTargetList[0].ordDtlStat;
|
|
|
+ var allCanYn = "N";
|
|
|
+ var allCanYnBeforePayment = "N";
|
|
|
+
|
|
|
+ var accountNo = "";
|
|
|
+ var accountNm = "";
|
|
|
+ var bankCd = "";
|
|
|
+
|
|
|
+ // 취소완료, 취소승인
|
|
|
+ let chk = false;
|
|
|
+ if (reqGbn == "cnclReq" || reqGbn == "cnclReqComplete" || reqGbn == "cnclComplete") {
|
|
|
+
|
|
|
+ // 2021.05.25 수정
|
|
|
+ var ordDtlNoArr = [];
|
|
|
+ var cnclRtnReqQtyArr = [];
|
|
|
+
|
|
|
+ // 1. 취소신청수량 체크
|
|
|
+ for (i=0 ; i<cancelRequestTargetList.length ; i++) {
|
|
|
+ if (cancelRequestTargetList[i].ordCanChgQty > 0) {
|
|
|
+ // 취소신청값설정
|
|
|
+ ordDtlNoArr.push(cancelRequestTargetList[i].ordDtlNo);
|
|
|
+ cnclRtnReqQtyArr.push(cancelRequestTargetList[i].ordCanChgQty);
|
|
|
+ temp = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (temp == false) {
|
|
|
+ mcxDialog.alert('취소신청수량을 입력하세요.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. 입금대기건 & 전체취소 체크
|
|
|
+ if (ordDtlStat == "G013_10" && $("#spanPayAmt").text() != $("#spanRefundAmt").text()) {
|
|
|
+ alert("입금대기건은 전체 취소만 가능합니다.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2.1 전체취소 여부 적용
|
|
|
+ if (ordDtlStat == "G013_10" && $("#spanPayAmt").text() == $("#spanRefundAmt").text()) {
|
|
|
+ if (ordDtlStat == "G013_10") {
|
|
|
+ allCanYnBeforePayment = "Y";
|
|
|
+ } else {
|
|
|
+ allCanYn = "Y";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3. 취소사유 체크
|
|
|
+ var chgReason = $("#cancelRequestFrm select[name=selectChgReason]").val();
|
|
|
+ if (gagajf.isNull(chgReason)) {
|
|
|
+ mcxDialog.alert("취소사유를 입력하세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3. 환불계좌체크 (결제타입이 무통장 입금일때 사용)
|
|
|
+ if (payMeans == 'G014_20' && payStat == 'G016_30') {
|
|
|
+ if ($("#refundAccount .bankNm").eq(0).text() == null || $("#refundAccount .bankNm").eq(0).text() == '') {
|
|
|
+ mcxDialog.alert('환불계좌가 미등록 되어 있습니다.');
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ chk = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ accountNo = $("#refundAccount .accountNo").eq(0).text();
|
|
|
+ accountNm = $("#refundAccount .accountNm").eq(0).text();
|
|
|
+ bankCd = $("#refundAccount .bankCd").eq(0).text();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 5. 추가정보설정
|
|
|
+ var chgerNm = orderInfoList[0].ordNm;
|
|
|
+ var chgerEmail = orderInfoList[0].ordEmail;
|
|
|
+ var chgerPhnno = orderInfoList[0].ordPhnno;
|
|
|
+ var chgerTelno = orderInfoList[0].ordTelno;
|
|
|
+ var custNo = orderInfoList[0].custNo;
|
|
|
+
|
|
|
+ // 2021.01.26 화면통합
|
|
|
+ // 6. 취소신청, 취소완료 여부 체크
|
|
|
+ // 취소신청
|
|
|
+ if (reqGbn == "cnclReq") {
|
|
|
+ confirmStr = "취소신청하시겠습니까?";
|
|
|
+ cnclUrl = '/orderChange/cnclComplete/';
|
|
|
+ }
|
|
|
+ // 취소완료
|
|
|
+ else if (reqGbn == "cnclComplete") {
|
|
|
+ confirmStr = "취소완료하시겠습니까?";
|
|
|
+ cnclUrl = '/orderChange/cnclComplete/';
|
|
|
+
|
|
|
+ // 2021.11.30 card007 교환배송비 취소 불가 시 PG점프 처리
|
|
|
+ if (wdGb == 'W' && delvPayMeans == 'G014_60') {
|
|
|
+ confirmStr = '교환배송비 [' + (addPayCost / 2).addComma() + '원] 취소불가로 PG점프 처리 됩니다. <br /> 요청번호 [' + ordChgSq + '] 에 대한 취소승인 처리를 하시겠습니까?';
|
|
|
+ } else if (wdGb == 'D' && canDeliveryCancelYn == 'N') {
|
|
|
+ confirmStr = '교환배송비 [' + addPayCost.addComma() + '원] 취소불가로 PG점프 처리 됩니다. <br /> 요청번호 [' + ordChgSq + '] 에 대한 취소승인 처리를 하시겠습니까?';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 취소신청승인
|
|
|
+ else if (reqGbn == "cnclReqComplete") {
|
|
|
+ confirmStr = "요청번호 [" + ordChgSq + "] 에 대한 취소승인 처리를 하시겠습니까?";
|
|
|
+ cnclUrl = '/orderChange/cnclComplete/';
|
|
|
+ }
|
|
|
+ // 취소신청철회
|
|
|
+ else if (reqGbn == "cnclReqCancel") {
|
|
|
+ confirmStr = "요청번호 [" + ordChgSq + "] 에 대한 요청철회 처리를 하시겠습니까?";
|
|
|
+ cnclUrl = '/orderChange/cnclReqCancel/';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 7. 추가정보설정
|
|
|
+ var ordNm = orderInfoList[0].ordNm;
|
|
|
+ var ordPhnno = orderInfoList[0].ordPhnno;
|
|
|
+ var custNo = orderInfoList[0].custNo;
|
|
|
+ var delvFeeCd = orderInfoList[0].delvFeeCd;
|
|
|
+ var chgReason = $('#cancelRequestFrm input[name=chgReason]').val();
|
|
|
+ var depositAmt = $('#depositAmt').val();
|
|
|
+
|
|
|
+ // 2021.07.22 교환미출고대상은 품절만 있음
|
|
|
+ if (ordChgSq > 0 && chgStat == 'G685_40') {
|
|
|
+ chgReason = "G686_30";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!$('#pgStat').is(':checked')) {
|
|
|
+ depositAmt = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ var jsonObj = {
|
|
|
+ "ordNo" : $('#cancelRequestFrm input[name=ordNo]').val()
|
|
|
+ ,"chgReason" : chgReason
|
|
|
+ ,"chgMemo" : $('#chgMemo').val()
|
|
|
+ ,"ordDtlNoArr" : ordDtlNoArr
|
|
|
+ ,"cnclRtnReqQtyArr" : cnclRtnReqQtyArr
|
|
|
+ ,"accountNo" : accountNo
|
|
|
+ ,"accountNm" : accountNm
|
|
|
+ ,"bankCd" : bankCd
|
|
|
+ ,"allCanYn" : allCanYn
|
|
|
+ ,"allCanYnBeforePayment" : allCanYnBeforePayment
|
|
|
+ ,"isCustomer" : isCustomer
|
|
|
+ ,"chgerNm" : chgerNm
|
|
|
+ ,"chgerEmail" : chgerEmail
|
|
|
+ ,"chgerZipcode" : ""
|
|
|
+ ,"chgerBaseAddr" : ""
|
|
|
+ ,"chgerDtlAddr" : ""
|
|
|
+ ,"chgerPhnno" : chgerPhnno
|
|
|
+ ,"chgerTelno" : chgerTelno
|
|
|
+ ,"chgerRtnMemo" : ""
|
|
|
+ ,"reqGbn" : reqGbn
|
|
|
+ ,"ordChgSq" : ordChgSq
|
|
|
+ ,"custNo" : custNo
|
|
|
+ ,"ordNm" : ordNm
|
|
|
+ ,"ordPhnno" : ordPhnno
|
|
|
+ ,"delvFeeCd" : delvFeeCd
|
|
|
+ ,"chgStat" : chgStat
|
|
|
+ ,"wdGb" : wdGb
|
|
|
+ ,"addPayCost" : addPayCost
|
|
|
+ ,"pgStat" : $('#pgStat').is(':checked') ? 'Y' : 'N'
|
|
|
+ ,"msgStat" : $('#msgStat').is(':checked') ? 'Y' : 'N'
|
|
|
+ ,"depositAmt" : depositAmt
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문번호, 취소사유, 취소메모, (취소, 반품, 교환 신청 정보 목록), 환불계좌
|
|
|
+ var jsonData = JSON.stringify(jsonObj);
|
|
|
+
|
|
|
+ mcxDialog.confirm(confirmStr, {
|
|
|
+ cancelBtnText : "취소",
|
|
|
+ sureBtnText : "확인",
|
|
|
+ sureBtnClick : function() {
|
|
|
+ if (chk && jsonObj.pgStat == 'N') {
|
|
|
+ // 환불계좌 유효성 체크
|
|
|
+ gagajf.ajaxJsonSubmit('/business/account/check', jsonData, function(result) {
|
|
|
+ if (result.isValid) { // 유효하면 true
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ cnclUrl
|
|
|
+ , jsonData
|
|
|
+ , function() {
|
|
|
+ // 2021.06.21 교환품절취소가 아닐때 주문상세화면 다시 로딩하지 않음
|
|
|
+ if (chgStat == 'G685_40') {
|
|
|
+ // 교환배송 취소대상목록 조회 실행
|
|
|
+ $('#btnSearch').trigger("click");
|
|
|
+ } else {
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
+ }
|
|
|
+ uifnPopupClose('popupCancelRequestForm');
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ mcxDialog.alert('환불계좌가 유효하지 않습니다.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ cnclUrl
|
|
|
+ , jsonData
|
|
|
+ , function() {
|
|
|
+ // 2021.06.21 교환품절취소가 아닐때 주문상세화면 다시 로딩하지 않음
|
|
|
+ if (chgStat == 'G685_40') {
|
|
|
+ // 교환배송 취소대상목록 조회 실행
|
|
|
+ $('#btnSearch').trigger("click");
|
|
|
+ } else {
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
+ }
|
|
|
+ uifnPopupClose('popupCancelRequestForm');
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 환불계좌 등록
|
|
|
+var fnCreateOrderRfAccount = function () {
|
|
|
+ var actionUrl = "/orderChange/refund/account/create/form?ordNo=" + ordNo ;
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCreateRefundAccount');
|
|
|
+};
|
|
|
+
|
|
|
+// 환불계좌 정보
|
|
|
+var fnBindOrderRfAccountInfo = function () {
|
|
|
+ var jsonObj = {
|
|
|
+ "ordNo" : ordNo
|
|
|
+ }
|
|
|
+
|
|
|
+ var jsonData = JSON.stringify(jsonObj);
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ '/orderChange/refund/account/info/list'
|
|
|
+ , jsonData
|
|
|
+ , function (result) {
|
|
|
+ if (result.orderRfAccountInfo[0].bankNm != null && result.orderRfAccountInfo[0].bankNm != '') {
|
|
|
+ $("#refundAccount .bankNm").text(result.orderRfAccountInfo[0].bankNm);
|
|
|
+ $("#refundAccount .bankCd").text(result.orderRfAccountInfo[0].bankCd);
|
|
|
+ $("#refundAccount .accountNo").text(result.orderRfAccountInfo[0].accountNo);
|
|
|
+ $("#refundAccount .accountNm").text(result.orderRfAccountInfo[0].accountNm);
|
|
|
+ $("#refundAccount .defaultYn").text(result.orderRfAccountInfo[0].defaultYn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+// PG점프 버튼 클릭 이벤트
|
|
|
+var fnChangePgStat = function() {
|
|
|
+ if ($('#pgStat').is(':checked')) {
|
|
|
+ $('#depositAmt').attr('readonly', false);
|
|
|
+ } else {
|
|
|
+ $('#depositAmt').val(0);
|
|
|
+ $('#depositAmt').attr('readonly', true);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$(document).ready(function() {
|
|
|
+ // 1. 그리드생성
|
|
|
+ gagaAgGrid.createGrid('gridOrderCancelRequestList' , gridOptionsCancelReqList); // 주문정보
|
|
|
+ gagaAgGrid.createGrid('gridOrderCancelRequestToBeList' , gridOptionsCancelReqToBeList); // 취소정보
|
|
|
+ gagaAgGrid.createGrid('gridDelvCdList' , gridOptionsDelvCdList); // 배송비정보
|
|
|
+
|
|
|
+ // 2. 그리드 데이타 싱크작업
|
|
|
+ gridOptionsCancelReqList.api.setRowData(cancelRequestTargetList); // 주문정보
|
|
|
+
|
|
|
+ // 2.1 TOTAL ROWS 없애기
|
|
|
+ gagaAgGrid.hideStatusBar('gridOrderCancelRequestList');
|
|
|
+ gagaAgGrid.hideStatusBar('gridOrderCancelRequestToBeList');
|
|
|
+ gagaAgGrid.hideStatusBar('gridDelvCdList');
|
|
|
+
|
|
|
+ // 3. 환불예상금액계산
|
|
|
+ fnCalculateRefundAmt(null);
|
|
|
+
|
|
|
+ // 4. 무통장입금아닌경우 환불계좌 그리드 숨김처리
|
|
|
+ if (payMeans !== 'G014_20') {
|
|
|
+ $('#refundAccount').addClass("off");
|
|
|
+ } else {
|
|
|
+ fnBindOrderRfAccountInfo();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 네이버페이 주문형일 경우 취소 접수, 완료 버튼 hide
|
|
|
+ if(pgGb == "NAVER_ORDER") {
|
|
|
+ $("#cnclReqBtn").css("display", "none");
|
|
|
+ $("#cnclCompleteBtn").css("display", "none");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 5. 취소신청, 취소완료, 취소승인, 취소철회 버튼 제어
|
|
|
+ if (ordChgSq > 0 && chgStat != 'G685_40') {
|
|
|
+ $("#cnclReqBtn").css("display" , "none");
|
|
|
+ $("#cnclCompleteBtn").css("display" , "none");
|
|
|
+ } else {
|
|
|
+ $("#cnclReqCompleteBtn").css("display" , "none");
|
|
|
+ $("#cnclReqCancelBtn").css("display" , "none");
|
|
|
+
|
|
|
+ // 교환배송미출고대상
|
|
|
+ if (chgStat == 'G685_40') {
|
|
|
+ $("#cnclReqBtn").css("display", "none");
|
|
|
+ $("#cnclCompleteBtn").css("display", "inline-block"); // 교환배송미출고 대상에서 왔을 경우 취소완료버튼 노출(네이버페이도 노출을 위해 추가) - xodud1202 21.07.27
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 6. 취소사유 선택
|
|
|
+ if (ordChgSq > 0 && chgStat != 'G685_40') {
|
|
|
+ let chgReasonTmp = $('#cancelRequestFrm input[name=chgReason]').val();
|
|
|
+ $("select[name='selectChgReason']").val(chgReasonTmp); // 변경사유코드
|
|
|
+ $("select[name='selectChgReason']").attr("disabled", "true"); // 변경사유 비활성화
|
|
|
+ $("#chgMemo").text(chgMemo); // 변경사유메모
|
|
|
+ $("#chgMemo").attr("disabled", "true"); // 변경사유메모 비활성화
|
|
|
+ fnChangeChgReason(chgReasonTmp); // 귀책사유
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.06.21 교환배송미출고대상
|
|
|
+ if (ordChgSq > 0 && chgStat == 'G685_40') {
|
|
|
+ $("select[name='selectChgReason']").val("G686_30");
|
|
|
+ $("select[name='selectChgReason']").attr("disabled", "true"); // 변경사유 비활성화
|
|
|
+ fnChangeChgReason(chgReason); // 귀책사유
|
|
|
+ }
|
|
|
+
|
|
|
+ // debug mode 해제
|
|
|
+ if (temp3) {
|
|
|
+ $("#h4OrderCancelRequestToBeList").css("display", "none");
|
|
|
+ $("#gridOrderCancelRequestToBeList").css("display", "none");
|
|
|
+ $("#h4DelvCdList").css("display", "none");
|
|
|
+ $("#gridDelvCdList").css("display", "none");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.05.13 높이자동조절
|
|
|
+ var cancelRequestTargetHeight = 50 + (40 * cancelRequestTargetCnt);
|
|
|
+ $("#gridOrderCancelRequestList").css("height" , cancelRequestTargetHeight+"px");
|
|
|
+});
|
|
|
+
|
|
|
+// 2021.06.17 구성상품 내역 팝업 호출
|
|
|
+var fnOrderDetailItemForm = function (ordDtlNo) {
|
|
|
+ var actionUrl = "/delivery/detail/item/form/" + ordDtlNo;
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupDeliveryDetailItemForm');
|
|
|
+}
|
|
|
+</script>
|
|
|
+</html>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|