Kaynağa Gözat

기획전다중검색,기획전팝업개발중

sowon4187 5 yıl önce
ebeveyn
işleme
a0db2e8670

+ 14 - 1
src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -1397,7 +1397,7 @@ public class TsaMarketingController extends TsaBaseController {
 			param.setConditionList(param.getCondition().replaceAll("\r", "").split("\n"));
 		}
 		Collection<Plan> planList = planService.getPlanList(param);
-
+		
 		param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		param.setPageable(new TscPageRequest(param.getPageNo() - 1, param.getPageSize()));
 		param.getPageable().setTotalCount(planService.getPlanListCnt(param));
@@ -1450,5 +1450,18 @@ public class TsaMarketingController extends TsaBaseController {
 	public Plan copyPlan(@RequestBody Plan param) {
 		return planService.copyPlan(param);
 	}
+	
+	/**
+	 * 기획전 조회 팝업
+	 *
+	 * @return
+	 * @author sowon
+	 * @since 2021. 2. 15
+	 */
+	@GetMapping("/planning/list/popup/form")
+	public ModelAndView planPopup() {
+		ModelAndView mav = new ModelAndView("marketing/PlanPopupForm");
+		return mav;
+	}
 
 }

+ 6 - 6
src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml

@@ -152,7 +152,7 @@
 		AND    PLAN_NM LIKE UPPER('%' || #{planNm} || '%')
 		</if>
 		
-		<if test="condition != null and condition != ''">
+		<!-- <if test="condition != null and condition != ''"> -->
 		<choose>
 			     <when test="search != null and search == 'searchPlanNm'">
 		AND    (
@@ -168,7 +168,7 @@
 		         </foreach>
 			      </when>
 		</choose>
-		</if>
+		<!-- </if> -->
 		<if test="openYn != null and openYn != ''">
 		AND    OPEN_YN = #{openYn}
 		</if>
@@ -208,24 +208,24 @@
 		<if test ="siteCd != null and siteCd !=''">
 		AND    SITE_CD = #{siteCd}
 		</if>
-        <if test='condition != null and condition != "" '>
+        <!-- <if test='condition != null and condition != "" '> -->
 		<choose>
 		     <when test='search != null and search == "searchPlanNm"'>
  		AND (
-		         <foreach collection="condition" item="item" index="index" separator="or">
+		         <foreach collection="conditionList" item="item" index="index" separator="or">
 		           UPPER(PLAN_NM) LIKE CONCAT('%',UPPER(#{item}),'%') 
 		         </foreach>
 		     )
 		     </when>
 		     <when test='search != null and search == "searchPlanSq"'>
  		AND (		 
-		         <foreach collection="condition" item="item" index="index" separator="or">
+		         <foreach collection="conditionList" item="item" index="index" separator="or">
 	    		   UPPER(PLAN_SQ) LIKE CONCAT('%',UPPER(#{item}),'%') 
 		         </foreach>
 		    )
 		      </when>
 		</choose>
-		</if>
+		<!-- </if> -->
 		<if test="openYn != null and openYn != ''">
 		AND    OPEN_YN = #{openYn}
 		</if>

+ 224 - 0
src/main/webapp/WEB-INF/views/marketing/PlanPopupForm.html

@@ -0,0 +1,224 @@
+<!DOCTYPE html>
+<html lang="ko" xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : PlanListPopupForm.html
+ * @desc    : 기획전 조회 팝업 화면 Page
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.02.15   sowon     최초 작성
+ *******************************************************************************
+ -->
+
+<div class="modalPopup" data-width="1200">
+
+	<div class="panelStyle" style="height: 750px;">
+		<div class="panelTitle">
+			<strong>기획전 조회</strong>
+			<button type="button" class="close"
+				onclick="uifnPopupClose('popupPlan')">
+				<i class="fa fa-times"></i>
+			</button>
+		</div>
+
+		<div class="panelContent">
+			<form id="popupPlanSearchForm" name="popupPlanSearchForm" action="#"
+				th:action="@{'/marketing/planning/list'}"
+				onsubmit="$('#btnPlanPopupSearch').trigger('click'); return false;">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width: 5%;" />
+						<col style="width: 20%;" />
+						<col style="width: 5%;" />
+						<col style="width: 20%;" />
+						<col style="width: 5%;" />
+						<col style="width: 10%;" />
+						<col style="width: 5%;" />
+						<col style="width: 10%;" />
+						<col />
+					</colgroup>
+					<tbody>
+						<tr>
+							<th>사이트</th>
+						<!-- 	<td><label th:if="${siteList}"
+								th:each="oneData, status : ${siteList}"> <input
+									type="checkbox" name="siteCds" th:value="${oneData.cd}"
+									th:text="${oneData.cdNm}" />
+							</label></td> -->
+
+							<th>기획전명</th>
+							<td><input type="text" name="planNm" id="planNm" /></td>
+
+							<th>기획전번호</th>
+							<td colspan="3"><input type="text" name="planSq" id="planSq" />
+							</td>
+
+						</tr>
+						<tr>
+							<th>웹/모바일구분</th>
+							<td><select name="frontGb">
+									<option value="">ALL</option>
+									<option value="P">웹</option>
+									<option value="M">모바일</option>
+							</select></td>
+
+							<th>기획전구분</th>
+							<td><select name="planGb">
+									<option value="">전체</option>
+									<option value="P">기획전</option>
+									<option value="E">이벤트</option>
+							</select></td>
+
+							<th>기획전템플릿유형</th>
+							<td colspan="3"><select name="templateType">
+									<option value="">전체</option>
+									<option value="H">HTML</option>
+									<option value="T">TEXT</option>
+							</select></td>
+						</tr>
+
+						<tr>
+							<th>진행기간</th>
+							<td colspan="3" id="popupPlanTerms"></td>
+
+							<th>오픈여부</th>
+							<!-- <td><select name="openYn">
+									<option value="">전체</option>
+									<option th:if="${useYnList}"
+										th:each="oneData, status : ${useYnList}"
+										th:value="${oneData.cd}"
+										th:text="|[${oneData.cd}] ${oneData.cdNm}|"></option>
+							</select></td> -->
+
+							<th class="dashR">등록자</th>
+							<td class="dashR"><input type="text" name="regId" id="regId" />
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<ul class="panelBar">
+					<li class="center"><input type="button" value="초기화"
+						class="btn btn-gray btn-lg" id="btnReset" onclick="fnReset();" />
+						<input type="button" value="조회" class="btn btn-base btn-lg"
+						id="btnPlanPopupSearch" /></li>
+				</ul>
+			</form>
+		</div>
+		<!-- 리스트 영역 -->
+		<div class="panelContent">
+			<div id="gridPlanList" style="width: 100%; height: 470px"
+				class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+
+		<!-- 버튼 배치 영역 -->
+		<ul class="panelBar">
+			<li class="right">
+				<button type="button" class="btn btn-info btn-lg"
+					id="btnConfirmPlan">확인</button>
+			</li>
+		</ul>
+
+	</div>
+</div>
+<!-- <script th:inline="javascript">
+/*<![CDATA[*/
+
+	var siteList = cfnConvertToArray([[${siteList}]]);
+	var wmGbList = {"A":"ALL", "P":"웹", "M":"모바일"};
+	var templateTypeList = {"H":"HTML", "T":"TEXT"};
+	var planGbList = {"P":"기획전", "E":"이벤트"};
+
+	var columnDefsPopupPlan = [
+// 		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+// 		{headerName: "미리보기"		, field:'plan'		, width:100, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return '<a href="javascript:void(0);" onclick="fnPreview(\'' + params.data.planSq + '\');">' + '미리보기' + '</a>'; }
+// 		},
+		{headerName: "기획전번호"		, field:'planSq'	, width:100, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
+		},
+		{headerName: "사이트"			, field:'siteCd'	, width:100, cellClass: 'text-center',
+			 valueFormatter: function (params) { return gagaAgGrid.lookupValue(siteList, params.value); }
+		},
+		{headerName: "기획전명"		, field:'planNm'	, width:300, cellClass: 'text-left',
+// 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
+		},
+		{headerName: "기획전구분"		, field:'planGb'	, width:100, cellClass: 'text-center',
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(planGbList, params.value); }
+		},
+		{headerName: "기획전템플릿유형"	, field:'templateType'	, width:100, cellClass: 'text-center',
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(templateTypeList, params.value); }
+		},
+		{headerName: "전시순서"		, field:'dispOrd'	, width:100, cellClass: 'text-right' },
+		{headerName: "진행시작일시"		, field:'dispStdt'	, width:150, cellClass: 'text-center'},
+		{headerName: "진행종료일시"		, field:'dispEddt'	, width:150, cellClass: 'text-center'},
+		{headerName: "프론트구분"	, field:'frontGb'	, width:120, cellClass: 'text-center',
+			 valueFormatter: function (params) { return gagaAgGrid.lookupValue(wmGbList, params.value); }
+		},
+		{headerName: "오픈여부"		, field:'openYn'	, width:80 , cellClass: 'text-center'},
+		{headerName: "등록자"			, field:'regId'		, width:100, cellClass: 'text-center'},
+		{headerName: "등록일"			, field:'regDt'		, width:150, cellClass: 'text-center'},
+	];
+
+	var gridOptionsPopupPlan = gagaAgGrid.getGridOptions(columnDefsPopupPlan);
+	gridOptionsPopupPlan.rowSelection = 'single';
+	
+	// 셀 클릭 이벤트
+	gridOptionsPopupPlan.onCellClicked = function(event) {
+		var field = event.colDef.field;
+		if (field != 'planSq' && field != 'planNm')
+			return;
+		
+	}
+	
+	// 조회 버튼 클릭 시
+	$('#btnPlanPopupSearch').on('click', function() {
+		var formId = '#popupPlanSearchForm';
+		gagaAgGrid.fetch($(formId).prop('action'), gridOptionsPopupPlan, formId);
+	});
+	
+	// 적용 버튼 클릭 시
+	$('#btnPlanPopupApply').on('click', function() {
+		var callback = [[${params.callBackFun}]];
+		
+		var selectedData = gagaAgGrid.selectedRowData(gridOptionsPopupPlan);
+		
+		if (selectedData.length < 1) {
+			mcxDialog.alert('선택 된 기획전이 없습니다.');
+			return
+		}
+		
+		var jsonData = JSON.stringify(selectedData);
+
+		if ( typeof callback != 'undefined' && callback) {
+
+			if (typeof callback == 'function') {
+				callback(jsonData);
+			} else {
+				if (callback) {
+					if ( callback.indexOf("(") == -1 ) eval( callback +"(" + jsonData+")");
+					else eval( callback(jsonData) );
+				}
+			}
+			
+			uifnPopClose('popupPlan'); //20191105
+		}
+	});
+	
+	$(document).ready(function() {
+		cfnCreateCalendar('#popupPlanTerms', 'popupDispStdt', 'popupDispEddt', false);
+		gagajf.setDate('popupDispStdt', 'popupDispEddt', '7d');
+		
+		gagaAgGrid.createGrid('gridListPopupPlan', gridOptionsPopupPlan);
+
+		uifnFitGrid('auto');
+	});
+	
+/*]]>*/
+</script> -->
+
+</html>