| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!DOCTYPE html>
- <html lang="ko"
- xmlns:th="http://www.thymeleaf.org">
- <!--
- *******************************************************************************
- * @source : CardSearchForm.html
- * @desc : 카드 리스트 팝업
- *============================================================================
- * STYLE24
- * Copyright(C) 2020 TSIT, All rights reserved.
- *============================================================================
- * VER DATE AUTHOR DESCRIPTION
- * === =========== ========== =============================================
- * 1.0 2021.09.28 swkim 최초 작성
- *******************************************************************************
- -->
- <div class="modalPopup" data-width="500" id="popupCardList">
- <div class="panelStyle">
- <!-- TITLE -->
- <div class="panelTitle">
- <strong>카드 목록</strong>
- <button type="button" class="close" onclick="uifnPopupClose('popupCardList');"><em class="fa fa-times"></em></button>
- </div>
- <!-- //TITLE -->
- <!-- 검색 조건 -->
- <div class="panelContent">
- <form id="searchCardListForm" class="searchCardListForm" name="searchCardListForm" action="#" th:action="@{'/statistics/card/list'}" onsubmit="$('#btnSearchCardList').trigger('click'); return false;">
- <table class="frmStyle" aria-describedby="검색조건">
- <colgroup>
- <col style="width:15%;"/>
- <col/>
- </colgroup>
- <tbody>
- </table>
- <!--<ul class="panelBar">
- <li class="center">
- <button type="button" class="btn btn-base btn-lg" id="btnSearchCardList">조회</button>
- </li>
- </ul>-->
- </form>
- </div>
- <!-- //검색 조건 -->
- <!-- 리스트 영역 -->
- <div class="panelContent">
- <div id="gridCardPopupList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
- </div>
- <!-- //리스트 영역 -->
- <!-- 버튼 배치 영역 -->
- <ul class="panelBar">
- <li class="right">
- <button type="button" class="btn btn-info btn-lg" id="btnConfirmCard">확인</button>
- </li>
- </ul>
- </div>
- <script th:inline="javascript">
- /*<![CDATA[*/
- let columnCardPopupDefList = [
- {width: 40, minWidth: 40, field: "cardCheck", cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
- {headerName: "카드명", field: "cardNm", width: 400, cellClass: 'text-center'}
- ];
- let gridOptionsCardPopupList = gagaAgGrid.getGridOptions(columnCardPopupDefList);
- gridOptionsCardPopupList.rowSelection = "multiple";
- // Row double click
- gridOptionsCardPopupList.onRowDoubleClicked = function(event) {
- $('#btnConfirmCard').trigger('click');
- }
- // 조회
- /*$('#btnSearchCardList').on('click', function() {
- // Fetch data
- gagaAgGrid.fetch($('#searchCardListForm').prop('action'), gridOptionsCardPopupList, '#searchCardListForm', function() {
- gridOptionsCardPopupList.api.forEachNode(function(rowNode, index) {
- });
- });
- });*/
- // 확인
- $('#btnConfirmCard').on('click', function() {
- var selectedData = gagaAgGrid.selectedRowData(gridOptionsCardPopupList);
- if (selectedData.length == 0) {
- mcxDialog.alert('선택된 카드가 없습니다.');
- return false;
- }
- var callbackFn = [[${params.callbackFn}]];
- var jsonData = JSON.stringify(selectedData);
- if (typeof callbackFn != 'undefined' && callbackFn) {
- if (typeof callbackFn == 'function') {
- callbackFn(jsonData);
- } else {
- if (callbackFn) {
- if (callbackFn.indexOf("(") == -1) {
- eval(callbackFn + "(" + jsonData + ")");
- } else {
- eval(callbackFn(jsonData));
- }
- }
- }
- uifnPopupClose('popupCardList');
- }
- });
- $(document).ready(function() {
- // Create a agGrid
- gagaAgGrid.createGrid('gridCardPopupList', gridOptionsCardPopupList);
- // Fetch data
- gagaAgGrid.fetch($('#searchCardListForm').prop('action'), gridOptionsCardPopupList, '#searchCardListForm', function() {
- gridOptionsCardPopupList.api.forEachNode(function(rowNode, index) {
- });
- });
- });
- /*]]>*/
- </script>
- </div>
- </html>
|