|
|
@@ -1,30 +1,32 @@
|
|
|
<!DOCTYPE html>
|
|
|
-<html lang="ko"
|
|
|
- xmlns:th="http://www.thymeleaf.org">
|
|
|
+<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
|
<!--
|
|
|
*******************************************************************************
|
|
|
* @source : BrandPopupForm.html
|
|
|
* @desc : 브랜드 팝업 Page
|
|
|
*============================================================================
|
|
|
- * STYLE24
|
|
|
+ * SISUN
|
|
|
* Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
*============================================================================
|
|
|
* VER DATE AUTHOR DESCRIPTION
|
|
|
* === =========== ========== =============================================
|
|
|
- * 1.0 2020.12.15 eskim 최초 작성
|
|
|
+ * 1.0 2021.5.21 bin2107 최초 작성
|
|
|
*******************************************************************************
|
|
|
-->
|
|
|
-<div class="modalPopup" data-width="650" id="popupBrandList">
|
|
|
- <div class="panelStyle" style="max-height:700px;overflow-y:scroll;">
|
|
|
- <!-- TITLE -->
|
|
|
+
|
|
|
+<div class="modalPopup" data-width="650" id="popupBrand">
|
|
|
+
|
|
|
+ <div class="panelStyle" style="height: 750px;">
|
|
|
<div class="panelTitle">
|
|
|
<strong>브랜드 목록</strong>
|
|
|
- <button type="button" class="close" onclick="uifnPopupClose('popupBrandList');"><em class="fa fa-times"></em></button>
|
|
|
+ <button type="button" class="close" onclick="uifnPopupClose('popupBrand')">
|
|
|
+ <i class="fa fa-times"></i>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <!-- //TITLE -->
|
|
|
- <!-- 검색 조건 -->
|
|
|
+
|
|
|
<div class="panelContent">
|
|
|
- <form id="searchBrandListForm" name="searchBrandListForm" action="#" th:action="@{'/business/brand/list'}" onsubmit="$('#btnSearchBrandList').trigger('click'); return false;">
|
|
|
+ <form id="popupBrandSearchForm" name="popupBrandSearchForm" action="#" th:action="@{'/marketing/brand/popup'}" onsubmit="$('#btnSearchBrandList').trigger('click'); return false;">
|
|
|
+ <input type="hidden" name="supplyCompCd" th:value="${params.supplyCompCd}">
|
|
|
<table class="frmStyle" aria-describedby="검색조건">
|
|
|
<colgroup>
|
|
|
<col style="width:15%;"/>
|
|
|
@@ -61,92 +63,85 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</form>
|
|
|
- <!-- 리스트 영역 -->
|
|
|
- <div class="panelContent">
|
|
|
- <div id="gridBrandList" style="width: 100%; height: 380px" class="ag-theme-balham"></div>
|
|
|
- </div>
|
|
|
- <!-- //리스트 영역 -->
|
|
|
-
|
|
|
- <!-- 버튼 배치 영역 -->
|
|
|
- <ul class="panelBar">
|
|
|
- <li class="right">
|
|
|
- <button type="button" class="btn btn-info btn-lg" id="btnConfirmBrand">확인</button>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
</div>
|
|
|
- <!-- //검색 조건 -->
|
|
|
- </div>
|
|
|
-
|
|
|
- <script th:inline="javascript">
|
|
|
- /*<![CDATA[*/
|
|
|
- let headerSelection = false;
|
|
|
- if([[${params.multiGb}]] == "M") headerSelection = true;
|
|
|
- let columnDefsMdList = [
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: headerSelection, checkboxSelection: true, filter: false},
|
|
|
- {headerName: "브랜드번호", field: "brandCd", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "브랜드국문명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
- {headerName: "브랜드영문명", field: "brandKnm", width: 150, cellClass: 'text-center'},
|
|
|
- {headerName: "브랜드그룹명", field: "brandGroupNm", width: 150, cellClass: 'text-center'}
|
|
|
- ];
|
|
|
-
|
|
|
- let gridOptionsBrandList = gagaAgGrid.getGridOptions(columnDefsMdList);
|
|
|
- if(headerSelection) { gridOptionsBrandList.rowSelection = "multiple"; }
|
|
|
-
|
|
|
- // Row double click
|
|
|
- gridOptionsBrandList.onRowDoubleClicked = function(event) {
|
|
|
- $('#btnConfirmBrand').trigger('click');
|
|
|
- }
|
|
|
-
|
|
|
- // 조회
|
|
|
- $('#btnSearchBrandList').on('click', function() {
|
|
|
-
|
|
|
- if (gagajf.isNull($('#searchBrandListForm textarea[name=searchBrandCd]').val()) && gagajf.isNull($('#searchBrandListForm textarea[name=searchBrandNm]').val())){
|
|
|
- mcxDialog.alert('검색조건을 입력하세요.');
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- // Fetch data
|
|
|
- gagaAgGrid.fetch($('#searchBrandListForm').prop('action'), gridOptionsBrandList, '#searchBrandListForm');
|
|
|
- });
|
|
|
+ <!-- 리스트 영역 -->
|
|
|
+ <div class="panelContent">
|
|
|
+ <div id="gridBrandList" style="width: 100%; height: 380px" class="ag-theme-balham"></div>
|
|
|
+ </div>
|
|
|
+ <!-- //리스트 영역 -->
|
|
|
|
|
|
- // 확인
|
|
|
- $('#btnConfirmBrand').on('click', function() {
|
|
|
- var selectedData = gagaAgGrid.selectedRowData(gridOptionsBrandList);
|
|
|
+ <!-- 버튼 배치 영역 -->
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="right">
|
|
|
+ <button type="button" class="btn btn-info btn-lg" id="btnConfirmBrand">확인</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
|
|
|
- if (selectedData.length == 0) {
|
|
|
- mcxDialog.alert('선택된 브랜드가 없습니다.');
|
|
|
- return false;
|
|
|
- }
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+
|
|
|
+ let headerSelection = false;
|
|
|
+ if([[${params.multiGb}]] == "M") headerSelection = true;
|
|
|
+ let columnDefsMdList = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: headerSelection, checkboxSelection: true, filter: false},
|
|
|
+ {headerName: "브랜드번호", field: "brandCd", width: 100, cellClass: 'text-center'},
|
|
|
+ {headerName: "브랜드국문명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
+ {headerName: "브랜드영문명", field: "brandKnm", width: 150, cellClass: 'text-center'},
|
|
|
+ {headerName: "브랜드그룹명", field: "brandGroupNm", width: 150, cellClass: 'text-center'}
|
|
|
+ ];
|
|
|
+
|
|
|
+ let gridOptionsBrandList = gagaAgGrid.getGridOptions(columnDefsMdList);
|
|
|
+ if(headerSelection) { gridOptionsBrandList.rowSelection = "multiple"; }
|
|
|
+
|
|
|
+ // Row double click
|
|
|
+ gridOptionsBrandList.onRowDoubleClicked = function(event) {
|
|
|
+ $('#btnConfirmBrand').trigger('click');
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#btnSearchBrandList').on('click', function() {
|
|
|
+ var formId = '#popupBrandSearchForm';
|
|
|
+ // Fetch data
|
|
|
+ gagaAgGrid.fetch($(formId).prop('action'), gridOptionsBrandList, formId);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 확인
|
|
|
+ $('#btnConfirmBrand').on('click', function() {
|
|
|
+ var selectedData = gagaAgGrid.selectedRowData(gridOptionsBrandList);
|
|
|
+
|
|
|
+ if (selectedData.length == 0) {
|
|
|
+ mcxDialog.alert('선택된 브랜드가 없습니다.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- var callbackFn = [[${params.callbackFn}]];
|
|
|
+ var callbackFn = [[${params.callbackFn}]];
|
|
|
|
|
|
- var jsonData = JSON.stringify(selectedData);
|
|
|
+ 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));
|
|
|
- }
|
|
|
+ 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('popupBrandList');
|
|
|
}
|
|
|
- });
|
|
|
-
|
|
|
- $(document).ready(function() {
|
|
|
- // Create a agGrid
|
|
|
- gagaAgGrid.createGrid('gridBrandList', gridOptionsBrandList);
|
|
|
+ uifnPopupClose('popupBrandList');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- //$('#btnSearchBrandList').trigger('click');
|
|
|
- });
|
|
|
- /*]]>*/
|
|
|
- </script>
|
|
|
+ $(document).ready(function() {
|
|
|
+ // Create a agGrid
|
|
|
+ gagaAgGrid.createGrid('gridBrandList', gridOptionsBrandList);
|
|
|
|
|
|
-</div>
|
|
|
+ //$('#btnSearchBrandList').trigger('click');
|
|
|
+ });
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
|
|
|
-</html>
|
|
|
+</html>
|