Browse Source

상품공지관리 정리

eskim 5 years ago
parent
commit
8484c2ed40

+ 0 - 522
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDetailNoticeForm.html

@@ -1,522 +0,0 @@
-<!DOCTYPE html>
-<html lang="ko"
-	xmlns:th="http://www.thymeleaf.org">
-<!--
- *******************************************************************************
- * @source  : GoodsDetailNoticeForm.html
- * @desc    : 상품상세공지관리 Page
- *============================================================================
- * STYLE24
- * Copyright(C) 2020 TSIT, All rights reserved.
- *============================================================================
- * VER  DATE         AUTHOR      DESCRIPTION
- * ===  ===========  ==========  =============================================
- * 1.0  2020.11.05   eskim     최초 작성
- *******************************************************************************
- -->
-	<div id="main">
-		<!-- 메인타이틀 영역 -->
-		<div class="main-title">
-		</div>
-		<!-- //메인타이틀 영역 -->
-		
-		<!-- 메뉴 설명 -->
-		<div class="infoBox menu-desc">
-		</div>
-		<!-- //메뉴 설명 -->
-		
-		<!-- 검색조건 영역 -->
-		<div class="panelStyle">
-			<!-- TITLE -->
-			<div class="panelTitle">
-				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
-			</div>
-			<!-- //TITLE -->
-			<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/notice/list'}" >
-				<input type="hidden" name="noticeType" value="G047_30"/>
-				<input type="hidden" id="searchGb" name="searchGb" />
-			<div class="panelContent">	
-				<table class="frmStyle" aria-describedby="검색조건">
-					<colgroup>
-						<col width="10%"/>
-						<col width="40%"/>
-						<col width="10%"/>
-						<col/>
-					</colgroup>
-					<tr>
-						<th>업체/브랜드</th>
-						<td>
-							<select name="supplyCompCd" id="supplyCompCd">
-								<option value="" th:if="${sessionInfo.roleCd} != 'B000'">[전체]</option>
-								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
-							<select name="brandCd" id="brandCd">
-								<option value="">[전체]</option>
-							</select>
-						</td>
-						<th>키워드</th>
-						<td>
-							<select name="search" id="search">
-								<option value="searchGoodsCd">상품코드</option>
-								<option value="searchGoodsNm">상품명</option>
-								<option value="searchGoodsNum">품번</option>
-								<option value="searchSupplyGoodsCd">업체상품코드</option>
-							</select>
-							<input type="text" class="w50p" name="condition" id="condition" maxlength="50"/>
-						</td>
-					</tr>
-					<tr>
-						<th>공지제목</th>
-						<td>
-							<input name="noteicTitle" type="text" maxlength="200"/>
-						</td>
-						<th>사용여부</th>
-						<td>
-							<select name="useYn">
-								<option value="">[전체]</option>
-								<option value="Y">[Y] Yes</option>
-								<option value="N">[N] No</option>
-							</select>
-						</td>
-					</tr>
-					<tr>
-						<th>공지기간</th>
-						<td colspan="3" id="sellTerms">
-						</td>
-					</tr>
-				</table>
-				<ul class="panelBar">
-					<li class="center">
-						<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
-						<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
-					</li>
-				</ul>
-			</div>	
-			</form>
-		</div>
-		<!-- 검색조건 영역 -->
-		<!-- 리스트 영역 -->
-		<div class="panelStyle">
-			<div id="gridNoticeList" style="width: 100%; height: 400px" class="ag-theme-balham"></div>
-		</div>
-		<!-- //리스트 영역 -->
-		<form id="goodsNoticeForm" name="goodsNoticeForm" action="#" th:action="@{'/goods/notice/save'}">
-		<input type="hidden" name="urgentYn" value="N"/> <!-- 긴급공지여부 -->
-		<input type="hidden" name="noticeType" value="G047_30"/>
-		<input type="hidden" name="goodsList" />
-		<!-- 등록/수정 -->
-		<div class="panelStyle" >
-			<ul>
-				<li>
-					<table class="w100p">
-						<colgroup>
-							<col style="width:65%;"/>
-							<col style="width:1%;"/>
-							<col/>
-						</colgroup>
-						<tr>
-							<td>
-								<table class="frmStyle" aria-describedby="등록/수정 폼">
-									<colgroup>
-										<col style="width:10%;"/>
-										<col style="width:15%;"/>
-										<col style="width:10%;"/>
-										<col style="width:15%;"/>
-										<col style="width:10%;"/>
-										<col/>
-									</colgroup>
-									<tr>
-										<th>공지번호</th>
-										<td>
-											<input type="text" class="w100" name="noticeSq" placeholder="자동부여" readonly="readonly"/>
-										</td>
-										<th>사용여부</th>
-										<td>
-											<input type="hidden" name="useYn"/>
-											<label class="chkBox"><input type="checkbox" name="chkUseYn" checked="checked" value="Y"/>사용</label>
-										</td>
-										<th>공지기간<i class="required" title="필수"></i></th>
-										<td>
-											<input type="text" class="schDate w100" name="noticeStdt" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
-											~
-											<input type="text" class="schDate w100" name="noticeEddt" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
-										</td>
-									</tr>
-									<tr>
-										<th>제목<i class="required" title="필수"></i></th>
-										<td colspan="5">
-											<input type="text" name="noticeTitle" required="required" data-valid-name="제목"/>
-										</td>
-									</tr>
-									<tr>
-										<th>공지내용<i class="required" title="필수"></i></th>
-										<td colspan="5">
-											<textarea class="textareaR4" name="noticeContent" id="noticeContent"></textarea>
-										</td>
-									</tr>
-								</table>
-							</td>
-							<td>&nbsp;</td>
-							<td>
-							<ul class="panelBar">
-								<li class="left">
-									<button type="button" class="btn btn-danger btn-lg" id="btnDeleteNoticeGoods">삭제</button>
-								</li>
-								<li class="right">
-									<button type="button" class="btn btn-base btn-lg" id="btnSearchExcel">엑셀조회</button>
-									<button type="button" class="btn btn-info btn-lg" id="btnSearchGoods">상품조회</button>
-								</li>
-							</ul>
-							<ul>
-								<li id="gridNoticeGoodsList" style="width: 100%; height: 450px;" class="ag-theme-balham"></li>
-							</ul>
-							</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 columnNoticeDefs = [
-		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "공지번호", field: "noticeSq", width: 90, cellClass: 'text-center'},
-		{headerName: "공지제목", field: "noticeTitle", width: 500,
-			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
-		},
-		{headerName: "공지시작일", field: "noticeStdt", width:150, cellClass: 'text-center',
-			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
-		},
-		{headerName: "공지종료일", field: "noticeEddt", width:150, cellClass: 'text-center',
-			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
-		},
-		{headerName: "사용여부", field: "useYn", width:90, cellClass: 'text-center'},
-		{headerName: "등록자", field: "regNm", width:90, cellClass: 'text-center'},
-		{headerName: "등록일자", field: "regDt", width:150, cellClass: 'text-center',
-			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
-		}
-	];
-	
-	var columnNoticeGoodsDefs = [
-		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
-		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
-		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
-		{headerName: "상품명", field: "goodsNm", width: 260, cellClass: 'text-left'}
-	];
-
-	var gridNoticeOptions = gagaAgGrid.getGridOptions(columnNoticeDefs);
-	var gridNoticeGoodsOptions = gagaAgGrid.getGridOptions(columnNoticeGoodsDefs);
-
-	gridNoticeGoodsOptions.rowSelection = 'multiple';
-	gridNoticeGoodsOptions.suppressRowClickSelection = true;
-	
-	// Cell click
-	gridNoticeOptions.onCellClicked = function(event) {
-		if (event.colDef.field != 'noticeTitle')
-			return;
-		
-		$('#goodsNoticeForm input[name=noticeSq]').val(event.data.noticeSq);
-		if (event.data.useYn == 'Y') {
-			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').prop('checked', true);
-			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').parent("label").addClass("checked");
-		} else {
-			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').prop('checked', false);
-			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').parent("label").removeClass("checked");
-		}
-		
-		$('#goodsNoticeForm input[name=noticeStdt]').val(event.data.noticeStdt);
-		$('#goodsNoticeForm input[name=noticeEddt]').val(event.data.noticeEddt);
-		$('#goodsNoticeForm input[name=noticeTitle]').val(event.data.noticeTitle);
-
-		// 공지내용. Summernote에 값 세팅
-		gagaSn.setContents('#noticeContent', event.data.noticeContent);
-
-		// 상품 목록
-		fnGetNoticeGoodsList(event.data.noticeSq);
-	}
-
-	// 검색
-	$('#btnSearch').on('click', function() {
-		if(!fnConditionCheck()) return;
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridNoticeOptions, '#searchForm');
-	});
-	
-	//검색 조건 확인
-	var fnConditionCheck = function(){
-		var formId = '#searchForm';
-		var form = document.searchForm;
-
-		var searchFlag = false;
-		var cnt = 0;
-
-		for (i = 0; i < form.elements.length; i++ ) {
-			var el = form.elements[i];
-
-			if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
-				if (!(el.value == null || el.value == "")) {
-					cnt++;
-				}
-			}
-		}
-			
-		if(cnt > 0) searchFlag = true;
-
-		if(searchFlag == false){
-			mcxDialog.alert("검색조건을 입력하세요.");
-			return false;
-		}
-		
-		var fromDate = $('#searchForm input[name=stDate]').val();
-		var toDate = $('#searchForm input[name=edDate]').val();
-		
-		if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
-			
-			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
-				mcxDialog.alertC("공지기간 조회시 시작일자와 종료일자를 입력하세요.", {
-					sureBtnText: "확인",
-					sureBtnClick: function(){
-						$('#searchForm input[name=stDate]').focus();
-					}
-				});
-				return false;
-			}
-
-			if (fromDate > toDate) {
-				mcxDialog.alertC("공지기간 시작일자는 종료일자 보다 클 수 없습니다.", {
-					sureBtnText: "확인",
-					sureBtnClick: function(){
-						$('#goodsNoticeForm input[name=stDate]').focus();
-					}
-				});
-				return false;
-			} 
-		}
-
-		return true;
-	}
-	
-	// 상품 목록 조회
-	var fnGetNoticeGoodsList = function(noticeSq) {
-		var actionUrl = '/goods/notice/goods/list/' + noticeSq;
-		gagaAgGrid.fetch(actionUrl, gridNoticeGoodsOptions);
-	}
-	
-	//업체변경시
-	$('#searchForm select[name=supplyCompCd]').on('change', function() {
-		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
-
-		if(sessRoleCd == "G001_B000"){
-			actionUrl = '/renderer/brand/AuthBrandlist';
-		}
-		$("#searchForm select[name=brandCd] option:gt(0)").remove();
-
-		cfnCreateCombo(actionUrl, $('#searchForm select[name=brandCd]'), "[전체]", "");
-	});	
-	
-	//엑셀 상품 조회
-	$('#btnSearchExcel').on('click', function() {
-		cfnExcelUploadPopup('goodsNoticeExcelUpload', 'goodsNoticeExcelUpload');
-	});
-
-	var goodsNoticeExcelUpload = function(result){
-		var data = {procJob : result.procJob
-			,excelFileNm : result.excelFileNm
-		};
-		var jsonData = JSON.stringify(data);
-		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnGoodsNoticeExcelUploadCallBack);
-	}
-	
-	var fnGoodsNoticeExcelUploadCallBack = function(result){
-		gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnExcelSearchCallBack);
-	}
-	
-	// 상품 엑셀 조회 콜백함수
-	var fnExcelSearchCallBack = function(result) {
-		if (result.goodsExcelList.length < 1) return;
-		var oldData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
-		$.each(result.goodsExcelList, function(idx, item) {
-			var isInvalid = false;
-			if (oldData != null && oldData.length != 0){
-				oldData.forEach(function(oneData){
-					if(oneData.goodsCd == item.goodsCd){
-						isInvalid = true;
-						return true;
-					}
-				});
-				if(isInvalid){
-					return isInvalid;
-				}
-			}
-			gagaAgGrid.addRowData(gridNoticeGoodsOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "crud" : "C"});
-		});
-		return;
-	};
-	
-	// 상품 조회 클릭 시
-	$('#btnSearchGoods').on('click', function() {
-		cfnOpenGoodsPopup('fnSearchCallBack');
-	});
-
-	// 상품 조회 콜백함수
-	var fnSearchCallBack = function(result) {
-		if (result.length < 1) return;
-		var oldData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
-		$.each(result, function(idx, item) {
-			var isInvalid = false;
-			if (oldData != null && oldData.length != 0){
-				oldData.forEach(function(oneData){
-					if(oneData.goodsCd == item.goodsCd){
-						isInvalid = true;
-						return true;
-					}
-				});
-				if(isInvalid){
-					return isInvalid;
-				}
-			}
-			gagaAgGrid.addRowData(gridNoticeGoodsOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "crud" : "C"});
-		});
-		return;
-	};
-	
-	// 상품 삭제
-	$('#btnDeleteNoticeGoods').on('click', function() {
-		
-		var selectedData = gridNoticeGoodsOptions.api.getSelectedRows();
-		if (selectedData.length == 0) {
-			mcxDialog.alert('선택된 행이 없습니다.');
-			return;
-		}
-		
-		var removedData = gagaAgGrid.removeRowData(gridNoticeGoodsOptions, false);
-		
-		// 신규 상세 공지일경우 화면에서만 삭제
-		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeSq]').val())){
-			return;
-		}
-		
-		var arrGoodsCd = [];
-		$.each(selectedData, function(idx, item) {
-			arrGoodsCd.push(item.goodsCd);
-		});
-		
-		mcxDialog.confirm('삭제하시겠습니까?',  {
-			cancelBtnText: "취소",
-			sureBtnText: "확인",
-			sureBtnClick: function(){
-				var data = {arrGoodsCd : arrGoodsCd
-							,noticeSq : $('#goodsNoticeForm input[name=noticeSq]').val()
-			};
-			
-			var jsonData = JSON.stringify(data);
-			gagajf.ajaxJsonSubmit('/goods/notice/goods/delete', jsonData);
-			}
-		});
-	});
-	
-	// 신규 버튼 클릭
-	$("#btnNew").on("click", function(){
-		$('#goodsNoticeForm')[0].reset();
-		
-		// 공지내용. Summernote에 값 세팅
-		gagaSn.setContents('#noticeContent', "");
-
-		// 그리드 초기화
-		gridNoticeGoodsOptions.api.setRowData(null);
-		 
-		$('#goodsNoticeForm input[name=noticeSq]').val('');
-		$('#goodsNoticeForm input[name=noticeStdt]').val(_today);
-		$('#goodsNoticeForm input[name=noticeEddt]').val(_today);
-	});
-	
-	// 저장
-	$("#btnSave").on("click", function() {
-		// 날짜 체크
-		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeStdt]').val())) {
-			mcxDialog.alertC('공지시작일자를 입력해 주세요.', {
-				sureBtnText: "확인",
-				sureBtnClick: function() {
-					$('#goodsNoticeForm input[name=noticeStdt]').focus();
-				}
-			});
-			return;
-		}
-
-		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeEddt]').val())) {
-			mcxDialog.alertC('공지종료일자를 입력해 주세요.', {
-				sureBtnText: "확인",
-				sureBtnClick: function() {
-					$('#goodsNoticeForm input[name=noticeEddt]').focus();
-				}
-			});
-			return;
-		}
-		var stDate = $('#goodsNoticeForm input[name=noticeStdt]').val().toDate('YYYY-MM-DD');
-		var edDate = $('#goodsNoticeForm input[name=noticeEddt]').val().toDate('YYYY-MM-DD');
-
-		if (stDate > edDate) {
-			mcxDialog.alert("공지기간 종료일자는 시작일자 보다 클 수 없습니다.");
-			return;
-		}
-
-		// validation
-		if (!gagajf.validation('#goodsNoticeForm'))
-			return false;
-
-		$('#goodsNoticeForm input[name=useYn]').val($('#goodsNoticeForm input:checkbox[name=chkUseYn]').is(":checked") ? 'Y' : 'N');
-
-		mcxDialog.confirm('저장하시겠습니까?', {
-			cancelBtnText: "취소",
-			sureBtnText: "확인",
-			sureBtnClick: function(){
-				
-				//var goodsAllData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
-				var goodsAllData = gagaAgGrid.getChangedData(gridNoticeGoodsOptions);
-				
-				var jsonGoodsData = JSON.stringify(goodsAllData);
-				$('#goodsNoticeForm input[name=goodsList]').val(jsonGoodsData);
-				
-				var jsonData = JSON.stringify($('#goodsNoticeForm').serializeObject());
-				gagajf.ajaxJsonSubmit($('#goodsNoticeForm').prop('action'), jsonData, function() {
-					$('#btnSearch').trigger('click');
-					fnGetNoticeGoodsList($('#goodsNoticeForm input[name=noticeSq]').val());
-					
-				});
-			}
-		});
-	});
-	
-	$(document).ready(function() {
-		
-		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '공지일', 'X');
-		
-		// Create a agGrid
-		gagaAgGrid.createGrid('gridNoticeList', gridNoticeOptions);
-		gagaAgGrid.createGrid('gridNoticeGoodsList', gridNoticeGoodsOptions);
-		
-		// Create a summernote
-		var snOptions = gagaSn.getToolbarOptions('media');
-		gagaSn.createSummernote(snOptions, '#noticeContent');
-		
-	});
-	
-/*]]>*/
-</script>
-
-</html>

+ 429 - 455
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsNoticeForm.html

@@ -3,546 +3,520 @@
 	xmlns:th="http://www.thymeleaf.org">
 <!--
  *******************************************************************************
- * @source  : GoodsPopupListForm.html
- * @desc    : 상품 조회 팝업
+ * @source  : GoodsDetailNoticeForm.html
+ * @desc    : 상품상세공지관리 Page
  *============================================================================
- * SISUN
+ * STYLE24
  * Copyright(C) 2020 TSIT, All rights reserved.
  *============================================================================
  * VER  DATE         AUTHOR      DESCRIPTION
  * ===  ===========  ==========  =============================================
- * 1.0  2020.10.26   eskim       최초 작성
+ * 1.0  2020.11.05   eskim     최초 작성
  *******************************************************************************
  -->
-	<div class="modalPopup" data-width="1700">
-	<div class="panelStyle">
-		<!-- TITLE -->
-		<div class="panelTitle">
-			<h2>상품조회</h2>
-			<button type="button" class="close" onclick="uifnPopupClose('popupGoods')"><i class="fa fa-times"></i></button>
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
 		</div>
-		<!-- //TITLE -->
-		<form id="goodsPopupForm" name="goodsPopupForm" action="#" th:action="@{'/goods/popup/list'}">
-		<div class="panelContent">
-			<ul class="notice">
-				<li>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</li>
-			</ul>
-			<table class="frmStyle">
-				<colgroup>
-					<col style="width: 7%;"/>
-					<col style="width: 21%;"/>
-					<col style="width: 7%;"/>
-					<col style="width: 18%;"/>
-					<col style="width: 7%;"/>
-					<col style="width: 18%;"/>
-					<col style="width: 7%;"/>
-					<col/>
-				</colgroup>
-				<tr>
-					<th>업체/브랜드<em class="required" title="필수"></em></th>
-					<td colspan="3">
-						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y"  checked/>자사</label>
-						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N"/>입점</label>
-						<select name="supplyCompCd" id="supplyCompCd">
-							<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
-							<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-						<span id="multiBrand"></span>
-					</td>
-					<th>상품타입</th>
-					<td>
-						<select name="goodsType" id="goodsType">
-							<option value="">[전체]</option>
-							<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th rowspan="4">키워드<em class="required" title="필수"></em></th>
-					<td rowspan="4">
-						<select name="search" id="search">
-							<option value="searchGoodsCd">상품코드</option>
-							<option value="searchGoodsNm">상품명</option>
-							<option value="searchGoodsNum">품번</option>
-							<option value="searchSupplyGoodsCd">업체상품코드</option>
-						</select>
-						<!-- <input type="text" class="w40p" name="condition" id="condition" maxlength="50"/> -->
-						<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
-					</td>
-				</tr>
-				<tr>
-					<th>품목</th>
-					<td>
-						<div class="multiCheckBox"  style="width:300px">
-							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px;">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
-								<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
-							</ul>
-						</div>
-					</td>
-					<th>상품상태</th>
-					<td>
-						<div class="multiCheckBox"  style="width:200px">
-							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiGoodsStat" onclick="uifnAllCheck('multiGoodsStat')">전체선택</label></li>
-								<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
-							</ul>
-						</div>
-					</td>
-					<th>정상/이월 구분</th>
-					<td>
-						<select  name="formalGb" id="formalGb">
-							<option value="">[전체]</option>
-							<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					
-				</tr>
-				<tr>
-					<th>년도/시즌</th>
-					<td>
-						<!-- <select  name="styleYear" id="styleYear">
-							<option value="">[전체]</option>
-							<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-						<select  name="seasonCd" id="seasonCd">
-							<option value="">[전체]</option>
-							<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select> -->
-						<div class="multiCheckBox" style="width:140px;">
-							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:140px">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
-								<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+		<!-- //메인타이틀 영역 -->
+		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- //메뉴 설명 -->
+		
+		<!-- 검색조건 영역 -->
+		<div class="panelStyle">
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
+			</div>
+			<!-- //TITLE -->
+			<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/notice/list'}" >
+				<input type="hidden" name="noticeType" value="G047_30"/>
+				<input type="hidden" id="searchGb" name="searchGb" />
+			<div class="panelContent">	
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<col width="10%"/>
+						<col width="40%"/>
+						<col width="10%"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>업체/브랜드</th>
+						<td>
+							<select name="supplyCompCd" id="supplyCompCd">
+								<option value="" th:if="${sessionInfo.roleCd} != 'B000'">[전체]</option>
+								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<select name="brandCd" id="brandCd">
+								<option value="">[전체]</option>
+							</select>
+						</td>
+						<th>키워드</th>
+						<td>
+							<select name="search" id="search">
+								<option value="searchGoodsCd">상품코드</option>
+								<option value="searchGoodsNm">상품명</option>
+								<option value="searchGoodsNum">품번</option>
+								<option value="searchSupplyGoodsCd">업체상품코드</option>
+							</select>
+							<input type="text" class="w50p" name="condition" id="condition" maxlength="50"/>
+						</td>
+					</tr>
+					<tr>
+						<th>공지제목</th>
+						<td>
+							<input name="noteicTitle" type="text" maxlength="200"/>
+						</td>
+						<th>사용여부</th>
+						<td>
+							<select name="useYn">
+								<option value="">[전체]</option>
+								<option value="Y">[Y] Yes</option>
+								<option value="N">[N] No</option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>공지기간</th>
+						<td colspan="3" id="sellTerms">
+						</td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
+						<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
+					</li>
+				</ul>
+			</div>	
+			</form>
+		</div>
+		<!-- 검색조건 영역 -->
+		<!-- 리스트 영역 -->
+		<div class="panelStyle">
+			<div id="gridNoticeList" style="width: 100%; height: 400px" class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+		<form id="goodsNoticeForm" name="goodsNoticeForm" action="#" th:action="@{'/goods/notice/save'}">
+		<input type="hidden" name="urgentYn" value="N"/> <!-- 긴급공지여부 -->
+		<input type="hidden" name="noticeType" value="G047_30"/>
+		<input type="hidden" name="goodsList" />
+		<!-- 등록/수정 -->
+		<div class="panelStyle" >
+			<ul>
+				<li>
+					<table class="w100p">
+						<colgroup>
+							<col style="width:65%;"/>
+							<col style="width:1%;"/>
+							<col/>
+						</colgroup>
+						<tr>
+							<td>
+								<table class="frmStyle" aria-describedby="등록/수정 폼">
+									<colgroup>
+										<col style="width:10%;"/>
+										<col style="width:15%;"/>
+										<col style="width:10%;"/>
+										<col style="width:15%;"/>
+										<col style="width:10%;"/>
+										<col/>
+									</colgroup>
+									<tr>
+										<th>공지번호</th>
+										<td>
+											<input type="text" class="w100" name="noticeSq" placeholder="자동부여" readonly="readonly"/>
+										</td>
+										<th>사용여부</th>
+										<td>
+											<input type="hidden" name="useYn"/>
+											<label class="chkBox"><input type="checkbox" name="chkUseYn" checked="checked" value="Y"/>사용</label>
+										</td>
+										<th>공지기간<i class="required" title="필수"></i></th>
+										<td>
+											<input type="text" class="schDate w100" name="noticeStdt" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
+											~
+											<input type="text" class="schDate w100" name="noticeEddt" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
+										</td>
+									</tr>
+									<tr>
+										<th>제목<i class="required" title="필수"></i></th>
+										<td colspan="5">
+											<input type="text" name="noticeTitle" required="required" data-valid-name="제목"/>
+										</td>
+									</tr>
+									<tr>
+										<th>공지내용<i class="required" title="필수"></i></th>
+										<td colspan="5">
+											<textarea class="textareaR4" name="noticeContent" id="noticeContent"></textarea>
+										</td>
+									</tr>
+								</table>
+							</td>
+							<td>&nbsp;</td>
+							<td>
+							<ul class="panelBar">
+								<li class="left">
+									<button type="button" class="btn btn-danger btn-lg" id="btnDeleteNoticeGoods">삭제</button>
+								</li>
+								<li class="right">
+									<button type="button" class="btn btn-base btn-lg" id="btnSearchExcel">엑셀조회</button>
+									<button type="button" class="btn btn-info btn-lg" id="btnSearchGoods">상품조회</button>
+								</li>
 							</ul>
-						</div>
-						<div class="multiCheckBox" style="width:170px;">
-							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
-								<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							<ul>
+								<li id="gridNoticeGoodsList" style="width: 100%; height: 450px;" class="ag-theme-balham"></li>
 							</ul>
-						</div>
-					</td>
-					<th>연령대</th>
-					<td>
-						<select  name="ageGrpCd" id="ageGrpCd">
-							<option value="">[전체]</option>
-							<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th>성별</th>
-					<td>
-						<select  name="sexGb" id="sexGb">
-							<option value="">[전체]</option>
-							<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-				</tr>
-				<tr>
-					<th>재고연동여부</th>
-					<td>
-						<select  name="erpStockLinkYn" id="erpStockLinkYn">
-							<option value="">[전체]</option>
-							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th>자사몰노출여부</th>
-					<td>
-						<select  name="dispYn" id="dispYn">
-							<option value="">[전체]</option>
-							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th>품절여부</th>
-					<td>
-						<select  name="soldOutYn" id="soldOutYn">
-							<option value="">[전체]</option>
-							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-				</tr>
-				<tr>
-					<th>반품가능여부</th>
-					<td>
-						<select  name="returnableYn" id="returnableYn">
-							<option value="">[전체]</option>
-							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-						<!-- <label class="chkBox"><input type="checkbox" name="returnableYn" value="Y"/>반품가능</label>
-						<label class="chkBox"><input type="checkbox" name="changeableYn" value="Y"/>교환가능</label>
-						<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" value="Y"/>무료반품</label>
-						<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" value="Y"/>무료교환</label> -->
-					</td>
-					<th>담당MD</th>
-					<td>
-						<select  name="mdId" id="mdId">
-							<option value="">[전체]</option>
-							<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th>판매가</th>
-					<td>
-						<input type="text" class="w90" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
-					</td>
-					<th>할인율</th>
-					<td>
-						<input type="text" class="w70" name="dcRateSt" id="dcRateSt" maxlength="3" data-valid-type="numeric"/> % ~ <input type="text" class="w70" name="dcRateEd" id="dcRateEd" maxlength="3" data-valid-type="numeric"/> %
-					</td>
-				</tr>
-				<tr>
-					<th>발생일<em class="required" title="필수"></em></th>
-					<td colspan="7" id="sellTermsP"></td>
-				</tr>
-			</table>
-			<ul class="panelBar">
-				<li class="center">
-					<button type="button" class="btn btn-gray btn-lg" id="btnPopupGoodsInit" >초기화</button>
-					<button type="button" class="btn btn-info btn-lg" id="btnPopupGoodsSearch" >조회</button>
+							</td>
+						</tr>
+					</table>
 				</li>
 			</ul>
-		</div>	
-			
-			<ul class="panelBar">
-				<li>검색 결과 : <em><span id="gridRowTotalCount">0</span></em>개가 검색되었습니다.
-				<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
-				</li>
-				<li class="right">
-					<select class="w100" name="pageSize" id="pageSize">
-						<option value="50" selected>50개</option>
-						<option value="100">100개</option>
-						<option value="500">500개</option>
-					</select>
-					<span class="btnRight" style="margin-top: 4px;">쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;</span>
-				</li>
-			</ul>
-			<div id="gridPopupGoodsList" style="width: 100%; height: 400px;" class="ag-theme-balham lh60"></div>
 			<!-- 버튼 배치 영역 -->
-			<ul class="panelBar">
-				<li class="center">
-					<div class="tablePaging" id="goodsPopupListPagination"></div>
-				</li>
-			</ul>
 			<ul class="panelBar">
 				<li class="right">
-					<button type="button" class="btnRight btn btn-base btn-lg" id="btnPopupGoodsApply">적용</button>
+					<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>
-			</form>
 			<!-- //버튼 배치 영역 -->
 		</div>
+		<!-- 등록/수정 -->
+		</form>
 	</div>
-<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+
+<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 sessRoleCd = [[${sessionInfo.roleCd}]];
-	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
-	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
-	var seasonList = gagajf.convertToArray([[${seasonList}]]);
-	var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
-	
-	var popupGoodsColumnDefs = [
-		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
-		{headerName: 'No', width: 60, cellClass: 'text-center',
-			valueGetter: function(params) { return cfnGridNumner('goodsPopupForm',params.node.rowIndex, 'A');}
-		},
-		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
-			,cellRenderer: function(params) {
-				if (params.data.imgType == "G030_A"){
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}
-				}else{
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}	
-				}
-			}
-		},
-		{headerName: "브랜드", field: "brandCd", width: 100, cellClass: 'text-center'},
-		{headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
-		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
-		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'},
-		{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-left'},
-		{headerName: "재고", field: "stockQtySum", width: 80, cellClass: 'text-right',
-			valueFormatter: function(params) {	return params.value.addComma();}
-		},
-		{headerName: "상품상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
-			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
-			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
-			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
-		},
-		{headerName: "15일간판매수량", field: "sellDay15Qty", width: 120, cellClass: 'text-right',
-			valueFormatter: function(params) {	return params.value.addComma();}
-		},
-		{headerName: "년도", field: "styleYear" , width: 90, cellClass: 'text-center'},
-		{headerName: "시즌", field: "seasonCd" , width: 90, cellClass: 'text-center',
-			cellEditorParams: { values: gagaAgGrid.extractValues(seasonList) },
-			valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
-			valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
-		},
-		{headerName: "정상가", field: "listPrice" , width: 100, cellClass: 'text-right'
-			,valueFormatter: function(params) {return params.value.addComma();},
-			cellEditor: 'textCellEditor',
-			cellEditorParams: { maxlength: 14, validType: 'numeric'}
-		},
-		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
-			,valueFormatter: function(params) {return params.value.addComma();},
-			cellEditor: 'textCellEditor',
-			cellEditorParams: { maxlength: 14, validType: 'numeric'}
-		},
-		{headerName: "할인율", field: "dcRate" , width: 90, cellClass: 'text-right'},
-		{headerName: "가격변경일", field: "priceUpdDt", width: 150, cellClass: 'text-center',
-			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
-			}
+
+	var columnNoticeDefs = [
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "공지번호", field: "noticeSq", width: 90, cellClass: 'text-center'},
+		{headerName: "공지제목", field: "noticeTitle", width: 500,
+			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
 		},
-		{headerName: "이월구분", field: "formalGb", width: 100, cellClass: 'text-center',
-			cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
-			valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
-			valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
+		{headerName: "공지시작일", field: "noticeStdt", width:150, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
 		},
-		{headerName: "반품가능", field: "returnableYn" , width: 90, 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: "noticeEddt", width:150, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
 		},
-		{headerName: "수정자", field: "updNm" , width: 100, cellClass: 'text-center'}
+		{headerName: "사용여부", field: "useYn", width:90, cellClass: 'text-center'},
+		{headerName: "등록자", field: "regNm", width:90, cellClass: 'text-center'},
+		{headerName: "등록일자", field: "regDt", width:150, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
+		}
+	];
+	
+	var columnNoticeGoodsDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
+		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
+		{headerName: "상품명", field: "goodsNm", width: 260, cellClass: 'text-left'}
 	];
 
-	// Get GridOptions
-	var popupGoodsGridOptions = gagaAgGrid.getGridOptions(popupGoodsColumnDefs);
-
-	// Add on options
-	popupGoodsGridOptions.suppressRowClickSelection = true;
-	popupGoodsGridOptions.rowSelection = 'multiple';
-
-	popupGoodsGridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+	var gridNoticeOptions = gagaAgGrid.getGridOptions(columnNoticeDefs);
+	var gridNoticeGoodsOptions = gagaAgGrid.getGridOptions(columnNoticeGoodsDefs);
 
-	popupGoodsGridOptions.getRowStyle = function(params) {
-		if ("G008_00" == params.data.goodsStat  || "G008_10" == params.data.goodsStat || "G008_20" == params.data.goodsStat || "G008_30" == params.data.goodsStat) {
-			return { background: '#23c6c8' };
+	gridNoticeGoodsOptions.rowSelection = 'multiple';
+	gridNoticeGoodsOptions.suppressRowClickSelection = true;
+	
+	// Cell click
+	gridNoticeOptions.onCellClicked = function(event) {
+		if (event.colDef.field != 'noticeTitle')
+			return;
+		
+		$('#goodsNoticeForm input[name=noticeSq]').val(event.data.noticeSq);
+		if (event.data.useYn == 'Y') {
+			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').prop('checked', true);
+			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').parent("label").addClass("checked");
+		} else {
+			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').prop('checked', false);
+			$('#goodsNoticeForm input:checkbox[name=chkUseYn]').parent("label").removeClass("checked");
 		}
-	}
-
-	// 초기화클릭시
-	$('#btnPopupGoodsInit').on('click', function() {
-		$('#goodsPopupForm')[0].reset();
-		//$("#goodsPopupForm input[type=radio]").removeClass("checked");
-		$("#goodsPopupForm input[type=checkbox]").removeClass("checked");
-		//$("#goodsPopupForm input[type=radio]").parent("label").removeClass("checked");
-		$("#goodsPopupForm input[type=checkbox]").parent("label").removeClass("checked");
-		$("#goodsPopupForm input[type=radio][checked]").parent("label").addClass("checked");
-	});
-
-	// 조회클릭시
-	$('#btnPopupGoodsSearch').on('click', function() {
-		fnPopupGoodsSearch();
-	});
-
-
-	// 조회
-	var fnPopupGoodsSearch = function() {
-
-		var formId = '#goodsPopupForm';
-		// Fetch data
-		//gagaAgGrid.fetch($(formId).prop('action'), popupGoodsGridOptions, formId, fnPopupGoodsSearchCallBack);
-
-		if(!fnPopupGoodsConditionCheck()) return;
+		
+		$('#goodsNoticeForm input[name=noticeStdt]').val(event.data.noticeStdt);
+		$('#goodsNoticeForm input[name=noticeEddt]').val(event.data.noticeEddt);
+		$('#goodsNoticeForm input[name=noticeTitle]').val(event.data.noticeTitle);
 
-		gagaPaging.init('goodsPopupForm', fnPopupGoodsSearchCallBack, 'goodsPopupListPagination', $('#goodsPopupForm').find('#pageSize').val());
-		gagaPaging.load(1);
+		// 공지내용. Summernote에 값 세팅
+		gagaSn.setContents('#noticeContent', event.data.noticeContent);
 
+		// 상품 목록
+		fnGetNoticeGoodsList(event.data.noticeSq);
 	}
 
+	// 검색
+	$('#btnSearch').on('click', function() {
+		if(!fnConditionCheck()) return;
+		gagaAgGrid.fetch($('#searchForm').prop('action'), gridNoticeOptions, '#searchForm');
+	});
+	
 	//검색 조건 확인
-	var fnPopupGoodsConditionCheck = function(){
-		var formId = '#goodsPopupForm';
-		var form = document.goodsPopupForm;
-
-		if($("#goodsPopupForm input[name=searchGb]").val() == "EXCEL") return true;
+	var fnConditionCheck = function(){
+		var formId = '#searchForm';
+		var form = document.searchForm;
 
 		var searchFlag = false;
 		var cnt = 0;
 
-		if( !gagajf.isNull($("#goodsPopupForm select[name=supplyCompCd]").val())
-				|| !gagajf.isNull($("#goodsPopupForm textarea[name=condition]").val())
-				|| (!gagajf.isNull($("#goodsPopupForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=edDate]").val())
-				|| !gagajf.isNull($("#goodsPopupForm select[name=brandGrpNm]").val())
-
-				)
-			){
-			searchFlag = true;
-		}else{
-			/* for (i = 0; i < form.elements.length; i++ ) {
-				var el = form.elements[i];
+		for (i = 0; i < form.elements.length; i++ ) {
+			var el = form.elements[i];
 
-				if ((el.getAttribute("type") == "text" || el.getAttribute("type") == "select-one") || el.name== "supplyCompCd") {
-					if (!(el.value == null || el.value == "")) {
-						cnt++;
-					}
+			if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
+				if (!(el.value == null || el.value == "")) {
+					cnt++;
 				}
 			}
-
-			if(cnt > 0) searchFlag = true; */
 		}
+			
+		if(cnt > 0) searchFlag = true;
 
 		if(searchFlag == false){
 			mcxDialog.alert("검색조건을 입력하세요.");
 			return false;
 		}
-
-		if(!gagajf.isNull($("#goodsPopupForm input[name=currPriceSt]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=currPriceEd]").val())){
-			if (Number($("#goodsPopupForm input[name=currPriceSt]").val().removeComma()) > Number($("#goodsPopupForm input[name=currPriceEd]").val().removeComma()) ){
-				mcxDialog.alertC("판매가를 확인해 주세요.", {
-					sureBtnText: "확인",
-					sureBtnClick: function() {
-						$("#goodsPopupForm input[name=currPriceEd]").focus();
-					}
-				});
-				return false;
-			}
-		}
-
-		if(!gagajf.isNull($("#goodsPopupForm input[name=dcRateSt]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=dcRateEd]").val())){
-			if (Number($("#goodsPopupForm input[name=dcRateSt]").val().removeComma()) > Number($("#goodsPopupForm input[name=dcRateEd]").val().removeComma()) ){
-				mcxDialog.alertC("할인율를 확인해 주세요.", {
-					sureBtnText: "확인",
-					sureBtnClick: function() {
-						$("#goodsPopupForm input[name=dcRateEd]").focus();
-					}
-				});
-				return false;
-			}
-		}
-
-		var fromDate = $('#goodsPopupForm input[name=stDate]').val();
-		var toDate = $('#goodsPopupForm input[name=edDate]').val();
-
+		
+		var fromDate = $('#searchForm input[name=stDate]').val();
+		var toDate = $('#searchForm input[name=edDate]').val();
+		
 		if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
-
+			
 			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
-				mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
+				mcxDialog.alertC("공지기간 조회시 시작일자와 종료일자를 입력하세요.", {
 					sureBtnText: "확인",
-					sureBtnClick: function() {
-						$('#goodsPopupForm input[name=stDate]').focus();
+					sureBtnClick: function(){
+						$('#searchForm input[name=stDate]').focus();
 					}
 				});
 				return false;
 			}
 
 			if (fromDate > toDate) {
-				mcxDialog.alertC("노출기간 시작일자는 종료일자 보다 클 수 없습니다.", {
+				mcxDialog.alertC("공지기간 시작일자는 종료일자 보다 클 수 없습니다.", {
 					sureBtnText: "확인",
-					sureBtnClick: function() {
-						$('#goodsPopupForm input[name=stDate]').focus();
+					sureBtnClick: function(){
+						$('#goodsNoticeForm input[name=stDate]').focus();
 					}
 				});
 				return false;
-			}
+			} 
 		}
 
 		return true;
 	}
-	var fnPopupGoodsSearchCallBack = function(result) {
-
-		if (!gagajf.isNull(result.couponGoodsList)) {
-			PopupCouponGoodsList = result.couponGoodsList;
-		}
-
-		$('#goodsPopupForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
-		$('#goodsPopupForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
-		$('#goodsPopupForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
-		$('#goodsPopupForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
-		popupGoodsGridOptions.api.setRowData(result.goodsList);
-		gagaPaging.createPagination(result.pageing.pageable);
-
+	
+	// 상품 목록 조회
+	var fnGetNoticeGoodsList = function(noticeSq) {
+		var actionUrl = '/goods/notice/goods/list/' + noticeSq;
+		gagaAgGrid.fetch(actionUrl, gridNoticeGoodsOptions);
 	}
+	
+	//업체변경시
+	$('#searchForm select[name=supplyCompCd]').on('change', function() {
+		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
 
-	// 적용버튼 클릭시
-	$('#btnPopupGoodsApply').on('click', function() {
-		var callback = [[${params.callBackFun}]];
-		//console.log(callback);
-		var selectedData = popupGoodsGridOptions.api.getSelectedRows();
-
-		if(selectedData.length == 0){
-			mcxDialog.alert("선택된 데이터가 없습니다.");
-			return false;
+		if(sessRoleCd == "G001_B000"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
 		}
+		$("#searchForm select[name=brandCd] option:gt(0)").remove();
 
-		var jsonData = JSON.stringify(selectedData);
-
-		if( typeof callback != 'undefined' && callback){
+		cfnCreateCombo(actionUrl, $('#searchForm select[name=brandCd]'), "[전체]", "");
+	});	
+	
+	//엑셀 상품 조회
+	$('#btnSearchExcel').on('click', function() {
+		cfnExcelUploadPopup('goodsNoticeExcelUpload', 'goodsNoticeExcelUpload');
+	});
 
-			if (typeof callback == 'function') {
-				callback(jsonData);
-			}else{
-				if( callback ) {
-					if( callback.indexOf("(") == -1 ) eval( callback +"(" + jsonData+")");
-					else eval( callback(jsonData) );
+	var goodsNoticeExcelUpload = function(result){
+		var data = {procJob : result.procJob
+			,excelFileNm : result.excelFileNm
+		};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnGoodsNoticeExcelUploadCallBack);
+	}
+	
+	var fnGoodsNoticeExcelUploadCallBack = function(result){
+		gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnExcelSearchCallBack);
+	}
+	
+	// 상품 엑셀 조회 콜백함수
+	var fnExcelSearchCallBack = function(result) {
+		if (result.goodsExcelList.length < 1) return;
+		var oldData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
+		$.each(result.goodsExcelList, function(idx, item) {
+			var isInvalid = false;
+			if (oldData != null && oldData.length != 0){
+				oldData.forEach(function(oneData){
+					if(oneData.goodsCd == item.goodsCd){
+						isInvalid = true;
+						return true;
+					}
+				});
+				if(isInvalid){
+					return isInvalid;
 				}
 			}
-			//uiPopupClose('goodsPopupForm');
-		}
+			gagaAgGrid.addRowData(gridNoticeGoodsOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "crud" : "C"});
+		});
+		return;
+	};
+	
+	// 상품 조회 클릭 시
+	$('#btnSearchGoods').on('click', function() {
+		cfnOpenGoodsPopup('fnSearchCallBack');
 	});
 
-	//업체변경시
-	$('#goodsPopupForm select[name=supplyCompCd]').on('change', function() {
-		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
-
-		if(sessRoleCd == "G001_B000"){
-			actionUrl = '/renderer/brand/AuthBrandlist';
+	// 상품 조회 콜백함수
+	var fnSearchCallBack = function(result) {
+		if (result.length < 1) return;
+		var oldData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
+		$.each(result, function(idx, item) {
+			var isInvalid = false;
+			if (oldData != null && oldData.length != 0){
+				oldData.forEach(function(oneData){
+					if(oneData.goodsCd == item.goodsCd){
+						isInvalid = true;
+						return true;
+					}
+				});
+				if(isInvalid){
+					return isInvalid;
+				}
+			}
+			gagaAgGrid.addRowData(gridNoticeGoodsOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "crud" : "C"});
+		});
+		return;
+	};
+	
+	// 상품 삭제
+	$('#btnDeleteNoticeGoods').on('click', function() {
+		
+		var selectedData = gridNoticeGoodsOptions.api.getSelectedRows();
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 행이 없습니다.');
+			return;
 		}
-		//$("#goodsPopupForm select[name=brandCd] option:gt(0)").remove();
-		//cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=brandCd]'), "[전체]", brandCd);
 		
-		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
-	});
-	
-	// 자사/입점 변경여부
-	$("#goodsPopupForm input[name=selfYn]").bind('click change', function () {
-		var radioValue = $(this).val();
-		var selfGb = "S";	// 자사 공급 업체
-		if (radioValue == "N"){
-			selfGb = "E";	//입점 공급업체
+		var removedData = gagaAgGrid.removeRowData(gridNoticeGoodsOptions, false);
+		
+		// 신규 상세 공지일경우 화면에서만 삭제
+		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeSq]').val())){
+			return;
 		}
 		
-		var actionUrl = '/renderer/supply/company/list/'+ selfGb;
-
-		$('#goodsPopupForm').find('#multiBrand').empty();
-		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
-
-		cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=supplyCompCd]'), "[전체]", "");
+		var arrGoodsCd = [];
+		$.each(selectedData, function(idx, item) {
+			arrGoodsCd.push(item.goodsCd);
+		});
 		
+		mcxDialog.confirm('삭제하시겠습니까?',  {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var data = {arrGoodsCd : arrGoodsCd
+							,noticeSq : $('#goodsNoticeForm input[name=noticeSq]').val()
+			};
+			
+			var jsonData = JSON.stringify(data);
+			gagajf.ajaxJsonSubmit('/goods/notice/goods/delete', jsonData);
+			}
+		});
 	});
+	
+	// 신규 버튼 클릭
+	$("#btnNew").on("click", function(){
+		$('#goodsNoticeForm')[0].reset();
+		
+		// 공지내용. Summernote에 값 세팅
+		gagaSn.setContents('#noticeContent', "");
+
+		// 그리드 초기화
+		gridNoticeGoodsOptions.api.setRowData(null);
+		 
+		$('#goodsNoticeForm input[name=noticeSq]').val('');
+		$('#goodsNoticeForm input[name=noticeStdt]').val(_today);
+		$('#goodsNoticeForm input[name=noticeEddt]').val(_today);
+	});
+	
+	// 저장
+	$("#btnSave").on("click", function() {
+		// 날짜 체크
+		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeStdt]').val())) {
+			mcxDialog.alertC('공지시작일자를 입력해 주세요.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#goodsNoticeForm input[name=noticeStdt]').focus();
+				}
+			});
+			return;
+		}
 
-	$(document).ready(function() {
-		cfnCreateCalendar('#sellTermsP', 'stDate', 'edDate', true, '등록일', 'X');
+		if (gagajf.isNull($('#goodsNoticeForm input[name=noticeEddt]').val())) {
+			mcxDialog.alertC('공지종료일자를 입력해 주세요.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#goodsNoticeForm input[name=noticeEddt]').focus();
+				}
+			});
+			return;
+		}
+		var stDate = $('#goodsNoticeForm input[name=noticeStdt]').val().toDate('YYYY-MM-DD');
+		var edDate = $('#goodsNoticeForm input[name=noticeEddt]').val().toDate('YYYY-MM-DD');
 
-		var selectCode = '<select  name="dateGbn" id="dateGbn"  class="w100">';
-		selectCode += '<option value="R" seledted>상품등록일</option>';
-		selectCode += '<option value="P">가격변경일</option>';
-		selectCode += '<option value="S">최초승인일</option>';
-		selectCode += '</select>';
+		if (stDate > edDate) {
+			mcxDialog.alert("공지기간 종료일자는 시작일자 보다 클 수 없습니다.");
+			return;
+		}
 
-		$("#goodsPopupForm").find('#sellTermsP').prepend(selectCode);
+		// validation
+		if (!gagajf.validation('#goodsNoticeForm'))
+			return false;
 
+		$('#goodsNoticeForm input[name=useYn]').val($('#goodsNoticeForm input:checkbox[name=chkUseYn]').is(":checked") ? 'Y' : 'N');
+
+		mcxDialog.confirm('저장하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				
+				//var goodsAllData = gagaAgGrid.getAllRowData(gridNoticeGoodsOptions);
+				var goodsAllData = gagaAgGrid.getChangedData(gridNoticeGoodsOptions);
+				
+				var jsonGoodsData = JSON.stringify(goodsAllData);
+				$('#goodsNoticeForm input[name=goodsList]').val(jsonGoodsData);
+				
+				var jsonData = JSON.stringify($('#goodsNoticeForm').serializeObject());
+				gagajf.ajaxJsonSubmit($('#goodsNoticeForm').prop('action'), jsonData, function() {
+					$('#btnSearch').trigger('click');
+					//fnGetNoticeGoodsList($('#goodsNoticeForm input[name=noticeSq]').val());
+					
+				});
+			}
+		});
+	});
+	
+	$(document).ready(function() {
+		
+		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '공지일', 'X');
+		
 		// Create a agGrid
-		gagaAgGrid.createGrid('gridPopupGoodsList', popupGoodsGridOptions);
+		gagaAgGrid.createGrid('gridNoticeList', gridNoticeOptions);
+		gagaAgGrid.createGrid('gridNoticeGoodsList', gridNoticeGoodsOptions);
+		
+		// Create a summernote
+		var snOptions = gagaSn.getToolbarOptions('media');
+		gagaSn.createSummernote(snOptions, '#noticeContent');
 		
-		// 입점 사용자 브랜드 조회 처리
-		if(sessRoleCd == "G001_B000"){
-			actionUrl = '/renderer/brand/AuthBrandlist';
-			cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
-		}
-
 	});
-
+	
 /*]]>*/
 </script>
-</html>
+
+</html>