Ver Fonte

이태영 - 2020127 사은품 프로모션 화면 작성 중 중간 커밋

이태영 há 5 anos atrás
pai
commit
5c4e2c4852
48 ficheiros alterados com 422 adições e 161 exclusões
  1. 4 0
      style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java
  2. 8 7
      style24.admin/src/main/webapp/WEB-INF/views/business/SupplyCompanySearchForm.html
  3. 3 3
      style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html
  4. 396 146
      style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html
  5. 2 1
      style24.batch/.gitignore
  6. 1 0
      style24.core/.gitignore
  7. 4 0
      style24.front/.gitignore
  8. BIN
      style24.front/target/classes/com/style24/front/biz/dao/TsfLoginDao.class
  9. BIN
      style24.front/target/classes/com/style24/front/biz/dao/TsfNoticeDao.class
  10. BIN
      style24.front/target/classes/com/style24/front/biz/service/TsfLoginService.class
  11. BIN
      style24.front/target/classes/com/style24/front/biz/service/TsfNoticeService.class
  12. BIN
      style24.front/target/classes/com/style24/front/biz/web/TsfCustomerController.class
  13. BIN
      style24.front/target/classes/com/style24/front/biz/web/TsfIndexController.class
  14. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfMybatisShopConfig.class
  15. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfRedisSessionConfig.class
  16. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfThymeleafConfig.class
  17. BIN
      style24.front/target/classes/com/style24/front/support/config/TsfWebMvcConfig.class
  18. BIN
      style24.front/target/classes/com/style24/front/support/controller/TsfBaseController.class
  19. BIN
      style24.front/target/classes/com/style24/front/support/controller/TsfCustomErrorController.class
  20. BIN
      style24.front/target/classes/com/style24/front/support/env/TsfConstants.class
  21. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfDormantAccountException.class
  22. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfEmailDuplicationException.class
  23. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfLockedAccountException.class
  24. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfSecedeAccountException.class
  25. BIN
      style24.front/target/classes/com/style24/front/support/exception/TsfSessionExpiredException.class
  26. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfAflinkInterceptor.class
  27. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfDefaultInterceptor.class
  28. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfGoodsViewInterceptor.class
  29. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfLoginCheckInterceptor.class
  30. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfRememberMeInterceptor.class
  31. BIN
      style24.front/target/classes/com/style24/front/support/interceptor/TsfReturnUrlInterceptor.class
  32. BIN
      style24.front/target/classes/com/style24/front/support/security/TsfAuthenticationProvider.class
  33. BIN
      style24.front/target/classes/com/style24/front/support/security/TsfLoginDetails.class
  34. BIN
      style24.front/target/classes/com/style24/front/support/security/config/TsfSecurityConfig.class
  35. BIN
      style24.front/target/classes/com/style24/front/support/security/filter/TsfAuthenticationFilter.class
  36. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginFailureHandler.class
  37. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLoginSuccessHandler.class
  38. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfLogoutSuccessHandler.class
  39. BIN
      style24.front/target/classes/com/style24/front/support/security/handler/TsfRememberMeSuccessHandler.class
  40. BIN
      style24.front/target/classes/com/style24/front/support/security/session/TsfSession.class
  41. BIN
      style24.front/target/classes/com/style24/front/support/startup/TsfApplication.class
  42. BIN
      style24.front/target/classes/com/style24/front/support/startup/TsfServletInitializer.class
  43. BIN
      style24.front/target/classes/com/style24/persistence/TsfPageRequest.class
  44. BIN
      style24.front/target/classes/com/style24/persistence/domain/Login.class
  45. BIN
      style24.front/target/classes/com/style24/persistence/domain/Notice.class
  46. BIN
      style24.front/target/classes/com/style24/persistence/domain/PersistentToken$PersistentTokenBuilder.class
  47. BIN
      style24.front/target/classes/com/style24/persistence/domain/PersistentToken.class
  48. 4 4
      style24.front/target/classes/com/style24/persistence/mybatis/TsfFaq.xml

+ 4 - 0
style24.admin/src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -99,6 +99,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;

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

+ 396 - 146
style24.admin/src/main/webapp/WEB-INF/views/marketing/FreeGoodsPromotionRegiForm.html

@@ -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,395 @@
 	</div>
 
 	<script th:inline="javascript">
-		let columnCompanyList = [
+		var 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';
+					}
+				}
+			}
+		];
+		// 공급업체 리스트 설정
+		var gridOptionsFGCompanyList = gagaAgGrid.getGridOptions(columnFGCompanyList);
+		gridOptionsFGCompanyList.rowSelection = "multiple";
+		// 브랜드 리스트 설정
+		var gridOptionsFGBrandList = gagaAgGrid.getGridOptions(columnBrandList);
+		gridOptionsFGBrandList.rowSelection = "multiple";
+		// 적용상품 리스트 설정
+		var gridOptionsFGApplyGoodsList = gagaAgGrid.getGridOptions(columnApplyGoodsList);
+		gridOptionsFGApplyGoodsList.rowSelection = "multiple";
+		// 제외상품 리스트 설정
+		var gridOptionsFGExceptGoodsList = gagaAgGrid.getGridOptions(columnExceptGoodsList);
+		gridOptionsFGExceptGoodsList.rowSelection = "multiple";
+		// 사은품 조건1 리스트 설정
+		var gridOptionsFreeGoods1List = gagaAgGrid.getGridOptions(columnFreeGoods1List);
+		gridOptionsFreeGoods1List.rowSelection = "multiple";
+		// 사은품 조건2 리스트 설정
+		var 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;
+			}
+
+			// 행사기간 확인
+			var fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
+			var 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;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList);		// 받아온 모든 데이터
+
+				// 받아온 data for
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					// 동일한 data는 추가하지 않음
+					if(gridListValue[j].supplyCompCd == result[i].supplyCompCd) {
+						addChk = false;
+					}
+				}
+
+				// 동일한 data 리스트에 추가
+				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;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);
 
-		}
+				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) {
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList);
+
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].goodsCd == result[i].goodsCd) {
+						addChk = false;
+					}
+				}
+
+				if(addChk) {
+					gagaAgGrid.addRowData(gridOptionsFGApplyGoodsList, result[i], "goodsCd");
+				}
+			}
+		};
+
+		// 제외 상품 리스트 콜백함수
+		var fnSetPopupExceptGoodsInfo = function(result) {
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList);
+
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].goodsCd == result[i].goodsCd) {
+						addChk = false;
+					}
+				}
+
+				if(addChk) {
+					gagaAgGrid.addRowData(gridOptionsFGExceptGoodsList, result[i], "goodsCd");
+				}
+			}
+		};
+
+		// 사은품 조건1 상품 리스트 콜백함수
+		var fnSetPopupFreeGoods1Info = function(result) {
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List);
+
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].goodsCd == result[i].goodsCd) {
+						addChk = false;
+					}
+				}
+
+				if(addChk) {
+					gagaAgGrid.addRowData(gridOptionsFreeGoods1List, result[i], "goodsCd");
+				}
+			}
+		};
+
+		// 사은품 조건1 상품 리스트 콜백함수
+		var fnSetPopupFreeGoods2Info = function(result) {
+			for(let i = 0 ; i < result.length ; i++) {
+				let addChk = true;
+				let gridListValue = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List);
+
+				for(let j = 0 ; j < gridListValue.length ; j++) {
+					if(gridListValue[j].goodsCd == result[i].goodsCd) {
+						addChk = false;
+					}
+				}
+
+				if(addChk) {
+					gagaAgGrid.addRowData(gridOptionsFreeGoods2List, 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)});
 		});
 
 		//패널영역 줄이기
@@ -450,5 +699,6 @@
 		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


+ 4 - 4
style24.front/target/classes/com/style24/persistence/mybatis/TsfFaq.xml

@@ -37,8 +37,8 @@
 		<if test="searchTxt != null and searchTxt !=''">
 		AND    (
 		        LOWER(QUESTION) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
-		        -- OR
-		        -- LOWER(ANSWER) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		        OR
+		        LOWER(ANSWER) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
 		       )
 		</if>
 	</select>
@@ -61,8 +61,8 @@
 		<if test="searchTxt != null and searchTxt !=''">
 		AND    (
 		        LOWER(QUESTION) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
-		        -- OR
-		        -- LOWER(ANSWER) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		        OR
+		        LOWER(ANSWER) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
 		       )
 		</if>
 		ORDER  BY REG_DT DESC