CustomerSecedePopupForm.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : CustomerSecedePopupForm.html
  7. * @desc : 회원탈퇴처리 화면 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2021 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.01.26 jsshin 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="800">
  18. <div class="panelStyle">
  19. <!-- TITLE -->
  20. <div class="panelTitle">
  21. <strong>회원탈퇴처리</strong>
  22. <button type="button" class="close" onclick="uifnPopupClose('popupCustSecedeForm')"><em class="fa fa-times"></em></button>
  23. </div>
  24. <!-- //TITLE -->
  25. <!-- CONTENT -->
  26. <div class="panelContent">
  27. <div class="panelStyle">
  28. <form id="custSecedeForm" name="custSecedeForm">
  29. <input type="hidden" name="custNo"/>
  30. <table class="frmStyle">
  31. <colgroup>
  32. <col style="width:10%;"/>
  33. <col style="width:20%;"/>
  34. <col style="width:10%;"/>
  35. <col style="width:15%;"/>
  36. <col style="width:10%;"/>
  37. <col style="width:20%;"/>
  38. <col/>
  39. </colgroup>
  40. <tbody>
  41. <tr>
  42. <th class="dashR">탈퇴사유</th>
  43. <td class="dashR" colspan="5">
  44. <select name="secedeRsn" > <!-- 탈퇴사유 (공통코드G102) -->
  45. <option value="">전체</option>
  46. <option th:if="${secedeRsnList}" th:each="oneData, status : ${secedeRsnList}" th:value="${oneData.cd}" th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
  47. </select>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th class="dashR">탈퇴 상세 사유</th>
  52. <td class="dashR" colspan="5">
  53. <input type="text" class="w600" id="secedeDtlRsn" name="secedeDtlRsn" />
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </form>
  59. </div>
  60. <ul class="panelBar">
  61. <li class="right">
  62. <button type="button" id="btnSaveSecede" class="btn btn-success btn-lg">탈퇴처리</button>
  63. </li>
  64. </ul>
  65. </div>
  66. <!-- //CONTENT -->
  67. </div>
  68. </div>
  69. <script th:inline="javascript">
  70. /*<![CDATA[*/
  71. const elementCustNo = [[${elementCustNo}]];
  72. // 회원탈퇴
  73. $("#btnSaveSecede").on("click",function() {
  74. let custSecedeForm = $('#custSecedeForm').serializeObject();
  75. if(gagajf.isNull(custSecedeForm.secedeRsn)){
  76. mcxDialog.alert("탈퇴 사유를 선택해주세요.");
  77. return;
  78. }
  79. mcxDialog.confirm('회원 탈퇴를 진행하시겠습니까?', {
  80. cancelBtnText: "취소",
  81. sureBtnText: "확인",
  82. sureBtnClick: function(){
  83. gagajf.ajaxFormSubmit('/customer/secede/save', '#custSecedeForm', fnSaveCall);
  84. }
  85. });
  86. });
  87. var fnSaveCall = function (data) {
  88. console.log('typeof', typeof data.isSuccess);
  89. if (data.isSuccess) {
  90. mcxDialog.alertC(data.resultMessage, {
  91. sureBtnText: "확인",
  92. sureBtnClick: function() {
  93. uifnPopupClose('popupCustSecedeForm');
  94. uifnPopupClose('popupCustomerDetail');
  95. }
  96. });
  97. } else {
  98. mcxDialog.alert(data.resultMessage);
  99. return;
  100. }
  101. }
  102. var fnInitDataSet = function () {
  103. let custNo = $(elementCustNo).val();
  104. if(!gagajf.isNull(custNo)) {
  105. $('#custSecedeForm input[name=custNo]').val(custNo);
  106. }
  107. }
  108. $(document).ready(function() {
  109. fnInitDataSet();
  110. });
  111. /*]]>*/
  112. </script>
  113. </html>