瀏覽代碼

Merge branch 'eskim' into develop

eskim 5 年之前
父節點
當前提交
98e955847b

+ 15 - 0
style24.admin/src/main/java/com/style24/admin/biz/web/TsaBusinessController.java

@@ -600,5 +600,20 @@ public class TsaBusinessController extends TsaBaseController {
 		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
+	/**
+	 * 브랜드 목록 화면(팝업)
+	 * @param brandMd - 담당MD 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	@GetMapping("/brand/search/form")
+	public ModelAndView brandSearchForm(Brand brand) {
+		ModelAndView mav = new ModelAndView();
+
+		mav.addObject("params", brand);
+		mav.setViewName("business/BrandSearchForm");
+		return mav;
+	}
 
 }

+ 1 - 0
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -480,6 +480,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch) {
 
+		log.info("[getGoodsList] goodsSearch=>{}", goodsSearch);
 		GagaMap result = new GagaMap();
 
 		// 입점업체담당자는 업체코드 설정

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

@@ -39,5 +39,6 @@ public class Brand extends TscBaseDomain {
 
 	// 검색조건
 	private String searchTxt;		// 검색어
+	private String callbackFn;	// 콜백함수
 
 }

+ 1 - 0
style24.admin/src/main/java/com/style24/persistence/domain/GoodsPriceRes.java

@@ -42,6 +42,7 @@ public class GoodsPriceRes extends TscBaseDomain {
 	private String edDate;
 	private String confirmY;
 	private Float goodsSellFeeRate;
+	private String searchBrandCd;
 
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] arrGoodsCd;

+ 1 - 0
style24.admin/src/main/java/com/style24/persistence/domain/GoodsSearch.java

@@ -76,6 +76,7 @@ public class GoodsSearch extends TscBaseDomain {
 	private String goodsPriceYn;
 	private String goodsType;
 	private String selfMallYn;
+	private String searchBrandCd;
 
 	private String useYn;
 	private String noticeTitle;

+ 3 - 3
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaBusiness.xml

@@ -424,11 +424,11 @@
 		AND    (
 		        A.BRAND_CD LIKE CONCAT('%',#{searchTxt},'%')
 		        OR
-		        A.BRAND_ENM LIKE CONCAT('%',#{searchTxt},'%')
+		        UPPER(A.BRAND_ENM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
 		        OR
-		        A.BRAND_KNM LIKE CONCAT('%',#{searchTxt},'%')
+		        UPPER(A.BRAND_KNM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
 		        OR
-		        A.BRAND_GRP_NM LIKE CONCAT('%',#{searchTxt},'%')
+		        UPPER(A.BRAND_GRP_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
 		       )
 		</if>
 		<if test='useYn != null and useYn != ""'>

+ 3 - 0
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -2971,6 +2971,9 @@
 		    <if test="brandCd != null and brandCd != ''">
 		    AND G.BRAND_CD = #{brandCd}
 		    </if>
+		    <if test="searchBrandCd != null and searchBrandCd != ''">
+		    AND G.BRAND_CD = #{searchBrandCd}
+		    </if>
 		    <if test="cfrmYn != null and cfrmYn != ''">
 		    AND A.CFRM_YN = #{cfrmYn}
 		    </if>

+ 7 - 4
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaStock.xml

@@ -53,6 +53,9 @@
 		        <if test="brandCd != null and brandCd != ''">
 		        AND G.BRAND_CD = #{brandCd}
 		        </if>
+		        <if test="searchBrandCd != null and searchBrandCd != ''">
+		        AND G.BRAND_CD = #{searchBrandCd}
+		        </if>
 		        <if test="multiBrand != null and multiBrand != ''">
 		        AND G.BRAND_CD IN
 		            <foreach collection="multiBrand" item="item" index="index"  open="(" close=")" separator=",">
@@ -246,10 +249,10 @@
 		            INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
 		            INNER JOIN TB_OPTION ST ON G.GOODS_CD = ST.GOODS_CD
 		            <if test="searchGb == null or searchGb =='BASIC'">
-		                                    <if test="optCd1 == null or optCd1 != ''">
+		                                    <if test="optCd1 != null and optCd1 != ''">
 		                                    AND ST.OPT_CD1 = #{optCd1}
 		                                    </if>
-		                                    <if test="optCd2 == null or optCd2 != ''">
+		                                    <if test="optCd2 != null and optCd2 != ''">
 		                                    AND ST.OPT_CD2 = #{optCd2}
 		                                    </if>
 		            </if>
@@ -397,10 +400,10 @@
 		                    INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
 		                    INNER JOIN TB_OPTION ST ON G.GOODS_CD = ST.GOODS_CD
 		                    <if test="searchGb == null or searchGb =='BASIC'">
-		                                            <if test="optCd1 == null or optCd1 != ''">
+		                                            <if test="optCd1 != null and optCd1 != ''">
 		                                            AND ST.OPT_CD1 = #{optCd1}
 		                                            </if>
-		                                            <if test="optCd2 == null or optCd2 != ''">
+		                                            <if test="optCd2 != null and optCd2 != ''">
 		                                            AND ST.OPT_CD2 = #{optCd2}
 		                                            </if>
 		                    </if>

+ 128 - 0
style24.admin/src/main/webapp/WEB-INF/views/business/BrandSearchForm.html

@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : BrandSearchForm.html
+ * @desc    : 브랜드 팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.12.15   eskim       최초 작성
+ *******************************************************************************
+ -->
+<div class="modalPopup" data-width="500" id="popupBrandList">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<strong>브랜드 목록</strong>
+			<button type="button" class="close" onclick="uifnPopupClose('popupBrandList');"><em class="fa fa-times"></em></button>
+		</div>
+		<!-- //TITLE -->
+		
+		<!-- 검색 조건 -->
+		<div class="panelContent">
+			<form id="searchBrandListForm" name="searchBrandListForm" action="#" th:action="@{'/business/brand/list'}" onsubmit="$('#btnSearchBrandList').trigger('click'); return false;">
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<col style="width:15%;"/>
+						<col/>
+					</colgroup>
+					<tbody>
+						<tr>
+							<th>브랜드명</th>
+							<td>
+								<input type="text" name="searchTxt" th:value="${params.searchTxt}" maxlength="20" onkeypress="if (event.keyCode == 13) { $('#btnSearchBrandList').trigger('click'); }"/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-base btn-lg" id="btnSearchBrandList">조회</button>
+					</li>
+				</ul>
+			</form>
+		</div>
+		<!-- //검색 조건 -->
+		
+		<!-- 리스트 영역 -->
+		<div class="panelContent">
+			<div id="gridBrandList" 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="btnConfirmBrand">확인</button>
+			</li>
+		</ul>
+	</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	let columnDefsMdList = [
+		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: false, 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);
+
+	// Row double click
+	gridOptionsBrandList.onRowDoubleClicked = function(event) {
+		$('#btnConfirmBrand').trigger('click');
+	}
+
+	// 조회
+	$('#btnSearchBrandList').on('click', function() {
+		// Fetch data
+		gagaAgGrid.fetch($('#searchBrandListForm').prop('action'), gridOptionsBrandList, '#searchBrandListForm');
+	});
+	
+	// 확인
+	$('#btnConfirmBrand').on('click', function() {
+		var selectedData = gagaAgGrid.selectedRowData(gridOptionsBrandList);
+		
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 브랜드가 없습니다.');
+			return false;
+		}
+		
+		var callbackFn = [[${params.callbackFn}]];
+
+		var jsonData = JSON.stringify(selectedData);
+
+		if (typeof callbackFn != 'undefined' && callbackFn) {
+			if (typeof callbackFn == 'function') {
+				callbackFn(jsonData);
+			} else {
+				if (callbackFn) {
+					if (callbackFn.indexOf("(") == -1) {
+						eval(callbackFn + "(" + jsonData + ")");
+					} else {
+						eval(callbackFn(jsonData));
+					}
+				}
+			}
+			uifnPopupClose('popupBrandList');
+		}
+	});
+	
+	$(document).ready(function() {
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridBrandList', gridOptionsBrandList);
+		
+		$('#btnSearchBrandList').trigger('click');
+	});
+/*]]>*/
+</script>
+
+</div>
+
+</html>

+ 30 - 7
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -62,12 +62,11 @@
 							</select>
 							<span id="multiBrand"></span>
 						</td>
-						<th>상품타입</th>
+						<th>브랜드<em class="required" title="필수"></em></th>
 						<td>
-							<select name="goodsType" id="goodsType">
-								<option value="">[전체]</option>
-								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
+							<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
+							<input type="text" class="w100" name="brandCd" readonly="readonly"/>
 						</td>
 						<th rowspan="4">키워드<em class="required" title="필수"></em></th>
 						<td rowspan="4">
@@ -204,7 +203,14 @@
 					</tr>
 					<tr>
 						<th>발생일<em class="required" title="필수"></em></th>
-						<td colspan="7" id="sellTerms"></td>
+						<td colspan="5" id="sellTerms"></td>
+						<th>상품타입</th>
+						<td>
+							<select name="goodsType" id="goodsType">
+								<option value="">[전체]</option>
+								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
 					</tr>
 				</table>
 				<ul class="panelBar">
@@ -593,7 +599,7 @@
 				|| !gagajf.isNull($("#searchForm select[name=statSupplyCompCd]").val()) 
 				|| !gagajf.isNull($("#searchForm textarea[name=condition]").val())
 				|| (!gagajf.isNull($("#searchForm input[name=stDate]").val()) && !gagajf.isNull($("#searchForm input[name=edDate]").val()))
-				|| !gagajf.isNull($("#searchForm select[name=brandGrpNm]").val())
+				|| !gagajf.isNull($("#searchForm input[name=brandCd]").val())
 			){
 			searchFlag = true;
 		}else{
@@ -1079,6 +1085,23 @@
 		cfnCreateCombo('/renderer/delvFee/list/' + $('#searchForm select[name=statSupplyCompCd]').val(), $('#searchForm select[name=delvFeeCdC]'), "[선택]");
 	});
 	
+	// 브랜드 조회 팝업에서 호출
+	var fnSetBrandInfo = function(result) {
+		$("#searchForm input[name=brandCd]").val(result[0].brandCd);
+	}
+	
+	// 브랜드 조회 선택시
+	$('#btnSearchBrand').on('click', function() {
+
+		if (gagajf.isNull($("#searchForm input[name=searchTxt]").val())){
+			mcxDialog.alert('브랜드 검색어를 입력하세요.');
+			return false;
+		}
+		
+		cfnOpenBrandListPopup('fnSetBrandInfo', $("#searchForm input[name=searchTxt]").val());
+		
+	});
+	
 	$(document).ready(function() {
 
 		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');

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

@@ -51,13 +51,12 @@
 						</select>
 						<span id="multiBrand"></span>
 					</td>
-					<th>상품타입</th>
-					<td>
-						<select name="goodsType" id="goodsType">
-							<option value="">[전체]</option>
-							<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
+					<th>브랜드<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnPopupSearchBrand"><i class="fa fa-search"></i></button>
+							<input type="text" class="w100" name="brandCd" readonly="readonly"/>
+						</td>
 					<th rowspan="4">키워드<em class="required" title="필수"></em></th>
 					<td rowspan="4">
 						<select name="search" id="search">
@@ -194,7 +193,14 @@
 				</tr>
 				<tr>
 					<th>발생일<em class="required" title="필수"></em></th>
-					<td colspan="7" id="sellTermsP"></td>
+					<td colspan="5" id="sellTermsP"></td>
+					<th>상품타입</th>
+					<td>
+						<select name="goodsType" id="goodsType">
+							<option value="">[전체]</option>
+							<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
 				</tr>
 			</table>
 			<ul class="panelBar">
@@ -384,7 +390,7 @@
 		if( !gagajf.isNull($("#goodsPopupForm select[name=supplyCompCd]").val())
 				|| !gagajf.isNull($("#goodsPopupForm textarea[name=condition]").val())
 				|| (!gagajf.isNull($("#goodsPopupForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=edDate]").val())
-				|| !gagajf.isNull($("#goodsPopupForm select[name=brandGrpNm]").val())
+				|| !gagajf.isNull($("#goodsPopupForm input[name=brandCd]").val())
 
 				)
 			){
@@ -531,6 +537,23 @@
 		cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=supplyCompCd]'), "[전체]", "");
 		
 	});
+	
+	// 브랜드 조회 팝업에서 호출
+	var fnSetPopupBrandInfo = function(result) {
+		$("#goodsPopupForm input[name=brandCd]").val(result[0].brandCd);
+	}
+	
+	// 브랜드 조회 선택시
+	$('#btnPopupSearchBrand').on('click', function() {
+
+		if (gagajf.isNull($("#goodsPopupForm input[name=searchTxt]").val())){
+			mcxDialog.alert('브랜드 검색어를 입력하세요.');
+			return false;
+		}
+		
+		cfnOpenBrandListPopup('fnSetPopupBrandInfo', $("#goodsPopupForm input[name=searchTxt]").val());
+		
+	});
 
 	$(document).ready(function() {
 		cfnCreateCalendar('#sellTermsP', 'stDate', 'edDate', true, '등록일', 'X');

+ 41 - 14
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsSupplyPriceForm.html

@@ -27,20 +27,22 @@
  		<!-- 패널 영역1 -->
 		<div class="panelStyle" >
 			<div class="panelTitle">
-				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 상품코드, 발생일</font> 중 하나를 꼭 입력해 주세요.</h3>
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 브랜드, 상품코드, 발생일</font> 중 하나를 꼭 입력해 주세요.</h3>
 			</div>
 			<div class="panelContent">
 				<table class="frmStyle">
 					<colgroup>
+						<col width="7%"/>
+						<col/>
+						<col width="7%"/>
+						<col width="18%"/>
+						<col width="7%"/>
 						<col width="10%"/>
-						<col width="23%"/>
-						<col width="10%"/>
-						<col width="23%"/>
+						<col width="7%"/>
 						<col width="10%"/>
-						<col/>
 					</colgroup>
 					<tr>
-						<th>업체/브랜드</th>
+						<th>업체/브랜드<em class="required" title="필수"></em></th>
 						<td>
 							<select name="supplyCompCd" id="supplyCompCd">
 								<option value="" >[전체]</option>
@@ -50,7 +52,13 @@
 								<option value="">[전체]</option>
 							</select>
 						</td>
-						<th>상품코드</th>
+						<th>브랜드<em class="required" title="필수"></em></th>
+						<td>
+							<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
+							<input type="text" class="w100" name="searchBrandCd" readonly="readonly"/>
+						</td>
+						<th>상품코드<em class="required" title="필수"></em></th>
 						<td>
 							<input type="text" class="w150" name="goodsCd" id="goodsCd" maxlength="50"/>
 						</td>
@@ -63,8 +71,8 @@
 						</td>
 					</tr>
 					<tr>
-						<th>발생일</th>
-						<td colspan="5" id="sellTerms"></td>
+						<th>발생일<em class="required" title="필수"></em></th>
+						<td colspan="7" id="sellTerms"></td>
 					</tr>
 				</table>
 				<ul class="panelBar">
@@ -245,12 +253,14 @@
 		var searchFlag = false;
 		var cnt = 0;
 
-		/* if( !gagajf.isNull($("#goodsPriceHstForm select[name=supplyCompCd]").val())
-				|| !gagajf.isNull($("#goodsPriceHstForm input[name=condition]").val())
+		 if( !gagajf.isNull($("#goodsPriceHstForm select[name=supplyCompCd]").val())
+				|| !gagajf.isNull($("#goodsPriceHstForm input[name=goodsCd]").val())
 				|| (!gagajf.isNull($("#goodsPriceHstForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPriceHstForm input[name=edDate]").val()))
+				|| !gagajf.isNull($("#goodsPriceHstForm input[name=searchBrandCd]").val())
 			){
 			searchFlag = true;
-		}else{ */
+		}else{ 
+		/*	
 			for (i = 0; i < form.elements.length; i++ ) {
 				var el = form.elements[i];
 				
@@ -262,8 +272,8 @@
 			}
 			
 			if(cnt > 0) searchFlag = true;
-			
-		/* } */
+		*/	
+		 }
 		
 		if(searchFlag == false){
 			mcxDialog.alert("검색조건을 입력하세요.");
@@ -345,6 +355,23 @@
 		fnGoodsPriceHstListSearch('N');
 	}
 	
+	// 브랜드 조회 팝업에서 호출
+	var fnSetBrandInfo = function(result) {
+		$("#goodsPriceHstForm input[name=searchBrandCd]").val(result[0].brandCd);
+	}
+	
+	// 브랜드 조회 선택시
+	$('#btnSearchBrand').on('click', function() {
+
+		if (gagajf.isNull($("#goodsPriceHstForm input[name=searchTxt]").val())){
+			mcxDialog.alert('브랜드 검색어를 입력하세요.');
+			return false;
+		}
+		
+		cfnOpenBrandListPopup('fnSetBrandInfo', $("#goodsPriceHstForm input[name=searchTxt]").val());
+		
+	});
+	
 	$(document).ready(function() {
 		
 		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');

+ 50 - 26
style24.admin/src/main/webapp/WEB-INF/views/stock/GoodsSizeStockForm.html

@@ -28,7 +28,7 @@
 		<div class="panelStyle" >
 			<!-- TITLE -->
 			<div class="panelTitle">
-				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 키워드</font>중 하나를 꼭 입력해 주세요.</h3>
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 브랜드, 키워드</font>중 하나를 꼭 입력해 주세요.</h3>
 				<span class="panelControl">
 					<i class="fa fa-chevron-up"></i>
 				</span>
@@ -59,24 +59,23 @@
 								<option value="">[전체]</option>
 							</select>
 						</td>
-						<th>품목</th>
+						<th>브랜드<em class="required" title="필수"></em></th>
 						<td colspan="3">
-							<select name="itemkindCd" id="itemkindCd">
-								<option value="">[전체]</option>
-								<option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
+							<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
+							<button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
+							<input type="text" class="w100" name="searchBrandCd" readonly="readonly"/>
 						</td>
 					</tr>
 					<tr>
 						<th>키워드<em class="required" title="필수"></em></th>
-						<td colspan="3">
+						<td>
 							<select name="search" id="search">
 								<option value="searchGoodsCd">상품코드</option>
 								<option value="searchGoodsNm">상품명</option>
 								<option value="searchGoodsNum">품번</option>
 								<option value="searchSupplyGoodsCd">업체상품코드</option>
 							</select>
-							<input type="text" class="w150" name="condition" id="condition" maxlength="50"/>
+							<input type="text" class="w100" name="condition" id="condition" maxlength="50"/>
 						</td>
 						<th>상품상태</th>
 						<td>
@@ -85,6 +84,15 @@
 								<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 						</td>
+						<th>품목</th>
+						<td colspan="3">
+							<select name="itemkindCd" id="itemkindCd">
+								<option value="">[전체]</option>
+								<option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
 						<th>정상/이월 구분</th>
 						<td>
 							<select  name="formalGb" id="formalGb">
@@ -92,8 +100,13 @@
 								<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>
+						<td>
+							<select name="optCd1" id="optCd1">
+								<option value="">[전체]</option>
+								<option th:if="${colorList}" th:each="oneData, status : ${colorList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
 						<th>년도/시즌</th>
 						<td colspan="3">
 							<select  name="styleYear" id="styleYear">
@@ -105,18 +118,6 @@
 								<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 						</td>
-						<th>색상</th>
-						<td>
-							<select name="optCd1" id="optCd1">
-								<option value="">[전체]</option>
-								<option th:if="${colorList}" th:each="oneData, status : ${colorList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-							</select>
-						</td>
-						<th>사이즈</th>
-						<td>
-							<input type="text" class="w80" name="optCd2" id="optCd2" maxlength="50"/>
-						</td>
-						
 					</tr>
 					<tr>
 						<th>품절여부</th>
@@ -133,6 +134,10 @@
 								<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
 							</select>
 						</td>
+						<th>사이즈</th>
+						<td>
+							<input type="text" class="w80" name="optCd2" id="optCd2" maxlength="50"/>
+						</td>
 						<th>재고수량</th>
 						<td colspan="3">
 							<input type="text" class="w70" name="stockQtySt" id="stockQtySt" maxlength="5" data-valid-type="numeric"/> ~ <input type="text" class="w70" name="stockQtyEd" id="stockQtyEd" maxlength="5" data-valid-type="numeric"/>
@@ -338,12 +343,15 @@
 		var searchFlag = false;
 		var cnt = 0;
 
-		/* if( !gagajf.isNull($("#goodsSizeStockForm select[name=supplyCompCd]").val())
+		if( !gagajf.isNull($("#goodsSizeStockForm select[name=supplyCompCd]").val())
 				|| !gagajf.isNull($("#goodsSizeStockForm input[name=condition]").val())
 				|| (!gagajf.isNull($("#goodsSizeStockForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsSizeStockForm input[name=edDate]").val()))
+				|| !gagajf.isNull($("#goodsSizeStockForm input[name=searchBrandCd]").val())
+				
 			){
 			searchFlag = true;
-		}else{ */
+		}else{
+			/*
 			for (i = 0; i < form.elements.length; i++ ) {
 				var el = form.elements[i];
 				
@@ -355,8 +363,8 @@
 			}
 
 			if(cnt > 0) searchFlag = true;
-			
-		/* } */
+			*/
+		 } 
 		
 		if(searchFlag == false){
 			mcxDialog.alert("검색조건을 입력하세요.");
@@ -535,7 +543,23 @@
 		$("#goodsSizeStockForm select[name=brandCd] option:gt(0)").remove();
 
 		cfnCreateCombo(actionUrl, $('#goodsSizeStockForm select[name=supplyCompCd]'), "[전체]", "");
+		
+	});
+	
+	// 브랜드 조회 팝업에서 호출
+	var fnSetBrandInfo = function(result) {
+		$("#goodsSizeStockForm input[name=searchBrandCd]").val(result[0].brandCd);
+	}
+	
+	// 브랜드 조회 선택시
+	$('#btnSearchBrand').on('click', function() {
 
+		if (gagajf.isNull($("#goodsSizeStockForm input[name=searchTxt]").val())){
+			mcxDialog.alert('브랜드 검색어를 입력하세요.');
+			return false;
+		}
+		
+		cfnOpenBrandListPopup('fnSetBrandInfo', $("#goodsSizeStockForm input[name=searchTxt]").val());
 		
 	});
 	

+ 21 - 0
style24.admin/src/main/webapp/ux/js/admin.popup.js

@@ -665,3 +665,24 @@ var cfnOpenFrontGoodsPopup = function(goodsCd, siteCd) {
 
 	window.open(actionUrl);
 }
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 브랜드 목록 팝업
+ * <pre>
+ *     cfnOpenBrandListPopup();
+ *     or
+ *     cfnOpenBrandListPopup('fnResult');
+ *     or
+ *     cfnOpenBrandListPopup('fnResult', 'TBJ');
+ * </pre>
+ * @since  : 2020/12/15
+ * @author : eskim
+ */
+var cfnOpenBrandListPopup = function(callbackfn, searchTxt) {
+	var actionUrl = '/business/brand/search/form';
+	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
+	if (typeof(searchTxt) != 'undefined') actionUrl += "&searchTxt=" + encodeURIComponent(searchTxt);
+	cfnOpenModalPopup(actionUrl, "popupBrandList");
+}

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

@@ -101,8 +101,9 @@ function uifnPopupClose(id) {
 	} else if ( $thisId.hasClass("videoPopup") ) {  //비디오팝업
 		$thisId.css({display:"none"});
 		$("#iframe_video").attr("src","");
-		$thisId.remove();
+
 	};
+	$thisId.remove();
 };
 
 //비디오 팝업 열기