bin2107 5 лет назад
Родитель
Сommit
5671b438aa

+ 9 - 0
src/main/java/com/style24/admin/biz/dao/TsaRendererDao.java

@@ -258,4 +258,13 @@ public interface TsaRendererDao {
 	 */
 	 */
 	Collection<CommonCode> getPollQtypeList();
 	Collection<CommonCode> getPollQtypeList();
 
 
+	/**
+	 * 카테고리1 조회
+	 * @param
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 3
+	 */
+	Collection<CommonCode> getCate1List();
+
 }
 }

+ 11 - 0
src/main/java/com/style24/admin/biz/service/TsaRendererService.java

@@ -576,4 +576,15 @@ public class TsaRendererService {
 	public Collection<CommonCode> getPollQtypeList() {
 	public Collection<CommonCode> getPollQtypeList() {
 		return rendererDao.getPollQtypeList();
 		return rendererDao.getPollQtypeList();
 	}
 	}
+
+	/**
+	 * 카테고리1 조회
+	 * @param
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 3
+	 */
+	public Collection<CommonCode> getCate1List() {
+		return rendererDao.getCate1List();
+	}
 }
 }

+ 40 - 2
src/main/java/com/style24/admin/biz/web/TsaDisplayController.java

@@ -6,6 +6,7 @@ import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.util.GagaDateUtil;
 import com.gagaframework.web.util.GagaDateUtil;
 import com.style24.admin.biz.service.TsaBusinessService;
 import com.style24.admin.biz.service.TsaBusinessService;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.admin.support.security.session.TsaSession;
+import com.style24.core.biz.service.TscPopupService;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.*;
 import com.style24.persistence.domain.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,8 +23,6 @@ import lombok.extern.slf4j.Slf4j;
 
 
 import com.gagaframework.web.rest.server.GagaResponse;
 import com.gagaframework.web.rest.server.GagaResponse;
 
 
-import javax.servlet.http.HttpServletRequest;
-
 /**
 /**
  * 전시 Controller
  * 전시 Controller
  *
  *
@@ -47,6 +46,9 @@ public class TsaDisplayController extends TsaBaseController {
 	@Autowired
 	@Autowired
 	private TsaBusinessService businessService;
 	private TsaBusinessService businessService;
 
 
+	@Autowired
+	private TscPopupService corePopupService;
+
 	/**
 	/**
 	 * 카테고리관리 화면
 	 * 카테고리관리 화면
 	 * @return
 	 * @return
@@ -637,4 +639,40 @@ public class TsaDisplayController extends TsaBaseController {
 		return mav;
 		return mav;
 	}
 	}
 
 
+	/**
+	 * 팝업관리 화면
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 3
+	 */
+	@GetMapping("/popup/form")
+	public ModelAndView popupListForm() {
+		ModelAndView mav = new ModelAndView();
+		mav.addObject("siteCdList", rendererService.getAvailCommonCodeList("G000"));
+		mav.addObject("viewPageList", rendererService.getAvailCommonCodeList("G037"));
+		mav.addObject("cate1NoList", rendererService.getCate1List());
+		mav.setViewName("display/PopupListForm");
+		return mav;
+	}
+
+	/**
+	 * 팝업관리 리스트
+	 * @return
+	 * @author bin2107
+	 * @since 2021. 3. 3
+	 */
+	@PostMapping("/popup/list")
+	@ResponseBody
+	public GagaMap getPopupList(@RequestBody Popup popup) {
+		GagaMap result = new GagaMap();
+
+		popup.setRegNo(TsaSession.getInfo().getUserNo());
+		popup.setPageable(new TscPageRequest(popup.getPageNo() - 1, popup.getPageSize()));
+		popup.getPageable().setTotalCount(corePopupService.getPopupListCount(popup));
+
+		result.set("pageing", popup);
+		result.set("popupList", corePopupService.getPopupList(popup));
+		return result;
+	}
+
 }
 }

+ 12 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaRenderer.xml

@@ -413,4 +413,16 @@
 				AND USE_YN = 'Y'
 				AND USE_YN = 'Y'
 	</select>
 	</select>
 
 
+	<!-- 카테고리1 조회 -->
+	<select id="getCate1List" resultType="CommonCode">
+		/* TsaRenderer.getCate1List */
+		SELECT	CATE1_NO AS CD
+		      , CATE1_NM AS CD_NM
+		FROM	TB_CATE_4SRCH
+		WHERE	CATE_GB = 'G032_101'
+		  AND	CATE_TYPE = 'G031_10'
+		GROUP BY CATE1_NO, CATE1_NM
+		ORDER BY CATE1_NO
+	</select>
+
 </mapper>
 </mapper>

+ 401 - 0
src/main/webapp/WEB-INF/views/display/PopupListForm.html

@@ -0,0 +1,401 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : PopupListForm.html
+ * @desc    : 팝업관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.3.3     bin2107     최초 작성
+ *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
+		<!-- 검색조건 영역 -->
+		<form id="searchForm" name="searchForm" action="#" th:action="@{'/display/popup/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+			<div class="panelStyle">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:15%;"/>
+						<col style="width:10%;"/>
+						<col style="width:15%;"/>
+						<col style="width:10%;"/>
+						<col style="width:40%;"/>
+					</colgroup>
+					<tr>
+						<th>사이트</th>
+						<td>
+							<select name="siteCd">
+								<option th:if="${siteCdList}" th:each="oneData, status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>전시화면</th>
+						<td>
+							<select name="frontGb">
+								<option value="A">전체</option>
+								<option value="P">PC</option>
+								<option value="M">모바일</option>
+							</select>
+						</td>
+						<th>전시기간</th>
+						<td colspan="5" id="sellTerms">
+							<span class="nowrap">
+								<input name="dispStdt" id="schStDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="노출기간 시작일" />
+								<select id="schStTimeHour" required="required" data-valid-name="노출기간 시작시간">
+									<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
+									</th:block>
+								</select>
+								<select id="schStTimeMin" required="required" data-valid-name="노출기간 시작시간">
+									<th:block th:each="num: ${#numbers.sequence(0,59)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" >분</option>
+									</th:block>
+								</select>
+								<input name="dispStTime" id="schStTime" type="hidden" data-valid-name="노출기간 시작시간" value='000000' />
+								~
+								<input name="dispEddt" id="schEdDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="노출기간 종료일" />
+								<select id="schEdTimeHour" required="required" data-valid-name="노출기간 종료시간">
+									<th:block th:each="num: ${#numbers.sequence(0,23)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시간</option>
+									</th:block>
+								</select>
+								<select id="schEdTimeMin" required="required" data-valid-name="노출기간 종료시간">
+									<th:block th:each="num: ${#numbers.sequence(0,59)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="${#numbers.formatInteger(num,2)}==59 ? 'true'">분</option>
+									</th:block>
+								</select>
+								<input name="dispEdTime" id="schEdTime" type="hidden" data-valid-name="노출기간 종료시간" value='235959' />
+							</span>
+						</td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-default btn-lg" id="btnInit">초기화</button>
+						<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
+					</li>
+				</ul>
+			</div>
+		<!-- 검색조건 영역 -->
+
+		<!-- 리스트 영역 -->
+		<div class="panelStyle">
+			<!-- 상단영역 START -->
+			<ul class="panelBar">
+				<li>
+					<span style="padding:5.5px 15px; background:#e9ecfb !important; border-top:1px solid #ddd; border-bottom:0.5px solid #dae0fd; font-weight: bold;">미리보기위치</span>
+					<select name="viewPage" id="viewPageView" onchange="fnChangeViewPage('View')" >
+						<option th:if="${viewPageList}" th:each="oneData, status : ${viewPageList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+					</select>
+					<select name="cate1No" id="cate1NoView" class='off' data-valid-name="대카테고리">
+						<option th:if="${cate1NoList}" th:each="oneData, status : ${cate1NoList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+					</select>
+					<input type="text" class="off w80" name="brandCd" id="brandCdView" placeholder="브랜드그룹번호" required="required" data-valid-name="브랜드"/>
+					<button type="button" class="off btn btn-base btn-lg" id="btnSearchBrandGroupView" onclick="fnBrandGroupSearch('View')">브랜드 조회</button>
+					<input type="text" class="off w80" name="planSq" id="planSqView" placeholder="기획전번호" required="required" data-valid-name="기획전번호"/>
+					<button type="button" class="off btn btn-base btn-lg" id="btnSearchPlanView" onclick="fnPlanSearch('View')">기획전 조회</button>
+					<span class="nowrap">
+						<input name="viewDate" id="viewDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="미리보기일자" />
+						<select id="viewTimeHour" name="viewTimeHour" required="required" data-valid-name="미리보기 시간">
+							<option value="" >시간</option>
+							<th:block th:each="num, index  : ${#numbers.sequence(0,24)}">
+								<option  th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${num == 9}">시간</option>
+							</th:block>
+						</select>
+						<select id="viewTimeMin" name="viewTimeMin" required="required" data-valid-name="미리보기 시간">
+							<option value="" >분</option>
+							<th:block th:each="num: ${#numbers.sequence(0,59)}">
+								<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="${num == 0}">분</option>
+							</th:block>
+						</select>
+						<input name="viewTime" id="viewTime" type="hidden" data-valid-name="미리보기 시간" />
+					</span>
+					<span>
+						<button type="button" class="btn btn-info btn-lg" id="btnView">미리보기</button>
+					</span>
+				</li>
+				<li class="right">
+					<span class="btnRight">
+						<button type="button" class="btn btn-success btn-lg" id="btnReg">적용</button>
+					</span>
+					<span class="btnRight">
+						<button type="button" class="btn btn-danger btn-lg" id="btnDel">삭제</button>
+					</span>
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+			</ul>
+			<!-- 상단영역 END -->
+			<div id="gridList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
+
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="popupListPagination"></div>
+				</li>
+			</ul>
+		</div>
+		<!-- //리스트 영역 -->
+		</form>
+		
+		<!-- 등록/수정 -->
+		<div class="panelStyle">
+			<form id="detailForm" name="detailForm" action="#" th:action="@{'/display/popup/save'}">
+				<input type="hidden" name="popupGb" value="W"/>	<!--팝업종류-->
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:15%;"/>
+						<col style="width:10%;"/>
+						<col style="width:15%;"/>
+						<col style="width:10%;"/>
+						<col style="width:15%;"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>팝업일련번호</th>
+						<td>
+							<input type="text" class="w90" name="popupSq" placeholder="자동생성" data-valid-name="팝업일련번호" disabled/>
+						</td>
+						<th>사이트코드<i class="required" title="필수"></i></th>
+						<td class="infoTxt">
+							<select name="siteCd">
+								<option th:if="${siteCdList}" th:each="oneData, status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>전시위치<i class="required" title="필수"></i></th>
+						<td colspan="3">
+							<select name="viewPage" id="viewPage" onchange="fnChangeViewPage('')" data-valid-name="전시위치">
+								<option th:if="${viewPageList}" th:each="oneData, status : ${viewPageList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<select name="cate1No" id="cate1No" class='off' data-valid-name="대카테고리">
+								<option value="">[선택]</option>
+								<option th:if="${cate1NoList}" th:each="oneData, status : ${cate1NoList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<input type="text" class="off w80" name="brandCd" id="brandCd" required="required" placeholder="브랜드그룹번호" data-valid-name="브랜드그룹번호"/>
+							<button type="button" class="off btn btn-base btn-lg" id="btnSearchBrandGroup"  onclick="fnBrandGroupSearch('')">브랜드 조회</button>
+							<input type="text" class="off w80" name="planSq" id="planSq" required="required" placeholder="기획전번호" data-valid-name="기획전번호"/>
+							<button type="button" class="off btn btn-base btn-lg" id="btnSearchPlan"  onclick="fnPlanSearch('')">기획전 조회</button>
+						</td>
+					</tr>
+					<tr>
+						<th>PC/모바일 구분<i class="required" title="필수"></i></th>
+						<td>
+							<select name="frontGb" id="frontGb">
+								<option value="A">[A] 전체</option>
+								<option value="P">[P] PC</option>
+								<option value="M">[M] 모바일</option>
+							</select>
+						</td>
+						<!--<th>팝업종류<i class="required" title="필수"></i></th>
+						<td>
+							<select name="popupGb" id="popupGb">
+								<option value="W">윈도우</option>
+								<option value="L">고정레이어</option>
+								<option value="M">이동레이어</option>
+							</select>
+						</td>-->
+						<th>미노출일수<i class="required" title="필수"></i></th>
+						<td>
+							<input type="text" class="w90" name="unexpDays" id="unexpDays" required="required" data-valid-type=numeric data-valid-name="미노출일수" value="1"/>
+						</td>
+						<th>우선순위<i class="required" title="필수"></i></th>
+						<td colspan="3">
+							<input type="text" class="w90" name="dispOrd" id="dispOrd" required="required" data-valid-type=numeric data-valid-name="우선순위"/>
+						</td>
+					</tr>
+					<tr>
+						<th>노출시작일시<i class="required" title="필수"></i></th>
+						<td colspan="3">
+							<input name="dispStdt" id="stDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="노출시작일자" />
+							<select id="stTimeHour" required="required" data-valid-name="노출기간 시작시간">
+								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
+								</th:block>
+							</select>
+							<select id="stTimeMin" required="required" data-valid-name="노출기간 시작시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" >분</option>
+								</th:block>
+							</select>
+							<input name="dispStTime" id="stTime" type="hidden" data-valid-name="노출기간 시작시간" value='000000' />
+						</td>
+						<th>노출종료일시<i class="required" title="필수"></i></th>
+						<td colspan="3">
+							<input name="dispEddt" id="edDate" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="노출종료일자" />
+							<select id="edTimeHour" required="required" data-valid-name="노출기간 종료시간">
+								<th:block th:each="num: ${#numbers.sequence(0,23)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시</option>
+								</th:block>
+							</select>
+							<select id="edTimeMin" required="required" data-valid-name="노출기간 종료시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+									<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="${#numbers.formatInteger(num,2)}==59 ? 'true'">분</option>
+								</th:block>
+							</select>
+							<input name="dispEdTime" id="edTime" type="hidden" data-valid-name="노출기간 종료시간" value='235959' />
+						</td>
+					</tr>
+					<tr>
+						<th>이미지<i class="star"></i></th>
+						<td colspan="7">
+							<div id="ImageArea">
+								이미지파일 : <span class="uFile w300">
+												<input id="imgUrl1" name="imgUrl" type="file" class="uFileInput w300"  data-valid-name="이미지파일"/>
+												<label for="imgUrl1" class="uFileLabel">파일선택</label>
+												<input type="hidden" name="orgImgFileNm"/>
+												<input type="hidden" name="newImgFileNm"/>
+											</span>
+								&nbsp;&nbsp;&nbsp;&nbsp;LINK : <input type="text" class="w400" name="linkUrl"  maxlength="300" required="required" data-valid-name="LINK" value="#"/>
+								<span class="memAdd off" id="imgFileNm1"></span>
+								<div id="ImageAddArea">
+								</div>
+							</div>
+						</td>
+					</tr>
+				</table>
+			</form>
+			
+			<!-- 버튼 배치 영역 -->
+			<ul class="panelBar">
+				<li class="center">
+					<button type="button" class="btn btn-info btn-lg" id="btnNew">신규</button>
+					<button type="button" class="btn btn-success btn-lg" id="btnSave">저장</button>
+				</li>
+			</ul>
+			<!-- //버튼 배치 영역 -->
+		</div>
+		<!-- 등록/수정 -->
+	</div>
+
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var siteCdList = [[${siteCdList}]];
+	var viewPageList = [[${viewPageList}]];
+	var cate1NoList = [[${cate1NoList}]];
+
+	var imgDivLen = 1;	//이미지 추가 액션수관리
+
+	let columnDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: "팝업일련번호", field: "popupSq", width: 150, cellClass: 'text-center'},
+		{headerName: "적용여부", field: "displayYn", width: 150, cellClass: 'text-center'},
+		{headerName: "전시위치", field: "viewPage", width: 150, cellClass: 'text-center'},
+		{headerName: "카테고리", field: "cate1No", width: 150, cellClass: 'text-center'},
+		{headerName: "브랜드", field: "brandCd", width: 150, cellClass: 'text-center'},
+		{headerName: "기획전번호", field: "planSq", width: 150, cellClass: 'text-center'},
+		{headerName: "PC/모바일", field: "frontGb", width: 150, cellClass: 'text-center'},
+		{headerName: "우선순위", field: "dispOrd", width: 150, cellClass: 'text-center'},
+		{headerName: "전시시작일", field: "dispStdt", width: 150, cellClass: 'text-center'},
+		{headerName: "전시종료일", field: "dispEddt", width: 150, cellClass: 'text-center'},
+		{headerName: "등록자", field: "regNo", width: 150, cellClass: 'text-center'},
+		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center'}
+	];
+
+	let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+	gridOptions.rowSelection = "multiple";
+
+	/**
+	 * 조회
+	 */
+	$('#btnSearch').on('click', function (){
+		fnSearch();
+	});
+
+	var fnSearch = function(){
+		gagaPaging.init('searchForm', fnSearchCallBack, 'popupListPagination', $('#searchForm').find('#pageSize').val());
+		gagaPaging.load(1);
+	};
+
+	var fnSearchCallBack = function(result){
+		$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		gridOptions.api.setRowData(result.popupList);
+		gagaPaging.createPagination(result.pageing.pageable);
+	}
+
+	// 미리보기위치 선택
+	var fnChangeViewPage = function(sub){
+		if($("#viewPage"+sub).val()=="G037_30"){
+			$("#cate1No"+sub).removeClass("off").addClass("on");
+			$("#brandCd"+sub).removeClass("on").addClass("off");
+			$("#btnSearchBrandGroup"+sub).removeClass("on").addClass("off");
+			$("#planSq"+sub).removeClass("on").addClass("off");
+			$("#btnSearchPlan"+sub).removeClass("on").addClass("off");
+		}else if($("#viewPage"+sub).val()=="G037_31"){
+			$("#cate1No"+sub).removeClass("on").addClass("off");
+			$("#brandCd"+sub).removeClass("off").addClass("on");
+			$("#btnSearchBrandGroup"+sub).removeClass("off").addClass("on");
+			$("#planSq"+sub).removeClass("on").addClass("off");
+			$("#btnSearchPlan"+sub).removeClass("on").addClass("off");
+		}else if($("#viewPage"+sub).val()=="G037_40"){
+			$("#cate1No"+sub).removeClass("on").addClass("off");
+			$("#brandCd"+sub).removeClass("on").addClass("off");
+			$("#btnSearchBrandGroup"+sub).removeClass("on").addClass("off");
+			$("#planSq"+sub).removeClass("off").addClass("on");
+			$("#btnSearchPlan"+sub).removeClass("off").addClass("on");
+		}else{
+			$("#cate1No"+sub).removeClass("on").addClass("off");
+			$("#brandCd"+sub).removeClass("on").addClass("off");
+			$("#btnSearchBrandGroup"+sub).removeClass("on").addClass("off");
+			$("#planSq"+sub).removeClass("on").addClass("off");
+			$("#btnSearchPlan"+sub).removeClass("on").addClass("off");
+		}
+	};
+
+	// 검색조건 초기화
+	$('#btnInit').on('click', function() {
+		$("#searchForm")[0].reset();
+		gagajf.setDate('schStDate', 'schEdDate', 't');
+	});
+
+	// 신규 버튼 클릭
+	$("#btnNew").on("click", function(){
+		$("#detailForm")[0].reset();
+		$("#ImageAddArea").empty();
+		$("#linkUrl").val('#');
+		$('#detailForm input[name=imgUrl]').val('');
+		$('#detailForm input[name=imgUrl]').closest('div').find('label').text('파일선택');
+		$('#detailForm #imgFileNm1').html('');
+		$('#detailForm input[name=orgImgFileNm]').val('');
+		$('#detailForm input[name=newImgFileNm]').val('');
+		$("#cate1No").removeClass("on").addClass("off");
+		$("#btnSearchBrandGroup").removeClass("on").addClass("off");
+		$('#detailForm input[name=brandCd]').removeClass("on").addClass("off");
+		$("#btnSearchPlan").removeClass("on").addClass("off");
+		$('#detailForm input[name=planSq]').removeClass("on").addClass("off");
+		imgDivLen = 1;
+	});
+	
+	$(document).ready(function() {
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridList', gridOptions);
+	});
+/*]]>*/
+</script>
+
+</html>