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

브랜드 조회 팝업 적용

eskim 5 лет назад
Родитель
Сommit
8786e0d3ca

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

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