Explorar el Código

사이즈정보관리

eskim hace 5 años
padre
commit
2907b3a8ae

+ 22 - 0
src/main/java/com/style24/admin/biz/dao/TsaGoodsDao.java

@@ -28,6 +28,7 @@ import com.style24.persistence.domain.Notice;
 import com.style24.persistence.domain.NoticeGoods;
 import com.style24.persistence.domain.Option;
 import com.style24.persistence.domain.ReinboundInform;
+import com.style24.persistence.domain.SizeInfo;
 import com.style24.persistence.domain.Video;
 import com.style24.persistence.domain.WmsColorMapping;
 import com.style24.persistence.domain.WmsGoods;
@@ -1157,4 +1158,25 @@ public interface TsaGoodsDao {
 	 * @since 2021. 01. 25
 	 */
 	Collection<GoodsMass> getGoodsRegLogList(GoodsSearch goodsSearch);
+
+	/**
+	 * 사이즈 정보 목록
+	 *
+	 * @param sizeInfo
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 26
+	 */
+	Collection<SizeInfo> getSizeInfoList(SizeInfo sizeInfo);
+
+	/**
+	 * 사이즈 정보 저장
+	 *
+	 * @param sizeInfo
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 27
+	 */
+	void saveSizeInfo(SizeInfo sizeInfo);
+
 }

+ 52 - 0
src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -50,6 +50,7 @@ import com.style24.persistence.domain.NoticeGoods;
 import com.style24.persistence.domain.Option;
 import com.style24.persistence.domain.ReinboundInform;
 import com.style24.persistence.domain.SearchData;
+import com.style24.persistence.domain.SizeInfo;
 import com.style24.persistence.domain.SupplyCompany;
 import com.style24.persistence.domain.Video;
 import com.style24.persistence.domain.WmsColorMapping;
@@ -3514,4 +3515,55 @@ public class TsaGoodsService {
 		}
 		return goodsDao.getGoodsRegLogList(goodsSearch);
 	}
+
+	/**
+	 * 사이즈 정보 목록
+	 *
+	 * @param sizeInfo
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 26
+	 */
+	public Collection<SizeInfo> getSizeInfoList(SizeInfo sizeInfo) {
+		return goodsDao.getSizeInfoList(sizeInfo);
+	}
+
+	/**
+	 * 사이즈 정보 저장
+	 *
+	 * @param sizeInfo
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 27
+	 */
+	public void saveSizeInfo(SizeInfo sizeInfo) {
+
+		String sizeCate1Cd = "";
+		String sizeCate2Cd = "";
+		if ("1".equals(sizeInfo.getSizeGb()) ){
+			sizeCate1Cd = "00";
+			if ("Y".equals(sizeInfo.getSelfYn())){
+				sizeCate1Cd = sizeInfo.getBrandCd();
+			}
+			sizeInfo.setSizeCate1Cd(sizeCate1Cd);
+			if (StringUtils.isBlank(sizeInfo.getSizeCate2Cd())) {
+				sizeCate2Cd = commonService.getNextSequence("SEQ_CATE").toString();
+				sizeInfo.setSizeCate2Cd(sizeCate2Cd);
+			}
+
+		}else {
+
+			if (StringUtils.isBlank(sizeInfo.getSizeCate1Cd())) {
+				sizeCate1Cd = commonService.getNextSequence("SEQ_CATE").toString();
+				sizeInfo.setSizeCate1Cd(sizeCate1Cd);
+				sizeInfo.setSizeCate2Cd(sizeCate1Cd);
+			}
+
+		}
+
+		sizeInfo.setRegNo(TsaSession.getInfo().getUserNo());
+		sizeInfo.setUpdNo(TsaSession.getInfo().getUserNo());
+		goodsDao.saveSizeInfo(sizeInfo);
+	}
+
 }

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

@@ -271,6 +271,20 @@ public class TsaRendererService {
 //	//		return rendererDao.getBrandList(brand);
 //	//	}
 //	//
+
+
+	/**
+	 * 브랜드 목록
+	 * @param
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 26
+	 */
+	public Collection<CommonCode> getBrandList(Brand brand) {
+		return rendererDao.getBrandList(brand);
+	}
+
+
 	/**
 	 * 공급업체 브랜드 목록
 	 * @param supplyCompCd - 공급업체코드

+ 51 - 0
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -34,6 +34,7 @@ import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.AdKeyword;
 import com.style24.persistence.domain.AdKeywordGoods;
+import com.style24.persistence.domain.Brand;
 import com.style24.persistence.domain.Color;
 import com.style24.persistence.domain.FreeGoods;
 import com.style24.persistence.domain.Goods;
@@ -55,6 +56,7 @@ import com.style24.persistence.domain.Notice;
 import com.style24.persistence.domain.NoticeGoods;
 import com.style24.persistence.domain.Option;
 import com.style24.persistence.domain.ReinboundInform;
+import com.style24.persistence.domain.SizeInfo;
 import com.style24.persistence.domain.User;
 import com.style24.persistence.domain.Video;
 import com.style24.persistence.domain.WmsColorMapping;
@@ -2603,4 +2605,53 @@ public class TsaGoodsController extends TsaBaseController {
 		return goodsService.getGoodsRegLogList(goodsSearch);
 	}
 
+	/**
+	 * 사이즈 정보관리
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 26
+	 */
+	@GetMapping("/size/info/form")
+	@ResponseBody
+	public ModelAndView sizeInfoForm() {
+
+		ModelAndView mav = new ModelAndView();
+
+		//자사브랜드
+		Brand brand = new Brand();
+		brand.setSelfYn("Y");
+		mav.addObject("selfBrandList", rendererService.getBrandList(brand));
+
+		mav.setViewName("goods/GoodsSizeInfoForm");
+		return mav;
+	}
+
+	/**
+	 * 사이즈 정보 목록
+	 *
+	 * @param goodsSearch
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 26
+	 */
+	@PostMapping("/size/info/list")
+	@ResponseBody
+	public Collection<SizeInfo> getSizeInfoList(@RequestBody SizeInfo sizeInfo) {
+		return goodsService.getSizeInfoList(sizeInfo);
+	}
+
+	/**
+	 * 사이즈 정보 저장
+	 *
+	 * @param sizeInfo
+	 * @return
+	 * @author eskim
+	 * @since 2021. 01. 27
+	 */
+	@PostMapping("/size/info/save")
+	@ResponseBody
+	public GagaResponse saveSizeInfo(@RequestBody SizeInfo sizeInfo) {
+		goodsService.saveSizeInfo(sizeInfo);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
 }

+ 29 - 0
src/main/java/com/style24/persistence/domain/SizeInfo.java

@@ -0,0 +1,29 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TscBaseDomain;
+
+import lombok.Data;
+
+/**
+ * 사이즈정보  Domain
+ *
+ * @author eskim
+ * @since 2021. 01. 26
+ */
+@SuppressWarnings("serial")
+@Data
+public class SizeInfo extends TscBaseDomain {
+
+	private String sizeGb;
+	private String sizeCate1Cd;
+	private String sizeCate1Nm;
+	private String sizeCate2Cd;
+	private String sizeCate2Nm;
+	private String sizeInfo;
+	private int dispOrd;
+	private String useYn;
+
+	private String selfYn;
+	private String brandCd;
+
+}

+ 7 - 4
src/main/java/com/style24/persistence/mybatis/shop/TsaBusiness.xml

@@ -477,7 +477,7 @@
 		     , A.DISP_NM_LANG                /*노출명언어*/
 		     , A.RGB_CD                      /*RGB코드*/
 		     , A.DISTRIBUTION_GB             /*유통구분*/
-		     , B.SUPPLY_COMP_NM              /*업체명*/
+		     -- , B.SUPPLY_COMP_NM              /*업체명*/
 		     , A.ERP_BRAND_CD                /*ERP브랜드코드*/
 		     , A.SELF_YN                     /*자사여부*/
 		     , A.USE_YN                      /*사용여부*/
@@ -488,10 +488,13 @@
 		     , A.LOGO_FILE_NM                 /*로고파일명*/
 		     , A.DISP_ORD                    /*표시순서*/
 		FROM   TB_BRAND A
-		INNER JOIN TB_SUPPLY_COMPANY B ON A.SUPPLY_COMP_CD = B.SUPPLY_COMP_CD
+		<if test='supplyCompCd != null and supplyCompCd != ""'>
+		INNER JOIN TB_BRAND_SUPPLY C ON A.BRAND_CD = C.BRAND_CD
+		INNER JOIN TB_SUPPLY_COMPANY B ON C.SUPPLY_COMP_CD = B.SUPPLY_COMP_CD
+		</if>
 		WHERE  1 = 1
 		<if test='supplyCompCd != null and supplyCompCd != ""'>
-		AND    A.SUPPLY_COMP_CD = #{supplyCompCd}
+		AND    C.SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
 		<if test='distributionGb != null and distributionGb != ""'>
 		AND    A.DISTRIBUTION_GB = #{distributionGb}
@@ -516,7 +519,7 @@
 		<if test='useYn != null and useYn != ""'>
 		AND    A.USE_YN = #{useYn}
 		</if>
-		ORDER  BY A.SELF_YN DESC, A.SUPPLY_COMP_CD, A.DISP_ORD
+		ORDER  BY A.SELF_YN DESC,  A.DISP_ORD
 	</select>
 	
 	<!-- 담당MD 목록 -->

+ 83 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -4282,4 +4282,87 @@
 		</if>
 		ORDER BY A.REG_DT DESC, A.GOODS_CD
 	</select>
+	
+	<!-- 사이즈 정보 목록 조회 -->
+	<select id="getSizeInfoList" parameterType="SizeInfo" resultType="SizeInfo">
+		/* TsaGoods.getSizeInfoList */
+		SELECT A.SIZE_GB
+		     , A.SIZE_CATE1_CD
+		     , CASE WHEN A.SIZE_GB = '1' AND A.SIZE_CATE1_CD <![CDATA[<>]]> '00' THEN B.BRAND_ENM
+		            WHEN A.SIZE_GB = '1' AND A.SIZE_CATE1_CD = '00' THEN '공통'
+		            ELSE  A.SIZE_CATE1_NM END AS SIZE_CATE1_NM
+		     , A.SIZE_CATE2_CD
+		     , A.SIZE_CATE2_NM
+		     , A.SIZE_INFO
+		     , A.DISP_ORD
+		     , A.USE_YN
+		     , FN_GET_USER_NM(A.REG_NO) AS REG_NM 
+		     , DATE_FORMAT(A.REG_DT, '%Y%m%d%H%i%S') AS REG_DT
+		     , FN_GET_USER_NM(A.UPD_NO) AS UPD_NM 
+		     , DATE_FORMAT(A.UPD_DT, '%Y%m%d%H%i%S') AS UPD_DT
+		FROM TB_SIZE_INFO A
+		LEFT OUTER JOIN TB_BRAND B ON (CASE WHEN A.SIZE_GB = '1' AND A.SIZE_CATE1_CD <![CDATA[<>]]> '00' THEN A.SIZE_CATE1_CD
+		                                  ELSE '0' END) = B.BRAND_CD
+		                           AND B.SELF_YN = 'Y'
+		
+		WHERE A.SIZE_GB = #{sizeGb}
+		<choose>
+		    <when test='sizeGb != null and sizeGb == "1"'>
+		        <if test='selfYn != null and selfYn != "N" '>
+		AND A.SIZE_CATE1_CD = '00'
+		        </if>
+		        <if test='brandCd != null and brandCd != "" '>
+		AND A.SIZE_CATE1_CD = #{brandCd}
+		        </if>
+		        <if test='sizeCate2Cd != null and sizeCate2Cd != "" '>
+		AND A.SIZE_CATE2_CD = #{sizeCate2Cd}
+		        </if>
+		    </when>
+		    <otherwise>
+		        <if test='sizeCate2Cd != null and sizeCate2Cd != "" '>
+		AND A.SIZE_CATE2_CD = #{sizeCate2Cd}
+		        </if>
+		    </otherwise>
+		</choose>
+	</select>
+	
+	<!-- 사이즈 정보 저장 -->
+	<insert id="saveSizeInfo" parameterType="SizeInfo">
+		/* TsaGoods.saveSizeInfo */
+		INSERT INTO TB_SIZE_INFO (
+		       SIZE_GB
+		     , SIZE_CATE1_CD
+		     , SIZE_CATE1_NM
+		     , SIZE_CATE2_CD
+		     , SIZE_CATE2_NM
+		     , SIZE_INFO
+		     , DISP_ORD
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       #{sizeGb}
+		     , #{sizeCate1Cd}
+		     , #{sizeCate1Nm}
+		     , #{sizeCate2Cd}
+		     , #{sizeCate2Nm}
+		     , #{sizeInfo}
+		     , #{dispOrd}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+		ON DUPLICATE KEY UPDATE
+		       USE_YN = #{useYn}
+		      ,DISP_ORD = #{dispOrd}
+		      ,SIZE_INFO = #{sizeInfo}
+		      ,UPD_NO = #{updNo}
+		      ,UPD_DT = NOW()
+	</insert>
+	
 </mapper>

+ 14 - 7
src/main/java/com/style24/persistence/mybatis/shop/TsaRenderer.xml

@@ -147,20 +147,27 @@
 	<!-- 브랜드 목록 -->
 	<select id="getBrandList" parameterType="Brand" resultType="CommonCode">
 		/* TsaRenderer.getBrandList */
-		SELECT BRAND_CD  AS CD
-		     , BRAND_ENM AS CD_NM
-		FROM   TB_BRAND
+		SELECT A.BRAND_CD  AS CD
+		     , A.BRAND_ENM AS CD_NM
+		FROM   TB_BRAND A
+		<if test='supplyCompCd != null and supplyCompCd != ""'>
+		INNER JOIN TB_BRAND_SUPPLY C ON A.BRAND_CD = C.BRAND_CD
+		INNER JOIN TB_SUPPLY_COMPANY B ON C.SUPPLY_COMP_CD = B.SUPPLY_COMP_CD
+		</if>
 		WHERE  1 = 1
 		<if test='supplyCompCd != null and supplyCompCd != ""'>
-		AND    SUPPLY_COMP_CD = #{supplyCompCd}
+		AND    C.SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
 		<if test='brandGrpNm != null and brandGrpNm != ""'>
-		AND    BRAND_GRP_NM = #{brandGrpNm}
+		AND    A.BRAND_GRP_NM = #{brandGrpNm}
 		</if>
 		<if test='useYn != null and useYn != ""'>
-		AND    USE_YN = #{useYn}
+		AND    A.USE_YN = #{useYn}
+		</if>
+		<if test='selfYn != null and selfYn != ""'>
+		AND    A.SELF_YN = #{selfYn}
 		</if>
-		ORDER  BY SUPPLY_COMP_CD, DISP_ORD
+		ORDER  BY A.SELF_YN DESC,  A.DISP_ORD
 	</select>
 
 	<!-- 권한별 브랜드 목록 -->

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

@@ -42,7 +42,7 @@
 					<tr>
 						<th>공급업체</th>
 						<td>
-							<select name="supplyComp">
+							<select name="supplyCompCd">
 								<option value="">[전체]</option>
 								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>

+ 285 - 0
src/main/webapp/WEB-INF/views/goods/GoodsSizeInfoForm.html

@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsSizeInfoForm.html
+ * @desc    : 사이즈정보관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.26   eskim       최초 작성
+  *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- 검색조건 영역 -->
+		<div class="panelStyle">
+			<div class="panelContent">
+			<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/size/info/list'}">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>구분<em class="required" title="필수"></em></th>
+						<td>
+							<label class="rdoBtn"><input type="radio" name="sizeGb"  value="1"  checked/>표준사이즈</label>
+							<label class="rdoBtn"><input type="radio" name="sizeGb"  value="2"/>측정가이드</label>
+						</td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-success btn-lg" id="btnSearch">조회</button>
+					</li>
+				</ul>
+			</form>
+			</div>
+		</div>
+		<!-- //검색조건 영역 -->
+		
+		<!-- 리스트 영역 -->
+		<div class="panelStyle">
+			<div id="gridList" style="width: 100%; height: 300px;" class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+		<!-- 등록/수정 -->
+		<form id="sizeInfoForm" name="sizeInfoForm" action="#" th:action="@{'/goods/size/info/save'}">
+		<!-- 등록/수정 -->
+		<div class="panelStyle" >
+			<ul>
+				<li>
+					<table class="w100p">
+						<colgroup>
+							<col style="width:35%;"/>
+							<col style="width:1%;"/>
+							<col/>
+						</colgroup>
+						<tr>
+							<td  class="vaT">
+								<table class="frmStyle" aria-describedby="등록/수정 폼">
+									<colgroup>
+										<col style="width:10%;"/>
+										<col/>
+									</colgroup>
+									<tr>
+										<th>구분<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="sizeGb"  value="1"  checked/>표준사이즈</label>
+											<label class="rdoBtn"><input type="radio" name="sizeGb"  value="2"/>측정가이드</label>
+										</td>
+									</tr>
+									<tr id="brandArea">	
+										<th>브랜드<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="selfYn"  value="N"  checked/>공통</label>
+											<label class="rdoBtn"><input type="radio" name="selfYn"  value="Y"/>자사브랜드</label>
+											<select name="brandCd" id="brandCd">
+												<option value="" >[선택]</option>
+												<option th:if="${selfBrandList}" th:each="oneData, status : ${selfBrandList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+										</td>
+									</tr>
+									<tr>
+										<th>사이즈카테명</th>
+										<td>
+											<input type="text" class="w200" name="sizeCate2Nm" maxlength="10" data-valid-name="사이즈카테명" />
+											<input type="hidden" name="sizeCate2Cd" />
+										</td>
+									</tr>
+									<tr>
+										<th>노출순서<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="aR w100" name="dispOrd" maxlength="5" required="required" data-valid-type="integer" data-valid-name="노출순서"/>
+										</td>
+									</tr>
+									<tr>
+										<th>사용여부<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="useYn" value="Y"  checked/>Yes</label>
+											<label class="rdoBtn"><input type="radio" name="useYn" value="N"/>No</label>
+										</td>
+									</tr>
+								</table>
+							</td>
+							<td>&nbsp;</td>
+							<td>
+								<textarea class="textareaR4" name="sizeInfo" id="sizeInfo"></textarea>
+							</td>
+						</tr>
+					</table>
+				</li>
+			</ul>
+			<!-- 버튼 배치 영역 -->
+			<ul class="panelBar">
+				<li class="right">
+					<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>
+		<!-- 등록/수정 -->
+		</form>
+	</div>
+<script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2020103001"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var sizeGbList = { "1":"표준사이즈", "2":"측정가이드" };
+	var useYnList = { "Y":"Yes", "N":"No" };
+	// specify the columns
+	var columnDefs = [
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "구분", field: "sizeGb", width: 120, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(sizeGbList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(sizeGbList, params.value); }
+		},
+		{headerName: "브랜드코드", field: "sizeCate1cd", width: 130, cellClass: 'text-center', hide: true},
+		{headerName: "브랜드명", field: "sizeCate1Nm", width: 150, cellClass: 'text-center'},
+		{headerName: "사이즈카테코드", field: "sizeCate2cd", width: 130, cellClass: 'text-center', hide: true},
+		{headerName: "카테명", field: "sizeCate2Nm", width: 150, cellClass: 'text-center'
+			,cellRenderer: function(params) {
+				return '<a href="javascript:void(0);">' + params.value + '</a>';
+			}
+		},
+		{headerName: "표시순서", field: "dispOrd", width: 150, cellClass: 'text-center'},
+		{headerName: "사용여부", field: "useYn", width: 100, cellClass: 'text-center'},
+		{headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "등록자", field: "regNm", width: 130, cellClass: 'text-center'},
+		{headerName: "수정일자", field: "updDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "수정자", field: "updNm", width: 130, cellClass: 'text-center'},
+	];
+	
+	// Get GridOptions
+	var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+	
+	//gridOptions.suppressRowClickSelection = true;
+	//gridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+	
+	//  클릭
+	gridOptions.onCellClicked = function(event) {
+		if (event.colDef.field == "sizeCate2Nm"){
+			
+			$('#btnNew').click();
+			
+			$("#sizeInfoForm input:radio[name=sizeGb]:input[value=" + event.data.sizeGb + "]").click();
+			if ("1" == event.data.sizeGb){
+				$('#brandArea').removeClass('off').addClass('on');
+				if (event.data.sizeCate1Cd == "00") {
+					$("#sizeInfoForm input:radio[name=selfYn]:input[value=N]").click();
+				}else{
+					
+					$("#sizeInfoForm input:radio[name=selfYn]:input[value=Y]").click();
+					$("#sizeInfoForm select[name=brandCd]").val(event.data.sizeCate1Cd);	
+				}
+			}
+			$("#sizeInfoForm input[name=sizeCate2Nm]").val(event.data.sizeCate2Nm);
+			$("#sizeInfoForm input[name=sizeCate2Cd]").val(event.data.sizeCate2Cd);
+			$("#sizeInfoForm input[name=dispOrd]").val(event.data.dispOrd);
+			gagaSn.setContents('#sizeInfo', event.data.sizeInfo); 
+				
+			$('#sizeInfoForm input[name=sizeGb]').prop('readonly', true);
+		}
+	}
+
+	// 조회
+	$('#btnSearch').on('click', function() {
+		// Fetch data
+		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+	});
+	
+	// 신규버튼 초기화
+	$('#btnNew').on('click', function() {
+		$("#sizeInfoForm")[0].reset();
+		$('#sizeInfoForm input[name=sizeGb]').prop('readonly', false);
+		$("#sizeInfoForm input:radio[name=sizeGb]:input[value=1]").click();
+		$("#sizeInfoForm input:radio[name=selfYn]:input[value=N]").click();
+		gagaSn.setContents('#sizeInfo', ''); 
+	});
+	
+	// 자사/입점 변경여부
+	$("#sizeInfoForm input[name=sizeGb]").bind('change', function () {
+		var sizeGb = $(this).val();
+		if (sizeGb == "1"){
+			$('#brandArea').removeClass('off').addClass('on');
+		}else{
+			$('#brandArea').removeClass('on').addClass('off');
+		}
+		
+	});
+	
+	// 사이즈정보 저장
+	$("#btnSave").on('click', function() {
+		
+		// 표준사이즈, 자사브랜드일 경우
+		if("1" == $('#sizeInfoForm input[name=sizeGb]').val() && "Y" == $('#sizeInfoForm input[name=selfYn]').val() 
+			&& gagajf.isNull($('#sizeInfoForm input[name=brandCd]').val())){
+			mcxDialog.alert("자사브랜드를 선택하세요.");
+			return false;
+		}
+		
+		// validation
+		if (!gagajf.validation('#sizeInfoForm'))
+			return false;
+		
+		if (gagajf.isNull($('#sizeInfoForm input[name=sizeCate2Nm]').val())){
+			if ("1" == $('#sizeInfoForm input[name=sizeGb]').val() && "Y" == $('#sizeInfoForm input[name=selfYn]').val() ){
+				
+			}else{
+				mcxDialog.alertC("사이즈카테명을 입력해주세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#sizeInfoForm select[name=sizeCate2Nm]").focus();
+					}
+				});
+				return false;
+			}	
+		}
+		
+		
+		mcxDialog.confirm('저장하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				gagajf.ajaxFormSubmit($('#sizeInfoForm').prop('action'), '#sizeInfoForm', function() {
+					$('#btnNew').click();
+					$('#btnSearch').click();
+				});
+			}
+		});
+	});
+	
+	$(document).ready(function() {
+		
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridList', gridOptions);
+		
+		// Create a summernote
+		var snOptions = gagaSn.getToolbarOptions('media');
+		gagaSn.createSummernote(snOptions, '#sizeInfo');
+	});
+	
+/*]]>*/
+</script>
+
+</html>