CustomerSecedeListForm.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : CustomerSecedeListForm.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.14 jsshin 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div id="main">
  18. <!-- 메인타이틀 영역 -->
  19. <div class="main-title">
  20. </div>
  21. <!-- //메인타이틀 영역 -->
  22. <!-- 메뉴 설명 -->
  23. <div class="infoBox menu-desc">
  24. </div>
  25. <!-- //메뉴 설명 -->
  26. <!-- 검색조건 영역 -->
  27. <div class="panelStyle">
  28. <form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/secede/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
  29. <table class="frmStyle" aria-describedby="검색조건">
  30. <colgroup>
  31. <col style="width:10%;"/>
  32. <col style="width:20%;"/>
  33. <col style="width:10%;"/>
  34. <col style="width:15%;"/>
  35. <col style="width:10%;"/>
  36. <col style="width:20%;"/>
  37. <col/>
  38. </colgroup>
  39. <tbody>
  40. <tr>
  41. <th class="dashR">검색구분</th>
  42. <td class="dashR">
  43. <select name="searchGb">
  44. <option value="">선택</option>
  45. <option value="custNo">회원번호 </option>
  46. <option value="custNm">회원명 </option>
  47. <option value="email">이메일</option>
  48. <option value="custId">아이디</option>
  49. </select>
  50. <input type="text" class="w200" name="searchTxt" id="searchTxt"/>
  51. </td>
  52. <th class="dashR">사이트</th>
  53. <td class="dashR">
  54. <select name="siteCd">
  55. <option value="">전체</option>
  56. <option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
  57. </select>
  58. </td>
  59. </tr>
  60. <tr>
  61. <th class="dashR">탈퇴사유</th>
  62. <td class="dashR">
  63. <select name="secedeGb" class="w200">
  64. <option value="">전체</option>
  65. <option th:if="${secedeGbList}" th:each="oneData, status : ${secedeGbList}" th:value="${oneData.cd}" th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
  66. </select>
  67. </td>
  68. <th class="dashR">휴대폰번호(숫자만)</th>
  69. <td class="dashR">
  70. <input type="text" class="w200" name="cellPhnno" id="cellPhnno" maxlength="13"/>
  71. </td>
  72. </tr>
  73. <tr>
  74. <th class="dashR">탈퇴일</th>
  75. <td class="dashR" colspan="3" id="terms">
  76. </td>
  77. </tr>
  78. </tbody>
  79. </table>
  80. <ul class="panelBar">
  81. <li class="center">
  82. <button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
  83. <button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
  84. </li>
  85. </ul>
  86. </form>
  87. </div>
  88. <!-- //검색조건 영역 -->
  89. <!-- 리스트 영역 -->
  90. <div class="panelStyle">
  91. <div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
  92. </div>
  93. <!-- //리스트 영역 -->
  94. </div>
  95. <script th:inline="javascript">
  96. /*<![CDATA[*/
  97. // 사이트목록
  98. const siteList = gagajf.convertToArray([[${siteList}]]);
  99. // specify the columns
  100. const columnDefs = [
  101. {
  102. headerName: "사이트", field:'siteCd', width:100, cellClass: 'text-center',
  103. valueGetter: function (params) { return gagaAgGrid.lookupValue(siteList, params.data.siteCd); }
  104. },
  105. {headerName: "회원ID", field:'custId', width:120, cellClass: 'text-center'},
  106. {headerName: "회원명", field:'custNm', width:100, cellClass: 'text-center'},
  107. {headerName: "핸드폰", field:'cellPhnno', width:140, cellClass: 'text-center'},
  108. {
  109. headerName: "생년월일", field:'birthYmd', width:90, cellClass: 'text-center',
  110. valueGetter: function (params) { return gagaAgGrid.toDateFormat(params.data.birthYmd); }
  111. },
  112. {
  113. headerName: "탈퇴일자", field:'secedeDt', width:120, cellClass: 'text-center',
  114. valueGetter: function (params) { return gagaAgGrid.toDateFormat(params.data.secedeDt); }
  115. },
  116. {headerName: "이메일", field:'email', width:220, cellClass: 'text-center'}
  117. ];
  118. // Get GridOptions
  119. let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
  120. // 셀 클릭 이벤트
  121. gridOptions.onCellClicked = function(event) {
  122. }
  123. // 조회
  124. $('#btnSearch').on('click', function() {
  125. fnSearch();
  126. });
  127. //엔터키 조회
  128. $('#searchForm input[name=cellPhnno], #searchForm input[name=searchNm]').on('keypress', function (event) {
  129. if (event.which === 13) {
  130. fnSearch();
  131. }
  132. });
  133. // 휴대폰 자동 하이픈
  134. $('#searchForm input[name=cellPhnno]').on('input keyup keydown paste change', function () {
  135. cfnCellPhonnHypen(this);
  136. });
  137. // 유효성 확인
  138. var fnValidationCheck = function () {
  139. // 입력 값 체크
  140. const $searchGb = $('#searchForm select[name=searchGb]'); // 검색구분
  141. const $searchTxt = $('#searchForm input[name=searchTxt]'); // 검색내용
  142. let isSearchVaild = true;
  143. let validationMessage;
  144. // 검색구분: O / 검색내용: X
  145. if (!gagajf.isNull($searchGb.val())) {
  146. if (gagajf.isNull($searchTxt.val())) {
  147. validationMessage = '내용을 입력해주세요';
  148. isSearchVaild = false;
  149. }
  150. }
  151. // 검색구분: X / 검색내용: O
  152. if (!gagajf.isNull($searchTxt.val())) {
  153. if (gagajf.isNull($searchGb.val())) {
  154. validationMessage = '검색구분을 선택해주세요';
  155. isSearchVaild = false;
  156. }
  157. }
  158. if (!isSearchVaild) {
  159. mcxDialog.alertC(validationMessage, {
  160. sureBtnText: "확인",
  161. sureBtnClick: function() {
  162. $searchTxt.focus();
  163. }
  164. });
  165. }
  166. return isSearchVaild;
  167. }
  168. // 검색
  169. var fnSearch = function() {
  170. // 유효성 체크
  171. let validation = fnValidationCheck();
  172. if (!validation) {
  173. return;
  174. }
  175. gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
  176. };
  177. $(document).ready(function() {
  178. // 공통 달력 생성
  179. cfnCreateCalendar('#terms', 'stDate', 'edDate', true);
  180. $('.btnToday').trigger('click');
  181. // Create a agGrid
  182. gagaAgGrid.createGrid('gridList', gridOptions);
  183. });
  184. /*]]>*/
  185. </script>
  186. </html>