Jelajahi Sumber

공통 브랜드 그룹 조회 팝업

eskim 5 tahun lalu
induk
melakukan
fa2bf56e9c

+ 1 - 0
src/main/java/com/style24/persistence/domain/BrandGroup.java

@@ -32,6 +32,7 @@ public class BrandGroup extends TscBaseDomain {
 	private String multiGb;			// 멀티 셀렉트 구분
 	private String searchBrandGroupNo;
 	private String searchBrandGroupNm;
+	private String type;			// S:조회용, C:브랜드관리화면에서 호출, 브랜드그룹등록영역 노출
 
 	/* 브랜드검색 Multi CheckBox 항목*/
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)

+ 1 - 2
src/main/webapp/WEB-INF/views/business/BrandForm.html

@@ -567,8 +567,7 @@
 	
 	//브랜드그룹 등록및 선택
 	$("#btnBrandGroup").on("click", function() {
-		var actionUrl = "/business/brand/group/popup/form?callbackFn=callBackBrandGroup";
-		cfnOpenModalPopup(actionUrl, 'popupBrandGroup'); 
+		cfnOpenBrandGroupListPopup("callBackBrandGroup", "S", "C");
 	});
 	var callBackBrandGroup = function(result) {
 		$("#detailForm input[name=brandGroupNm]").val(result[0].brandGroupNm);

+ 33 - 32
src/main/webapp/WEB-INF/views/business/BrandGroupPopupForm.html

@@ -14,7 +14,7 @@
  * 1.0  2021.02.19   eskim       최초 작성
  *******************************************************************************
  -->
-<div class="modalPopup" data-width="900" data-height="full" id="popupBrandGroup">
+<div class="modalPopup" data-width="900" id="popupBrandGroup">
 	<div class="panelStyle">
 		<!-- TITLE -->
 		<div class="panelTitle">
@@ -24,39 +24,38 @@
 		<!-- //TITLE -->
 		
 		<!-- 검색 조건 -->
-		<div class="panelContent" style="height:90%; overflow-y:auto; padding:0px 20px !important; ">
-			<form id="searchBrandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/list'}" onsubmit="$('#btnSearchBrandGroup').trigger('click'); return false;">
-				
-				<table class="frmStyle" aria-describedby="검색조건">
-					<colgroup>
-						<col style="width:15%;"/>
-						<col style="width:35%;"/>
-						<col style="width:15%;"/>
-						<col/>
-					</colgroup>
-					<tbody>
-						<tr>
-							<th>브랜드그룹코드<i class="required" title="필수"></i></th>
-							<td>
-								<textarea class="textareaR3" name="searchBrandGroupNo" id="searchBrandGroupNo"></textarea>
-							</td>
-							<th>브랜드그룹명<i class="required" title="필수"></i></th>
-							<td>
-								<textarea class="textareaR3" name="searchBrandGroupNm" id="searchBrandGroupNm"></textarea>
-							</td>
-						</tr>
-					</tbody>
-				</table>
-				<ul class="panelBar">
-					<li class="center">
-						<button type="button" class="btn btn-base btn-lg" id="btnSearchBrandGroup">조회</button>
-					</li>
-				</ul>
-			</form>
-
+		<div class="panelContent" >
+		<form id="searchBrandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/list'}" onsubmit="$('#btnSearchBrandGroup').trigger('click'); return false;">
+			
+			<table class="frmStyle" aria-describedby="검색조건">
+				<colgroup>
+					<col style="width:15%;"/>
+					<col style="width:35%;"/>
+					<col style="width:15%;"/>
+					<col/>
+				</colgroup>
+				<tbody>
+					<tr>
+						<th>브랜드그룹코드<i class="required" title="필수"></i></th>
+						<td>
+							<textarea class="textareaR3" name="searchBrandGroupNo" id="searchBrandGroupNo"></textarea>
+						</td>
+						<th>브랜드그룹명<i class="required" title="필수"></i></th>
+						<td>
+							<textarea class="textareaR3" name="searchBrandGroupNm" id="searchBrandGroupNm"></textarea>
+						</td>
+					</tr>
+				</tbody>
+			</table>
+			<ul class="panelBar">
+				<li class="center">
+					<button type="button" class="btn btn-base btn-lg" id="btnSearchBrandGroup">조회</button>
+				</li>
+			</ul>
+		</form>
 		<!-- //검색 조건 -->
 		<!-- 리스트 영역 -->
-		<div id="gridBrandGroupList" style="width: 100%; height: 300px" class="ag-theme-balham"></div>
+		<div id="gridBrandGroupList" style="width: 100%; height: 250px" class="ag-theme-balham"></div>
 		<!-- 버튼 배치 영역 -->
 		<ul class="panelBar">
 			<li class="right">
@@ -64,6 +63,7 @@
 			</li>
 		</ul>
 		<!-- //리스트 영역 -->
+		<th:block th:if="${params.type == 'C'}">
 		<div class="panelContent">
 			<form id="brandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/save'}">
 			<input type="hidden" name="mode" value="N"/>
@@ -128,6 +128,7 @@
 				<button type="button" class="btn btn-success btn-lg" id="btnBrandGroupSave">저장</button>
 			</li>
 		</ul>
+		</th:block>
 		</div>
 	</div>
 </div>

+ 17 - 0
src/main/webapp/ux/js/admin.popup.js

@@ -691,6 +691,23 @@ var cfnOpenBrandListPopup = function(callbackfn, multiGb, searchTxt) {
 	cfnOpenModalPopup(actionUrl, "popupBrandList");
 }
 
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 브랜드 그룹 목록 팝업
+ * <pre>
+ *     cfnOpenBrandGroupListPopup('fnResult', 'S', 'S');
+ * </pre>
+ * @since  : 2021/02/23
+ * @author : eskim
+ */
+var cfnOpenBrandGroupListPopup = function(callbackfn, multiGb, type) {
+	var actionUrl = '/business/brand/group/popup/form?callbackFn=' + callbackfn;
+	if (typeof(multiGb) != 'undefined' && multiGb != null && multiGb == "M") actionUrl += "&multiGb=" + multiGb; else actionUrl += "&multiGb=S";
+	if (typeof(type) != 'undefined' && type != null && type == "C") actionUrl += "&type=" + type; else actionUrl += "&type=S";
+	cfnOpenModalPopup(actionUrl, "popupBrandGroup");
+}
+
 /**
  * @type   : function
  * @access : public