Bladeren bron

공지사항 팝업여부와 팝업노출기간 칼럼 추가에 따른 수정

gagamel 5 jaren geleden
bovenliggende
commit
bf94b9abab

+ 3 - 1
style24.admin/src/main/java/com/style24/persistence/domain/Notice.java

@@ -26,6 +26,9 @@ public class Notice extends TscBaseDomain {
 	private String noticeStdt;		// 공지시작일시
 	private String noticeEddt;		// 공지종료일시
 	private int readCnt;			// 조회수
+	private String popupYn;			// 팝업여부
+	private String popupDispStdt;	// 팝업노출시작일시
+	private String popupDispEddt;	// 팝업노출종료일시
 	private String useYn;			// 사용여부
 
 	// 검색용
@@ -51,7 +54,6 @@ public class Notice extends TscBaseDomain {
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] sysFileNms;
 
-
 	private String goodsList;
 	private Collection<NoticeGoods> goodsListNew;
 

+ 186 - 174
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaNotice.xml

@@ -1,175 +1,187 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.style24.admin.biz.dao.TsaNoticeDao">
-
-	<!-- 공지사항 목록 -->
-	<select id="getNoticeList" parameterType="Notice" resultType="Notice">
-		/* TsaNotice.getNoticeList */
-		SELECT A.NOTICE_SQ                                         /*공지번호*/
-		     , A.NOTICE_TYPE                                       /*공지유형*/
-		     , A.URGENT_YN                                         /*긴급여부*/
-		     , A.NOTICE_TITLE                                      /*공지제목*/
-		     , A.NOTICE_CONTENT                                    /*공지내용*/
-		     , IFNULL((SELECT COUNT(*)
-		               FROM   TB_NOTICE_FILE
-		               WHERE  NOTICE_SQ = A.NOTICE_SQ
-		              ),0)                          AS FILE_CNT    /*파일건수*/
-		     , DATE_FORMAT(A.NOTICE_STDT,'%Y%m%d')  AS NOTICE_STDT /*공지시작일자*/
-		     , DATE_FORMAT(A.NOTICE_EDDT,'%Y%m%d')  AS NOTICE_EDDT /*공지종료일자*/
-		     , A.USE_YN                                            /*사용여부*/
-		     , A.READ_CNT                                          /*조회수*/
-		     , 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_NOTICE A
-		WHERE  A.NOTICE_TYPE = #{noticeType}
-		<if test="startDt != null and startDt !=''">
-		AND    A.REG_DT <![CDATA[>=]]> STR_TO_DATE(#{startDt},'%Y-%m-%d')
-		</if>
-		<if test="startDt != null and startDt !='' and endDt != null and endDt != ''">
-		AND    A.REG_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{endDt},'%Y-%m-%d'),INTERVAL 1 DAY)
-		</if>
-		<if test='useYn != null and useYn !=""'>
-		AND    A.USE_YN = #{useYn}
-		</if>
-		<if test="noticeTitle != null and noticeTitle !=''">
-		AND    LOWER(A.NOTICE_TITLE) LIKE CONCAT('%',LOWER(#{noticeTitle}),'%')
-		</if>
-		<if test='receiverId != null and receiverId !=""'>
-		AND    A.NOTICE_SQ IN (SELECT NOTICE_SQ
-		                       FROM   TB_NOTICE_RECEIVER
-		                       WHERE  RECEIVER_ID = #{receiverId}
-		                      )
-		</if>
-		ORDER  BY A.URGENT_YN DESC, A.NOTICE_SQ DESC
-	</select>
-
-	<!-- 공지사항 수신자 목록 -->
-	<select id="getNoticeReceiverList" parameterType="Integer" resultType="Notice">
-		/* TsaNotice.getNoticeReceiverList */
-		SELECT RECEIVER_ID
-		FROM   TB_NOTICE_RECEIVER
-		WHERE  NOTICE_SQ = #{noticeSq}
-	</select>
-
-	<!-- 공지사항 파일 목록 -->
-	<select id="getNoticeFileList" parameterType="Integer" resultType="Notice">
-		/* TsaNotice.getNoticeFileList */
-		SELECT NOTICE_SQ
-		     , SEQ
-		     , ORG_FILE_NM
-		     , SYS_FILE_NM
-		FROM   TB_NOTICE_FILE
-		WHERE  NOTICE_SQ = #{noticeSq}
-	</select>
-
-	<!-- 공지사항 저장 -->
-	<insert id="createNotice" parameterType="Notice" keyProperty="noticeSq">
-		/* TsaNotice.createNotice */
-		INSERT INTO TB_NOTICE (
-		       NOTICE_SQ
-		     , NOTICE_TYPE
-		     , NOTICE_TITLE
-		     , NOTICE_STDT
-		     , NOTICE_EDDT
-		     , NOTICE_CONTENT
-		     , URGENT_YN
-		     , USE_YN
-		     , READ_CNT
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       NULL
-		     , #{noticeType}
-		     , #{noticeTitle}
-		     , STR_TO_DATE(#{noticeStdt},'%Y-%m-%d')
-		     , STR_TO_DATE(#{noticeEddt},'%Y-%m-%d')
-		     , #{noticeContent}
-		     , IFNULL(#{urgentYn},'N')
-		     , #{useYn}
-		     , IFNULL(#{readCnt},0)
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-	</insert>
-
-	<!-- 공지사항 수정 -->
-	<update id="updateNotice" parameterType="Notice">
-		/* TsaNotice.updateNotice */
-		UPDATE TB_NOTICE
-		SET    NOTICE_TITLE = #{noticeTitle}
-		     , NOTICE_CONTENT = #{noticeContent}
-		     , NOTICE_STDT = STR_TO_DATE(#{noticeStdt},'%Y-%m-%d')
-		     , NOTICE_EDDT = STR_TO_DATE(#{noticeEddt},'%Y-%m-%d')
-		     , URGENT_YN = IFNULL(#{urgentYn},'N')
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-		WHERE  NOTICE_SQ = #{noticeSq}
-	</update>
-
-	<!-- 공지사항 수신자 삭제 -->
-	<delete id="deleteNoticeReceiver" parameterType="Notice">
-		/* TsaNotice.deleteNoticeReceiver */
-		DELETE FROM TB_NOTICE_RECEIVER
-		WHERE  NOTICE_SQ = #{noticeSq}
-	</delete>
-
-	<!--공지사항 수신자 등록 -->
-	<insert id="createNoticeReceiver" parameterType="Notice">
-		/* TsaNotice.createNoticeReceiver */
-		INSERT INTO TB_NOTICE_RECEIVER (
-		       NOTICE_SQ
-		     , RECEIVER_ID
-		     , REG_NO
-		     , REG_DT
-		)
-		VALUES (
-		       #{noticeSq}
-		     , #{receiverId}
-		     , #{regNo}
-		     , NOW()
-		)
-	</insert>
-
-	<!-- 공지사항 파일 삭제 -->
-	<delete id="deleteNoticeFile" parameterType="Notice">
-		/* TsaNotice.deleteNoticeFile */
-		DELETE FROM TB_NOTICE_FILE
-		WHERE  NOTICE_SQ = #{noticeSq}
-		<if test="seq != null and seq !=''">
-		AND    SEQ = #{seq}
-		</if>
-	</delete>
-
-	<!-- 공지사항 파일 저장 -->
-	<insert id="createNoitceFlie" parameterType="Notice">
-		/* TsaNotice.createNoitceFlie */
-		INSERT INTO TB_NOTICE_FILE (
-		       NOTICE_SQ
-		     , SEQ
-		     , ORG_FILE_NM
-		     , SYS_FILE_NM
-		     , REG_NO
-		     , REG_DT
-		)
-		VALUES (
-		       #{noticeSq}
-		     , IFNULL((SELECT MAX(SEQ)
-		               FROM   TB_NOTICE_FILE
-		               WHERE  NOTICE_SQ = #{noticeSq}
-		              ),0) + 1
-		     , #{orgFileNm}
-		     , #{sysFileNm}
-		     , #{regNo}
-		     , NOW()
-		)
-	</insert>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.style24.admin.biz.dao.TsaNoticeDao">
+
+	<!-- 공지사항 목록 -->
+	<select id="getNoticeList" parameterType="Notice" resultType="Notice">
+		/* TsaNotice.getNoticeList */
+		SELECT A.NOTICE_SQ                                                /*공지번호*/
+		     , A.NOTICE_TYPE                                              /*공지유형*/
+		     , A.URGENT_YN                                                /*긴급여부*/
+		     , A.NOTICE_TITLE                                             /*공지제목*/
+		     , A.NOTICE_CONTENT                                           /*공지내용*/
+		     , IFNULL((SELECT COUNT(*)
+		               FROM   TB_NOTICE_FILE
+		               WHERE  NOTICE_SQ = A.NOTICE_SQ
+		              ),0)                             AS FILE_CNT        /*파일건수*/
+		     , DATE_FORMAT(A.NOTICE_STDT,'%Y%m%d')     AS NOTICE_STDT     /*공지시작일자*/
+		     , DATE_FORMAT(A.NOTICE_EDDT,'%Y%m%d')     AS NOTICE_EDDT     /*공지종료일자*/
+		     , A.USE_YN                                                   /*사용여부*/
+		     , A.READ_CNT                                                 /*조회수*/
+		     , A.POPUP_YN                                                 /*팝업여부*/
+		     , DATE_FORMAT(A.POPUP_DISP_STDT,'%Y%m%d') AS POPUP_DISP_STDT /*팝업노출시작일자*/
+		     , DATE_FORMAT(A.POPUP_DISP_EDDT,'%Y%m%d') AS POPUP_DISP_EDDT /*팝업노출종료일자*/
+		     , 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_NOTICE A
+		WHERE  A.NOTICE_TYPE = #{noticeType}
+		<if test="startDt != null and startDt !=''">
+		AND    A.REG_DT <![CDATA[>=]]> STR_TO_DATE(#{startDt},'%Y-%m-%d')
+		</if>
+		<if test="startDt != null and startDt !='' and endDt != null and endDt != ''">
+		AND    A.REG_DT <![CDATA[<]]> DATE_ADD(STR_TO_DATE(#{endDt},'%Y-%m-%d'),INTERVAL 1 DAY)
+		</if>
+		<if test='useYn != null and useYn !=""'>
+		AND    A.USE_YN = #{useYn}
+		</if>
+		<if test="noticeTitle != null and noticeTitle !=''">
+		AND    LOWER(A.NOTICE_TITLE) LIKE CONCAT('%',LOWER(#{noticeTitle}),'%')
+		</if>
+		<if test='receiverId != null and receiverId !=""'>
+		AND    A.NOTICE_SQ IN (SELECT NOTICE_SQ
+		                       FROM   TB_NOTICE_RECEIVER
+		                       WHERE  RECEIVER_ID = #{receiverId}
+		                      )
+		</if>
+		ORDER  BY A.URGENT_YN DESC, A.NOTICE_SQ DESC
+	</select>
+
+	<!-- 공지사항 수신자 목록 -->
+	<select id="getNoticeReceiverList" parameterType="Integer" resultType="Notice">
+		/* TsaNotice.getNoticeReceiverList */
+		SELECT RECEIVER_ID
+		FROM   TB_NOTICE_RECEIVER
+		WHERE  NOTICE_SQ = #{noticeSq}
+	</select>
+
+	<!-- 공지사항 파일 목록 -->
+	<select id="getNoticeFileList" parameterType="Integer" resultType="Notice">
+		/* TsaNotice.getNoticeFileList */
+		SELECT NOTICE_SQ
+		     , SEQ
+		     , ORG_FILE_NM
+		     , SYS_FILE_NM
+		FROM   TB_NOTICE_FILE
+		WHERE  NOTICE_SQ = #{noticeSq}
+	</select>
+
+	<!-- 공지사항 저장 -->
+	<insert id="createNotice" parameterType="Notice" keyProperty="noticeSq">
+		/* TsaNotice.createNotice */
+		INSERT INTO TB_NOTICE (
+		       NOTICE_SQ
+		     , NOTICE_TYPE
+		     , NOTICE_TITLE
+		     , NOTICE_STDT
+		     , NOTICE_EDDT
+		     , NOTICE_CONTENT
+		     , URGENT_YN
+		     , USE_YN
+		     , READ_CNT
+		     , POPUP_YN
+		     , POPUP_DISP_STDT
+		     , POPUP_DISP_EDDT
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       NULL
+		     , #{noticeType}
+		     , #{noticeTitle}
+		     , STR_TO_DATE(#{noticeStdt},'%Y-%m-%d')
+		     , STR_TO_DATE(#{noticeEddt},'%Y-%m-%d')
+		     , #{noticeContent}
+		     , IFNULL(#{urgentYn},'N')
+		     , #{useYn}
+		     , IFNULL(#{readCnt},0)
+		     , IFNULL(#{popupYn},'N')
+		     , STR_TO_DATE(#{popupDispStdt},'%Y-%m-%d')
+		     , STR_TO_DATE(#{popupDispEddt},'%Y-%m-%d')
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+	</insert>
+
+	<!-- 공지사항 수정 -->
+	<update id="updateNotice" parameterType="Notice">
+		/* TsaNotice.updateNotice */
+		UPDATE TB_NOTICE
+		SET    NOTICE_TITLE = #{noticeTitle}
+		     , NOTICE_CONTENT = #{noticeContent}
+		     , NOTICE_STDT = STR_TO_DATE(#{noticeStdt},'%Y-%m-%d')
+		     , NOTICE_EDDT = STR_TO_DATE(#{noticeEddt},'%Y-%m-%d')
+		     , URGENT_YN = IFNULL(#{urgentYn},'N')
+		     , POPUP_YN = IFNULL(#{popupYn},'N')
+		     , POPUP_DISP_STDT = STR_TO_DATE(#{popupDispStdt},'%Y-%m-%d')
+		     , POPUP_DISP_EDDT = STR_TO_DATE(#{popupDispEddt},'%Y-%m-%d')
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+		WHERE  NOTICE_SQ = #{noticeSq}
+	</update>
+
+	<!-- 공지사항 수신자 삭제 -->
+	<delete id="deleteNoticeReceiver" parameterType="Notice">
+		/* TsaNotice.deleteNoticeReceiver */
+		DELETE FROM TB_NOTICE_RECEIVER
+		WHERE  NOTICE_SQ = #{noticeSq}
+	</delete>
+
+	<!--공지사항 수신자 등록 -->
+	<insert id="createNoticeReceiver" parameterType="Notice">
+		/* TsaNotice.createNoticeReceiver */
+		INSERT INTO TB_NOTICE_RECEIVER (
+		       NOTICE_SQ
+		     , RECEIVER_ID
+		     , REG_NO
+		     , REG_DT
+		)
+		VALUES (
+		       #{noticeSq}
+		     , #{receiverId}
+		     , #{regNo}
+		     , NOW()
+		)
+	</insert>
+
+	<!-- 공지사항 파일 삭제 -->
+	<delete id="deleteNoticeFile" parameterType="Notice">
+		/* TsaNotice.deleteNoticeFile */
+		DELETE FROM TB_NOTICE_FILE
+		WHERE  NOTICE_SQ = #{noticeSq}
+		<if test="seq != null and seq !=''">
+		AND    SEQ = #{seq}
+		</if>
+	</delete>
+
+	<!-- 공지사항 파일 저장 -->
+	<insert id="createNoitceFlie" parameterType="Notice">
+		/* TsaNotice.createNoitceFlie */
+		INSERT INTO TB_NOTICE_FILE (
+		       NOTICE_SQ
+		     , SEQ
+		     , ORG_FILE_NM
+		     , SYS_FILE_NM
+		     , REG_NO
+		     , REG_DT
+		)
+		VALUES (
+		       #{noticeSq}
+		     , IFNULL((SELECT MAX(SEQ)
+		               FROM   TB_NOTICE_FILE
+		               WHERE  NOTICE_SQ = #{noticeSq}
+		              ),0) + 1
+		     , #{orgFileNm}
+		     , #{sysFileNm}
+		     , #{regNo}
+		     , NOW()
+		)
+	</insert>
+
 </mapper>

+ 115 - 10
style24.admin/src/main/webapp/WEB-INF/views/board/NoticeForm.html

@@ -151,6 +151,19 @@
 							</label>
 						</td>
 					</tr>
+					<tr th:style="${noticeType == 'G047_10' ? 'display: none;' : ''}">
+						<th>팝업여부</th>
+						<td>
+							<input type="hidden" name="popupYn"/>
+							<label class="chkBox"><input type="checkbox" name="chkPopupYn" checked="checked" value="Y"/>팝업</label>
+						</td>
+						<th>팝업노출기간</th>
+						<td colspan="5">
+							<input type="text" class="schDate w100" name="popupDispStdt" maxlength="10"/>
+							~
+							<input type="text" class="schDate w100" name="popupDispEddt" maxlength="10"/>
+						</td>
+					</tr>
 					<tr>
 						<th>제목<i class="required" title="필수"></i></th>
 						<td colspan="5">
@@ -209,10 +222,10 @@
 	// 공지사항유형(10:사이트공지, 20:내부공지)
 	let noticeType = [[${noticeType}]];
 
-	let columnDefs = [
+	let columnDefs1 = [
 		{headerName: "공지번호", field: "noticeSq", width: 90, cellClass: 'text-center'},
 		{
-			headerName: "긴급공지", field: "urgentYn", width:90, cellClass: 'text-center',
+			headerName: "긴급공지", field: "urgentYn", width: 90, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? '긴급' : '일반'; }
 		},
 // 		{headerName: "사이트", field: "siteNm", width: 200, cellClass: 'text-center'},
@@ -226,24 +239,71 @@
 		},
 		{headerName: "공지내용", field: "noticeContent", width: 500, hide: true },
 		{
-			headerName: "공지시작일", field: "noticeStdt", width:120, cellClass: 'text-center',
+			headerName: "공지시작일", field: "noticeStdt", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
 		},
 		{
-			headerName: "공지종료일", field: "noticeEddt", width:120, cellClass: 'text-center',
+			headerName: "공지종료일", field: "noticeEddt", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
 		},
 		{headerName: "조회수", field: "readCnt", width:90, cellClass: 'text-center'},
-		{headerName: "사용여부", field: "useYn", width:90, cellClass: 'text-center'},
-		{headerName: "등록자", field: "regNm", width:90, cellClass: 'text-center'},
+		{headerName: "사용여부", field: "useYn", width: 90, cellClass: 'text-center'},
+		{headerName: "등록자", field: "regNm", width: 90, cellClass: 'text-center'},
 		{
-			headerName: "등록일자", field: "regDt", width:120, cellClass: 'text-center',
+			headerName: "등록일자", field: "regDt", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
+		}
+	];
+	
+	let columnDefs2 = [
+		{headerName: "공지번호", field: "noticeSq", width: 90, cellClass: 'text-center'},
+		{
+			headerName: "긴급공지", field: "urgentYn", width: 90, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value == 'Y' ? '긴급' : '일반'; }
+		},
+// 		{headerName: "사이트", field: "siteNm", width: 200, cellClass: 'text-center'},
+		{
+			headerName: "공지제목", field: "noticeTitle", width: 500,
+			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
+		},
+		{
+			headerName: "파일", field: "fileCnt", width: 50, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value > 0 ? '<i class="fa fa-folder fa-lg"></i>' : ''; }
+		},
+		{headerName: "공지내용", field: "noticeContent", width: 500, hide: true },
+		{
+			headerName: "공지시작일", field: "noticeStdt", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
+		},
+		{
+			headerName: "공지종료일", field: "noticeEddt", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
+		},
+		{headerName: "조회수", field: "readCnt", width:90, cellClass: 'text-center'},
+		{headerName: "팝업여부", field: "popupYn", width: 90, cellClass: 'text-center'},
+		{
+			headerName: "팝업노출시작일", field: "popupDispStdt", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
+		},
+		{
+			headerName: "팝업노출종료일", field: "popupDispEddt", width: 120, 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: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return gagaAgGrid.toDateFormat(params.value); }
 		}
 	];
 
-	let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
-
+	let gridOptions;
+	if (noticeType == 'G047_10') { // 사이트공지
+		gridOptions = gagaAgGrid.getGridOptions(columnDefs1);
+	} else if (noticeType == 'G047_20') { // 내부공지
+		gridOptions = gagaAgGrid.getGridOptions(columnDefs2);
+	}
+	
 	// Cell click
 	gridOptions.onCellClicked = function(event) {
 		if (event.colDef.field != 'noticeTitle')
@@ -275,6 +335,18 @@
 		$('#detailForm input[name=regNm]').val(event.data.regNm);
 		$('#detailForm input[name=regDt]').val(event.data.regDt.toDate("YYYYMMDD").format("YYYY-MM-DD"));
 		$('#detailForm input[name=noticeTitle]').val(event.data.noticeTitle);
+		
+		if (noticeType == 'G047_20') { // 내부공지
+			if (event.data.popupYn == 'Y') {
+				$('#detailForm input:checkbox[name=chkPopupYn]').prop('checked', true);
+				$("#detailForm input:checkbox[name=chkPopupYn]").parent().addClass('checked');
+			} else {
+				$('#detailForm input:checkbox[name=chkPopupYn]').prop('checked', false);
+				$("#detailForm input:checkbox[name=chkPopupYn]").parent().removeClass('checked');
+			}
+			$('#detailForm input[name=popupDispStdt]').val(event.data.popupDispStdt.toDate("YYYYMMDD").format("YYYY-MM-DD"));
+			$('#detailForm input[name=popupDispEddt]').val(event.data.popupDispEddt.toDate("YYYYMMDD").format("YYYY-MM-DD"));
+		}
 
 		// 공지내용. Summernote에 값 세팅
 		gagaSn.setContents('#noticeContent', event.data.noticeContent);
@@ -479,6 +551,38 @@
 			return;
 		}
 
+		if (noticeType == 'G047_20') { // 내부공지
+			if ($('#detailForm input:checkbox[name=chkPopupYn]').is(":checked")) {
+				if (gagajf.isNull($('#detailForm input[name=popupDispStdt]').val())) {
+					mcxDialog.alertC('팝업노출시작일자를 입력해 주세요.', {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#detailForm input[name=popupDispStdt]').focus();
+						}
+					});
+					return;
+				}
+
+				if (gagajf.isNull($('#detailForm input[name=popupDispEddt]').val())) {
+					mcxDialog.alertC('팝업노출종료일자를 입력해 주세요.', {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#detailForm input[name=popupDispEddt]').focus();
+						}
+					});
+					return;
+				}
+
+				var stDate = $('#detailForm input[name=popupDispStdt]').val().toDate('YYYY-MM-DD');
+				var edDate = $('#detailForm input[name=popupDispEddt]').val().toDate('YYYY-MM-DD');
+
+				if (stDate > edDate) {
+					mcxDialog.alert("팝업노출기간 종료일자는 시작일자 보다 클 수 없습니다.");
+					return;
+				}
+			}
+		}
+		
 		// 수신자 선택
 		if ($('#detailForm input:checkbox[name=receiverIds]').is(":checked") != true) {
 			if (noticeType == 'G047_10') { // 사이트공지
@@ -495,7 +599,8 @@
 			return false;
 
 		$('#detailForm input[name=useYn]').val($('#detailForm input:checkbox[name=chkUseYn]').is(":checked") ? 'Y' : 'N');
-
+		$('#detailForm input[name=popupYn]').val($('#detailForm input:checkbox[name=chkPopupYn]').is(":checked") ? 'Y' : 'N');
+		
 		mcxDialog.confirm('저장하시겠습니까?', {
 			cancelBtnText: "취소",
 			sureBtnText: "확인",