Przeglądaj źródła

Merge branch 'develop' of http://112.172.147.34:4936/style24/STYLE24.git into develop

gagamel 5 lat temu
rodzic
commit
4cc1dac300
53 zmienionych plików z 1186 dodań i 162 usunięć
  1. 19 0
      style24.admin/src/main/java/com/style24/admin/biz/dao/TsaMarketingDao.java
  2. 21 0
      style24.admin/src/main/java/com/style24/admin/biz/service/TsaMarketingService.java
  3. 125 3
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java
  4. 64 0
      style24.admin/src/main/java/com/style24/persistence/domain/Coupon.java
  5. 99 0
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaMarketing.xml
  6. 8 7
      style24.admin/src/main/webapp/WEB-INF/views/business/SupplyCompanySearchForm.html
  7. 3 3
      style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html
  8. 220 0
      style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponCreatePopupForm.html
  9. 267 0
      style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponListForm.html
  10. 353 148
      style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html
  11. 2 1
      style24.batch/.gitignore
  12. 1 0
      style24.core/.gitignore
  13. 4 0
      style24.front/.gitignore
  14. BIN
      style24.front/target/classes/com/style24/front/biz/dao/TsfLoginDao.class
  15. BIN
      style24.front/target/classes/com/style24/front/biz/dao/TsfNoticeDao.class
  16. BIN
      style24.front/target/classes/com/style24/front/biz/service/TsfLoginService.class
  17. BIN
      style24.front/target/classes/com/style24/front/biz/service/TsfNoticeService.class
  18. BIN
      style24.front/target/classes/com/style24/front/biz/web/TsfCustomerController.class
  19. BIN
      style24.front/target/classes/com/style24/front/biz/web/TsfIndexController.class
  20. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfMybatisShopConfig.class
  21. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfRedisSessionConfig.class
  22. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfThymeleafConfig.class
  23. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfWebMvcConfig.class
  24. BIN
      style24.front/target/classes/com/style24/front/support/controller/TsfBaseController.class
  25. BIN
      style24.front/target/classes/com/style24/front/support/controller/TsfCustomErrorController.class
  26. BIN
      style24.front/target/classes/com/style24/front/support/env/TsfConstants.class
  27. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfDormantAccountException.class
  28. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfEmailDuplicationException.class
  29. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfLockedAccountException.class
  30. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfSecedeAccountException.class
  31. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfSessionExpiredException.class
  32. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfAflinkInterceptor.class
  33. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfDefaultInterceptor.class
  34. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfGoodsViewInterceptor.class
  35. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfLoginCheckInterceptor.class
  36. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfRememberMeInterceptor.class
  37. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfReturnUrlInterceptor.class
  38. BIN
      style24.front/target/classes/com/style24/front/support/security/TsfAuthenticationProvider.class
  39. BIN
      style24.front/target/classes/com/style24/front/support/security/TsfLoginDetails.class
  40. BIN
      style24.front/target/classes/com/style24/front/support/security/config/TsfSecurityConfig.class
  41. BIN
      style24.front/target/classes/com/style24/front/support/security/filter/TsfAuthenticationFilter.class
  42. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginFailureHandler.class
  43. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginSuccessHandler.class
  44. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLogoutSuccessHandler.class
  45. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfRememberMeSuccessHandler.class
  46. BIN
      style24.front/target/classes/com/style24/front/support/security/session/TsfSession.class
  47. BIN
      style24.front/target/classes/com/style24/front/support/startup/TsfApplication.class
  48. BIN
      style24.front/target/classes/com/style24/front/support/startup/TsfServletInitializer.class
  49. BIN
      style24.front/target/classes/com/style24/persistence/TsfPageRequest.class
  50. BIN
      style24.front/target/classes/com/style24/persistence/domain/Login.class
  51. BIN
      style24.front/target/classes/com/style24/persistence/domain/Notice.class
  52. BIN
      style24.front/target/classes/com/style24/persistence/domain/PersistentToken$PersistentTokenBuilder.class
  53. BIN
      style24.front/target/classes/com/style24/persistence/domain/PersistentToken.class

+ 19 - 0
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaMarketingDao.java

@@ -1,9 +1,12 @@
 package com.style24.admin.biz.dao;
 
 import com.style24.core.support.annotation.ShopDs;
+import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.FreeGoodsPromotion;
+import com.style24.persistence.domain.Itemkind;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.Collection;
 
 /**
@@ -29,7 +32,23 @@ public interface TsaMarketingDao {
 	/* // xodud1202 진행 */
 
 	/* JSM 진행 */
+	/**
+	 * 쿠폰 리스트 조회
+	 * @param  Coupon
+	 * @return ArrayList<Coupon>
+	 * @author xyzp1539
+	 * @since 2020-12-22
+	 */
+	ArrayList<Coupon> getCouponList(Coupon param);
 
+	/**
+	 * 쿠폰 리스트 카운트 조회
+	 * @param  Coupon
+	 * @return int
+	 * @author xyzp1539
+	 * @since 2020-12-22
+	 */
+	int getCouponListCnt(Coupon param);
 	/* // JSM 진행 */
 
 }

+ 21 - 0
style24.admin/src/main/java/com/style24/admin/biz/service/TsaMarketingService.java

@@ -26,6 +26,7 @@ import org.springframework.util.StringUtils;
 
 import java.io.IOException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Collection;
 
 /**
@@ -89,7 +90,27 @@ public class TsaMarketingService {
 	/* // xodud1202 진행 */
 
 	/* JSM 진행 */
+	/**
+	 * 쿠폰 리스트 조회
+	 * @param  Coupon
+	 * @return ArrayList<Coupon>
+	 * @author xyzp1539
+	 * @since 2020-12-22
+	 */
+	public ArrayList<Coupon> getCouponList(Coupon param) {
+		return marketingDao.getCouponList(param);
+	}
 
+	/**
+	 * 쿠폰리스트 카운트 조회
+	 * @param  Coupon
+	 * @return int
+	 * @author xyzp1539
+	 * @since 2020-12-22
+	 */
+	public int getCouponListCnt(Coupon param) {
+		return marketingDao.getCouponListCnt(param);
+	}
 	/* // JSM 진행 */
 
 }

+ 125 - 3
style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -1,14 +1,15 @@
 package com.style24.admin.biz.web;
 
 import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.util.GagaDateUtil;
 import com.style24.admin.biz.service.*;
 import com.style24.admin.support.controller.TsaBaseController;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.TsaPageRequest;
+import com.style24.persistence.domain.CommonCode;
+import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.FreeGoodsPromotion;
-import com.style24.persistence.domain.SupplyCompany;
+
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
@@ -16,9 +17,10 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
+import java.lang.reflect.Array;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
-
 /**
  * 마케팅 Controller
  * @author xodud1202
@@ -99,6 +101,10 @@ public class TsaMarketingController extends TsaBaseController {
 	public ModelAndView freeGoodsRegiForm(FreeGoodsPromotion param) {
 		ModelAndView mav = new ModelAndView();
 
+		// 상품상태
+		String[] exceptCds = {"G008_00"};
+		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
+
 		mav.addObject("param", param);
 		mav.setViewName("marketing/FreeGoodsPromotionRegiForm");
 		return mav;
@@ -108,6 +114,122 @@ public class TsaMarketingController extends TsaBaseController {
 	/* // xodud1202 진행 */
 
 	/* JSM 진행 */
+	/**
+	 * 쿠폰 리스트 목록 화면
+	 * @author xyzp1539
+	 * @since 2020-12-21
+	 */
+	@GetMapping("/coupon/form")
+	public ModelAndView couponListForm(){
+		ModelAndView mav = new ModelAndView();
+
+		// 쿠폰 유형 조회
+		mav.addObject("cpnTypeList" ,  rendererService.getCommonCodeList("G230"));
+		// 할인 유형 조회
+		mav.addObject("dcWayList" , rendererService.getCommonCodeList("G240"));
+		// 사이트 조회
+		mav.addObject("siteCdList" , rendererService.getCommonCodeList("G000"));
+
+		mav.setViewName("marketing/CouponListForm");
+
+		return mav;
+	}
+
+	/**
+	 * 쿠폰 리스트 조회
+	 * @param  Coupon
+	 * @return GagaMap
+	 * @author xyzp1539
+	 * @since 2020-12-22
+	 */
+	@PostMapping("/coupon/list")
+	@ResponseBody
+	public GagaMap getCouponList(@RequestBody Coupon param){
+		GagaMap result =  new GagaMap();
 
+		ArrayList<Coupon> cpnList = marketingService.getCouponList(param);
+		int cpnTotCnt = marketingService.getCouponListCnt(param);
+
+		param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		param.setPageable(new TsaPageRequest(param.getPageNo() - 1, param.getPageSize()));
+		param.getPageable().setTotalCount(cpnTotCnt);
+
+		result.set("pageing" , param);
+		result.set("cpnTotCnt" , cpnTotCnt);
+		result.set("cpnList" , cpnList);
+
+		return result;
+	}
+
+	/**
+	 * 쿠폰 등록 팝업 화면
+	 * @return ModelAndView
+	 * @author xyzp1539
+	 * @since 2020-12-23
+	 */
+	@GetMapping("/coupon/popup/form")
+	@ResponseBody
+	public ModelAndView couponCreatePopup() {
+		ModelAndView mav = new ModelAndView();
+		String num = "";
+
+		// 일시 시 리스트 세팅
+		Collection<CommonCode> hhList = new ArrayList<CommonCode>();
+		for(int i = 0; i < 24; i++) {
+			num = "";
+			CommonCode temp = new CommonCode();
+			if(i < 10) {
+				num = "0" + i;
+			} else {
+				num = String.valueOf(i);
+			}
+
+			// 상품상태
+			String[] exceptCds = {"G008_00"};
+			mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
+
+			temp.setCd(num);
+			temp.setCdNm(num+"시");
+
+			hhList.add(temp);
+		}
+		// 일시 분 리스트 세팅
+		Collection<CommonCode> mmList = new ArrayList<CommonCode>();
+		for(int i = 0 ; i < 60; i++) {
+			num = "";
+			CommonCode temp = new CommonCode();
+			if(i < 10) {
+				num = "0" + i;
+			} else {
+				num = String.valueOf(i);
+			}
+			temp.setCd(num);
+			temp.setCdNm(num+"분");
+
+			mmList.add(temp);
+		}
+
+		// 쿠폰 유형 조회
+		mav.addObject("cpnTypeList" ,  rendererService.getCommonCodeList("G230"));
+		// 사용가능 고객구분 조회
+		mav.addObject("usableCustGbList", rendererService.getCommonCodeList("G100"));
+		// 사용가능 고객등급 조회
+		mav.addObject("usableCustGradeList", rendererService.getCommonCodeList("G110"));
+		// 사이트코드 조회
+		mav.addObject("siteCdList" , rendererService.getCommonCodeList("G000"));
+		// 재발급 여부 조회
+		mav.addObject("reissuanceList" , rendererService.getCommonCodeList("G231"));
+		// 할인방식 조회
+		mav.addObject("dcWayList" , rendererService.getCommonCodeList("G240"));
+		// 쿠폰다운로드 방식 조회
+		mav.addObject("dnGbList" , rendererService.getCommonCodeList("G058"));
+		// 시간 분 리스트 세팅
+		mav.addObject("mmList" , mmList);
+		// 시간 시 리스트 세팅
+		mav.addObject("hhList" , hhList);
+
+		mav.setViewName("marketing/CouponCreatePopupForm");
+		return mav;
+	}
 	/* // JSM 진행 */
 }

+ 64 - 0
style24.admin/src/main/java/com/style24/persistence/domain/Coupon.java

@@ -0,0 +1,64 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TsaPageRequest;
+import com.style24.persistence.TscBaseDomain;
+import lombok.Data;
+
+/**
+ * 쿠폰 도메인
+ * @author xyzp1539
+ * @since 2020-12-21
+ */
+@SuppressWarnings("serial")
+@Data
+public class Coupon extends TscBaseDomain {
+
+    private String  cpnId;					// 쿠폰ID
+    private String  cpnNm;					// 쿠폰명
+    private String  siteCd;					// 사이트코드(공통코드G000)
+    private String  afLinkCd;				// 제휴링크코드
+    private String  usableCustGb;			// 사용가능고객구분(공통코드G100)
+    private String  useableCustGrade;		// 사용가능고객등급(공통코드G110)
+    private String  cpnType;				// 쿠폰유형(공통코드G230)
+    private String  applyScope;				// 적용범위(A:전체, I:개별). "I:개별"이고 쿠폰유형이 "20:장바구니쿠폰" 외 이면 TB_COUPON_REFVAL 참조
+    private String  dcWay;					// 할인방식(공통코드G240)
+    private Integer dcPval;					// 할인값(PC). 할인방식이 금액이면 할인금액, 율이면 할인율
+    private Integer dcMval;					// 할인값(모바일). 할인방식이 금액이면 할인금액, 율이면 할인율
+    private Integer dcAval;					// 할인값(모바일앱)
+    private Integer maxDcAmt;				// 최고할인금액
+    private String  pdGb;					// 기간/일수구분(P:기간, D:일수)
+    private String  availStdt;				// 유효시작일시(기간/일수구분 "P:기간"일 때 사용됨)
+    private String  availEddt;				// 유효종료일시(기간/일수구분 "P:기간"일 때 사용됨)
+    private Integer availDays;				// 유효일수(기간/일수구분 "D:일수"일 때 사용됨)
+    private Integer custPubLimitQty;		// 고객당발행제한수량(0은 무제한)
+    private Integer totPubLimitQty;			// 총발행제한수량(0은 무제한)
+    private Integer onePubQTy;				// 1회발행수량(기본은 1)
+    private String  dnGb;					// 다운로드구분(공통코드G058)
+    private String  downStdt;				// 다운로드시작일시
+    private String  downEddt;				// 다운로드종료일시
+    private Integer buyLimitAmt;			// 구매제한금액(0은 제한없음. 그 외는 00 이상 구매 시 사용)
+    private Integer planSq;					// 기획전번호(쿠폰유형이 플러스쿠폰 일 때 사용 기획전번호)
+    private String  reissuance;				// 쿠폰재발급여부(공통코드G231)
+    private String  cpnStat;				// 쿠폰상태(공통코드G232)
+    private String  endAlimYn;				// 만료알림여부
+    private Integer regNo;					// 등록자번호
+    private String  regDt;					// 등록일시
+    private Integer updNo;					// 수정자번호
+    private String  updDt;					// 수정일시
+    private String  firstYn;				// 첫구매여부 (Y:구매이력이없음 | N:구매이력있음)
+    private String  downYN;					// 다운로드가능여부(마이페이지, 상품상세) --> EP쿠폰, 난수쿠폰
+    private String  custJoinStdt;			// 회원가입일자(FROM) 20200101 (신규회원여부의 판단을 가입일자로 설정함)
+    private String  custJoinEddt;			// 회원가입일자(FROM) 20200101 (신규회원여부의 판단을 가입일자로 설정함)
+    private String  buyStdt;				// 회원가입일자(FROM) 20200101 (구매기간일자(FROM) (해당기간에 구매이력이 없으면 다운로드 가능))
+    private String  buyEddt;				// 구매기간일자(TO)
+
+    private Integer issueCnt;				// 쿠폰발급개수
+    private Integer useCnt;					// 쿠폰사용개수
+
+    // Pagination
+    private TsaPageRequest pageable;
+    private int pageNo = 1;
+    private int pageSize = 50;
+    private int pageUnit = 10;
+
+}

+ 99 - 0
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaMarketing.xml

@@ -33,6 +33,105 @@
 	<!-- // xodud1202 진행 -->
 
 	<!-- JSM 진행 -->
+	<!-- 쿠폰리스트 조회 -->
+	<select id="getCouponList" parameterType="Coupon" resultType="Coupon">
+		/* marketing.getCouponList */
+		SELECT T.*
+		, COUNT(CUST_CPN_SQ) AS ISSUE_CNT
+		, COUNT(USED_DT) AS USE_CNT
+		FROM (
+		SELECT SITE_CD
+		, CPN_ID
+		, CPN_NM
+		, USABLE_CUST_GB
+		, CPN_TYPE
+		, DC_WAY
+		, DC_PVAL
+		, DC_MVAL
+		, MAX_DC_AMT
+		, PD_GB
+		, AVAIL_STDT
+		, AVAIL_EDDT
+		, REG_NO
+		, REG_DT
+		FROM TB_COUPON
+		WHERE 1=1
+		<if test="siteCd != null and siteCd != ''">
+			AND SITE_CD = #{siteCd}
+		</if>
+		<if test="cpnId != null and cpnId != ''">
+			AND CPN_ID = #{cpnId}
+		</if>
+		<if test="cpnType != null and cpnType != ''">
+			AND CPN_TYPE = #{cpnType}
+		</if>
+		<if test="regNo != null and regNo != ''">
+			AND REG_NO = #{regNo}
+		</if>
+		<if test="dcWay != null and dcWay != ''">
+			AND DC_WAY = #{dcWay}
+		</if>
+		<if test="cpnNm != null and cpnNm != ''">
+			AND CPN_NM LIKE LOWER('%' || #{cpnNm} || '%')
+		</if>
+		<if test="pdGb != null and pdGb != ''">
+			AND PD_GB = #{pdGb}
+		</if>
+		<if test="availStdt != null and availStdt != '' and availEddt != null and availEddt != ''">
+			AND AVAIL_STDT >= DATE_FORMAT(#{availStdt} , '%Y-%m-%d')
+			AND AVAIL_EDDT <![CDATA[ <= ]]> DATE_FORMAT(#{availEddt} , '%Y-%m-%d')
+		</if>
+		) T
+		LEFT OUTER JOIN TB_CUST_COUPON CC
+		ON T.CPN_ID = CC.CPN_ID
+		GROUP BY  T.SITE_CD
+		, T.CPN_ID
+		, T.CPN_NM
+		, T.USABLE_CUST_GB
+		, T.CPN_TYPE
+		, T.DC_WAY
+		, T.DC_PVAL
+		, T.DC_MVAL
+		, T.MAX_DC_AMT
+		, T.PD_GB
+		, T.AVAIL_STDT
+		, T.AVAIL_EDDT
+		, T.REG_NO
+		, T.REG_DT
+		ORDER BY  T.REG_DT DESC
+	</select>
 
+	<!-- 쿠폰 리스트 카운트 조회-->
+	<select id="getCouponListCnt" parameterType="Coupon" resultType="int">
+		/* marketing.getCouponListCnt */
+		SELECT COUNT(1)
+		FROM TB_COUPON
+		WHERE 1=1
+		<if test="siteCd != null and siteCd != ''">
+			AND SITE_CD = #{siteCd}
+		</if>
+		<if test="cpnId != null and cpnId != ''">
+			AND CPN_ID = #{cpnId}
+		</if>
+		<if test="cpnType != null and cpnType != ''">
+			AND CPN_TYPE = #{cpnType}
+		</if>
+		<if test="regNo != null and regNo != ''">
+			AND REG_NO = #{regNo}
+		</if>
+		<if test="dcWay != null and dcWay != ''">
+			AND DC_WAY = #{dcWay}
+		</if>
+		<if test="cpnNm != null and cpnNm != ''">
+			AND CPN_NM LIKE LOWER('%' || #{cpnNm} || '%')
+		</if>
+		<if test="pdGb != null and pdGb != ''">
+			AND PD_GB = #{pdGb}
+		</if>
+		<if test="availStdt != null and availStdt != '' and availEddt != null and availEddt != ''">
+			AND AVAIL_STDT >= DATE_FORMAT(#{availStdt} , '%Y-%m-%d')
+			AND AVAIL_EDDT <![CDATA[ <= ]]> DATE_FORMAT(#{availEddt} , '%Y-%m-%d')
+		</if>
+	</select>
 	<!-- // JSM 진행 -->
 </mapper>

+ 8 - 7
style24.admin/src/main/webapp/WEB-INF/views/business/SupplyCompanySearchForm.html

@@ -52,7 +52,7 @@
 
 		<!-- 리스트 영역 -->
 		<div class="panelContent">
-			<div id="gridComapnyList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
+			<div id="gridComapanyPopupList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
 		</div>
 		<!-- //리스트 영역 -->
 
@@ -66,29 +66,30 @@
 
 	<script th:inline="javascript">
 		/*<![CDATA[*/
-		let columnDefsList = [
+		let columnCompanyPopupDefList = [
 			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 			{headerName: "공급업체번호", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
 			{headerName: "공급업체국문명", field: "supplyCompNm", width: 150, cellClass: 'text-center'},
 			{headerName: "입점상태", field: "supplyStatNm", width: 150, cellClass: 'text-center'}
 		];
 
-		let gridOptionsCompanyList = gagaAgGrid.getGridOptions(columnDefsList);
+		let gridOptionsCompanyPopupList = gagaAgGrid.getGridOptions(columnCompanyPopupDefList);
+		gridOptionsCompanyPopupList.rowSelection = "multiple";
 
 		// Row double click
-		gridOptionsCompanyList.onRowDoubleClicked = function(event) {
+		gridOptionsCompanyPopupList.onRowDoubleClicked = function(event) {
 			$('#btnConfirmCompany').trigger('click');
 		}
 
 		// 조회
 		$('#btnSearchCompanyList').on('click', function() {
 			// Fetch data
-			gagaAgGrid.fetch($('#searchCompanyListForm').prop('action'), gridOptionsCompanyList, '#searchCompanyListForm');
+			gagaAgGrid.fetch($('#searchCompanyListForm').prop('action'), gridOptionsCompanyPopupList, '#searchCompanyListForm');
 		});
 
 		// 확인
 		$('#btnConfirmCompany').on('click', function() {
-			var selectedData = gagaAgGrid.selectedRowData(gridOptionsCompanyList);
+			var selectedData = gagaAgGrid.selectedRowData(gridOptionsCompanyPopupList);
 
 			if (selectedData.length == 0) {
 				mcxDialog.alert('선택된 공급업체가 없습니다.');
@@ -117,7 +118,7 @@
 
 		$(document).ready(function() {
 			// Create a agGrid
-			gagaAgGrid.createGrid('gridComapnyList', gridOptionsCompanyList);
+			gagaAgGrid.createGrid('gridComapanyPopupList', gridOptionsCompanyPopupList);
 		});
 		/*]]>*/
 	</script>

+ 3 - 3
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -97,7 +97,7 @@
 							<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>
@@ -209,8 +209,8 @@
 					<button type="button" class="btn btn-info btn-lg" id="btnPopupGoodsSearch" >조회</button>
 				</li>
 			</ul>
-		</div>	
-			
+		</div>
+
 			<ul class="panelBar">
 				<li>검색 결과 : <em><span id="gridRowTotalCount">0</span></em>개가 검색되었습니다.
 				<input type="hidden" name="pageNo" id="pageNo" value ="1"/>

+ 220 - 0
style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponCreatePopupForm.html

@@ -0,0 +1,220 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : CouponCreatePopupForm.html
+ * @desc    : 쿠폰 등록 팝업 화면
+ *============================================================================
+ * ISTYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.12.23   xyzp1539       최초 작성
+ *******************************************************************************
+ -->	
+	<div class="modalPopup"  data-width="1250" data-height="750">
+		<div class="panelStyle">
+			<div class="panelTitle">
+				<h2>쿠폰등록</h2>
+				<button type="button" class="close" onclick="uifnPopupClose('CouponCreatePopup')"><i class="fa fa-times"></i></button>
+			</div>
+			<form id="couponCreateForm" name="couponCreateForm">
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width:10%">
+						<col style="width:40%;">
+						<col style="width:10%">
+						<col style="width:40%;">
+					</colgroup>
+					<tr>
+						<th>쿠폰번호<em class="required" title="필수"></em></th>
+						<td colspan="5">
+							<input type="hidden" name="copyCpnId" maxlength="50" value="">
+							<input type="hidden" name="mode" maxlength="50" value="">
+							<input type="text" name="cpnId" maxlength="50" value="" style="width:70%;" disabled="" placeholder="자동생성">
+							<label class="chkBox">
+								<input type="checkbox" name="cpnCreateType" onchange="fnCreateCpnNoOnChange(this);" value="true" class="type-check" checked="">쿠폰번호 자동생성
+							</label>
+						</td>
+					</tr>
+					<tr>
+						<th>쿠폰명<em class="required" title="필수"></em></th>
+						<td colspan="5">
+							<input type="text" name="cpnNm" id="cpnNm" style="width: 70%;">
+						</td>
+					</tr>
+					<tr>
+						<th>쿠폰유형<em class="required" title="필수"></em></th>
+						<td colspan="5">
+							<label class="rdoBtn" th:if="${cpnTypeList}" th:each="oneData, status : ${cpnTypeList}"> <input type="radio" name="cpnType"  th:text="${oneData.cdNm}" th:value="${oneData.cd}"/></label>
+						</td>
+					</tr>
+					<tr>
+						<th>사용가능고객구분<em class="required" title="필수"></em></th>
+						<td>
+							<select name="usableCustGb" id="usableCustGb">
+								<option th:if="${usableCustGbList}" th:each="oneData , status : ${usableCustGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>사이트<em class="required" title="필수"></em></th>
+						<td>
+							<select name="siteCd" id="siteCd">
+								<option th:if="${siteCdList}" th:each="oneData , status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>사용고객등급구분<em class="required" title="필수"></em></th>
+						<td>
+							<select name="usableCustGradeList" id="usableCustGradeList">
+								<option value="">[전체]</option>
+								<option th:if="${usableCustGradeList}" th:each="oneData , status : ${usableCustGradeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>할인방식<em class="required" title="필수"></em></th>
+						<td>
+							<label class="rdoBtn" th:if="${dcWayList}" th:each="oneData, status : ${dcWayList}"> <input type="radio" name="dcWay"  th:text="${oneData.cdNm}" th:value="${oneData.cd}"/></label>
+						</td>
+						<th>할인값(PC)<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w200" id="dcPval" name="dcPval" value="0" style="text-align: right"><span id="dcPvalSpan">원</span>
+						</td>
+					</tr>
+					<tr>
+						<th>할인값(모바일)<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w200" id="dcMval" name="dcMval" value="0" style="text-align: right"><span id="dcMvalSpan">원</span>
+						</td>
+						<th>최대할인금액<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w200" id="maxDcAmt" name="maxDcAmt" value="0"><span id="maxDcAmtSpan">원</span>
+						</td>
+					</tr>
+					<tr>
+						<th>다운로드시작일시<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="schDate w100" name="downStdt" maxlength="10"/>
+							<select name="downStHH" id="downStHH">
+								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+							<select name="downStMM" id="downStMM">
+								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+						<th>다운로드종료일시<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="schDate w100" name="downEddt" maxlength="10"/>
+							<select name="downEdHH" id="downEdHH">
+								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+							<select name="downEdMM" id="downEdMM">
+								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>기간/일수구분<em class="required" title="필수"></em></th>
+						<td>
+							<select name="pdGbList" id="pdGbList">
+								<option value="">[전체]</option>
+								<option value="P">기간</option>
+								<option value="D">일수</option>
+							</select>
+						</td>
+						<th>적용범위<em class="required" title="필수"></em></th>
+						<td>
+							<label class="rdoBtn"> <input type="radio" name="appliyScope" value="A"/>전체</label>
+							<label class="rdoBtn"> <input type="radio" name="appliyScope" value="I"/>개별</label>
+						</td>
+					</tr>
+					<tr>
+						<th>유효기간시작일시<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="schDate w100" name="applyStdt" maxlength="10"/>
+							<select name="applyStHH" id="applyStHH">
+								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+							<select name="applyStMM" id="applyStMM">
+								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+						<th>유효기간종료일시<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="schDate w100" name="applyEddt" maxlength="10"/>
+							<select name="applyEdHH" id="applyEdHH">
+								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+							<select name="applyEdMM" id="applyEdMM">
+								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>총발행제한수량<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w200" name="totPubLimitQty" id="totPubLimitQty" value="0" style="text-align: right;">개
+						</td>
+						<th>1인당발행제한수량<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w200" name="custPubLimitQty" id="custPubLimitQty" value="0" style="text-align: right;">개
+						</td>
+					</tr>
+					<tr>
+						<th>최소주문금액<em class="required" title="필수"></em></th>
+						<td><input type="text" class="w200" name="minBuyAmt" id="minBuyAmt" value="0" style="text-align: right;"></td>원
+						<th>1회발행수량<em class="required" title="필수"></em></th>
+						<td><input type="text" class="w200" name="onePubQty" id="onePubQty" value="1" style="text-align: right;"></td>개
+					</tr>
+					<tr>
+						<th>재발급여부<em class="required" title="필수"></em></th>
+						<td>
+							<select name="reissuanceList" id="reissuanceList">
+								<option th:if="${reissuanceList}" th:each="oneData , status : ${reissuanceList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>다운로드구분<em class="required" title="필수"></em></th>
+						<td>
+							<select name="dnGbList" id="dnGbList">
+								<option th:if="${dnGbList}" th:each="oneData , status:${dnGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+				</table>
+			</div>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-info btn-lg" onclick="fnCouponCreate();">등록</button>
+				</li>
+			</ul>
+			</form>
+		</div>
+	</div>
+<script th:inline="javascript">
+/*<![CDATA[*/
+
+	$(document).ready(function(){
+
+	});
+
+	// 쿠폰 등록 버튼 클릭시
+	function fnCouponCreate(){
+		alert("쿠폰 등록 ");
+		if(!checkVelidation()) {
+			return;
+		}
+	}
+
+	// 쿠폰등록 유효성 체크
+	function checkVelidation(){
+		alert("벨리데이션 체크");
+		if()
+
+	}
+
+
+/*]]>*/
+</script>
+</html>

+ 267 - 0
style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponListForm.html

@@ -0,0 +1,267 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : CouponListForm.html
+ * @desc    : 쿠폰관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.12.21   xyzp1539    최초 작성
+ *******************************************************************************
+ -->
+<div id="main">
+	<!-- 메인타이틀 영역 -->
+	<div class="main-title">
+	</div>
+	<!-- //메인타이틀 영역 -->
+
+	<form id="searchForm" name="searchForm" action="#" th:action="@{'/marketing/coupon/list'}">
+		<!-- 패널 영역1 -->
+		<div class="panelStyle" >
+			<!-- 검색조건 영역 -->
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<h3>검색조건</h3>
+				<span class="panelControl">
+						<i class="fa fa-chevron-up"></i>
+					</span>
+			</div>
+			<!-- //TITLE -->
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width: 8%;"/>
+						<col style="width: 12%;"/>
+						<col style="width: 8%;"/>
+						<col style="width: 12%;"/>
+						<col style="width: 8%;"/>
+						<col style="width: 12%;"/>
+						<col style="width: 8%;"/>
+						<col style="width: 12%;"/>
+						<col style="width: 8%;"/>
+						<col style="width: 12%;"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>사이트</th>
+						<td>
+							<select name="site" id="site">
+								<option value="">[전체]</option>
+								<option th:if="${siteCdList}" th:each="oneData, status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>쿠폰ID</th>
+						<td>
+							<input type="text" class="w900" name="cpnId" id="cpnId"/>
+						</td>
+						<th>쿠폰유형</th>
+						<td>
+							<select name="cpnType" id="cpnType">
+								<option value="">[전체]</option>
+								<option th:if="${cpnTypeList}" th:each="oneData, status : ${cpnTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>등록자</th>
+						<td>
+							<input type="text" class="w200" name="regNo" id="regNo">
+						</td>
+					</tr>
+					<tr>
+						<th>할인유형</th>
+						<td>
+							<select name="dcWayList" id="dcWayList">
+								<option value="">[전체]</option> dcWayList
+								<option th:if="${dcWayList}" th:each="oneData, status : ${dcWayList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>쿠폰명</th>
+						<td colspan="10">
+							<input type="text" class="w800" id="cpnNm" name="cpnNm">
+						</td>
+					</tr>
+					<tr>
+						<th>유효기간구분</th>
+						<td>
+							<select name="pdGb" id="pdGb">
+								<option value="">[전체]</option>
+								<option value="P">기간</option>
+								<option value="D">일</option>
+							</select>
+						</td>
+						<th>유효기간</th>
+						<td colspan="5" id="sellTerms"></td>
+					</tr>
+					<tr>
+						<th colspan="1">
+						<td colspan="9">
+							<label class="chkBox"><input type="checkbox" id="endCpnExcep" name="chkExcep" value="E" checked>종료쿠폰제외</label>
+						</td>
+						</th>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
+						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
+					</li>
+				</ul>
+			</div>
+			<!-- //검색조건 영역 -->
+		</div>
+
+		<!-- 패널 영역1 -->
+		<div class="panelStyle">
+			<!-- 상단버튼 영역  -->
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-info btn-lg" onclick="fnCouponCreateForm();">등록</button>
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+			</ul>
+
+			<!-- 검색결과 영역 -->
+			<div id="gridList" style="width: 100%; height: 700px;" class="ag-theme-balham lh60"></div>
+		</div>
+	</form>
+	<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+	<script th:inline="javascript">
+		/*<![CDATA[*/
+		var columnDefs = [];
+		columnDefs = [
+			{headerName: "사이트", field: "siteCD", width: 80, cellClass: 'text-center'},
+			{headerName: "쿠폰ID", field: "cpnId", width: 130, cellClass: 'text-center'},
+			{headerName: "쿠폰명", field: "cpnNm", width: 140, cellClass: 'text-center'},
+			{headerName: "사용가능고객구분", field: "useableCustGb", width: 140, cellClass: 'text-center'},
+			{headerName: "쿠폰유형", field: "cpnType", width: 140, cellClass: 'text-center'},
+			{headerName: "할인방식", field: "dcWay", width: 140, cellClass: 'text-center'},
+			{headerName: "할인값(PC)", field: "dcPval", width: 140, cellClass: 'text-center'},
+			{headerName: "할인값(MOBILE)", field: "dcMval", width: 140, cellClass: 'text-center'},
+			{headerName: "최고할인값", field: "maxDcAmt", width: 140, cellClass: 'text-center'},
+			{headerName: "사용 수/발급 수 ", field: "useIssueCnt", width: 140, cellClass: 'text-center',
+				cellRenderer: function(params) {
+					return params.data.issueCnt + "/" + params.data.useCnt;
+				}
+			},
+			{headerName: "기간/일수구분", field: "pdGb", width: 140, cellClass: 'text-center'},
+			{headerName: "유효시작일시", field: "availStdt", width: 140, cellClass: 'text-center'},
+			{headerName: "유효종료일시", field: "availEddt", width: 140, cellClass: 'text-center'},
+			{headerName: "등록자", field: "regNo", width: 200, cellClass: 'text-left'},
+			{headerName: "등록일시", field: "regDt", width: 140, cellClass: 'text-center'},
+		];
+
+		// Get GridOptions
+		var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+		// 쿠폰등록 팝업창
+		function fnCouponCreateForm(){
+			cfnCouponCreatePopup();
+		}
+
+		// Row Click
+		/*
+        gridOptions.onCellClicked = function(event) {
+            var goodsCd = event.data.goodsCd;
+            if (event.colDef.field == "freeGiftName"){
+                // 수ㅜ정 필요
+                // cfnOpenGoodsDetailPopup('U',goodsCd);
+            }
+        }
+        */
+
+		// 초기화 클릭시
+		$('#btnInit').on('click', function() {
+			$('#searchForm')[0].reset();
+			//$("#searchForm input[type=radio]").removeClass("checked");
+			$("#searchForm input[type=checkbox]").removeClass("checked");
+			//$("#searchForm input[type=radio]").parent("label").removeClass("checked");
+			$("#searchForm input[type=checkbox]").parent("label").removeClass("checked");
+			$("#searchForm input[type=radio][checked]").parent("label").addClass("checked");
+		});
+
+		// 조회클릭시
+		$('#btnSearch').on('click', function() {
+			$("#searchForm input[name=pageNo]").val('1');
+			fnCouponListSearch();
+		});
+
+		// 조회
+		var fnCouponListSearch = function() {
+			if(!fnConditionCheck()) return;
+
+			gagaPaging.init('searchForm', fnSearchCallBack, 'couponListPagination', $('#searchForm').find('#pageSize').val());
+			gagaPaging.load($("#searchForm input[name=pageNo]").val());
+		}
+
+		//검색 조건 확인
+		var fnConditionCheck = function(){
+			var fromDate = $('#searchForm input[name=availStdt]').val();
+			var toDate = $('#searchForm input[name=availEddt]').val();
+
+			if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
+
+				if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+					mcxDialog.alertC("기간 조회시 시작일자와 종료일자를 입력하세요.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#searchForm input[name=availStdt]').focus();
+						}
+					});
+					return false;
+				}
+
+				if (fromDate > toDate) {
+					mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$('#searchForm input[name=availEddt]').focus();
+						}
+					});
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		var fnSearchCallBack = function(result){
+
+			$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+			$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+			$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+			$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+			gridOptions.api.setRowData(result.cpnList);
+			gagaPaging.createPagination(result.pageing.pageable);
+
+		}
+
+		//페이징
+		$('#searchForm select[name=pageSize]').on('change', function() {
+			$("#searchForm input[name=pageNo]").val('1');
+			fnCouponListSearch();
+		});
+
+		$(document).ready(function() {
+			cfnCreateCalendar('#sellTerms', 'availStdt', 'availEddt', true, '기간', 'X');
+
+			// Create a agGrid
+			gagaAgGrid.createGrid('gridList', gridOptions);
+		});
+
+		/*]]>*/
+	</script>
+</div>
+
+</html>

+ 353 - 148
style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html

@@ -3,7 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <!--
  *******************************************************************************
- * @source  : GoodsSetForm.html
+ * @source  : FreeGoodsPromotionRegiForm.html
  * @desc    : 세트상품 구성 관리
  *============================================================================
  * SISUN
@@ -11,7 +11,7 @@
  *============================================================================
  * VER  DATE         AUTHOR      DESCRIPTION
  * ===  ===========  ==========  =============================================
- * 1.0  2020.11.04   eskim       최초 작성
+ * 1.0  2020.12.23   xodud1202   최초 작성
  *******************************************************************************
  -->	
 	<div class="modalPopup frGoodsPro" data-width="1100">
@@ -22,7 +22,14 @@
 			</div>
 
 			<form id="freeGoodsPromotionForm" name="freeGoodsPromotionForm" th:method="post" >
-				<input type="hidden" name="gbn" th:value="${param.gbn}" />
+				<input type="hidden" name="gbn" th:value="${param.gbn}" />				<!-- 신규/수정 구분 -->
+				<input type="hidden" id="supplyCompCds" name="supplyCompCds"/>			<!-- 공급업체 리스트 -->
+				<input type="hidden" id="brandCds" name="brandCds"/>					<!-- 브랜드 리스트 -->
+				<input type="hidden" id="applyGoodsCds" name="applyGoodsCds"/>			<!-- 적용상품 리스트 -->
+				<input type="hidden" id="exceptGoodsCds" name="exceptGoodsCds"/>		<!-- 제외상품 리스트 -->
+				<input type="hidden" id="freeGoods1Cds" name="freeGoods1Cds"/>			<!-- 적용 사은품1 리스트 -->
+				<input type="hidden" id="freeGoods2Cds" name="freeGoods2Cds"/>			<!-- 적용 사은품2 리스트 -->
+
 				<div class="panelContent">
 					<ul class="notice">
 						<li>구성상품 등록시 기본값&nbsp;
@@ -117,23 +124,7 @@
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteCompany">선택삭제</button>
 												<span>선택 : 00개</span>
 												<br/>
-												<div id="gridCompanyList" style="width:100%; height:300px;" class="ag-theme-balgam lh60"></div>
-												<table class="frmStyle aC">
-													<thead>
-														<tr>
-															<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="companyAll"/></label></th>
-															<th style="width:30%;">공급처ID</th>
-															<th style="width:55%;">공급업체명</th>
-														</tr>
-													</thead>
-													<tbody>
-														<tr>
-															<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="company_idx"/></label></td>
-															<td>1211</td>
-															<td>업체이름</td>
-														</tr>
-													</tbody>
-												</table>
+												<div id="gridFGPromotionCompanyList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											</div>
 										</div>
 										<div class="padding10 wid45">
@@ -143,22 +134,8 @@
 												<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteBrand">선택삭제</button>
 												<span>선택 : 00개</span>
 												<br/>
-												<table class="frmStyle aC">
-													<thead>
-														<tr>
-															<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="brandAll"/></label></th>
-															<th style="width:30%;">브랜드ID</th>
-															<th style="width:55%;">브랜드명</th>
-														</tr>
-													</thead>
-													<tbody>
-														<tr>
-															<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="brand_idx"/></label></td>
-															<td>1211</td>
-															<td>브랜드이름</td>
-														</tr>
-													</tbody>
-												</table>
+												<!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
+												<div id="gridFGBrandList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 											</div>
 										</div>
 									</td>
@@ -167,36 +144,11 @@
 									<th>적용상품</th>
 									<td>
 										<div class="padding10">
-											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddGoods">상품 추가</button>
-											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteGoods">선택삭제</button>
+											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyGoods">상품 추가</button>
+											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteApplyGoods">선택삭제</button>
 											<span>선택 : 00개</span>
 											<br/>
-											<div class="padding10 inner-tb-solid">
-												<table class="frmStyle aC">
-													<thead>
-														<tr>
-															<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="goodsAll"/></label></th>
-															<th style="width:15%;">Product ID</th>
-															<th style="width:15%;">브랜드명</th>
-															<th style="width:35%;">상품명</th>
-															<th style="width:10%;">판매상태</th>
-															<th class="cRed" style="width:10%;">정상가</th>
-															<th class="cRed" style="width:10%;">판매가</th>
-														</tr>
-													</thead>
-													<tbody>
-														<tr>
-															<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="brand_idx"/></label></td>
-															<td>1211</td>
-															<td>브랜드이름</td>
-															<td>덕다운패딩</td>
-															<td>판매중</td>
-															<td>202,000</td>
-															<td>199,000</td>
-														</tr>
-													</tbody>
-												</table>
-											</div>
+											<div id="gridFGApplyGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 									</td>
 								</tr>
@@ -225,36 +177,11 @@
 									<th>제외 대상</th>
 									<td>
 										<div class="padding10">
-											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExtGoods">상품 추가</button>
+											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExceptGoods">상품 추가</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteExtGoods">선택삭제</button>
 											<span>선택 : 00개</span>
 											<br/>
-											<div class="padding10 inner-tb-solid">
-												<table class="frmStyle aC">
-													<thead>
-														<tr>
-															<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="ExtGoodsAll"/></label></th>
-															<th style="width:15%;">Product ID</th>
-															<th style="width:15%;">브랜드명</th>
-															<th style="width:35%;">상품명</th>
-															<th style="width:10%;">판매상태</th>
-															<th class="cRed" style="width:10%;">정상가</th>
-															<th class="cRed" style="width:10%;">판매가</th>
-														</tr>
-													</thead>
-													<tbody>
-														<tr>
-															<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="brand_idx"/></label></td>
-															<td>1211</td>
-															<td>브랜드이름</td>
-															<td>덕다운패딩</td>
-															<td>판매중</td>
-															<td>202,000</td>
-															<td>199,000</td>
-														</tr>
-													</tbody>
-												</table>
-											</div>
+											<div id="gridFGExceptGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 									</td>
 								</tr>
@@ -302,35 +229,12 @@
 											<input type="button" value="+ 사은품 선택" id="goodsList" /> <!-- 선택 시 팝업 노출 -->
 											<input type="button" value="선택삭제" id="deleteGoodsList" />
 											<br/>
-											<table class="frmStyle aC">
-												<thead>
-													<tr>
-														<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="freeGoodsAll1"/></label></th>
-														<th style="width:15%;">사은품 코드</th>
-														<th style="width:40%;">사은품명</th>
-														<th style="width:10%;">포인트액</th>
-														<th style="width:10%;">지급수량</th>
-														<th style="width:10%;">한정수량</th>
-														<th style="width:10%;">잔여수량</th>
-													</tr>
-												</thead>
-												<tbody>
-													<tr>
-														<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="brand_idx"/></label></td>
-														<td>1211</td>
-														<td>사은품목도리</td>
-														<td><input type="text" class="w100" placeholder="0" /></td>
-														<td><input type="text" class="w100" placeholder="1" /></td>
-														<td><input type="text" class="w100" placeholder="0" /></td>
-														<td>88</td>
-													</tr>
-												</tbody>
-											</table>
+											<div id="gridFreeGoods1List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 									</td>
 								</tr>
 								<tr>
-									<th>사은품 조건2<em class="required" title="필수"></em><br/>(최대 2개)</th>
+									<th>사은품 조건2<br/>(최대 2개)</th>
 									<td>
 										<div>
 											<label for="saleAmt2">구매금액</label><input type="text" class="w300" id="saleAmt2" /> <br/>
@@ -338,30 +242,7 @@
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods2">+ 사은품 선택</button>
 											<button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods2">선택삭제</button>
 											<br/>
-											<table class="frmStyle aC">
-												<thead>
-													<tr>
-														<th style="width:5%;"><label class="chkBox"><input type="checkbox" id="freeGoodsAll2"/></label></th>
-														<th style="width:15%;">사은품 코드</th>
-														<th style="width:40%;">사은품명</th>
-														<th style="width:10%;">포인트액</th>
-														<th style="width:10%;">지급수량</th>
-														<th style="width:10%;">한정수량</th>
-														<th style="width:10%;">잔여수량</th>
-													</tr>
-												</thead>
-												<tbody>
-													<tr>
-														<td><label class="chkBox"><input type="checkbox" class="brand_idx" value="brand_idx"/></label></td>
-														<td>1211</td>
-														<td>사은품목도리</td>
-														<td><input type="text" class="w100" placeholder="0" /></td>
-														<td><input type="text" class="w100" placeholder="1" /></td>
-														<td><input type="text" class="w100" placeholder="0" /></td>
-														<td>88</td>
-													</tr>
-												</tbody>
-											</table>
+											<div id="gridFreeGoods2List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
 										</div>
 									</td>
 								</tr>
@@ -412,27 +293,350 @@
 	</div>
 
 	<script th:inline="javascript">
-		let columnCompanyList = [
+		let FGAddGoodsStatList = gagajf.convertToArray([[${goodsStatList}]]);		// 상품 상태 리스트
+		// 공급업체 리스트 설정
+		let columnFGCompanyList = [
 			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 			{headerName: "공급처ID", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
 			{headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'}
 		];
-		let gridOptionsCompanyList = gagaAgGrid.getGridOptions(columnCompanyList);
-		gridOptionsCompanyList.rowSelection = "multiple";
+		// 브랜드 리스트 설정
+		let columnBrandList = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "브랜드ID", field: "brandCd", width: 120, cellClass: 'text-center'},
+			{headerName: "공급업체명", field: "brandEnm", width: 150, cellClass: 'text-center'}
+		];
+		// 적용상품 리스트 설정
+		let columnApplyGoodsList = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
+			{headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
+			{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
+			{headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
+				cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
+				valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
+				valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
+			},
+			{headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}},
+			{headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}}
+		];
+		// 제외상품 리스트 설정
+		let columnExceptGoodsList = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
+			{headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
+			{headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
+			{headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
+				cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
+				valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
+				valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
+			},
+			{headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}},
+			{headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}}
+		];
+		// 사은품 조건1 리스트 설정 (사은품 상품 만들어지면 만들어야함)
+		let columnFreeGoods1List = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
+			{headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
+			{headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return 0;
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return 1;
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return 0;
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return 0;
+					}
+				}
+			}
+		];
+		// 사은품 조건2 리스트 설정 (사은품 상품 만들어지면 만들어야함)
+		let columnFreeGoods2List = [
+			{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+			{headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
+			{headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
+			{headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return '0';
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return '1';
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return '0';
+					}
+				},
+				cellEditor: 'textCellEditor',
+				cellEditorParams: { maxlength: 14, validType: 'numeric'}
+			},
+			{headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
+				,valueFormatter: function(params) {
+					if(params.value && params.value > 0) {
+						return params.value.addComma();
+					} else {
+						return '0';
+					}
+				}
+			}
+		];
+		// 공급업체 리스트 설정
+		let gridOptionsFGCompanyList = gagaAgGrid.getGridOptions(columnFGCompanyList);
+		gridOptionsFGCompanyList.rowSelection = "multiple";
+		// 브랜드 리스트 설정
+		let gridOptionsFGBrandList = gagaAgGrid.getGridOptions(columnBrandList);
+		gridOptionsFGBrandList.rowSelection = "multiple";
+		// 적용상품 리스트 설정
+		let gridOptionsFGApplyGoodsList = gagaAgGrid.getGridOptions(columnApplyGoodsList);
+		gridOptionsFGApplyGoodsList.rowSelection = "multiple";
+		// 제외상품 리스트 설정
+		let gridOptionsFGExceptGoodsList = gagaAgGrid.getGridOptions(columnExceptGoodsList);
+		gridOptionsFGExceptGoodsList.rowSelection = "multiple";
+		// 사은품 조건1 리스트 설정
+		let gridOptionsFreeGoods1List = gagaAgGrid.getGridOptions(columnFreeGoods1List);
+		gridOptionsFreeGoods1List.rowSelection = "multiple";
+		// 사은품 조건2 리스트 설정
+		let gridOptionsFreeGoods2List = gagaAgGrid.getGridOptions(columnFreeGoods2List);
+		gridOptionsFreeGoods2List.rowSelection = "multiple";
 
 		$(document).ready(function() {
-			gagaAgGrid.createGrid("gridCompanyList", gridOptionsCompanyList);
+			gagaAgGrid.createGrid("gridFGPromotionCompanyList", gridOptionsFGCompanyList);
+			gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
+			gagaAgGrid.createGrid("gridFGApplyGoodsList", gridOptionsFGApplyGoodsList);
+			gagaAgGrid.createGrid("gridFGExceptGoodsList", gridOptionsFGExceptGoodsList);
+			gagaAgGrid.createGrid("gridFreeGoods1List", gridOptionsFreeGoods1List);
+			gagaAgGrid.createGrid("gridFreeGoods2List", gridOptionsFreeGoods2List);
+
 			cfnCreateCalendar('#promotionTerms', 'freegoodsStdt', 'freegoodsEddt', true, '행사기간', 'X');
 		});
 
+		// 저장 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnFreegoodsPromotionSave').on('click', function() {
+			// 각 ag-grid list 수량
+			let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
+			let brandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
+			let applyGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList).length;
+			// let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList).length;
+			let freeGoods1Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List).length;
+			let freeGoods2Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List).length;
+
+			// 프로모션명 확인
+			if(gagajf.isEmpty($("#freeGoodsPromotionForm #freegiftNm").val())) {
+				mcxDialog.alert("프로모션명을 입력해주세요");
+				$("#freeGoodsPromotionForm #freegiftNm").focus();
+				return false;
+			}
+
+			// 행사기간 확인
+			let fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
+			let toDate = $('#freeGoodsPromotionForm input[name=freegiftEddt]').val();
+
+			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+				mcxDialog.alert("행사 기간 시작일자와 종료일자를 입력하세요.");
+				$('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
+				return false;
+			}
+
+			if (fromDate > toDate) {
+				mcxDialog.alert("시작일자는 종료일자 보다 클 수 없습니다.");
+				$('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
+				return false;
+			}
+
+			// 공급업체, 브랜드, 적용상품 중 1개 필수 체크
+			if(supplyCompCnt < 1 && brandCnt < 1 && applyGoodsCnt < 1) {
+				mcxDialog.alert("공급업체, 브랜드, 적용 상품 중 한가지 이상 등록해주세요.");
+				return false;
+			}
+
+			// 사은품조건1 필수 체크
+			if(freeGoods1Cnt < 1) {
+				mcxDialog.alert("사은품 조건1의 사은품을 등록해주세요.");
+				return false;
+			}
+
+			// 사은품조건1 의 수량 체크
+			if(freeGoods1Cnt > 2) {
+				mcxDialog.alert("사은품 조건1의 사은품은 최대 2개까지 등록가능합니다.");
+				return false;
+			}
+
+			// 사은품조건2의 수량 체크
+			if(freeGoods2Cnt > 2) {
+				mcxDialog.alert("사은품 조건2의 사은품은 최대 2개까지 등록가능합니다.");
+				return false;
+			}
+
+
+		});
+
+		// 공급업체 설정 / 업체 추가 콜백함수
+		var fnSetPopupComapnyInfo = function(result) {
+			// 기존 리스트 데이터 for
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList);		// 받아온 모든 데이터
+
+				// 받아온 data for
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					// 동일한 data는 추가하지 않음
+					if(gridListValue[j].supplyCompCd == result[i].supplyCompCd) {	addChk = false;	}		// 중복체크
+				}
+
+				// 중복되지 않은 데이터 리스트에 추가
+				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGCompanyList, result[i], "supplyCompCd");	}
+			}
+		};
+
+		// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
 		var fnSetPopupBrandInfo = function(result) {
-			// $("#goodsPopupForm input[name=brandCd]").val(result[0].brandCd);
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);		// 받아온 모든 데이터
+
+				// 받아온 data for
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].brandCd == result[i].brandCd) {	addChk = false;	}					// 중복체크
+				}
+
+				// 중복되지 않은 데이터 리스트에 추가
+				if(addChk) {	gagaAgGrid.addRowData(gridOptionsFGBrandList, result[i], "brandCd");	}
+			}
+		};
+
+		// 적용 상품 리스트 콜백함수
+		var fnSetPopupApplyGoodsInfo = function(result) {
+			gridAddGoodsList(gridOptionsFGApplyGoodsList, result);
+		};
 
+		// 제외 상품 리스트 콜백함수
+		var fnSetPopupExceptGoodsInfo = function(result) {
+			gridAddGoodsList(gridOptionsFGExceptGoodsList, result);
+		};
+
+		// 사은품 조건1 상품 리스트 콜백함수
+		var fnSetPopupFreeGoods1Info = function(result) {
+			gridAddGoodsList(gridOptionsFreeGoods1List, result);
+		};
+
+		// 사은품 조건1 상품 리스트 콜백함수
+		var fnSetPopupFreeGoods2Info = function(result) {
+			gridAddGoodsList(gridOptionsFreeGoods2List, result);
+		};
+
+		// ag-grid 상품관련 list 콜백함수
+		function gridAddGoodsList(OriginGridListOption, result) {
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true, gridListValue = gagaAgGrid.getAllRowData(OriginGridListOption);		// 받아온 모든 데이터
+
+				// 받아온 data for
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].goodsCd == result[i].goodsCd) {	addChk = false;	}				// 중복체크
+				}
+
+				// 중복되지 않은 데이터 리스트에 추가
+				if(addChk) {	gagaAgGrid.addRowData(OriginGridListOption, result[i], "goodsCd");	}
+			}
 		}
 
 		// 공급업체 설정 업체 추가 버튼 클릭시
-		$('#btnAddCompany').on('click', function() {
-			cfnOpenCompanyListPopup('fnSetPopupBrandInfo');
+		$('#freeGoodsPromotionForm #btnAddCompany').on('click', function() {
+			cfnOpenCompanyListPopup("fnSetPopupComapnyInfo");
+		});
+
+		// 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
+		$('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
+			cfnOpenBrandListPopup("fnSetPopupBrandInfo");
+		});
+
+		// 적용 상품 추가 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnAddApplyGoods').on('click', function() {
+			cfnOpenGoodsPopup("fnSetPopupApplyGoodsInfo");
+		});
+		// 제외 상품 추가 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnAddExceptGoods').on('click', function() {
+			cfnOpenGoodsPopup("fnSetPopupExceptGoodsInfo");
+		});
+		// 사은품 조건1 상품 추가 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnAddFreeGoods1').on('click', function() {
+			cfnOpenGoodsPopup("fnSetPopupFreeGoods1Info");
+		});
+		// 사은품 조건2 상품 추가 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnAddFreeGoods2').on('click', function() {
+			cfnOpenGoodsPopup("fnSetPopupFreeGoods2Info");
+		});
+
+		// 공급업체 설정 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteCompany').on('click', function() {
+			gridOptionsFGCompanyList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCompanyList)});
+		});
+		// 브랜드 설정 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteBrand').on('click', function() {
+			gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
+		});
+		// 적용상품 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteApplyGoods').on('click', function() {
+			gridOptionsFGApplyGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList)});
+		});
+		// 제외상품 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteExtGoods').on('click', function() {
+			gridOptionsFGExceptGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList)});
+		});
+		// 사은품조건1 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteFreeGoods1').on('click', function() {
+			gridOptionsFreeGoods1List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods1List)});
+		});
+		// 사은품조건2 선택삭제 버튼 클릭시
+		$('#freeGoodsPromotionForm #btnDeleteFreeGoods2').on('click', function() {
+			gridOptionsFreeGoods2List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods2List)});
 		});
 
 		//패널영역 줄이기
@@ -446,9 +650,10 @@
 			$(this).attr("class","fa inner-fa-chevron-up");
 		});
 
-		//창종료
+		// 창 닫기
 		var fnFreeGoodsPromotionFormClose = function(){
 			uifnPopupClose('popupFreeGoodsPromotionRegi');
 		}
+
 	</script>
 </html>

+ 2 - 1
style24.batch/.gitignore

@@ -1,2 +1,3 @@
 target/
-.classpath
+.classpath
+/target/

+ 1 - 0
style24.core/.gitignore

@@ -2,3 +2,4 @@ target/
 .settings/
 .classpath
 /bin/
+/target/

+ 4 - 0
style24.front/.gitignore

@@ -0,0 +1,4 @@
+target/
+.classpath
+/target/
+*.class

BIN
style24.front/target/classes/com/style24/front/biz/dao/TsfLoginDao.class


BIN
style24.front/target/classes/com/style24/front/biz/dao/TsfNoticeDao.class


BIN
style24.front/target/classes/com/style24/front/biz/service/TsfLoginService.class


BIN
style24.front/target/classes/com/style24/front/biz/service/TsfNoticeService.class


BIN
style24.front/target/classes/com/style24/front/biz/web/TsfCustomerController.class


BIN
style24.front/target/classes/com/style24/front/biz/web/TsfIndexController.class


BIN
style24.front/target/classes/com/style24/front/support/config/TsfMybatisShopConfig.class


BIN
style24.front/target/classes/com/style24/front/support/config/TsfRedisSessionConfig.class


BIN
style24.front/target/classes/com/style24/front/support/config/TsfThymeleafConfig.class


BIN
style24.front/target/classes/com/style24/front/support/config/TsfWebMvcConfig.class


BIN
style24.front/target/classes/com/style24/front/support/controller/TsfBaseController.class


BIN
style24.front/target/classes/com/style24/front/support/controller/TsfCustomErrorController.class


BIN
style24.front/target/classes/com/style24/front/support/env/TsfConstants.class


BIN
style24.front/target/classes/com/style24/front/support/exception/TsfDormantAccountException.class


BIN
style24.front/target/classes/com/style24/front/support/exception/TsfEmailDuplicationException.class


BIN
style24.front/target/classes/com/style24/front/support/exception/TsfLockedAccountException.class


BIN
style24.front/target/classes/com/style24/front/support/exception/TsfSecedeAccountException.class


BIN
style24.front/target/classes/com/style24/front/support/exception/TsfSessionExpiredException.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfAflinkInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfDefaultInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfGoodsViewInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfLoginCheckInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfRememberMeInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/interceptor/TsfReturnUrlInterceptor.class


BIN
style24.front/target/classes/com/style24/front/support/security/TsfAuthenticationProvider.class


BIN
style24.front/target/classes/com/style24/front/support/security/TsfLoginDetails.class


BIN
style24.front/target/classes/com/style24/front/support/security/config/TsfSecurityConfig.class


BIN
style24.front/target/classes/com/style24/front/support/security/filter/TsfAuthenticationFilter.class


BIN
style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginFailureHandler.class


BIN
style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginSuccessHandler.class


BIN
style24.front/target/classes/com/style24/front/support/security/handler/TsfLogoutSuccessHandler.class


BIN
style24.front/target/classes/com/style24/front/support/security/handler/TsfRememberMeSuccessHandler.class


BIN
style24.front/target/classes/com/style24/front/support/security/session/TsfSession.class


BIN
style24.front/target/classes/com/style24/front/support/startup/TsfApplication.class


BIN
style24.front/target/classes/com/style24/front/support/startup/TsfServletInitializer.class


BIN
style24.front/target/classes/com/style24/persistence/TsfPageRequest.class


BIN
style24.front/target/classes/com/style24/persistence/domain/Login.class


BIN
style24.front/target/classes/com/style24/persistence/domain/Notice.class


BIN
style24.front/target/classes/com/style24/persistence/domain/PersistentToken$PersistentTokenBuilder.class


BIN
style24.front/target/classes/com/style24/persistence/domain/PersistentToken.class