Просмотр исходного кода

Merge branch 'develop' into eskim

eskim 5 лет назад
Родитель
Сommit
b1b49ec65c
18 измененных файлов с 904 добавлено и 56 удалено
  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. 9 6
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaCustomerController.java
  4. 121 3
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java
  5. 2 2
      style24.admin/src/main/java/com/style24/persistence/domain/Brand.java
  6. 4 2
      style24.admin/src/main/java/com/style24/persistence/domain/Counsel.java
  7. 64 0
      style24.admin/src/main/java/com/style24/persistence/domain/Coupon.java
  8. 18 9
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml
  9. 99 0
      style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaMarketing.xml
  10. 4 1
      style24.admin/src/main/webapp/WEB-INF/views/business/BrandSearchForm.html
  11. 11 11
      style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html
  12. 16 2
      style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html
  13. 5 5
      style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html
  14. 11 3
      style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html
  15. 220 0
      style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponCreatePopupForm.html
  16. 267 0
      style24.admin/src/main/webapp/WEB-INF/views/marketing/CouponListForm.html
  17. 11 11
      style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html
  18. 2 1
      style24.admin/src/main/webapp/ux/js/admin.popup.js

+ 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 진행 */
 
 }

+ 9 - 6
style24.admin/src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -142,17 +142,20 @@ public class TsaCustomerController extends TsaBaseController {
 		// 일대일문의상세 조회
 		Counsel tCounsel = counselService.getOneToOneQna(counsel.getCounselSq());
 
-//		try {
-//			// 답변완료 카카오알림톡 발송
-//			kakaoService.sendOnetoOneAnswer(tCounsel);
-//		} catch (Exception e) {
-//			// Do nothing
+//		// TODO. 고객이 SMS답변수신을 요청했을 때
+//		if (counsel.getSmsReqYn().equals("Y")) {
+//			try {
+//				// 답변완료안내 카카오알림톡 발송
+//				kakaoService.sendOnetoOneAnswer(tCounsel);
+//			} catch (Exception e) {
+//				// Do nothing
+//			}
 //		}
 
 		// 고객이 이메일답변수신을 요청했을 때
 //		if (counsel.getEmailReqYn().equals("Y")) {
 //			try {
-//				// 답변 메일 발송
+//				// 답변완료안내 메일 발송
 //				mailService.sendOneToOneAnswer(tCounsel);
 //			} catch (Exception e) {
 //				// Do nothing

+ 121 - 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
@@ -112,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 진행 */
 }

+ 2 - 2
style24.admin/src/main/java/com/style24/persistence/domain/Brand.java

@@ -45,6 +45,6 @@ public class Brand extends TscBaseDomain {
 
 	// 검색조건
 	private String searchTxt;		// 검색어
-	private String callbackFn;	// 콜백함수
-
+	private String callbackFn;		// 콜백함수
+	private String multiGb;			// 멀티 셀렉트 구분
 }

+ 4 - 2
style24.admin/src/main/java/com/style24/persistence/domain/Counsel.java

@@ -26,9 +26,11 @@ public class Counsel extends TscBaseDomain {
 	private String custId;			// 고객ID
 	private String custNm;			// 고객명
 	private String cellPhnno;		// 휴대전화번호
+	private String smsReqYn;		// SMS(알림톡)요청여부
+	private String smsSendYn;		// SMS(알림톡)발송여부
 	private String email;			// 이메일
-	private String emailReqYn;		// 이메일요청여부
-	private String emailSendYn;		// 이메일발송여부
+//	private String emailReqYn;		// 이메일요청여부
+//	private String emailSendYn;		// 이메일발송여부
 	private String relGoodsCd;		// 관련상품코드(상품문의에서만 사용)
 	private String goodsNm;			// 상품명(상품문의에서만 사용)
 	private String selfGoodsYn;		// 자사상품여부(상품문의에서만 사용)

+ 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;
+
+}

+ 18 - 9
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml

@@ -16,9 +16,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.ANS_STAT                                                          /*답변상태*/
 		     , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
 		     , A.ANS_NO                                                            /*답변자번호*/
@@ -76,9 +78,11 @@
 		     , B.CUST_ID                                                          /*고객ID*/
 		     , B.CUST_NM                                                          /*고객명*/
 		     , A.CELL_PHNNO                                                       /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                       /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                      /*SMS발송여부*/
 		     , A.EMAIL                                                            /*이메일*/
-		     , A.EMAIL_REQ_YN                                                     /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                    /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                     /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                    /*이메일발송여부*/
 		     , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')    AS QUEST_DT         /*문의일시*/
 		     , A.ANS_NO                                                           /*답변자번호*/
 		     , C.USER_NM                                      AS ANS_NM           /*답변자명*/
@@ -104,7 +108,8 @@
 	<update id="updateQnaAnswer" parameterType="Counsel">
 		/* TsaCounsel.updateQnaAnswer */
 		UPDATE TB_COUNSEL
-		SET    EMAIL_SEND_YN = EMAIL_REQ_YN /*이메일답변수신 값에 따라 이메일을 먼저 발송함으로 이메일답변수신 값과 동일하게 처리*/
+		SET    SMS_SEND_YN = SMS_REQ_YN /*SMS답변수신 값에 따라 SMS를 먼저 발송함으로 SMS답변수신 값과 동일하게 처리*/
+		     -- , EMAIL_SEND_YN = EMAIL_REQ_YN /*이메일답변수신 값에 따라 이메일을 먼저 발송함으로 이메일답변수신 값과 동일하게 처리*/
 		     , ANS_TITLE = #{ansTitle}
 		     , ANS_CONTENT = #{ansContent}
 		     , ANS_STAT = 'G060_20' /*답변완료*/
@@ -126,9 +131,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.REL_GOODS_CD                                                      /*관련상품코드*/
 		     , G.GOODS_NM                                                          /*상품명*/
 		     , A.ANS_STAT                                                          /*답변상태*/
@@ -206,9 +213,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.REL_GOODS_CD                                                      /*관련상품코드*/
 		     , G.GOODS_NM                                                          /*상품명*/
 		     , G.SELF_GOODS_YN                                                     /*자사상품여부*/

+ 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>

+ 4 - 1
style24.admin/src/main/webapp/WEB-INF/views/business/BrandSearchForm.html

@@ -65,14 +65,17 @@
 
 <script th:inline="javascript">
 /*<![CDATA[*/
+	let headerSelection = false;
+	if([[${params.multiGb}]] == "M") headerSelection = true;
 	let columnDefsMdList = [
-		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: false, checkboxSelection: true, filter: false},
+		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: headerSelection, checkboxSelection: true, filter: false},
 		{headerName: "브랜드번호", field: "brandCd", width: 120, cellClass: 'text-center'},
 		{headerName: "브랜드국문명", field: "brandEnm", width: 150, cellClass: 'text-center'},
 		{headerName: "브랜드영문명", field: "brandKnm", width: 150, cellClass: 'text-center'}
 	];
 
 	let gridOptionsBrandList = gagaAgGrid.getGridOptions(columnDefsMdList);
+	if(headerSelection) {	gridOptionsBrandList.rowSelection = "multiple";	}
 
 	// Row double click
 	gridOptionsBrandList.onRowDoubleClicked = function(event) {

+ 11 - 11
style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html

@@ -27,18 +27,18 @@
 		<div class="panelContent">
 			<form id="qnaDetailForm" name="qnaDetailForm" action="#" th:action="@{'/customer/qna/answer/save'}" th:method="post" th:object="${counselInfo}">
 				<input type="hidden" name="counselSq" th:value="*{counselSq}"/>
-				<input type="hidden" name="emailReqYn" th:value="*{emailReqYn}"/>
+				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
 					<colgroup>
 						<col style="width:10%;"/>
 						<col style="width:10%;"/>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
+						<col style="width:8%;"/>
+						<col style="width:12%;"/>
 						<col/>
-						<col style="width:15%;"/>
-						<col style="width:25%;"/>
+						<col style="width:22%;"/>
+						<col style="width:22%;"/>
 					</colgroup>
 					<thead>
 						<tr>
@@ -57,9 +57,9 @@
 							<td th:text="*{siteNm}"></td>
 							<td>상품문의</td>
 							<td th:text="*{questDt}"></td>
-							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
-							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + ' / ' + ansCompNm : ''}"></td>
-							<td th:utext="*{ansStat == '20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+							<td th:utext="*{custNm + ' / ' + cellPhnno + '<br/>' + email}"></td>
+							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td>
+							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
 						</tr>
 					</tbody>
 				</table>
@@ -88,8 +88,8 @@
 						<tr>
 							<th>비밀글여부</th>
 							<td th:text="*{secretYn == 'Y' ? 'Yes' : 'No'}"></td>
-							<th>이메일답변요청</th>
-							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
+							<th>SMS답변요청</th>
+							<td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
@@ -149,7 +149,7 @@
 					</select>
 					<button type="button" class="btn btn-danger btn-lg" id="btnTransferAnswer">답변의뢰</button>
 				</span>
-				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer">답변저장</button>
+				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
 			</li>
 		</ul>
 		<!-- //버튼 배치 영역 -->

+ 16 - 2
style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html

@@ -142,9 +142,23 @@
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.custId + ')</a>'; }
 		},
 		{headerName: "휴대전화번호", field: "cellPhnno", width: 120, cellClass: 'text-center'},
+		{
+			headerName: "SMS답변요청", field: "smsReqYn", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+		},
+		{
+			headerName: "SMS답변발송", field: "smsSendYn", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+		},
 		{headerName: "이메일", field: "email", width: 200},
-		{headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center'},
-		{headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center'},
+// 		{
+// 			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
+// 		{
+// 			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
 		{
 			headerName: "답변상태", field: "ansStat", width: 100, cellClass: 'text-center',
 			cellRenderer: function (params) { return gagaAgGrid.lookupValue(ansStatList, params.value); }

+ 5 - 5
style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html

@@ -27,7 +27,7 @@
 		<div class="panelContent">
 			<form id="qnaDetailForm" name="qnaDetailForm" action="#" th:action="@{'/customer/qna/answer/save'}" th:method="post" th:object="${counselInfo}">
 				<input type="hidden" name="counselSq" th:value="*{counselSq}"/>
-				<input type="hidden" name="emailReqYn" th:value="*{emailReqYn}"/>
+				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
@@ -62,7 +62,7 @@
 							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
 <!-- 							<td th:text="*{relOrdNo}"></td> -->
 <!-- 							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
-							<td th:utext="*{ansStat == '20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
 						</tr>
 					</tbody>
 				</table>
@@ -79,8 +79,8 @@
 						<tr>
 							<th>문의 제목</th>
 							<td th:text="*{questTitle}"></td>
-							<th>이메일답변요청</th>
-							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
+							<th>SMS답변요청</th>
+							<td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
@@ -135,7 +135,7 @@
 		<!-- 버튼 배치 영역 -->
 		<ul class="panelBar">
 			<li class="right">
-				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer">답변저장</button>
+				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
 			</li>
 		</ul>
 		<!-- //버튼 배치 영역 -->

+ 11 - 3
style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html

@@ -131,15 +131,23 @@
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.custId + ')</a>'; }
 		},
 		{headerName: "휴대전화번호", field: "cellPhnno", width: 120, cellClass: 'text-center'},
-		{headerName: "이메일", field: "email", width: 200},
 		{
-			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+			headerName: "SMS답변요청", field: "smsReqYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
 		},
 		{
-			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+			headerName: "SMS답변발송", field: "smsSendYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
 		},
+		{headerName: "이메일", field: "email", width: 200},
+// 		{
+// 			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
+// 		{
+// 			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
 		{
 			headerName: "답변상태", field: "ansStat", width: 100, cellClass: 'text-center',
 			cellRenderer: function (params) { return gagaAgGrid.lookupValue(ansStatList, params.value); }

+ 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>

+ 11 - 11
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">
@@ -521,7 +521,7 @@
 		});
 
 		// 공급업체 설정 / 업체 추가 콜백함수
-		let fnSetPopupComapnyInfo = function(result) {
+		var fnSetPopupComapnyInfo = function(result) {
 			// 기존 리스트 데이터 for
 			for(let i = 0 ; i < result.length ; i++) {
 				let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList);		// 받아온 모든 데이터
@@ -538,7 +538,7 @@
 		};
 
 		// 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
-		let fnSetPopupBrandInfo = function(result) {
+		var fnSetPopupBrandInfo = function(result) {
 			for(let i = 0 ; i < result.length ; i++) {
 				let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);		// 받아온 모든 데이터
 
@@ -553,22 +553,22 @@
 		};
 
 		// 적용 상품 리스트 콜백함수
-		let fnSetPopupApplyGoodsInfo = function(result) {
+		var fnSetPopupApplyGoodsInfo = function(result) {
 			gridAddGoodsList(gridOptionsFGApplyGoodsList, result);
 		};
 
 		// 제외 상품 리스트 콜백함수
-		let fnSetPopupExceptGoodsInfo = function(result) {
+		var fnSetPopupExceptGoodsInfo = function(result) {
 			gridAddGoodsList(gridOptionsFGExceptGoodsList, result);
 		};
 
 		// 사은품 조건1 상품 리스트 콜백함수
-		let fnSetPopupFreeGoods1Info = function(result) {
+		var fnSetPopupFreeGoods1Info = function(result) {
 			gridAddGoodsList(gridOptionsFreeGoods1List, result);
 		};
 
 		// 사은품 조건1 상품 리스트 콜백함수
-		let fnSetPopupFreeGoods2Info = function(result) {
+		var fnSetPopupFreeGoods2Info = function(result) {
 			gridAddGoodsList(gridOptionsFreeGoods2List, result);
 		};
 
@@ -594,7 +594,7 @@
 
 		// 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
 		$('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
-			cfnOpenBrandListPopup("fnSetPopupBrandInfo");
+			cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
 		});
 
 		// 적용 상품 추가 버튼 클릭시
@@ -650,8 +650,8 @@
 			$(this).attr("class","fa inner-fa-chevron-up");
 		});
 
-		//창종료
-		let fnFreeGoodsPromotionFormClose = function(){
+		// 창 닫기
+		var fnFreeGoodsPromotionFormClose = function(){
 			uifnPopupClose('popupFreeGoodsPromotionRegi');
 		}
 

+ 2 - 1
style24.admin/src/main/webapp/ux/js/admin.popup.js

@@ -680,10 +680,11 @@ var cfnOpenFrontGoodsPopup = function(goodsCd, siteCd) {
  * @since  : 2020/12/15
  * @author : eskim
  */
-var cfnOpenBrandListPopup = function(callbackfn, searchTxt) {
+var cfnOpenBrandListPopup = function(callbackfn, multiGb, searchTxt) {
 	var actionUrl = '/business/brand/search/form';
 	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
 	if (typeof(searchTxt) != 'undefined') actionUrl += "&searchTxt=" + encodeURIComponent(searchTxt);
+	if (typeof(multiGb) != 'undefined' && multiGb != null && multiGb == "M") actionUrl += "&multiGb=" + multiGb; else actionUrl += "&multiGb=S";
 	cfnOpenModalPopup(actionUrl, "popupBrandList");
 }