ExchangeRequestForm.html 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465
  1. <!DOCTYPE html>
  2. <html lang="ko" xmlns:th="http://www.thymeleaf.org">
  3. <!--
  4. *******************************************************************************
  5. * @source : ExchangeRequestForm.html
  6. * @desc : 교환요청 화면
  7. *============================================================================
  8. * STYLE24
  9. * Copyright(C) 2021 TSIT, All rights reserved.
  10. *============================================================================
  11. * VER DATE AUTHOR DESCRIPTION
  12. * === =========== ========== =============================================
  13. * 1.0 2021.01.15 card007 최초 작성
  14. *******************************************************************************
  15. -->
  16. <div class="modalPopup" data-width="1400" data-height="600">
  17. <div class="panelStyle">
  18. <div class="panelTitle">
  19. <h2>교환요청</h2>
  20. <button type="button" class="close" onclick="uifnPopupClose('popupExchangeRequestForm');"><i class="fa fa-times"></i></button>
  21. </div>
  22. <div class="panelContent" style="height:90%; overflow-y:auto; padding:0px 20px !important; ">
  23. <form id="exchangeRequestFrm" name="exchangeRequestFrm" action="/orderChange/exchange" method="post" target="hdFrameForOrderExchange">
  24. <input type="hidden" name="ordNo" th:value="${ordNo}"/>
  25. <input type="hidden" name="chgReason" value=""/>
  26. <input type="hidden" name="chgReasonDesc" value=""/>
  27. <h4>주문정보</h4>
  28. <div id="gridOrderCancelRequestList" style="width:100%; height: 200px;" class="ag-theme-balham"></div>
  29. <div id="delvCdList">
  30. <h4>배송정보</h4>
  31. <div id="gridDelvCdList" style="width:100%; height: 66px;" class="ag-theme-balham"></div>
  32. </div>
  33. <div style="text-align:right; padding-bottom:5px; padding-top:5px;">
  34. <button type="button" class="btn btn-success" th:unless="${ordChgSq > 0}" id="fnExchangeRequestSubmit" onclick="fnExchange()">교환요청</button>
  35. <!-- 2021.07.22 선발송 처리 시 교환철회 불가 처리 -->
  36. <th:block th:if="${wdBfSendYn == 'N'}">
  37. <!-- 2021.07.22 택배사 회수 불가 시 회수요청상태에서 교환철회 처리 -->
  38. <!-- 2021.10.01 card007 CS 요청으로 상품검수중까지 교환철회 오픈 처리 -->
  39. <!-- <button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or (recallExceptionInfo != null and (chgStat == 'G685_30' or chgStat == 'G685_31'))}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button> -->
  40. <!-- <button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or chgStat == 'G685_22' or (chgStat == 'G685_30' and (canRequestCancelYn == 'Y' or recallExceptionInfo != null)) or (chgStat == 'G685_31' and recallExceptionInfo != null)}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button> -->
  41. <button type="button" class="btn btn-success" th:if="${chgStat == 'G685_20' or chgStat == 'G685_21' or chgStat == 'G685_22' or chgStat == 'G685_30' or chgStat == 'G685_31'}" id="fnExchangeCancelRequestSubmit" onclick="fnExchangeCancel()">교환철회</button>
  42. </th:block>
  43. <th:block th:if="${ordChgSq > 0 and (ordChgGb == 'G681_20' or ordChgGb == 'G681_40')}">
  44. <!-- 선발송 처리 시 교TO교 접수 불가 처리 -->
  45. <button type="button" class="btn btn-success" th:unless="${ordChgGb == 'G681_20' and wdBfSendYn == 'Y'}" id="fnReturnToExchangeSubmit" onclick="fnExchange()">교환변경</button>
  46. </th:block>
  47. <th:block th:if="${ordChgSq > 0 and chgStat == 'G685_22'}">
  48. <!-- 네이버페이 주문형 교환승인 버튼 -->
  49. <button type="button" class="btn btn-success" id="fnExchangeApprovalSubmit" onclick="fnExchange()">교환승인</button>
  50. </th:block>
  51. <th:block th:if="${ordChgSq > 0 and chgStat != 'G685_40'}">
  52. <!-- 네이버페이 주문형 교환보류 버튼 -->
  53. <button type="button" class="btn btn-success" id="fnExchangeHold" npayChangeHoldYn="N" onclick="fnNpayExchangeHold(this)">교환보류</button>
  54. <button type="button" class="btn btn-success" id="fnReleaseExchangeHold" npayChangeHoldYn="Y" onclick="fnNpayExchangeHold(this)">교환보류해제</button>
  55. </th:block>
  56. </div>
  57. <table class="frmStyle">
  58. <colgroup>
  59. <col style="width:160px;" />
  60. <col style="width:320px;" />
  61. <col style="width:160px;" />
  62. <col style="width:320px;" />
  63. <col style="width:160px;" />
  64. <col />
  65. </colgroup>
  66. <tbody>
  67. <tr>
  68. <th>교환사유 <i class="star"></i></th>
  69. <td th:if="${ordChgSq <= 0 or ordChgGb == 'G681_40'}">
  70. <select name="selectChgReason" onchange="fnChangeChgReason($(this).val());">
  71. <option value="">[선택하세요]</option>
  72. <option th:if="${chgReasonList}" th:each="oneData, status : ${chgReasonList}" th:value="|${oneData.cd}:${oneData.cdNm}|" th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
  73. </select>
  74. </td>
  75. <td th:if="${ordChgSq > 0 and ordChgGb != 'G681_40'}" th:id="chgReason"></td>
  76. <th>귀책사유</th>
  77. <td><span id="imputeReason"></span></td>
  78. <th>선발송</th>
  79. <td>
  80. <label class="chkBox">
  81. <input type="checkbox" name="wdBfSendYn" id="wdBfSendYn" disabled="disabled"/>
  82. </label>
  83. </td>
  84. </tr>
  85. <tr>
  86. <th>회수방법</th>
  87. <td>
  88. <label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="W" onclick="fnChangeWdGb(this)"/>회수요청<span></span></label>
  89. <label class="rdoBtn"><input type="radio" name="wdGb" th:id="wdGb" value="D" onclick="fnChangeWdGb(this)"/>직접발송<span></span></label>
  90. </td>
  91. <th>추가배송비</th>
  92. <td id="addDelvFee"></td>
  93. <th>알림톡미전송여부</th>
  94. <td>
  95. <label class="chkBox">
  96. <input type="checkbox" name="msgStat" id="msgStat" checked/>
  97. </label>
  98. </td>
  99. </tr>
  100. <tr>
  101. <th>요청메모<br/><span id="chgMemoCount">0</span>/1,000Byte</th>
  102. <td colspan="5">
  103. <textarea id="chgMemo" name="chgMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#chgMemoCount'));"></textarea>
  104. </td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. <h4 class="chger">회수지 정보</h4>
  109. <button style="float: right" type="button" class="btn btn-success chger" id="chgerButton" onclick="fnChangeChgerInfo();">회수지 수정</button>
  110. <!-- <button style="float: right" type="button" class="btn btn-success chger" id="chgerButton" th:if="${(#strings.isEmpty(ordChgGb) or ordChgGb == 'G681_50') and ordChgSq > 0 and wdGb == 'W' and (chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnChangeChgerInfo();">회수지 수정</button>-->
  111. <table class="frmStyle chger">
  112. <colgroup>
  113. <col style="width:160px;" />
  114. <col style="width:320px;" />
  115. <col style="width:160px;" />
  116. <col />
  117. </colgroup>
  118. <tbody>
  119. <tr>
  120. <th>보내는사람 <i class="star"></i></th>
  121. <td colspan="3"><input type="text" name ="chgerNm" class=""/></td>
  122. </tr>
  123. <tr>
  124. <th>회수지주소 <i class="star"></i></th>
  125. <td colspan="3">
  126. <input type="text" name ="chgerZipcode" class="w100" readonly="readonly"/>
  127. <!-- <button type="button" class="btn btn-info" th:if="${#strings.isEmpty(ordChgGb) and (ordChgSq == 0 or chgStat == 'G685_20' or chgStat == 'G685_21')}" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>-->
  128. <button type="button" class="btn btn-info" id="chgerFindAddr" onclick="fnOpenDaumAddr('withdraw');">우편번호찾기</button>
  129. <input type="text" name ="chgerBaseAddr" class="w300" readonly="readonly"/>
  130. <input type="text" name ="chgerDtlAddr" class="w300"/>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>일반전화</th>
  135. <td>
  136. <select name="chgerTelno1" class="w100">
  137. <option value="">[선택하세요]</option>
  138. <option th:if="${TelExcNoList}" th:each="oneData, status : ${TelExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
  139. </select>
  140. - <input type="text" name ="chgerTelno2" class="w60"/>
  141. - <input type="text" name ="chgerTelno3" class="w60"/>
  142. </td>
  143. <th>휴대전화 <i class="star"></i></th>
  144. <td>
  145. <select name="chgerPhnno1" class="w100">
  146. <option value="">[선택하세요]</option>
  147. <option th:if="${PhnExcNoList}" th:each="oneData, status : ${PhnExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
  148. </select>
  149. - <input type="text" name ="chgerPhnno2" class="w60"/>
  150. - <input type="text" name ="chgerPhnno3" class="w60"/>
  151. </td>
  152. </tr>
  153. <tr>
  154. <th>반품메모<br/><span id="chgerRtnMemoCount">0</span>/1,000Byte</th>
  155. <td colspan="3">
  156. <textarea id="chgerRtnMemo" name="chgerRtnMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#chgerRtnMemoCount'));"></textarea>
  157. </td>
  158. </tr>
  159. </tbody>
  160. </table>
  161. <h4>교환지 정보</h4>
  162. <button style="float: right" type="button" class="btn btn-success" id="recipButton" onclick="fnChangeRecipInfo();">교환지 수정</button>
  163. <!-- <button style="float: right" type="button" class="btn btn-success" th:unless="${ordChgSq == 0 or ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35'))}" onclick="fnChangeRecipInfo();">교환지 수정</button>-->
  164. <table class="frmStyle">
  165. <colgroup>
  166. <col style="width:160px;" />
  167. <col style="width:320px;" />
  168. <col style="width:160px;" />
  169. <col />
  170. </colgroup>
  171. <tbody>
  172. <tr>
  173. <th>받는사람 <i class="star"></i></th>
  174. <td colspan="3"><input type="text" name ="recipNm" class=""/></td>
  175. </tr>
  176. <tr>
  177. <th>교환지주소 <i class="star"></i></th>
  178. <td colspan="3">
  179. <input type="text" name ="recipZipcode" class="w100" readonly="readonly"/>
  180. <!-- <button type="button" class="btn btn-info" th:unless="${ordChgGb == 'G681_20' or (chgStat == 'G685_40' and (chgOrdDtlStat != 'G013_20' or chgOrdDtlStat != 'G013_30' or chgOrdDtlStat != 'G013_35')) or chgStat == 'G685_22'}" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>-->
  181. <button type="button" class="btn btn-info" id="recipFindAddr" onclick="fnOpenDaumAddr('exchange');">우편번호찾기</button>
  182. <input type="text" name ="recipBaseAddr" class="w300" readonly="readonly"/>
  183. <input type="text" name ="recipDtlAddr" class="w300"/>
  184. </td>
  185. </tr>
  186. <tr>
  187. <th>일반전화</th>
  188. <td>
  189. <select name="recipTelno1" class="w100">
  190. <option value="">[선택하세요]</option>
  191. <option th:if="${TelExcNoList}" th:each="oneData, status : ${TelExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
  192. </select>
  193. - <input type="text" name ="recipTelno2" class="w60"/>
  194. - <input type="text" name ="recipTelno3" class="w60"/>
  195. </td>
  196. <th>휴대전화 <i class="star"></i></th>
  197. <td>
  198. <select name="recipPhnno1" class="w100">
  199. <option value="">[선택하세요]</option>
  200. <option th:if="${PhnExcNoList}" th:each="oneData, status : ${PhnExcNoList}" th:value="${oneData.cd}" th:text="${oneData.cd}"></option>
  201. </select>
  202. - <input type="text" name ="recipPhnno2" class="w60"/>
  203. - <input type="text" name ="recipPhnno3" class="w60"/>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th>배송메모<br/><span id="delvMemoCount">0</span>/1,000Byte</th>
  208. <td colspan="3">
  209. <textarea id="delvMemo" name="delvMemo" style="height:80px;" onkeyup="cfnGetTextLength(this, 1000, $('#delvMemoCount'));"></textarea>
  210. </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. </form>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- data -->
  219. <script th:inline="javascript">
  220. /*<![CDATA[*/
  221. var cancelRequestTargetList = [[${cancelRequestTargetList}]]; // 교환대상목록
  222. var ordNo = [[${ordNo}]]; // 주문번호
  223. var ordChgSq = [[${ordChgSq}]]; // 주문변경번호
  224. var chgStat = [[${chgStat}]]; // 변경상태
  225. var orderInfoList = [[${orderInfoList}]]; // 주문기본정보
  226. var payMeans = orderInfoList[0].payMeans; // 결제수단
  227. var pgGb = orderInfoList[0].pgGb; // PG구분
  228. var orderDelvAddrInfo = [[${orderDelvAddrInfo}]]; // 회수지정보
  229. var recallExceptionInfo = [[${recallExceptionInfo}]]; // 회수 예외 정보
  230. var rtnLocInfo = [[${rtnLocInfo}]]; // 반송지주소정보
  231. var addPayCost = 0; // 추가배송비
  232. var addDelvFee = 0; // 추가배송비
  233. //var addDelvFeeList = []; // 추가배송비정보
  234. var exchangeRequestList = []; // 교환요청목록
  235. var exchangeInfoList; // 교환정보
  236. var wdGb; // 회수방법
  237. var ordChgGb = [[${ordChgGb}]]; // 변경요청변경구분
  238. var orderChangeDetailList; // 취소/반품/교환요청 정보
  239. var chgOrdDtlStat; // 교환상품상세상태값
  240. var delvAddrSq; // 교환상품배송지일련번호
  241. var npayChangeHoldYn = ''; // 네이버페이 주문형 반품/교환 보류 여부
  242. var selfGoodsYn = cancelRequestTargetList[0].selfGoodsYn; // 자사,입점여부
  243. var wdBfSendYn = "";
  244. var temp1 = true;
  245. var temp2 = true;
  246. // 변경요청정보 승인, 철회
  247. if (ordChgSq > 0) {
  248. orderChangeDetailList = [[${orderChangeDetailList}]]; // 취소/반품/교환요청 정보
  249. exchangeInfoList = [[${exchangeInfoList}]]; // 교환정보
  250. npayChangeHoldYn = orderChangeDetailList[0].npayChangeHoldYn; // 네이버페이 주문형 반품/교환 보류 여부
  251. if (ordChgGb == 'G681_40') {
  252. chgReason = orderChangeDetailList[0].chgReason; // 변경사유코드
  253. chgReasonNm = orderChangeDetailList[0].chgReasonNm; // 변경사유코드명
  254. chgMemo = orderChangeDetailList[0].chgMemo; // 변경사유메모
  255. wdGb = orderChangeDetailList[0].wdGb; // 회수방법
  256. chgOrdDtlStat = ''; // 교환상품상세상태값
  257. delvAddrSq = ''; // 교환상품배송지일련번호
  258. } else {
  259. chgReason = exchangeInfoList[0].chgReason; // 변경사유코드
  260. chgReasonNm = exchangeInfoList[0].chgReasonNm; // 변경사유코드명
  261. chgMemo = exchangeInfoList[0].chgMemo; // 변경사유메모
  262. wdGb = exchangeInfoList[0].wdGb; // 회수방법
  263. chgOrdDtlStat = exchangeInfoList[0].ordDtlStat; // 교환상품상세상태값
  264. delvAddrSq = exchangeInfoList[0].delvAddrSq; // 교환상품배송지일련번호
  265. addPayCost = exchangeInfoList[0].addPayCost; // 추가배송비
  266. }
  267. wdBfSendYn = orderChangeDetailList[0].wdBfSendYn; // 선발송여부
  268. }
  269. // 1. 주문정보(교환대상)
  270. var columnExchangeReqList = [
  271. {
  272. headerName : "주문상세정보",
  273. children : [
  274. {headerName: "주문번호" , field: "ordNo" , width: 80 , cellClass: 'text-center', hide: temp1},
  275. {headerName: "주문상세" , field: "ordDtlNo" , width: 80 , cellClass: 'text-center'},
  276. {headerName: "주문상세" , field: "ordDtlStat" , width: 80 , cellClass: 'text-center', hide: temp1},
  277. {headerName: "주문상세상태" , field: "ordDtlStatNm" , width: 100 , cellClass: 'text-center', hide: temp1},
  278. {headerName: "상품코드" , field: "goodsCd" , width: 100 , cellClass: 'text-center'},
  279. {headerName: "상품명" , field: "goodsNm" , width: 130 , cellClass: 'text-center'},
  280. {headerName: "상품타입" , field: "goodsTypeNm" , width: 100 , cellClass: 'text-center', hide: temp2}
  281. ]
  282. },
  283. {
  284. headerName : "주문상세단품정보",
  285. children : [
  286. {headerName: "단품번호" , field: "ordDtlItemSq" , width: 100 , cellClass: 'text-center', hide: temp2},
  287. {headerName: "단품코드" , field: "itemCd" , width: 100 , cellClass: 'text-center'},
  288. {headerName: "SKUCODE" , field: "optCd" , width: 100 , cellClass: 'text-center'},
  289. {headerName: "단품명" , field: "itemNm" , width: 130 , cellClass: 'text-center'},
  290. {headerName: "옵션1" , field: "optCd1" , width: 60 , cellClass: 'text-center'},
  291. {headerName: "옵션2" , field: "optCd2" , width: 60 , cellClass: 'text-center'},
  292. {
  293. headerName : "단품수량"
  294. , field : "itemQty"
  295. , width : 60
  296. , cellClass : 'text-center'
  297. , cellRenderer : function (params) {
  298. return params.value.addComma();
  299. }
  300. },
  301. {
  302. headerName : "단품금액"
  303. , field : "itemPrice"
  304. , width : 80
  305. , cellClass : 'text-right'
  306. , cellRenderer : function (params) {
  307. return params.value.addComma();
  308. }
  309. },
  310. {
  311. headerName : "단품옵션금액"
  312. , field : "optAddPrice"
  313. , width : 90
  314. , cellClass : 'text-right'
  315. , cellRenderer : function (params) {
  316. return params.value.addComma();
  317. }
  318. }
  319. ]
  320. },
  321. {
  322. headerName : "주문상세수량",
  323. children : [
  324. {
  325. headerName : "주문"
  326. , field : "ordQty"
  327. , width : 70
  328. , cellClass : 'text-center'
  329. , cellRenderer : function (params) {
  330. return params.value.addComma();
  331. }
  332. },
  333. {
  334. headerName : "취소/요청"
  335. , field : "cnclRtnQty"
  336. , width : 70
  337. , cellClass : 'text-center'
  338. , cellRenderer : function (params) {
  339. var cnclRtnReqQty = parseInt(params.data.cnclRtnQty) + parseInt(params.data.ordReqChgQty);
  340. return cnclRtnReqQty;
  341. }
  342. },
  343. {headerName: "교환가능옵션" , field: "optCd2s" , width: 200 , cellClass: 'text-center', hide: temp2},
  344. {
  345. headerName : "교환옵션"
  346. , field : "ordChgOpt"
  347. , width : 100
  348. , cellClass : "text-center"
  349. , cellRenderer : function (params) {
  350. if (ordChgSq > 0 && ordChgGb != 'G681_40' && chgStat != 'G685_22') {
  351. $.each(exchangeInfoList, function(idx, item) {
  352. if (params.data.itemCd == item.itemCd && params.data.optCd1 == item.optCd1) {
  353. strVal = item.optCd2;
  354. }
  355. });
  356. } else {
  357. var optCd2Arr = params.data.optCd2s.split(',');
  358. var optCdArr = params.data.optCds.split(',');
  359. var ordChgOpt = params.data.ordChgOpt;
  360. var ordQty = parseInt(params.data.ordQty);
  361. var cnclRtnQty = parseInt(params.data.cnclRtnQty);
  362. var ordReqChgQty = parseInt(params.data.ordReqChgQty);
  363. var ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
  364. if (ordChgGb == 'G681_40' || chgStat == 'G685_22') {
  365. ordCanChgQty = params.data.chgQty;
  366. }
  367. var strVal = '';
  368. if (ordCanChgQty == 0) {
  369. strVal += '<select class="ordChgOpt" name="ordChgOpt" ordDtlNo="' + params.data.ordDtlNo + '" ordDtlItemSq="' + params.data.ordDtlItemSq + '" onchange="fnChangeOption(this)" disabled="disabled">';
  370. } else {
  371. strVal += '<select class="ordChgOpt" name="ordChgOpt" ordDtlNo="' + params.data.ordDtlNo + '" ordDtlItemSq="' + params.data.ordDtlItemSq + '" onchange="fnChangeOption(this)">';
  372. }
  373. if (gagajf.isNull(ordChgOpt)) {
  374. strVal += '<option value="">선택</option>';
  375. } else {
  376. strVal += '<option value="" selected>선택</option>';
  377. }
  378. $.each(optCdArr, function (idx, item) {
  379. // 2021.07.26 교환옵션 optCd2 -> optCd로 변경 처리
  380. if (ordChgOpt == item) {
  381. //strVal += '<option value="' + item + '" selected>' + item + '</option>';
  382. strVal += '<option value="' + item + '/' + optCd2Arr[idx] + '" selected>' + optCd2Arr[idx] + '</option>';
  383. } else {
  384. //strVal += '<option value="' + item + '">' + item + '</option>';
  385. strVal += '<option value="' + item + '/' + optCd2Arr[idx] + '">' + optCd2Arr[idx] + '</option>';
  386. }
  387. });
  388. }
  389. return strVal;
  390. }
  391. },
  392. {headerName: "재고수량" , field: "currStockQty" , width: 100 , cellClass: 'text-center', hide: temp2},
  393. {
  394. headerName : "교환신청수량"
  395. , field : "chgQty"
  396. , width : 100
  397. , cellClass : 'text-center'
  398. , cellRenderer : function (params) {
  399. if (ordChgSq > 0) {
  400. // 반품TO교환, 교환TO교환
  401. if (ordChgGb == 'G681_40' || ordChgGb == 'G681_20') {
  402. strVal = params.data.chgQty;
  403. }
  404. // 교환상세
  405. else {
  406. $.each(exchangeInfoList, function (idx, item) {
  407. if (params.data.itemCd == item.itemCd && params.data.optCd1 == item.optCd1) {
  408. strVal = item.chgQty;
  409. }
  410. });
  411. }
  412. } else {
  413. var ordQty = parseInt(params.data.ordQty);
  414. var cnclRtnQty = parseInt(params.data.cnclRtnQty);
  415. var ordReqChgQty = parseInt(params.data.ordReqChgQty);
  416. var ordCanChgQty = ordQty - (cnclRtnQty + ordReqChgQty);
  417. //// 교환TO교환
  418. //if (ordChgGb == 'G681_20') {
  419. // ordCanChgQty = parseInt(params.data.ordCanChgQty);
  420. //}
  421. var strVal = "";
  422. if (ordCanChgQty == 0) {
  423. strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="' + params.data.ordDtlNo + '" onchange="fnChangeQty(this)" disabled="disabled">';
  424. } else {
  425. strVal += '<select class="ordCanChgQty ' + params.data.ordDtlNo + '" name="chgQty" ordDtlNo="' + params.data.ordDtlNo + '" onchange="fnChangeQty(this)">';
  426. }
  427. for (i = 0; i <= ordCanChgQty; i++) {
  428. if (i == params.data.chgQty) {
  429. strVal += " <option value='" + i + "' selected>" + i + "</option>";
  430. } else {
  431. strVal += " <option value='" + i + "'>" + i + "</option>";
  432. }
  433. }
  434. strVal += "</select>";
  435. }
  436. return strVal;
  437. }
  438. }
  439. ]
  440. },
  441. {
  442. headerName : "주문단품금액",
  443. children : [
  444. {
  445. headerName : "주문"
  446. , field : "ordAmt"
  447. , width : 80
  448. , cellClass : 'text-right'
  449. , cellRenderer : function (params) {
  450. return params.value.addComma();
  451. }
  452. },
  453. {
  454. headerName : "취소"
  455. , field : "cnclRtnAmt"
  456. , width : 80
  457. , cellClass : 'text-right'
  458. , cellRenderer : function (params) {
  459. return params.value.addComma();
  460. }
  461. },
  462. {
  463. headerName : "즉시할인"
  464. , field : "cpn1DcAmt"
  465. , width : 80
  466. , cellClass : 'text-right'
  467. , cellRenderer : function (params) {
  468. return params.value.addComma();
  469. }
  470. },
  471. {
  472. headerName : "다다익선1"
  473. , field : "tmtb1DcAmt"
  474. , width : 80
  475. , cellClass : 'text-right'
  476. , cellRenderer : function (params) {
  477. return params.value.addComma();
  478. }
  479. },
  480. {
  481. headerName : "다다익선2"
  482. , field : "tmtb2DcAmt"
  483. , width : 80
  484. , cellClass : 'text-right'
  485. , cellRenderer : function (params) {
  486. return params.value.addComma();
  487. }
  488. },
  489. {
  490. headerName : "상품쿠폰"
  491. , field : "goodsCpnDcAmt"
  492. , width : 80
  493. , cellClass : 'text-right'
  494. , cellRenderer : function (params) {
  495. return params.value.addComma();
  496. }
  497. },
  498. {
  499. headerName : "장바구니쿠폰"
  500. , field : "cartCpnDcAmt"
  501. , width : 80
  502. , cellClass : 'text-right'
  503. , cellRenderer : function (params) {
  504. return params.value.addComma();
  505. }
  506. },
  507. {
  508. headerName : "포인트"
  509. , field : "pntDcAmt"
  510. , width : 80
  511. , cellClass : 'text-right'
  512. , cellRenderer : function (params) {
  513. return params.value.addComma();
  514. }
  515. },
  516. {
  517. headerName : "선포인트"
  518. , field : "prePntDcAmt"
  519. , width : 80
  520. , cellClass : 'text-right'
  521. , cellRenderer : function (params) {
  522. return params.value.addComma();
  523. }
  524. },
  525. {
  526. headerName : "상품권"
  527. , field : "gfcdUseAmt"
  528. , width : 80
  529. , cellClass : 'text-right'
  530. , cellRenderer : function (params) {
  531. return params.value.addComma();
  532. }
  533. },
  534. {
  535. headerName : "실결제금액"
  536. , field : "realOrdAmt"
  537. , width : 80
  538. , cellClass : 'text-right'
  539. , cellRenderer : function (params) {
  540. return params.value.addComma();
  541. }
  542. }
  543. ]
  544. },
  545. {
  546. headerName : "주문배송비정보",
  547. children : [
  548. {
  549. headerName : "배송비"
  550. , field : "delvFee"
  551. , width : 80
  552. , cellClass : 'text-right'
  553. , cellRenderer : function (params) {
  554. return params.value.addComma();
  555. }
  556. , hide : temp2
  557. },
  558. {headerName: "업체" , field: "supplyCompCd" , width: 100 , cellClass: 'text-center', hide: temp2},
  559. {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center', hide: temp2},
  560. {
  561. headerName : "무료배송비"
  562. , field : "minOrdAmt"
  563. , width : 80
  564. , cellClass : 'text-right'
  565. , cellRenderer : function (params) {
  566. return params.value.addComma();
  567. }
  568. , hide : temp2
  569. },
  570. {
  571. headerName : "기본배송비"
  572. , field : "orgDelvFee"
  573. , width : 80
  574. , cellClass : 'text-right'
  575. , cellRenderer : function (params) {
  576. return params.value.addComma();
  577. }
  578. , hide : temp2
  579. },
  580. {
  581. headerName : "반품배송비"
  582. , field : "rtnDelvFee"
  583. , width : 80
  584. , cellClass : 'text-right'
  585. , cellRenderer : function (params) {
  586. return params.value.addComma();
  587. }
  588. , hide : temp2
  589. },
  590. {
  591. headerName : "교환배송비"
  592. , field : "excDelvFee"
  593. , width : 80
  594. , cellClass : 'text-right'
  595. , cellRenderer : function (params) {
  596. return params.value.addComma();
  597. }
  598. , hide : temp2
  599. },
  600. {headerName: "전체취소가능" , field: "allCanYn" , width: 100 , cellClass: 'text-center', hide: temp2},
  601. ]
  602. }
  603. ];
  604. var gridOptionsExchangeReqList = gagaAgGrid.getGridOptions(columnExchangeReqList);
  605. // Add on options
  606. gridOptionsExchangeReqList.suppressRowClickSelection = true;
  607. gridOptionsExchangeReqList.rowSelection = 'multiple';
  608. // 3. 배송정보(환불정보)
  609. var columnDelvCdList = [
  610. {headerName: "업체" , field: "supplyCompNm" , width: 100 , cellClass: 'text-center'},
  611. {headerName: "배송비코드" , field: "delvFeeCd" , width: 100 , cellClass: 'text-center'},
  612. {
  613. headerName : "추가배송비"
  614. , field : "addDelvFee"
  615. , width : 100
  616. , cellClass : 'text-right'
  617. , cellRenderer : function (params) {
  618. return params.value.addComma();
  619. }
  620. , hide : true
  621. },
  622. {headerName: "반품지명" , field: "rtnLocNm" , width: 100 , cellClass: 'text-center'},
  623. {headerName: "반품지전화번호" , field: "rtnLocTelno" , width: 100 , cellClass: 'text-center'},
  624. {headerName: "반품지우편번호" , field: "rtnLocZipcode" , width: 100 , cellClass: 'text-center'},
  625. {headerName: "반품지기본주소" , field: "rtnLocBaseAddr" , width: 300 , cellClass: 'text-center'},
  626. {headerName: "반품지상세주소" , field: "rtnLocDtlAddr" , width: 300 , cellClass: 'text-center'},
  627. ];
  628. var gridOptionsDelvCdList = gagaAgGrid.getGridOptions(columnDelvCdList);
  629. </script>
  630. <script>
  631. //현재 사유는 회사 입니다.
  632. var isCustomer = false;
  633. // 사유 변경
  634. var fnChangeChgReason = function(reasonCd){
  635. var arrReasonCd = reasonCd.split(":");
  636. var customerReasonArr = ['G689_10', 'G689_30', 'G688_10'];
  637. isCustomer = false;
  638. // 취소, 반품, 교환 사유 판단
  639. for (i=0 ; i<customerReasonArr.length ; i++) {
  640. if (customerReasonArr[i] == arrReasonCd[0]) {
  641. isCustomer = true;
  642. }
  643. }
  644. // 귀책사유설정 회사, 고객
  645. if (isCustomer) {
  646. $("#imputeReason").text("고객");
  647. if ($('#wdBfSendYn').is(':checked')) {
  648. $('#wdBfSendYn').prop('checked', false);
  649. }
  650. $('#wdBfSendYn').attr('disabled', true);
  651. } else {
  652. $("#imputeReason").text("회사");
  653. if (selfGoodsYn == 'Y' && (ordChgSq == null || ordChgSq <= 0)) {
  654. $('#wdBfSendYn').attr('disabled', false);
  655. }
  656. }
  657. $('#exchangeRequestFrm input[name=chgReason]').val(arrReasonCd[0]);
  658. $('#exchangeRequestFrm input[name=chgReasonDesc]').val(arrReasonCd[1]);
  659. // 추가배송비 설정
  660. fnChangeQty();
  661. }
  662. // 교환요청
  663. var fnExchange = function () {
  664. var qty = true;
  665. var opt = true;
  666. var wdGb = $('#wdGb:checked').val();
  667. if (ordChgGb == 'G681_50') {
  668. wdGb = 'D';
  669. }
  670. // 1. 교환수량 체크
  671. //$.each(cancelRequestTargetList, function(idx, item) {
  672. // if (item.chgQty > 0) {
  673. // qty = true;
  674. //
  675. // if (!gagajf.isNull(item.ordChgOpt)) {
  676. // opt = true;
  677. // }
  678. // }
  679. //});
  680. // 교환TO교환, 반품TO교환 신청 수량 설정
  681. if (ordChgGb == 'G681_20' || ordChgGb == 'G681_40') {
  682. exchangeRequestList = cancelRequestTargetList;
  683. //$.each(exchangeRequestList, function(idx, exchangeRequest) {
  684. // $.each(exchangeInfoList , function(idx2, exchangeInfo) {
  685. // if (exchangeRequest.itemCd == exchangeInfo.itemCd && exchangeRequest.optCd1 == exchangeInfo.optCd1) {
  686. // exchangeRequest.chgQty = exchangeInfo.chgQty;
  687. // }
  688. // });
  689. //});
  690. }
  691. $.each(exchangeRequestList, function(idx, item) {
  692. if (item.chgQty == null || item.chgQty == 0) {
  693. qty = false;
  694. }
  695. if (gagajf.isNull(item.ordChgOpt)) {
  696. opt = false;
  697. }
  698. });
  699. if (qty == false) {
  700. mcxDialog.alert('교환 할 수량을 입력하세요.');
  701. return;
  702. }
  703. if (opt == false) {
  704. mcxDialog.alert('교환옵션을 선택해주세요.');
  705. return;
  706. }
  707. // 2. 교환사유 체크
  708. var chgReason = $("#exchangeRequestFrm select[name=selectChgReason]").val();
  709. if (ordChgGb == 'G681_20' || chgStat == 'G685_22') {
  710. chgReason = $('#exchangeRequestFrm input[name=chgReason]').val();
  711. }
  712. //var chgReason = $('#exchangeRequestFrm input[name=chgReason]').val();
  713. if (gagajf.isNull(chgReason)) {
  714. mcxDialog.alert("교환사유를 입력하세요.");
  715. return;
  716. }
  717. // 5. 회수지정보설정
  718. var chgerNm = "";
  719. var chgerZipcode = "";
  720. var chgerBaseAddr = "";
  721. var chgerDtlAddr = "";
  722. var chgerPhnno1 = "";
  723. var chgerPhnno2 = "";
  724. var chgerPhnno3 = "";
  725. var chgerTelno1 = "";
  726. var chgerTelno2 = "";
  727. var chgerTelno3 = "";
  728. var chgerPhnno = "";
  729. var chgerTelno = "";
  730. var chgerEmail = "";
  731. var chgerRtnMemo = "";
  732. if (wdGb == 'W' && selfGoodsYn == 'Y') {
  733. chgerNm = $("#exchangeRequestFrm input[name=chgerNm]").val();
  734. chgerZipcode = $("#exchangeRequestFrm input[name=chgerZipcode]").val();
  735. chgerBaseAddr = $("#exchangeRequestFrm input[name=chgerBaseAddr]").val();
  736. chgerDtlAddr = $("#exchangeRequestFrm input[name=chgerDtlAddr]").val();
  737. chgerPhnno1 = $("#exchangeRequestFrm select[name=chgerPhnno1]").val();
  738. chgerPhnno2 = $("#exchangeRequestFrm input[name=chgerPhnno2]").val();
  739. chgerPhnno3 = $("#exchangeRequestFrm input[name=chgerPhnno3]").val();
  740. chgerTelno1 = $("#exchangeRequestFrm select[name=chgerTelno1]").val();
  741. chgerTelno2 = $("#exchangeRequestFrm input[name=chgerTelno2]").val();
  742. chgerTelno3 = $("#exchangeRequestFrm input[name=chgerTelno3]").val();
  743. chgerRtnMemo = $("#exchangeRequestFrm textarea[name=chgerRtnMemo]").val();
  744. if (gagajf.isNull(chgerZipcode)) {
  745. mcxDialog.alert("회수지주소를 입력하세요."); return;
  746. }
  747. if (gagajf.isNull(chgerBaseAddr)) {
  748. mcxDialog.alert("회수지주소를 입력하세요."); return;
  749. }
  750. if (gagajf.isNull(chgerDtlAddr)) {
  751. mcxDialog.alert("회수지주소를 입력하세요."); return;
  752. }
  753. if (gagajf.isNull(chgerPhnno1)) {
  754. mcxDialog.alert("휴대전화를 입력하세요."); return;
  755. }
  756. if (gagajf.isNull(chgerPhnno2)) {
  757. mcxDialog.alert("휴대전화를 입력하세요."); return;
  758. }
  759. if (gagajf.isNull(chgerPhnno3)) {
  760. mcxDialog.alert("휴대전화를 입력하세요."); return;
  761. }
  762. chgerPhnno = chgerPhnno1 + '-' + chgerPhnno2 + '-' + chgerPhnno3;
  763. chgerEmail = orderInfoList[0].ordEmail;
  764. if (gagajf.isNull(chgerTelno1) && gagajf.isNull(chgerTelno2) && gagajf.isNull(chgerTelno3)) {
  765. chgerTelno = '';
  766. } else {
  767. chgerTelno = chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
  768. }
  769. // 2021.11.09 card007 휴대폰번호 유효성검증 추가
  770. if (!gagajf.checkPhnno(chgerPhnno)) {
  771. mcxDialog.alert("회수지 휴대폰 번호가 유효하지 않습니다.");
  772. return false;
  773. }
  774. }
  775. // 교환지정보 설정
  776. var recipNm = $("#exchangeRequestFrm input[name=recipNm]").val();
  777. var recipZipcode = $("#exchangeRequestFrm input[name=recipZipcode]").val();
  778. var recipBaseAddr = $("#exchangeRequestFrm input[name=recipBaseAddr]").val();
  779. var recipDtlAddr = $("#exchangeRequestFrm input[name=recipDtlAddr]").val();
  780. var recipPhnno1 = $("#exchangeRequestFrm select[name=recipPhnno1]").val();
  781. var recipPhnno2 = $("#exchangeRequestFrm input[name=recipPhnno2]").val();
  782. var recipPhnno3 = $("#exchangeRequestFrm input[name=recipPhnno3]").val();
  783. var recipTelno1 = $("#exchangeRequestFrm select[name=recipTelno1]").val();
  784. var recipTelno2 = $("#exchangeRequestFrm input[name=recipTelno2]").val();
  785. var recipTelno3 = $("#exchangeRequestFrm input[name=recipTelno3]").val();
  786. if (gagajf.isNull(recipZipcode)) {
  787. mcxDialog.alert("교환지주소를 입력하세요."); return;
  788. }
  789. if (gagajf.isNull(recipBaseAddr)) {
  790. mcxDialog.alert("교환지주소를 입력하세요."); return;
  791. }
  792. if (gagajf.isNull(recipDtlAddr)) {
  793. mcxDialog.alert("교환지주소를 입력하세요."); return;
  794. }
  795. if (gagajf.isNull(recipPhnno1)) {
  796. mcxDialog.alert("휴대전화를 입력하세요."); return;
  797. }
  798. if (gagajf.isNull(recipPhnno2)) {
  799. mcxDialog.alert("휴대전화를 입력하세요."); return;
  800. }
  801. if (gagajf.isNull(recipPhnno3)) {
  802. mcxDialog.alert("휴대전화를 입력하세요."); return;
  803. }
  804. var recipPhnno = recipPhnno1 + '-' + recipPhnno2 + '-' + recipPhnno3;
  805. var recipEmail = orderInfoList[0].ordEmail;
  806. var recipTelno;
  807. if (gagajf.isNull(recipTelno1) && gagajf.isNull(recipTelno2) && gagajf.isNull(recipTelno3)) {
  808. recipTelno = '';
  809. } else {
  810. recipTelno = recipTelno1 + '-' + recipTelno2 + '-' + recipTelno3;
  811. }
  812. // 2021.11.09 card007 휴대폰번호 유효성검증 추가
  813. if (!gagajf.checkPhnno(recipPhnno)) {
  814. mcxDialog.alert("교환배송지 휴대폰 번호가 유효하지 않습니다.");
  815. return false;
  816. }
  817. // 선발송 여부 설정
  818. let wdBfSendYn = $('#wdBfSendYn').is(':checked') ? 'Y' : 'N';
  819. var jsonObj = {
  820. "ordNo" : $('#exchangeRequestFrm input[name=ordNo]').val()
  821. ,"chgReason" : $('#exchangeRequestFrm input[name=chgReason]').val()
  822. ,"chgMemo" : $('#chgMemo').val()
  823. ,"cancelReqList" : exchangeRequestList
  824. ,"isCustomer" : isCustomer
  825. ,"wdGb" : wdGb
  826. ,"addPayCost" : addDelvFee
  827. ,"chgerNm" : chgerNm
  828. ,"chgerEmail" : chgerEmail
  829. ,"chgerZipcode" : chgerZipcode
  830. ,"chgerBaseAddr" : chgerBaseAddr
  831. ,"chgerDtlAddr" : chgerDtlAddr
  832. ,"chgerPhnno" : chgerPhnno
  833. ,"chgerTelno" : chgerTelno
  834. ,"chgerRtnMemo" : chgerRtnMemo
  835. ,"recipNm" : recipNm
  836. ,"recipEmail" : recipEmail
  837. ,"recipZipcode" : recipZipcode
  838. ,"recipBaseAddr" : recipBaseAddr
  839. ,"recipDtlAddr" : recipDtlAddr
  840. ,"recipPhnno" : recipPhnno
  841. ,"recipTelno" : recipTelno
  842. ,"delvMemo" : $("#exchangeRequestFrm textarea[name=delvMemo]").val()
  843. ,"ordChgSq" : ordChgSq
  844. ,"wdBfSendYn" : wdBfSendYn
  845. ,"ordChgGb" : ordChgGb
  846. ,"msgStat" : $('#msgStat').is(':checked') ? 'Y' : 'N'
  847. }
  848. // 주문번호, 교환사유, 교환메모, (취소, 반품, 교환 신청 정보 목록)
  849. var jsonData = JSON.stringify(jsonObj);
  850. // URL 설정
  851. var url;
  852. if (ordChgGb == 'G681_40') {
  853. url = '/orderChange/return/to/exchange/';
  854. } else if (ordChgGb == 'G681_20') {
  855. url = '/orderChange/exchange/to/exchange/';
  856. } else if (chgStat == 'G685_22') {
  857. url = '/orderChange/exchange/approval/';
  858. } else {
  859. url = '/orderChange/exchange/request/';
  860. }
  861. mcxDialog.confirm('교환요청하시겠습니까?', {
  862. cancelBtnText : "취소",
  863. sureBtnClick : function(){
  864. // 교환 실행
  865. gagajf.ajaxJsonSubmit(
  866. url
  867. , jsonData
  868. , function() {
  869. if (chgStat == 'G685_22') {
  870. uifnPopupClose('popupExchangeRequestForm');
  871. fnSearchList();
  872. } else {
  873. uifnPopupClose('popupOrderDetail');
  874. fnReOpenOrderDetailPopup();
  875. uifnPopupClose('popupExchangeRequestForm');
  876. }
  877. }
  878. );
  879. }
  880. });
  881. }
  882. // 교환철회 처리
  883. var fnExchangeCancel = function() {
  884. let data = {};
  885. data.ordChgSq = ordChgSq;
  886. data.ordNo = ordNo;
  887. let jsonData = JSON.stringify(data);
  888. mcxDialog.confirm('요청번호 [' + ordChgSq + '] 에 대한 요청철회 처리를 하시겠습니까?', {
  889. cancelBtnText : "취소",
  890. sureBtnClick : function(){
  891. // 교환 실행
  892. gagajf.ajaxJsonSubmit(
  893. '/orderChange/exchangeCancelRequest/'
  894. , jsonData
  895. , function() {
  896. uifnPopupClose('popupOrderDetail');
  897. fnReOpenOrderDetailPopup();
  898. uifnPopupClose('popupExchangeRequestForm');
  899. }
  900. );
  901. }
  902. });
  903. }
  904. // 네이버페이 주문형 교환보류 버튼 클릭 이벤트
  905. var fnNpayExchangeHold = function(param) {
  906. let url = '/orderChange/nPay/order/exchange/hold';
  907. let npayChangeHoldYn = $(param).attr('npayChangeHoldYn');
  908. let data = {};
  909. data.cancelReqList = exchangeRequestList;
  910. data.npayChangeHoldYn = npayChangeHoldYn;
  911. data.ordChgSq = ordChgSq;
  912. let jsonData = JSON.stringify(data);
  913. gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
  914. uifnPopupClose('popupOrderDetail');
  915. fnReOpenOrderDetailPopup();
  916. uifnPopupClose('popupExchangeRequestForm');
  917. });
  918. }
  919. // 우편번호 DAUM을 이용한 우편번호 팝업 레이어
  920. var fnOpenDaumAddr = function(loc) {
  921. let daumZip = new daum.Postcode({
  922. oncomplete: function(data) {
  923. // 우편번호와 주소 정보를 해당 필드에 넣는다.
  924. if (loc == 'withdraw') {
  925. $('#exchangeRequestFrm input[name=chgerZipcode]').val(data.zonecode);
  926. $('#exchangeRequestFrm input[name=chgerBaseAddr]').val(cfnGetDaumRoadAddr(data));
  927. $('#exchangeRequestFrm input[name=chgerDtlAddr]').focus();
  928. } else if (loc == 'exchange') {
  929. $('#exchangeRequestFrm input[name=recipZipcode]').val(data.zonecode);
  930. $('#exchangeRequestFrm input[name=recipBaseAddr]').val(cfnGetDaumRoadAddr(data));
  931. $('#exchangeRequestFrm input[name=recipDtlAddr]').focus();
  932. }
  933. cfnCloseDaumAddr();
  934. },
  935. width: '100%'
  936. });
  937. cfnOpenDaumAddr(daumZip);
  938. }
  939. // 회수지정보 설정
  940. var fnSetChger = function(){
  941. var data;
  942. if (ordChgSq > 0) {
  943. data = orderChangeDetailList[0];
  944. data.recipPhnno = data.chgerPhnno;
  945. data.recipTelno = data.chgerTelno;
  946. data.recipNm = data.chgerNm;
  947. data.recipZipcode = data.chgerZipcode;
  948. data.recipBaseAddr = data.chgerBaseAddr;
  949. data.recipDtlAddr = data.chgerDtlAddr;
  950. } else {
  951. data = orderDelvAddrInfo[0];
  952. }
  953. var spRecipPhnno = (data.recipPhnno != null) ? data.recipPhnno.split('-') : null;
  954. var spRecipTelno = (data.recipTelno != null) ? data.recipTelno.split('-') : null;
  955. $("#exchangeRequestFrm input[name=chgerNm]").val(data.recipNm);
  956. $("#exchangeRequestFrm input[name=chgerZipcode]").val(data.recipZipcode);
  957. $("#exchangeRequestFrm input[name=chgerBaseAddr]").val(data.recipBaseAddr);
  958. $("#exchangeRequestFrm input[name=chgerDtlAddr]").val(data.recipDtlAddr);
  959. $("#exchangeRequestFrm textarea[name=chgerRtnMemo]").val(data.chgerRtnMemo);
  960. if (spRecipPhnno) {
  961. $("#exchangeRequestFrm select[name=chgerPhnno1]").val(spRecipPhnno[0]);
  962. $("#exchangeRequestFrm input[name=chgerPhnno2]").val(spRecipPhnno[1]);
  963. $("#exchangeRequestFrm input[name=chgerPhnno3]").val(spRecipPhnno[2]);
  964. }
  965. if (spRecipTelno) {
  966. $("#exchangeRequestFrm select[name=chgerTelno1]").val(spRecipTelno[0]);
  967. $("#exchangeRequestFrm input[name=chgerTelno2]").val(spRecipTelno[1]);
  968. $("#exchangeRequestFrm input[name=chgerTelno3]").val(spRecipTelno[2]);
  969. }
  970. }
  971. // 교환지정보 설정
  972. var fnSetExchangeAddr = function(){
  973. var data;
  974. if (ordChgSq > 0 && ordChgGb != 'G681_40') {
  975. data = exchangeInfoList[0];
  976. } else {
  977. data = orderDelvAddrInfo[0];
  978. }
  979. var spRecipPhnno = (data.recipPhnno != null) ? data.recipPhnno.split('-') : null;
  980. var spRecipTelno = (data.recipTelno != null) ? data.recipTelno.split('-') : null;
  981. $("#exchangeRequestFrm input[name=recipNm]").val(data.recipNm);
  982. $("#exchangeRequestFrm input[name=recipZipcode]").val(data.recipZipcode);
  983. $("#exchangeRequestFrm input[name=recipBaseAddr]").val(data.recipBaseAddr);
  984. $("#exchangeRequestFrm input[name=recipDtlAddr]").val(data.recipDtlAddr);
  985. $("#exchangeRequestFrm textarea[name=delvMemo]").val(data.delvMemo);
  986. if (spRecipPhnno) {
  987. $("#exchangeRequestFrm select[name=recipPhnno1]").val(spRecipPhnno[0]);
  988. $("#exchangeRequestFrm input[name=recipPhnno2]").val(spRecipPhnno[1]);
  989. $("#exchangeRequestFrm input[name=recipPhnno3]").val(spRecipPhnno[2]);
  990. }
  991. if (spRecipTelno) {
  992. $("#exchangeRequestFrm select[name=recipTelno1]").val(spRecipTelno[0]);
  993. $("#exchangeRequestFrm input[name=recipTelno2]").val(spRecipTelno[1]);
  994. $("#exchangeRequestFrm input[name=recipTelno3]").val(spRecipTelno[2]);
  995. }
  996. }
  997. // 교환옵션 변경 이벤트
  998. var fnChangeOption = function(param) {
  999. var opt = $(param).val().split('/');
  1000. var optCd = opt[0];
  1001. var optCd2 = opt[1];
  1002. var ordDtlNo = $(param).attr('ordDtlNo');
  1003. var ordDtlItemSq = $(param).attr('ordDtlItemSq');
  1004. $.each(cancelRequestTargetList, function(idx, item){
  1005. if (item.ordDtlNo == ordDtlNo && item.ordDtlItemSq == ordDtlItemSq) {
  1006. var stockQtyArr = item.currStockQtys.split(',');
  1007. var sizeCdArr = item.optCd2s.split(',');
  1008. var stockIdx = sizeCdArr.indexOf(optCd2);
  1009. var stockQty = stockQtyArr[stockIdx];
  1010. item.currStockQty = stockQty;
  1011. item.ordChgOpt = optCd;
  1012. }
  1013. });
  1014. //gridOptionsExchangeReqList.api.setRowData(cancelRequestTargetList);
  1015. }
  1016. // 교환수량 변경 이벤트
  1017. var fnChangeQty = function(param) {
  1018. var chgQty = $(param).val();
  1019. var ordDtlNo = $(param).attr('ordDtlNo');
  1020. var exchangeRequestTargetList = [];
  1021. $.each(cancelRequestTargetList, function(idx, item){
  1022. if (item.ordDtlNo == ordDtlNo) {
  1023. if (gagajf.isNull(item.ordChgOpt) && chgQty > 0) {
  1024. mcxDialog.alert('교환옵션을 선택해주세요.');
  1025. return false;
  1026. }
  1027. item.chgQty = chgQty;
  1028. if (chgQty > 0) {
  1029. exchangeRequestTargetList.push(item);
  1030. }
  1031. } else if (item.chgQty > 0) {
  1032. exchangeRequestTargetList.push(item);
  1033. } else if (ordChgSq > 0 && item.ordCanChgQty > 0) {
  1034. exchangeRequestTargetList.push(item);
  1035. }
  1036. });
  1037. // 추가배송비 설정
  1038. fnAddDelvFee(exchangeRequestTargetList);
  1039. // 교환대상목록 설정
  1040. exchangeRequestList = exchangeRequestTargetList;
  1041. //gridOptionsExchangeReqList.api.setRowData(cancelRequestTargetList);
  1042. }
  1043. // 추가배송비 설정
  1044. var fnAddDelvFee = function (exchangeRequestTargetList) {
  1045. var delvCdList = [];
  1046. var delvFeeList = [];
  1047. var delvFee = 0;
  1048. // 고객 귀책사유에 한하여 추가배송비 설정
  1049. $.each(exchangeRequestTargetList, function (idx, item) {
  1050. if (!delvCdList.includes(item.delvFeeCd)) {
  1051. if (isCustomer) {
  1052. var delvFeeTmp = $('#wdGb:checked').val() == 'W' ? item.excDelvFee : item.rtnDelvFee;
  1053. delvFee += delvFeeTmp;
  1054. item.addDelvFeeYn = 'Y';
  1055. item.addDelvFee = delvFeeTmp;
  1056. } else {
  1057. item.addDelvFeeYn = 'N';
  1058. item.addDelvFee = 0;
  1059. }
  1060. delvCdList.push(item.delvFeeCd);
  1061. delvFeeList.push(item);
  1062. }
  1063. });
  1064. addDelvFee = delvFee;
  1065. //addDelvFeeList = delvFeeList;
  1066. // 회수방법 > 직접발송일 경우 그리드 표시
  1067. // 2021.07.19 그리드 표시 여부 처리 변경
  1068. //if ($('#wdGb:checked').val() == 'D') {
  1069. // gridOptionsDelvCdList.api.setRowData(addDelvFeeList);
  1070. //} else {
  1071. // gridOptionsDelvCdList.api.setRowData();
  1072. //}
  1073. if (ordChgSq > 0) {
  1074. $('#addDelvFee').text(addPayCost.addComma() + '원');
  1075. } else {
  1076. $('#addDelvFee').text(addDelvFee.addComma() + '원');
  1077. }
  1078. }
  1079. // 회수방법 라디오 클릭 이벤트
  1080. var fnChangeWdGb = function(param) {
  1081. let wdGb = $(param).val();
  1082. // 회수지정보 히든 처리
  1083. if (wdGb == 'D') {
  1084. $('.chger').css('display', 'none');
  1085. $('#delvCdList').css('display', '');
  1086. } else {
  1087. $('.chger').css('display', '');
  1088. $('#delvCdList').css('display', 'none');
  1089. if (ordChgSq == 0) {
  1090. $('#chgerButton').css('display', 'none');
  1091. }
  1092. }
  1093. // 추가배송비 계산
  1094. fnChangeQty();
  1095. }
  1096. // 회수지 정보 수정
  1097. var fnChangeChgerInfo = function() {
  1098. let url = '/orderChange/change/chger/addr';
  1099. let chgerNm = $("#exchangeRequestFrm input[name=chgerNm]").val();
  1100. let chgerZipcode = $("#exchangeRequestFrm input[name=chgerZipcode]").val();
  1101. let chgerBaseAddr = $("#exchangeRequestFrm input[name=chgerBaseAddr]").val();
  1102. let chgerDtlAddr = $("#exchangeRequestFrm input[name=chgerDtlAddr]").val();
  1103. let chgerPhnno1 = $("#exchangeRequestFrm select[name=chgerPhnno1]").val();
  1104. let chgerPhnno2 = $("#exchangeRequestFrm input[name=chgerPhnno2]").val();
  1105. let chgerPhnno3 = $("#exchangeRequestFrm input[name=chgerPhnno3]").val();
  1106. let chgerTelno1 = $("#exchangeRequestFrm select[name=chgerTelno1]").val();
  1107. let chgerTelno2 = $("#exchangeRequestFrm input[name=chgerTelno2]").val();
  1108. let chgerTelno3 = $("#exchangeRequestFrm input[name=chgerTelno3]").val();
  1109. if (gagajf.isNull(chgerZipcode)) {
  1110. mcxDialog.alert("회수지주소를 입력하세요."); return;
  1111. }
  1112. if (gagajf.isNull(chgerBaseAddr)) {
  1113. mcxDialog.alert("회수지주소를 입력하세요."); return;
  1114. }
  1115. if (gagajf.isNull(chgerDtlAddr)) {
  1116. mcxDialog.alert("회수지주소를 입력하세요."); return;
  1117. }
  1118. if (gagajf.isNull(chgerPhnno1)) {
  1119. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1120. }
  1121. if (gagajf.isNull(chgerPhnno2)) {
  1122. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1123. }
  1124. if (gagajf.isNull(chgerPhnno3)) {
  1125. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1126. }
  1127. let chgerPhnno = chgerPhnno1 + '-' + chgerPhnno2 + '-' + chgerPhnno3;
  1128. let chgerRtnMemo = $("#exchangeRequestFrm textarea[name=chgerRtnMemo]").val();
  1129. let chgerTelno = '';
  1130. if (!gagajf.isNull(chgerTelno1) && !gagajf.isNull(chgerTelno2) && !gagajf.isNull(chgerTelno3)) {
  1131. chgerTelno = chgerTelno1 + '-' + chgerTelno2 + '-' + chgerTelno3;
  1132. }
  1133. // 2021.11.09 card007 휴대폰번호 유효성검증 추가
  1134. if (!gagajf.checkPhnno(chgerPhnno)) {
  1135. mcxDialog.alert("회수지 휴대폰 번호가 유효하지 않습니다.");
  1136. return false;
  1137. }
  1138. let data = {};
  1139. data.ordNo = ordNo;
  1140. data.ordChgSq = ordChgSq;
  1141. data.chgerNm = chgerNm;
  1142. data.chgerPhnno = chgerPhnno;
  1143. data.chgerZipcode = chgerZipcode;
  1144. data.chgerBaseAddr = chgerBaseAddr;
  1145. data.chgerDtlAddr = chgerDtlAddr;
  1146. data.chgerRtnMemo = chgerRtnMemo;
  1147. let jsonData = JSON.stringify(data);
  1148. gagajf.ajaxJsonSubmit(url, jsonData, function(result){
  1149. });
  1150. }
  1151. // 교환지 정보 수정
  1152. var fnChangeRecipInfo = function() {
  1153. let url = '/order/deliver/addr/update';
  1154. var recipNm = $("#exchangeRequestFrm input[name=recipNm]").val();
  1155. var recipZipcode = $("#exchangeRequestFrm input[name=recipZipcode]").val();
  1156. var recipBaseAddr = $("#exchangeRequestFrm input[name=recipBaseAddr]").val();
  1157. var recipDtlAddr = $("#exchangeRequestFrm input[name=recipDtlAddr]").val();
  1158. var delvMemo = $("#exchangeRequestFrm textarea[name=delvMemo]").val();
  1159. var recipPhnno1 = $("#exchangeRequestFrm select[name=recipPhnno1]").val();
  1160. var recipPhnno2 = $("#exchangeRequestFrm input[name=recipPhnno2]").val();
  1161. var recipPhnno3 = $("#exchangeRequestFrm input[name=recipPhnno3]").val();
  1162. var recipTelno1 = $("#exchangeRequestFrm select[name=recipTelno1]").val();
  1163. var recipTelno2 = $("#exchangeRequestFrm input[name=recipTelno2]").val();
  1164. var recipTelno3 = $("#exchangeRequestFrm input[name=recipTelno3]").val();
  1165. if (gagajf.isNull(recipZipcode)) {
  1166. mcxDialog.alert("교환지주소를 입력하세요."); return;
  1167. }
  1168. if (gagajf.isNull(recipBaseAddr)) {
  1169. mcxDialog.alert("교환지주소를 입력하세요."); return;
  1170. }
  1171. if (gagajf.isNull(recipDtlAddr)) {
  1172. mcxDialog.alert("교환지주소를 입력하세요."); return;
  1173. }
  1174. if (gagajf.isNull(recipPhnno1)) {
  1175. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1176. }
  1177. if (gagajf.isNull(recipPhnno2)) {
  1178. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1179. }
  1180. if (gagajf.isNull(recipPhnno3)) {
  1181. mcxDialog.alert("휴대전화를 입력하세요."); return;
  1182. }
  1183. var recipPhnno = recipPhnno1 + '-' + recipPhnno2 + '-' + recipPhnno3;
  1184. var recipTelno;
  1185. if (gagajf.isNull(recipTelno1) && gagajf.isNull(recipTelno2) && gagajf.isNull(recipTelno3)) {
  1186. recipTelno = '';
  1187. } else {
  1188. recipTelno = recipTelno1 + '-' + recipTelno2 + '-' + recipTelno3;
  1189. }
  1190. // 2021.11.09 card007 휴대폰번호 유효성검증 추가
  1191. if (!gagajf.checkPhnno(recipPhnno)) {
  1192. mcxDialog.alert("교환배송지 휴대폰 번호가 유효하지 않습니다.");
  1193. return false;
  1194. }
  1195. let data = {};
  1196. data.ordNo = ordNo;
  1197. data.delvAddrSq = delvAddrSq;
  1198. data.recipNm = recipNm;
  1199. data.recipPhnno = recipPhnno;
  1200. data.recipZipcode = recipZipcode;
  1201. data.recipBaseAddr = recipBaseAddr;
  1202. data.recipDtlAddr = recipDtlAddr;
  1203. data.delvMemo = delvMemo;
  1204. let jsonData = JSON.stringify(data);
  1205. gagajf.ajaxJsonSubmit(url, jsonData, function(result){
  1206. });
  1207. }
  1208. $(document).ready(function() {
  1209. // 1. 그리드생성
  1210. gagaAgGrid.createGrid('gridOrderCancelRequestList' , gridOptionsExchangeReqList); // 주문정보
  1211. gagaAgGrid.createGrid('gridDelvCdList' , gridOptionsDelvCdList); // 배송정보
  1212. gridOptionsExchangeReqList.api.setRowData(cancelRequestTargetList);
  1213. gridOptionsDelvCdList.api.setRowData(rtnLocInfo);
  1214. // 2.1 TOTAL ROWS 없애기
  1215. gagaAgGrid.hideStatusBar('gridOrderCancelRequestList');
  1216. gagaAgGrid.hideStatusBar('gridOrderCancelRequestToBeList');
  1217. gagaAgGrid.hideStatusBar('gridDelvCdList');
  1218. // 3. 회수지정보설정
  1219. fnSetChger();
  1220. // 4. 교환지정보설정
  1221. fnSetExchangeAddr();
  1222. // 5. 회수방법 라디오 체크 처리
  1223. if (ordChgGb == 'G681_50') {
  1224. $('input:radio[name="wdGb"]:radio[value="D"]').prop('checked', true);
  1225. $('.chger').css('display', 'none');
  1226. $('input:radio[name=wdGb]').attr('disabled', true);
  1227. $('#delvCdList').css('display', 'none');
  1228. }
  1229. // 2021.07.15 입점업체인 경우에는 회수요청만 해당
  1230. else if (selfGoodsYn == "N") {
  1231. $('input:radio[name="wdGb"]:radio[value="W"]').prop('checked', true);
  1232. $('.chger').css('display', 'none');
  1233. $('input:radio[name=wdGb]').attr('disabled', true);
  1234. } else {
  1235. if (wdGb == 'D') {
  1236. $('input:radio[name="wdGb"]:radio[value="D"]').prop('checked', true);
  1237. $('.chger').css('display', 'none');
  1238. } else {
  1239. $('input:radio[name="wdGb"]:radio[value="W"]').prop('checked', true);
  1240. $('#delvCdList').css('display', 'none');
  1241. }
  1242. }
  1243. // 교환철회 처리
  1244. if (ordChgSq > 0) {
  1245. // 5. 교환사유설정
  1246. $('#chgReason').text(chgReasonNm);
  1247. // 6. 교환요청메모설정
  1248. $('#chgMemo').text(chgMemo);
  1249. // 7. 귀책사유 설정
  1250. fnChangeChgReason(chgReason);
  1251. // 8. 데이터 Disabled 처리
  1252. $('input:radio[name=wdGb]').attr('disabled', true); // 8-1. 회수방법
  1253. $('input[name=chgerBaseAddr]').attr('readOnly', true); // 8-4. 회수지정보 > 기본주소
  1254. $('input[name=recipBaseAddr]').attr('readOnly', true); // 8-10. 교환지정보 > 기본주소
  1255. $('#chgMemo').attr('readOnly', true); // 8-2. 요청메모
  1256. // 2021.06.25 교환접수, 교환대기 상태에서는 회수지 정보 수정 가능
  1257. if (!gagajf.isNull(ordChgGb) || (chgStat != 'G685_20' && chgStat != 'G685_21') || pgGb == 'NAVER_ORDER') {
  1258. $('input[name=chgerNm]').attr('readOnly', true); // 8-3. 회수지정보 > 보내는사람
  1259. $('input[name=chgerDtlAddr]').attr('readOnly', true); // 8-5. 회수지정보 > 상세주소
  1260. $('select[name=chgerTelno1]').attr('disabled', true); // 8-6. 회수지정보 > 일반전화
  1261. $('input[name=chgerTelno2]').attr('readOnly', true); // 8-6. 회수지정보 > 일반전화
  1262. $('input[name=chgerTelno3]').attr('readOnly', true); // 8-6. 회수지정보 > 일반전화
  1263. $('select[name=chgerPhnno1]').attr('disabled', true); // 8-7. 회수지정보 > 휴대전화
  1264. $('input[name=chgerPhnno2]').attr('readOnly', true); // 8-7. 회수지정보 > 휴대전화
  1265. $('input[name=chgerPhnno3]').attr('readOnly', true); // 8-7. 회수지정보 > 휴대전화
  1266. $('#chgerRtnMemo').attr('readOnly', true); // 8-8. 회수지정보 > 반품메모
  1267. $('#chgerButton').css('display', 'none'); // 회수지 수정 버튼
  1268. $('#chgerFindAddr').css('display', 'none'); // 회수지 우편번호 찾기 버튼
  1269. }
  1270. // 2021.06.25 교환상품 배송중 상태 전까지 정보 수정 가능
  1271. if (ordChgGb == 'G681_20' || (chgStat == 'G685_40' && (chgOrdDtlStat != 'G013_20' && chgOrdDtlStat != 'G013_30' && chgOrdDtlStat != 'G013_35')) || chgStat == 'G685_22' || pgGb == 'NAVER_ORDER') {
  1272. $('input[name=recipNm]').attr('readOnly', true); // 8-9. 교환지정보 > 받는사람
  1273. $('input[name=recipDtlAddr]').attr('readOnly', true); // 8-11. 교환지정보 > 상세주소
  1274. $('select[name=recipTelno1]').attr('disabled', true); // 8-12. 교환지정보 > 일반전화
  1275. $('input[name=recipTelno2]').attr('readOnly', true); // 8-12. 교환지정보 > 일반전화
  1276. $('input[name=recipTelno3]').attr('readOnly', true); // 8-12. 교환지정보 > 일반전화
  1277. $('select[name=recipPhnno1]').attr('disabled', true); // 8-13. 교환지정보 > 휴대전화
  1278. $('input[name=recipPhnno2]').attr('readOnly', true); // 8-13. 교환지정보 > 휴대전화
  1279. $('input[name=recipPhnno3]').attr('readOnly', true); // 8-13. 교환지정보 > 휴대전화
  1280. $('#delvMemo').attr('readOnly', true); // 8-14. 교환지정보 > 배송메모
  1281. $('#recipButton').css('display', 'none'); // 교환지 수정 버튼
  1282. $('#recipFindAddr').css('display', 'none'); // 교환지 우편번호 찾기 버튼
  1283. }
  1284. // 반품TO교환
  1285. if (ordChgGb == 'G681_40') {
  1286. $('#recipButton').css('display', 'none'); // 교환지 수정 버튼
  1287. }
  1288. // 2021.10.14 선발송여부 체크
  1289. if ("Y" == wdBfSendYn) {
  1290. $('#wdBfSendYn').attr('checked', "checked");
  1291. }
  1292. // 네이버페이 주문형 보류 버튼 처리
  1293. if (!gagajf.isNull(npayChangeHoldYn)) {
  1294. if (npayChangeHoldYn == 'Y') {
  1295. $('#fnExchangeHold').css('display', 'none');
  1296. } else {
  1297. $('#fnReleaseExchangeHold').css('display', 'none');
  1298. }
  1299. }
  1300. } else {
  1301. $('#chgerButton').css('display', 'none'); // 회수지 수정 버튼
  1302. $('#recipButton').css('display', 'none'); // 교환지 수정 버튼
  1303. }
  1304. // 글자수 제한 byte 표기
  1305. cfnGetTextLength($('#chgMemo'), 1000, $('#chgMemoCount'));
  1306. cfnGetTextLength($('#chgerRtnMemo'), 1000, $('#chgerRtnMemoCount'));
  1307. cfnGetTextLength($('#delvMemo'), 1000, $('#delvMemoCount'));
  1308. });
  1309. </script>
  1310. </html>