ExchangeRequestForm.html 54 KB

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