|
@@ -0,0 +1,1857 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
+<!--
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ * @source : RtnReqForm.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('popupReturnRequestForm');"><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/return" 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="delvFeeCdGrp" th:value="${delvFeeCdGrp}"/>
|
|
|
|
|
+ <input type="hidden" name="chgReason" value=""/>
|
|
|
|
|
+ <input type="hidden" name="chgReasonDesc" value=""/>
|
|
|
|
|
+
|
|
|
|
|
+ <h4 th:id="orderInfoTitle">주문기본정보</h4>
|
|
|
|
|
+ <!-- TABLE -->
|
|
|
|
|
+ <table class="tableStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="6%"/>
|
|
|
|
|
+ <col width="6%"/>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="6%"/>
|
|
|
|
|
+ <col width="7%"/>
|
|
|
|
|
+ <col width="9%"/>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col width="6%"/>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <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].mallGbNm}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].frontGbNm}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].ordDt}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].ordNo}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].ordNm}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].ordPhnno}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].ordEmail}"></td>
|
|
|
|
|
+ <td th:text="${orderInfoList[0].custNo}"></td>
|
|
|
|
|
+ <td th:text="${cancelRequestTargetList[0].regDt}"></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <!-- //TABLE -->
|
|
|
|
|
+
|
|
|
|
|
+ <h4>반품정보</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>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="delvCdList">
|
|
|
|
|
+ <h4>배송정보</h4>
|
|
|
|
|
+ <div id="gridDelvCdList" style="width:100%; height: 66px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <h4 id="h4DelvInfoList">배송비정보</h4>
|
|
|
|
|
+ <div id="gridDelvInfoList" style="width:100%; height: 140px;" class="ag-theme-balham"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width:160px;" />
|
|
|
|
|
+ <col style="width:320px;" />
|
|
|
|
|
+ <col style="width:160px;" />
|
|
|
|
|
+ <col style="width:320px;" />
|
|
|
|
|
+ <col style="width:160px;" />
|
|
|
|
|
+ <col />
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>반품사유 <i class="star"></i></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="selectChgReason" onchange="fnChangeChgReason($(this).val());">
|
|
|
|
|
+ <option value="">[선택하세요]</option>
|
|
|
|
|
+ <option th:if="${chgReasonList}" th:each="oneData, status : ${chgReasonList}" th:value="|${oneData.cd}|" th:text="|${oneData.cdNm}|"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>회수방법</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="W" onclick="fnChangeWdGb(this)"/>회수요청<span></span></label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="D" onclick="fnChangeWdGb(this)"/>직접발송<span></span></label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>귀책사유</th>
|
|
|
|
|
+ <td><span id="imputeReason"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>알림톡미전송여부</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <label class="chkBox">
|
|
|
|
|
+ <input type="checkbox" name="msgStat" id="msgStat" checked/>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>요청메모<br/><span id="chgMemoCount">0</span>/1,000Byte</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <textarea id="chgMemo" name="chgMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#chgMemoCount'));"></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">0P</td>
|
|
|
|
|
+ <td></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="height:25px;">포인트환불</td>
|
|
|
|
|
+ <td class="spanPntDcAmt">0원</td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <span>적립예정포인트환수 : </span><span class="spanSavePntAmt">0P</span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 회수지정보 -->
|
|
|
|
|
+ <div id="chgerAddress">
|
|
|
|
|
+ <h4>회수지 정보</h4>
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width:160px;" />
|
|
|
|
|
+ <col style="width:320px;" />
|
|
|
|
|
+ <col style="width:160px;" />
|
|
|
|
|
+ <col />
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>보내는사람 <i class="star"></i></th>
|
|
|
|
|
+ <td colspan="3"><input type="text" name ="chgerNm" class="" readonly="readonly"/></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>회수지주소 <i class="star"></i></th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <input type="text" name ="chgerZipcode" class="w100" readonly="readonly"/>
|
|
|
|
|
+ <input type="text" name ="chgerBaseAddr" class="w300" readonly="readonly"/>
|
|
|
|
|
+ <input type="text" name ="chgerDtlAddr" class="w300" readonly="readonly"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>일반전화</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="chgerTelno1" class="w100" readonly="readonly">
|
|
|
|
|
+ <option value="">[선택하세요]</option>
|
|
|
|
|
+ <option th:if="${TelExcNoList}" th:each="oneData, status : ${TelExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ - <input type="text" name ="chgerTelno2" class="w60" readonly="readonly"/>
|
|
|
|
|
+ - <input type="text" name ="chgerTelno3" class="w60" readonly="readonly"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>휴대전화 <i class="star"></i></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="chgerPhnno1" class="w100" readonly="readonly">
|
|
|
|
|
+ <option value="">[선택하세요]</option>
|
|
|
|
|
+ <option th:if="${PhnExcNoList}" th:each="oneData, status : ${PhnExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ - <input type="text" name ="chgerPhnno2" class="w60" readonly="readonly"/>
|
|
|
|
|
+ - <input type="text" name ="chgerPhnno3" class="w60" readonly="readonly"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>반품메모<br/><span id="chgerRtnMemoCount">0</span>/1,000Byte</th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <textarea id="chgerRtnMemo" name="chgerRtnMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#chgerRtnMemoCount'));" readonly="readonly"></textarea>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //회수지정보 -->
|
|
|
|
|
+
|
|
|
|
|
+ <div id="refundAccount" style="width:100%">
|
|
|
|
|
+ <h4>환불계좌정보</h4>
|
|
|
|
|
+ <!-- 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 orderDelvRtnAddrInfo = [[${orderDelvRtnAddrInfo}]]; // 회수지정보
|
|
|
|
|
+var orderChangeDetailList = [[${orderChangeDetailList}]]; // 취소/반품/교환요청 정보
|
|
|
|
|
+var chgStat = [[${chgStat}]]; // 변경상태
|
|
|
|
|
+var recallExceptionInfo = [[${recallExceptionInfo}]]; // 회수 예외 정보
|
|
|
|
|
+var rtnLocInfo = [[${rtnLocInfo}]]; // 반송지주소정보
|
|
|
|
|
+var payGb = orderInfoList[0].payGb; // 결제수단
|
|
|
|
|
+var payMeans = orderInfoList[0].payMeans; // 결제방법
|
|
|
|
|
+var payMeansNm = orderInfoList[0].payMeansNm; // 결제방법명
|
|
|
|
|
+var cardNm = orderInfoList[0].cardNm; // 결제카드명
|
|
|
|
|
+var pgGb = orderInfoList[0].pgGb; // PG구분
|
|
|
|
|
+var payStat = orderInfoList[0].payStat; // 결제상태
|
|
|
|
|
+var selfGoodsYn = cancelRequestTargetList[0].selfGoodsYn; // 자사,입점여부
|
|
|
|
|
+var chgReason = ""; // 변경사유코드
|
|
|
|
|
+var chgMemo = ""; // 변경사유메모
|
|
|
|
|
+var wdGb = ""; // 회수방법
|
|
|
|
|
+var ordChgGb = [[${ordChgGb}]]; // 주문변경요쳥변경구분
|
|
|
|
|
+var canRequestCancelYn = ""; // 반품철회가능여부
|
|
|
|
|
+var npayChangeHoldYn = ''; // 네이버페이 주문형 반품/교환 보류 여부
|
|
|
|
|
+
|
|
|
|
|
+// 변경요청정보
|
|
|
|
|
+if (ordChgSq > 0) {
|
|
|
|
|
+ chgReason = orderChangeDetailList[0].chgReason; // 변경사유코드
|
|
|
|
|
+ chgMemo = orderChangeDetailList[0].chgMemo; // 변경사유메모
|
|
|
|
|
+ wdGb = orderChangeDetailList[0].wdGb; // 회수방법
|
|
|
|
|
+ canRequestCancelYn = orderChangeDetailList[0].canRequestCancelYn; // 반품철회가능여부
|
|
|
|
|
+ npayChangeHoldYn = orderChangeDetailList[0].npayChangeHoldYn; // 네이버페이 주문형 반품/교환 보류 여부
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+if (gagajf.isNull(ordChgGb)) {
|
|
|
|
|
+ ordChgGb == '1';
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+var temp1 = true;
|
|
|
|
|
+var temp2 = false;
|
|
|
|
|
+var temp3 = true;
|
|
|
|
|
+
|
|
|
|
|
+// 1. 주문정보(변경요청가능대상)
|
|
|
|
|
+var columnCancelReqList = [
|
|
|
|
|
+ {headerName: "업체명" , field: "supplyCompNm" , width: 120 , cellClass: 'text-left'},
|
|
|
|
|
+ {headerName: "브랜드명" , field: "brandGroupNm" , width: 120 , cellClass: 'text-left'},
|
|
|
|
|
+ {headerName: "주문번호" , field: "ordNo" , width: 80 , cellClass: 'text-center' , hide: temp1},
|
|
|
|
|
+ {headerName: "주문상세번호" , field: "ordDtlNo" , width: 120 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "요청구분" , field: "chgGbNm" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "변경상태" , field: "chgStatNm" , width: 100 , 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: 110 , 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: 80 , 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: 60 , cellClass: 'text-center' , hide: temp2},
|
|
|
|
|
+ {headerName: "옵션2" , field: "optCd2" , width: 60 , 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;
|
|
|
|
|
+ }
|
|
|
|
|
+ , hide : temp1
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 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 = "";
|
|
|
|
|
+
|
|
|
|
|
+ // 취소신청가능수량있으면 수량만 표시 (취소,반품,교환 신청정보 처리)
|
|
|
|
|
+ // 2021.06.22 반품TO반품 수량 처리
|
|
|
|
|
+ if (ordChgSq > 0) {
|
|
|
|
|
+ if (ordChgGb == 'G681_30') {
|
|
|
|
|
+ ordCanChgQty = params.data.chgQty;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rtnStr = ordCanChgQty;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 2021.08.03 확정후품절 수량 처리
|
|
|
|
|
+ else if (ordChgGb == 'G681_60') {
|
|
|
|
|
+ rtnStr = params.data.chgQty;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
|
|
|
|
|
+
|
|
|
|
|
+ if (ordCanChgQty == 0) {
|
|
|
|
|
+ rtnStr += "<select class='ordCanChgQty' name='ordCanChgQty' ordDtlNo='" + params.data.ordDtlNo + "' onChange='fnCalculateRefundAmt(this);' disabled='disabled'>";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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) {
|
|
|
|
|
+ if (params.data.delvFeeCrite == 'G078_30') {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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) {
|
|
|
|
|
+ if (params.data.delvFeeCrite == 'G078_30') {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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 columnDelvInfoList = [
|
|
|
|
|
+ {
|
|
|
|
|
+ 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) {
|
|
|
|
|
+ if (params.data.delvFeeCrite == 'G078_30') {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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 gridOptionsDelvInfoList = gagaAgGrid.getGridOptions(columnDelvInfoList);
|
|
|
|
|
+
|
|
|
|
|
+// 3. 배송정보(환불정보)
|
|
|
|
|
+var columnDelvCdList = [
|
|
|
|
|
+ {headerName: "업체" , field: "supplyCompNm" , width: 150 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "추가배송비"
|
|
|
|
|
+ , field : "addDelvFee"
|
|
|
|
|
+ , width : 100
|
|
|
|
|
+ , cellClass : 'text-right'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ }
|
|
|
|
|
+ , hide : true
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "반품지명" , field: "rtnLocNm" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "반품지전화번호" , field: "rtnLocTelno" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "반품지우편번호" , field: "rtnLocZipcode" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "반품지기본주소" , field: "rtnLocBaseAddr" , width: 300 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "반품지상세주소" , field: "rtnLocDtlAddr" , width: 300 , cellClass: 'text-center'},
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsDelvCdList = gagaAgGrid.getGridOptions(columnDelvCdList);
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+// 현재 사유는 고객 입니다.
|
|
|
|
|
+var isCustomer = false;
|
|
|
|
|
+
|
|
|
|
|
+// 환불예상금액계산
|
|
|
|
|
+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('popupReturnRequestForm');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.05.25 수정
|
|
|
|
|
+ var ordDtlNoArr = [];
|
|
|
|
|
+ var cnclRtnReqQtyArr = [];
|
|
|
|
|
+ var chgQtyArr = [];
|
|
|
|
|
+
|
|
|
|
|
+ // 1. 반품신청수량 체크
|
|
|
|
|
+ var chk = 0;
|
|
|
|
|
+ for (i=0 ; i<cancelRequestTargetList.length ; i++) {
|
|
|
|
|
+ if (cancelRequestTargetList[i].ordCanChgQty > 0) {
|
|
|
|
|
+ // 반품신청값설정
|
|
|
|
|
+ ordDtlNoArr.push(cancelRequestTargetList[i].ordDtlNo);
|
|
|
|
|
+ cnclRtnReqQtyArr.push(cancelRequestTargetList[i].ordCanChgQty);
|
|
|
|
|
+ chgQtyArr.push(cancelRequestTargetList[i].chgQty);
|
|
|
|
|
+ chk++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 신청수량이 없거나 반품사유 선택 안했을 시 계산 안함
|
|
|
|
|
+ //if (chk == 0 || $('#cancelRequestFrm input[name=chgReason]').val() == '') {
|
|
|
|
|
+ //return false;
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ // 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 delvFeeCdGrp = $('#cancelRequestFrm input[name=delvFeeCdGrp]').val();
|
|
|
|
|
+
|
|
|
|
|
+ // 환불금액계산호출
|
|
|
|
|
+ var jsonObj = {
|
|
|
|
|
+ "ordNo" : ordNo
|
|
|
|
|
+ ,"ordDtlNoArr" : ordDtlNoArr
|
|
|
|
|
+ ,"cnclRtnReqQtyArr" : cnclRtnReqQtyArr
|
|
|
|
|
+ ,"isCustomer" : isCustomer
|
|
|
|
|
+ ,"chgerNm" : chgerNm
|
|
|
|
|
+ ,"chgerEmail" : chgerEmail
|
|
|
|
|
+ ,"chgerPhnno" : chgerPhnno
|
|
|
|
|
+ ,"custNo" : custNo
|
|
|
|
|
+ ,"ordNm" : chgerNm
|
|
|
|
|
+ ,"ordPhnno" : chgerPhnno
|
|
|
|
|
+ ,"delvFeeCdGrp" : delvFeeCdGrp
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(jsonObj);
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/orderChange/cancel/refundAmt'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function(result) {
|
|
|
|
|
+
|
|
|
|
|
+ $.each(result.cancelOrderRefundList, function(idx, item) {
|
|
|
|
|
+ let index = ordDtlNoArr.indexOf(item.ordDtlNo);
|
|
|
|
|
+ if (index >= 0) {
|
|
|
|
|
+ item.chgQty = chgQtyArr[index];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ gridOptionsCancelReqToBeList.api.setRowData(result.cancelOrderRefundList);
|
|
|
|
|
+ gridOptionsDelvInfoList.api.setRowData(result.cancelDelvRefundList);
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.12.01 취소금액설정
|
|
|
|
|
+ if (result.cancelOrderRefundList != null && result.cancelOrderRefundList.length > 0) {
|
|
|
|
|
+ for (i=0 ; i<result.cancelOrderRefundList.length ; i++) {
|
|
|
|
|
+ for (j=0 ; j<cancelRequestTargetList.length ; j++) {
|
|
|
|
|
+ if (result.cancelOrderRefundList[i].ordDtlNo == cancelRequestTargetList[j].ordDtlNo) {
|
|
|
|
|
+ cancelRequestTargetList[j].cnclRtnAmt = result.cancelOrderRefundList[i].cnclRtnAmt; // 취소금액
|
|
|
|
|
+ cancelRequestTargetList[j].cpn1DcAmt = result.cancelOrderRefundList[i].cpn1DcAmt; // 즉시할인쿠폰금액
|
|
|
|
|
+ cancelRequestTargetList[j].tmtb1DcAmt = result.cancelOrderRefundList[i].tmtb1DcAmt; // 수량할인다다익선금액
|
|
|
|
|
+ cancelRequestTargetList[j].tmtb2DcAmt = result.cancelOrderRefundList[i].tmtb2DcAmt; // 금액할인다다익선금액
|
|
|
|
|
+ cancelRequestTargetList[j].goodsCpnDcAmt = result.cancelOrderRefundList[i].goodsCpnDcAmt; // 상품쿠폰금액
|
|
|
|
|
+ cancelRequestTargetList[j].cartCpnDcAmt = result.cancelOrderRefundList[i].cartCpnDcAmt; // 장바구니쿠폰금액
|
|
|
|
|
+ cancelRequestTargetList[j].pntDcAmt = result.cancelOrderRefundList[i].pntDcAmt; // 포인트금액
|
|
|
|
|
+ cancelRequestTargetList[j].prePntDcAmt = result.cancelOrderRefundList[i].prePntDcAmt; // 선포인트금액
|
|
|
|
|
+ cancelRequestTargetList[j].gfcdUseAmt = result.cancelOrderRefundList[i].gfcdUseAmt; // 상품권적용금액
|
|
|
|
|
+ cancelRequestTargetList[j].realOrdAmt = result.cancelOrderRefundList[i].realOrdAmt; // 실결제금액
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 주문변경대상정보 재설정
|
|
|
|
|
+ gridOptionsCancelReqList.api.setRowData(cancelRequestTargetList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ 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 spanTotRtnDelvFee = Number(result.spanTotRtnDelvFee); // 반품배송비
|
|
|
|
|
+ let spanRealCnclRtnAmt = Number(result.spanRealCnclRtnAmt); // 환불 상품 실결제 금액 (환불상품금액 - 할인차감금액)
|
|
|
|
|
+ let goodsCancelAmt = spanCnclRtnAmt + spanCpn1DcAmt; // 상품취소금액
|
|
|
|
|
+ let spanRefundAmt = spanRealCnclRtnAmt; // 환불예정금액 (환불상품실결제금액)
|
|
|
|
|
+ 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 = "외부몰입금";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 회사사유거나 고객사유(직접발송) 시 반품배송비 0
|
|
|
|
|
+ if (!isCustomer || $('#wdGb:checked').val() == 'D') {
|
|
|
|
|
+ spanTotRtnDelvFee = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.08.10 card007 상품권100% 결제 로직 수정
|
|
|
|
|
+ let refundAmt = spanRefundAmt + spanGfcdUseAmt;
|
|
|
|
|
+ let leftAddDelvFee = spanTotRtnDelvFee;
|
|
|
|
|
+
|
|
|
|
|
+ if (refundAmt < spanTotRtnDelvFee) {
|
|
|
|
|
+ addDelvFee = spanTotRtnDelvFee;
|
|
|
|
|
+ } 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 - leftAddDelvFee; // 결제금액 환불 (환불예정금액 - 환불 배송비 상품권 금액 - 추가배송비)
|
|
|
|
|
+ let deliveryFee = 0 - spanTotRtnDelvFee; // 환불배송비
|
|
|
|
|
+ let spanTotGfcdUseAmt = spanGfcdUseAmt; // 환불 상품권 금액 합계
|
|
|
|
|
+ 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"); // 포인트환불 > 적립예정포인트환수
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 귀책사유설정
|
|
|
|
|
+var fnChangeChgReason = function(reasonCd){
|
|
|
|
|
+ var customerReasonArr = ['G688_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 accountNo = "";
|
|
|
|
|
+ var accountNm = "";
|
|
|
|
|
+ var bankCd = "";
|
|
|
|
|
+
|
|
|
|
|
+ var chgerNm = "";
|
|
|
|
|
+ var chgerZipcode = "";
|
|
|
|
|
+ var chgerBaseAddr = "";
|
|
|
|
|
+ var chgerDtlAddr = "";
|
|
|
|
|
+
|
|
|
|
|
+ var chgerPhnno1 = "";
|
|
|
|
|
+ var chgerPhnno2 = "";
|
|
|
|
|
+ var chgerPhnno3 = "";
|
|
|
|
|
+
|
|
|
|
|
+ var chgerTelno1 = "";
|
|
|
|
|
+ var chgerTelno2 = "";
|
|
|
|
|
+ var chgerTelno3 = "";
|
|
|
|
|
+
|
|
|
|
|
+ var chgerPhnno = "";
|
|
|
|
|
+ var chgerTelno = "";
|
|
|
|
|
+ var chgerEmail = "";
|
|
|
|
|
+ var chgerRtnMemo = "";
|
|
|
|
|
+
|
|
|
|
|
+ // 반품신청
|
|
|
|
|
+ let chk = false;
|
|
|
|
|
+ if (reqGbn == "rtnReq") {
|
|
|
|
|
+ // 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. 반품사유 체크
|
|
|
|
|
+ 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();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 4. 회수지정보설정 (회수요청일때실행)
|
|
|
|
|
+ if ($('#wdGb:checked').val() == "W") {
|
|
|
|
|
+ chgerNm = $("#cancelRequestFrm input[name=chgerNm]").val();
|
|
|
|
|
+ chgerZipcode = $("#cancelRequestFrm input[name=chgerZipcode]").val();
|
|
|
|
|
+ chgerBaseAddr = $("#cancelRequestFrm input[name=chgerBaseAddr]").val();
|
|
|
|
|
+ chgerDtlAddr = $("#cancelRequestFrm input[name=chgerDtlAddr]").val();
|
|
|
|
|
+
|
|
|
|
|
+ chgerPhnno1 = $("#cancelRequestFrm select[name=chgerPhnno1]").val();
|
|
|
|
|
+ chgerPhnno2 = $("#cancelRequestFrm input[name=chgerPhnno2]").val();
|
|
|
|
|
+ chgerPhnno3 = $("#cancelRequestFrm input[name=chgerPhnno3]").val();
|
|
|
|
|
+
|
|
|
|
|
+ chgerTelno1 = $("#cancelRequestFrm select[name=chgerTelno1]").val();
|
|
|
|
|
+ chgerTelno2 = $("#cancelRequestFrm input[name=chgerTelno2]").val();
|
|
|
|
|
+ chgerTelno3 = $("#cancelRequestFrm input[name=chgerTelno3]").val();
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(chgerZipcode)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerBaseAddr)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerDtlAddr)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno1)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno2)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno3)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ chgerPhnno = chgerPhnno1 + '-' + chgerPhnno2 + '-' + chgerPhnno3;
|
|
|
|
|
+ chgerEmail = orderInfoList[0].ordEmail;
|
|
|
|
|
+ chgerRtnMemo = $("#cancelRequestFrm textarea[name=chgerRtnMemo]").val();
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(chgerTelno1) && gagajf.isNull(chgerTelno2) && gagajf.isNull(chgerTelno3)) {
|
|
|
|
|
+ chgerTelno = '';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ chgerTelno = chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.11.09 card007 휴대폰번호 유효성검증 추가
|
|
|
|
|
+ if (!gagajf.checkPhnno(chgerPhnno)) {
|
|
|
|
|
+ mcxDialog.alert("회수지 휴대폰 번호가 유효하지 않습니다.");
|
|
|
|
|
+
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.01.26 화면통합
|
|
|
|
|
+ // 5. 반품신청, 반품철회
|
|
|
|
|
+ // 반품신청
|
|
|
|
|
+ if (reqGbn == "rtnReq" && ordChgGb != 'G681_30') {
|
|
|
|
|
+ confirmStr = "반품신청하시겠습니까?";
|
|
|
|
|
+ cnclUrl = '/orderChange/rtnReq/';
|
|
|
|
|
+ }
|
|
|
|
|
+ // 반품신청철회
|
|
|
|
|
+ else if (reqGbn == "rtnReqCancel") {
|
|
|
|
|
+ confirmStr = "요청번호 [" + ordChgSq + "] 에 대한 요청철회 처리를 하시겠습니까?";
|
|
|
|
|
+ cnclUrl = '/orderChange/rtnReqCancel/';
|
|
|
|
|
+ }
|
|
|
|
|
+ // 반품TO반품 신청
|
|
|
|
|
+ else if (ordChgGb == 'G681_30') {
|
|
|
|
|
+ confirmStr = "반품변경하시겠습니까?";
|
|
|
|
|
+ cnclUrl = '/orderChange/return/to/return/';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 7. 추가정보설정
|
|
|
|
|
+ var ordNm = orderInfoList[0].ordNm;
|
|
|
|
|
+ var ordPhnno = orderInfoList[0].ordPhnno;
|
|
|
|
|
+ var custNo = orderInfoList[0].custNo;
|
|
|
|
|
+ var delvFeeCd = orderInfoList[0].delvFeeCd;
|
|
|
|
|
+ var delvFeeCdGrp = $('#cancelRequestFrm input[name=delvFeeCdGrp]').val();
|
|
|
|
|
+
|
|
|
|
|
+ var jsonObj = {
|
|
|
|
|
+ "ordNo" : $('#cancelRequestFrm input[name=ordNo]').val()
|
|
|
|
|
+ ,"chgReason" : $('#cancelRequestFrm input[name=chgReason]').val()
|
|
|
|
|
+ ,"chgMemo" : $('#chgMemo').val()
|
|
|
|
|
+ ,"ordDtlNoArr" : ordDtlNoArr
|
|
|
|
|
+ ,"cnclRtnReqQtyArr" : cnclRtnReqQtyArr
|
|
|
|
|
+ ,"accountNo" : accountNo
|
|
|
|
|
+ ,"accountNm" : accountNm
|
|
|
|
|
+ ,"bankCd" : bankCd
|
|
|
|
|
+ ,"allCanYn" : allCanYn
|
|
|
|
|
+ ,"allCanYnBeforePayment" : "N"
|
|
|
|
|
+ ,"isCustomer" : isCustomer
|
|
|
|
|
+ ,"chgerNm" : chgerNm
|
|
|
|
|
+ ,"chgerEmail" : chgerEmail
|
|
|
|
|
+ ,"chgerZipcode" : chgerZipcode
|
|
|
|
|
+ ,"chgerBaseAddr" : chgerBaseAddr
|
|
|
|
|
+ ,"chgerDtlAddr" : chgerDtlAddr
|
|
|
|
|
+ ,"chgerPhnno" : chgerPhnno
|
|
|
|
|
+ ,"chgerTelno" : chgerTelno
|
|
|
|
|
+ ,"chgerRtnMemo" : chgerRtnMemo
|
|
|
|
|
+ ,"ordChgSq" : ordChgSq
|
|
|
|
|
+ ,"wdGb" : $('#wdGb:checked').val()
|
|
|
|
|
+ ,"delvFeeCdGrp" : delvFeeCdGrp
|
|
|
|
|
+ ,"custNo" : custNo
|
|
|
|
|
+ ,"ordNm" : ordNm
|
|
|
|
|
+ ,"ordPhnno" : ordPhnno
|
|
|
|
|
+ ,"msgStat" : $('#msgStat').is(':checked') ? 'Y' : 'N'
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 주문번호, 취소사유, 취소메모, (취소, 반품, 교환 신청 정보 목록), 환불계좌
|
|
|
|
|
+ var jsonData = JSON.stringify(jsonObj);
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm(confirmStr, {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function(){
|
|
|
|
|
+ if (chk) {
|
|
|
|
|
+ // 환불계좌 유효성 체크
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/business/account/check', jsonData, function(result) {
|
|
|
|
|
+ if (result.isValid) { // 유효하면 true
|
|
|
|
|
+ // 취소 실행
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ cnclUrl
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ uifnPopupClose('popupReturnRequestForm');
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mcxDialog.alert('환불계좌가 유효하지 않습니다.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 취소 실행
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ cnclUrl
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ uifnPopupClose('popupReturnRequestForm');
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 환불계좌 등록
|
|
|
|
|
+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);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 우편번호 DAUM을 이용한 우편번호 팝업 레이어
|
|
|
|
|
+var fnOpenDaumAddr = function() {
|
|
|
|
|
+ let daumZip = new daum.Postcode({
|
|
|
|
|
+ oncomplete: function(data) {
|
|
|
|
|
+ // 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
|
|
|
+ $('#cancelRequestFrm input[name=chgerZipcode]').val(data.zonecode);
|
|
|
|
|
+ $('#cancelRequestFrm input[name=chgerBaseAddr]').val(cfnGetDaumRoadAddr(data));
|
|
|
|
|
+ $('#cancelRequestFrm input[name=chgerDtlAddr]').focus();
|
|
|
|
|
+
|
|
|
|
|
+ cfnCloseDaumAddr();
|
|
|
|
|
+ },
|
|
|
|
|
+ width: '100%'
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ cfnOpenDaumAddr(daumZip);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 회수지정보 설정
|
|
|
|
|
+var fnSetChger = function(){
|
|
|
|
|
+ var data = orderDelvRtnAddrInfo[0];
|
|
|
|
|
+ var spRecipPhnno = (data.recipPhnno != null) ? data.recipPhnno.split('-') : null;
|
|
|
|
|
+ var spRecipTelno = (data.recipTelno != null) ? data.recipTelno.split('-') : null;
|
|
|
|
|
+
|
|
|
|
|
+ // 반품상세화면일때적용
|
|
|
|
|
+ if (ordChgSq > 0) {
|
|
|
|
|
+ data = orderChangeDetailList[0];
|
|
|
|
|
+ spRecipPhnno = (data.chgerPhnno != null) ? data.chgerPhnno.split('-') : null;
|
|
|
|
|
+ spRecipTelno = (data.chgerTelno != null) ? data.chgerTelno.split('-') : null;
|
|
|
|
|
+
|
|
|
|
|
+ // 회수지정보 히든 처리
|
|
|
|
|
+ if (wdGb == 'D') {
|
|
|
|
|
+ $('#chgerAddress').css('display', 'none');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerNm]").val(data.chgerNm);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerZipcode]").val(data.chgerZipcode);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerBaseAddr]").val(data.chgerBaseAddr);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerDtlAddr]").val(data.chgerDtlAddr);
|
|
|
|
|
+ $("#cancelRequestFrm textarea[name=chgerRtnMemo]").val(data.chgerRtnMemo);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerNm]").val(data.recipNm);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerZipcode]").val(data.recipZipcode);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerBaseAddr]").val(data.recipBaseAddr);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerDtlAddr]").val(data.recipDtlAddr);
|
|
|
|
|
+ $("#cancelRequestFrm textarea[name=chgerRtnMemo]").val(data.chgerRtnMemo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (spRecipPhnno) {
|
|
|
|
|
+ $("#cancelRequestFrm select[name=chgerPhnno1]").val(spRecipPhnno[0]);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerPhnno2]").val(spRecipPhnno[1]);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerPhnno3]").val(spRecipPhnno[2]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (spRecipTelno) {
|
|
|
|
|
+ $("#cancelRequestFrm select[name=chgerTelno1]").val(spRecipTelno[0]);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerTelno2]").val(spRecipTelno[1]);
|
|
|
|
|
+ $("#cancelRequestFrm input[name=chgerTelno3]").val(spRecipTelno[2]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (ordChgSq > 0 && chgStat != 'G685_50' && chgStat != 'G685_51') {
|
|
|
|
|
+ $('input[name=chgerNm]').attr('readOnly', true); // 회수지정보 > 보내는사람 비활성화
|
|
|
|
|
+ $('input[name=chgerBaseAddr]').attr('readOnly', true); // 회수지정보 > 기본주소 비활성화
|
|
|
|
|
+ $('input[name=chgerDtlAddr]').attr('readOnly', true); // 회수지정보 > 상세주소 비활성화
|
|
|
|
|
+ $('select[name=chgerTelno1]').attr('disabled', true); // 회수지정보 > 일반전화 비활성화
|
|
|
|
|
+ $('input[name=chgerTelno2]').attr('readOnly', true); // 회수지정보 > 일반전화 비활성화
|
|
|
|
|
+ $('input[name=chgerTelno3]').attr('readOnly', true); // 회수지정보 > 일반전화 비활성화
|
|
|
|
|
+ $('select[name=chgerPhnno1]').attr('disabled', true); // 회수지정보 > 휴대전화 비활성화
|
|
|
|
|
+ $('input[name=chgerPhnno2]').attr('readOnly', true); // 회수지정보 > 휴대전화 비활성화
|
|
|
|
|
+ $('input[name=chgerPhnno3]').attr('readOnly', true); // 회수지정보 > 휴대전화 비활성화
|
|
|
|
|
+ $('#chgerRtnMemo').attr('readOnly', true); // 회수지정보 > 반품메모 비활성화
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 회수방법설정이벤트
|
|
|
|
|
+var fnChangeWdGb = function(param) {
|
|
|
|
|
+ let wdGb = $(param).val();
|
|
|
|
|
+
|
|
|
|
|
+ // 회수지정보 히든 처리
|
|
|
|
|
+ if (wdGb == 'D') {
|
|
|
|
|
+ $('#chgerAddress').css('display', 'none');
|
|
|
|
|
+ $('#delvCdList').css('display', '');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('#chgerAddress').css('display', '');
|
|
|
|
|
+ $('#delvCdList').css('display', 'none');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 환불예정금액 계산
|
|
|
|
|
+ fnCalculateRefundAmt();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 반품TO교환 버튼 클릭 이벤트
|
|
|
|
|
+var fnRtnToExc = function() {
|
|
|
|
|
+ let ordNo = $('#cancelRequestFrm input[name=ordNo]').val();
|
|
|
|
|
+ let ordChgSq = $('#cancelRequestFrm input[name=ordChgSq]').val();
|
|
|
|
|
+ let delvFeeCd = $('#cancelRequestFrm input[name=delvFeeCd]').val();
|
|
|
|
|
+ let delvFeeCdGrp = $('#cancelRequestFrm input[name=delvFeeCdGrp]').val();
|
|
|
|
|
+
|
|
|
|
|
+ // 취소요청 구분 (orChgSq null 이면 취소요청화면 있으면 취소요청정보화면)
|
|
|
|
|
+ if (ordChgSq == null) {
|
|
|
|
|
+ ordChgSq = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var param = "";
|
|
|
|
|
+ param += "&ordNo=" + ordNo;
|
|
|
|
|
+ param += "&delvFeeCd=" + delvFeeCd;
|
|
|
|
|
+ param += "&delvFeeCdGrp=" + delvFeeCdGrp;
|
|
|
|
|
+ param += "&ordChgSq=" + ordChgSq;
|
|
|
|
|
+ param += "&ordChgGb=G681_40";
|
|
|
|
|
+
|
|
|
|
|
+ // 반품상세 팝업 닫기
|
|
|
|
|
+ uifnPopupClose('popupReturnRequestForm');
|
|
|
|
|
+
|
|
|
|
|
+ var actionUrl = "/orderChange/exchange/request/form?" + param;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupExchangeRequestForm');
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 회수지 정보 수정
|
|
|
|
|
+var fnChangeChgerInfo = function() {
|
|
|
|
|
+ let url = '/orderChange/change/chger/addr';
|
|
|
|
|
+ let chgerNm = $("#cancelRequestFrm input[name=chgerNm]").val();
|
|
|
|
|
+ let chgerZipcode = $("#cancelRequestFrm input[name=chgerZipcode]").val();
|
|
|
|
|
+ let chgerBaseAddr = $("#cancelRequestFrm input[name=chgerBaseAddr]").val();
|
|
|
|
|
+ let chgerDtlAddr = $("#cancelRequestFrm input[name=chgerDtlAddr]").val();
|
|
|
|
|
+ let chgerPhnno1 = $("#cancelRequestFrm select[name=chgerPhnno1]").val();
|
|
|
|
|
+ let chgerPhnno2 = $("#cancelRequestFrm input[name=chgerPhnno2]").val();
|
|
|
|
|
+ let chgerPhnno3 = $("#cancelRequestFrm input[name=chgerPhnno3]").val();
|
|
|
|
|
+ let chgerTelno1 = $("#cancelRequestFrm select[name=chgerTelno1]").val();
|
|
|
|
|
+ let chgerTelno2 = $("#cancelRequestFrm input[name=chgerTelno2]").val();
|
|
|
|
|
+ let chgerTelno3 = $("#cancelRequestFrm input[name=chgerTelno3]").val();
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(chgerZipcode)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerBaseAddr)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerDtlAddr)) {
|
|
|
|
|
+ mcxDialog.alert("회수지주소를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno1)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno2)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (gagajf.isNull(chgerPhnno3)) {
|
|
|
|
|
+ mcxDialog.alert("휴대전화를 입력하세요."); return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let chgerPhnno = chgerPhnno1 + '-' + chgerPhnno2 + '-' + chgerPhnno3;
|
|
|
|
|
+ let chgerRtnMemo = $("#cancelRequestFrm textarea[name=chgerRtnMemo]").val();
|
|
|
|
|
+ let chgerTelno = '';
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.isNull(chgerTelno1) && !gagajf.isNull(chgerTelno2) && !gagajf.isNull(chgerTelno3)) {
|
|
|
|
|
+ chgerTelno = chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.11.09 card007 휴대폰번호 유효성검증 추가
|
|
|
|
|
+ if (!gagajf.checkPhnno(chgerPhnno)) {
|
|
|
|
|
+ mcxDialog.alert("회수지 휴대폰 번호가 유효하지 않습니다.");
|
|
|
|
|
+
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let data = {};
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+ data.chgerNm = chgerNm;
|
|
|
|
|
+ data.chgerPhnno = chgerPhnno;
|
|
|
|
|
+ data.chgerZipcode = chgerZipcode;
|
|
|
|
|
+ data.chgerBaseAddr = chgerBaseAddr;
|
|
|
|
|
+ data.chgerDtlAddr = chgerDtlAddr;
|
|
|
|
|
+ data.chgerRtnMemo = chgerRtnMemo;
|
|
|
|
|
+
|
|
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(url, jsonData, function(result){
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 네이버페이 주문형 반품보류 버튼 클릭 이벤트
|
|
|
|
|
+var fnNpayReturnHold = function(param) {
|
|
|
|
|
+ let url = '/orderChange/nPay/order/return/hold';
|
|
|
|
|
+ let npayChangeHoldYn = $(param).attr('npayChangeHoldYn');
|
|
|
|
|
+
|
|
|
|
|
+ let data = {};
|
|
|
|
|
+ data.cancelReqList = cancelRequestTargetList;
|
|
|
|
|
+ data.npayChangeHoldYn = npayChangeHoldYn;
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
|
|
|
|
|
+ uifnPopupClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ uifnPopupClose('popupReturnRequestForm');
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+$(document).ready(function() {
|
|
|
|
|
+ // 1. 그리드생성
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderCancelRequestList' , gridOptionsCancelReqList); // 주문정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderCancelRequestToBeList' , gridOptionsCancelReqToBeList); // 취소정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridDelvInfoList' , gridOptionsDelvInfoList); // 배송비정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridDelvCdList' , gridOptionsDelvCdList); // 배송정보
|
|
|
|
|
+
|
|
|
|
|
+ gridOptionsCancelReqList.api.setRowData(cancelRequestTargetList);
|
|
|
|
|
+ gridOptionsDelvCdList.api.setRowData(rtnLocInfo);
|
|
|
|
|
+
|
|
|
|
|
+ // 1.1 TOTAL ROWS 없애기
|
|
|
|
|
+ gagaAgGrid.hideStatusBar('gridOrderCancelRequestList');
|
|
|
|
|
+ gagaAgGrid.hideStatusBar('gridOrderCancelRequestToBeList');
|
|
|
|
|
+ gagaAgGrid.hideStatusBar('gridDelvCdList');
|
|
|
|
|
+
|
|
|
|
|
+ // 2. 회수구분처리
|
|
|
|
|
+ // 2021.11.22 입점업체인 경우에는 회수요청만 해당
|
|
|
|
|
+ if (selfGoodsYn == "N") {
|
|
|
|
|
+ $('input:radio[name="wdGb"]:radio[value="W"]').prop('checked', true);
|
|
|
|
|
+ $('input:radio[name=wdGb]').attr('disabled', true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (wdGb == 'D') {
|
|
|
|
|
+ $('input:radio[name="wdGb"]:radio[value="D"]').prop('checked', true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('input:radio[name="wdGb"]:radio[value="W"]').prop('checked', true);
|
|
|
|
|
+ $('#delvCdList').css('display', 'none');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 3. 무통장입금아닐때 환불계좌 목록 숨김처리
|
|
|
|
|
+ if (payMeans !== 'G014_20') {
|
|
|
|
|
+ $('#refundAccount').addClass("off");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fnBindOrderRfAccountInfo();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 4. 회수지정보설정
|
|
|
|
|
+ fnSetChger();
|
|
|
|
|
+
|
|
|
|
|
+ // 네이버페이 주문형 보류 버튼 처리
|
|
|
|
|
+ $('#returnHold').css('display', 'none');
|
|
|
|
|
+ $('#releaseReturnHold').css('display', 'none');
|
|
|
|
|
+
|
|
|
|
|
+ // 5. 반품신청, 반품철회 버튼 제어
|
|
|
|
|
+ if (ordChgSq > 0) {
|
|
|
|
|
+ $("#rtnReqBtn").css("display", "none");
|
|
|
|
|
+ $("#rtnReqCancelBtn").css("display", "none");
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.05.25 반품접수, 반품대기 상태에서만 철회가능
|
|
|
|
|
+ // 2021.07.13 회수예외정보가 있고 회수요청, 상품검수중 상태에서 철회 가능 처리
|
|
|
|
|
+ // 2021.07.22 택배사 회수 불가 시 회수요청상태에서 반품철회 처리
|
|
|
|
|
+ //if (chgStat != "G685_50" && chgStat != "G685_51" && (recallExceptionInfo == null || (chgStat != "G685_30" && chgStat != 'G685_31'))) {
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.09.07 반품철회 전체 상태 오픈 현업(정지혜 과장 요청)
|
|
|
|
|
+ //if (chgStat != "G685_50" && chgStat != "G685_51") {
|
|
|
|
|
+ //$("#rtnReqCancelBtn").css("display", "none");
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ // 회수요청 상태에서 택배사 회수 불가 or 회수예외정보 존재 시 반품철회 가능
|
|
|
|
|
+ //if (chgStat == 'G685_30' && (recallExceptionInfo != null || canRequestCancelYn == 'Y')) {
|
|
|
|
|
+ // $("#rtnReqCancelBtn").css("display", "");
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ // 상품검수중 상태에서 회수예외정보 존재 시 반품철회 가능
|
|
|
|
|
+ //if (chgStat == 'G685_31' && recallExceptionInfo != null) {
|
|
|
|
|
+ // $("#rtnReqCancelBtn").css("display", "");
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.10.01 card007 CS요청으로 반품접수, 반품대기, 회수요청, 상품검수중 상태에서 반품철회 가능
|
|
|
|
|
+ if (chgStat == 'G685_50' || chgStat == 'G685_51' || chgStat == 'G685_30' || chgStat == 'G685_31') {
|
|
|
|
|
+ $("#rtnReqCancelBtn").css("display", "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 반품TO교환 버튼
|
|
|
|
|
+ if ((chgStat != "G685_50" && chgStat != "G685_51" && chgStat != "G685_30") || pgGb == 'NAVER_ORDER') {
|
|
|
|
|
+ $("#rtnToExcBtn").css("display", "none");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 반품TO반품 버튼
|
|
|
|
|
+ if (ordChgGb != 'G681_30') {
|
|
|
|
|
+ $("#rtnToRtnBtn").css("display", "none");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $("#rtnReqCancelBtn").css("display", "none");
|
|
|
|
|
+ $("#rtnToExcBtn").css("display", "none");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 직접발송일때 회수지정보 숨김처리
|
|
|
|
|
+ if (wdGb == "D") {
|
|
|
|
|
+ $("#chgerAddress").css("display", "none");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('#delvCdList').css('display', 'none');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 네이버페이 주문형 보류 버튼 처리
|
|
|
|
|
+ if (!gagajf.isNull(npayChangeHoldYn)) {
|
|
|
|
|
+ if (npayChangeHoldYn == 'Y') {
|
|
|
|
|
+ $('#releaseReturnHold').css('display', '');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('#returnHold').css('display', '');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $("#rtnReqCompleteBtn").css("display", "none");
|
|
|
|
|
+ $("#rtnReqCancelBtn").css("display", "none");
|
|
|
|
|
+ $("#rtnToExcBtn").css("display", "none");
|
|
|
|
|
+ $("#rtnToRtnBtn").css("display", "none");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 6. 취소사유 선택
|
|
|
|
|
+ if (ordChgSq > 0) {
|
|
|
|
|
+ $("select[name='selectChgReason']").val(chgReason); // 변경사유코드
|
|
|
|
|
+ $("select[name='selectChgReason']").attr('disabled', true); // 변경사유 비활성화
|
|
|
|
|
+ $("#chgMemo").text(chgMemo); // 변경사유메모
|
|
|
|
|
+ $("#chgMemo").attr('readOnly', true); // 변경사유메모 비활성화
|
|
|
|
|
+ $('input:radio[name=wdGb]').attr('disabled', true); // 회수방법 비활성화
|
|
|
|
|
+ fnChangeChgReason(chgReason); // 귀책사유
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // debug mode 해제
|
|
|
|
|
+ if (temp3) {
|
|
|
|
|
+ $("#h4OrderCancelRequestToBeList").css("display" , "none");
|
|
|
|
|
+ $("#gridOrderCancelRequestToBeList").css("display" , "none");
|
|
|
|
|
+ $("#h4DelvInfoList").css("display" , "none");
|
|
|
|
|
+ $("#gridDelvInfoList").css("display" , "none");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 7. 환불예상금액계산
|
|
|
|
|
+ fnCalculateRefundAmt(null);
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.05.13 높이자동조절
|
|
|
|
|
+ var cancelRequestTargetHeight = 50 + (40 * cancelRequestTargetCnt);
|
|
|
|
|
+ $("#gridOrderCancelRequestList").css("height" , cancelRequestTargetHeight+"px");
|
|
|
|
|
+
|
|
|
|
|
+ // 글자수 제한 byte 표기
|
|
|
|
|
+ cfnGetTextLength($('#chgMemo'), 1000, $('#chgMemoCount'));
|
|
|
|
|
+ cfnGetTextLength($('#chgerRtnMemo'), 1000, $('#chgerRtnMemoCount'));
|
|
|
|
|
+
|
|
|
|
|
+ // WMS 미접수, 확정후품절 처리
|
|
|
|
|
+ if (ordChgGb == 'G681_50' || ordChgGb == 'G681_60') {
|
|
|
|
|
+ $('input:radio[name="wdGb"]:radio[value="D"]').prop('checked', true);
|
|
|
|
|
+ $('#chgerAddress').css('display', 'none');
|
|
|
|
|
+ $('input:radio[name=wdGb]').attr('disabled', true);
|
|
|
|
|
+ $('#delvCdList').css('display', 'none');
|
|
|
|
|
+
|
|
|
|
|
+ // 확정후품절 반품사유 품절로 처리
|
|
|
|
|
+ if (ordChgGb == 'G681_60') {
|
|
|
|
|
+ $("select[name='selectChgReason']").val('G688_17'); // 변경사유코드
|
|
|
|
|
+ $("select[name='selectChgReason']").attr('disabled', true); // 변경사유 비활성화
|
|
|
|
|
+ fnChangeChgReason('G688_17'); // 귀책사유
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+// 2021.06.17 구성상품 내역 팝업 호출
|
|
|
|
|
+var fnOrderDetailItemForm = function (ordDtlNo) {
|
|
|
|
|
+ var actionUrl = "/delivery/detail/item/form/" + ordDtlNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupDeliveryDetailItemForm');
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+</html>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|