eskim 5 роки тому
батько
коміт
f8cb2580cc

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

@@ -760,7 +760,7 @@ public class TsaGoodsController extends TsaBaseController {
 		int toYear = Integer.parseInt(GagaDateUtil.getToday("yyyy")) - 4;
 		mav.addObject("styleYearList", rendererService.getYearList(toYear,0,5));
 		// 회원등급
-		mav.addObject("custGradeList", rendererService.getAvailCommonCodeList("G101"));
+		//mav.addObject("custGradeList", rendererService.getAvailCommonCodeList("G101"));
 
 		mav.addObject("params", goods);
 

+ 13 - 13
style24.admin/src/main/java/com/style24/admin/biz/web/TsaRendererController.java

@@ -134,19 +134,19 @@ public class TsaRendererController extends TsaBaseController {
 //		return rendererService.getVendorExtmallSellStoreList(vendorId);
 //	}
 //
-//	/**
-//	 * 현재 유효한 공통코드 목록
-//	 * @param cdGb - 공통그룹코드
-//	 * @return
-//	 * @author eskim
-//	 * @since 2020. 01. 22
-//	 */
-//	@GetMapping("/avail/commonCode/list/{cdGb}")
-//	@ResponseBody
-//	public Collection<AdmCommonCode> getAvailCommonCodeList(@PathVariable String cdGb) {
-//		return rendererService.getAvailCommonCodeList(cdGb);
-//	}
-//
+	/**
+	 * 현재 유효한 공통코드 목록
+	 * @param cdGb - 공통그룹코드
+	 * @return
+	 * @author eskim
+	 * @since 2020. 01. 22
+	 */
+	@GetMapping("/avail/commonCode/list/{cdGb}")
+	@ResponseBody
+	public Collection<CommonCode> getAvailCommonCodeList(@PathVariable String cdGb) {
+		return rendererService.getAvailCommonCodeList(cdGb);
+	}
+
 	/**
 	 * 업체별 색상 목록
 	 * @param cdGb - 공통그룹코드

+ 20 - 44
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -76,9 +76,8 @@
 							<li><a href="#goodstab2">옵션/재고정보</a></li>
 							<li><a href="#goodstab3">상품상세정보</a></li>
 							<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
-							<li id="goodsGradeTab"><a href="#goodstab5">구매등급</a></li>
-							<li id="goodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
-							<li><a href="#goodstab7">변경이력</a></li>
+							<li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
+							<li><a href="#goodstab6">변경이력</a></li>
 						</ul>
 					</div>
 					<!-- //TABS NAVI -->
@@ -158,7 +157,7 @@
 										</td>
 									</tr>
 									<tr>
-										<td rowspan="11">&nbsp;</td>
+										<td rowspan="12">&nbsp;</td>
 										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
 											<select  name="seasonCd" id="seasonCd">
@@ -329,6 +328,12 @@
 											<input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
 										</td>
 									</tr>
+									<tr>
+										<th>구매등급</th>
+										<td colspan="5">
+											<div id="goodsCustGradeList"></div>
+										</td>
+									</tr>
 									<tr>
 										<th>안전인증번호</th>
 										<td colspan="5">
@@ -336,7 +341,6 @@
 											<input type="hidden" id="certNumOrg" name="certNumOrg"/>
 											<button type="button" class="btn btn-success btn-lg" id="btnGoodsSafetyCertNum">안전인증</button>
 										</td>
-										
 									</tr>
 									</tbody>
 								</table>
@@ -445,33 +449,8 @@
 							<!-- //TAB4 CONTENTS AREA -->
 						</li>
 						<!-- //TAB4 : 고시정보 -->
-						<!-- 구매등급정보 -->
-						<li class="tab" id="goodstab5">
-							<div class="panelStyle">
-								<table class="frmStyle">
-									<colgroup>
-										<col style="width:10%"/>
-										<col style="width:13%"/>
-										<col/>
-									</colgroup>
-									<tr>
-										<th>구매등급</th>
-										<td>
-											<select id="custGrade" name="custGrade" >
-												<option value="" selected="selected">[선택]</option>
-												<option th:if="${custGradeList}" th:each="oneData, status : ${custGradeList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
-											</select>
-											<button type="button" class="btn btn-default btn-lg" onclick="fnGoodsOrderGrade()">선택</button>
-										</td>
-										<td>
-											<div class="memAddWrap" id="goodsCustGradeList"></div>
-										</td>
-									</tr>
-								</table>
-							</div>
-						</li>
 						<!-- 구성상품 -->
-						<li class="tab" id="goodstab6">
+						<li class="tab" id="goodstab5">
 							<!-- TAB6 CONTENTS AREA -->
 							<div class="panelStyle">
 								<!-- 내용 삽입 -->
@@ -488,7 +467,7 @@
 							<!-- //TAB6 CONTENTS AREA -->
 						</li>
 						<!-- TAB5 : 이력정보 -->
-						<li class="tab" id="goodstab7">
+						<li class="tab" id="goodstab6">
 							<!-- TAB8 CONTENTS AREA -->
 							<div class="panelStyle">
 								<!-- 내용 삽입 -->
@@ -1027,22 +1006,17 @@
 	var fnGoodsDetailOrderGradeSearchCallback = function(result) {
 		if (result == null) return;
 
-		var addHtml = "";
-		$('#goodsDetailForm').find('#goodsCustGradeList').html('');
-		
 		result.forEach(function(info){
-			addHtml = '<span class="memAdd"><input type="hidden" name="goodsOrderGrade" value="'+info.custGrade+'"/>'+ info.custGradeName+' <button type="button" onclick="$(this).parent().remove();return false;">삭제</button></span>';
-			addHtml += '\n';
+			
+			$("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
+				if (info.custGrade == $(this).val() ){
+					$(this).prop("checked", true);
+					$(this).parent("label").addClass("checked");
+				}
+			});
 		});
-
-		$('#goodsDetailForm').find('#goodsCustGradeList').append(addHtml);
 	}
 
-	//구매등급 변경여부
-	$('#goodsDetailForm').find('#goodstab5').find("input, select, textarea").on('change', function() {
-		$('#goodsDetailForm').find('.tabs .tabsNav li:eq(4) a').attr("style", "color:red;");
-	});
-	
 	//상품명 길이표시
 	$("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
 		fnDataLengthCheck('goodsNm',200);
@@ -2107,6 +2081,8 @@
 	});
 	
 	$(document).ready(function() {
+		
+		cfnCreateCheckbox("/renderer/avail/commonCode/list/G101", $('#goodsCustGradeList'), "goodsOrderGrade");
 
 		gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
 		gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);

+ 1 - 1
style24.scm/src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -422,7 +422,7 @@ public class TssGoodsController extends TssBaseController {
 		int toYear = Integer.parseInt(GagaDateUtil.getToday("yyyy")) - 4;
 		mav.addObject("styleYearList", rendererService.getYearList(toYear, 0, 5));
 		// 회원등급
-		mav.addObject("custGradeList", rendererService.getAvailCommonCodeList("G101"));
+		//mav.addObject("custGradeList", rendererService.getAvailCommonCodeList("G101"));
 
 		mav.addObject("params", goods);
 

+ 13 - 13
style24.scm/src/main/java/com/style24/scm/biz/web/TssRendererController.java

@@ -111,19 +111,19 @@ public class TssRendererController extends TssBaseController {
 //		return rendererService.getVendorExtmallSellStoreList(vendorId);
 //	}
 //
-//	/**
-//	 * 현재 유효한 공통코드 목록
-//	 * @param cdGb - 공통그룹코드
-//	 * @return
-//	 * @author eskim
-//	 * @since 2020. 01. 22
-//	 */
-//	@GetMapping("/avail/commonCode/list/{cdGb}")
-//	@ResponseBody
-//	public Collection<AdmCommonCode> getAvailCommonCodeList(@PathVariable String cdGb) {
-//		return rendererService.getAvailCommonCodeList(cdGb);
-//	}
-//
+	/**
+	 * 현재 유효한 공통코드 목록
+	 * @param cdGb - 공통그룹코드
+	 * @return
+	 * @author eskim
+	 * @since 2020. 01. 22
+	 */
+	@GetMapping("/avail/commonCode/list/{cdGb}")
+	@ResponseBody
+	public Collection<CommonCode> getAvailCommonCodeList(@PathVariable String cdGb) {
+		return rendererService.getAvailCommonCodeList(cdGb);
+	}
+
 	/**
 	 * 업체별 색상 목록
 	 * @param cdGb - 공통그룹코드

+ 20 - 38
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -77,9 +77,8 @@
 							<li><a href="#goodstab2">옵션/재고정보</a></li>
 							<li><a href="#goodstab3">상품상세정보</a></li>
 							<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
-							<li id="goodsGradeTab"><a href="#goodstab5">구매등급</a></li>
-							<li id="goodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
-							<li><a href="#goodstab7">변경이력</a></li>
+							<li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
+							<li><a href="#goodstab6">변경이력</a></li>
 						</ul>
 					</div>
 					<!-- //TABS NAVI -->
@@ -159,7 +158,7 @@
 										</td>
 									</tr>
 									<tr>
-										<td rowspan="10">&nbsp;</td>
+										<td rowspan="11">&nbsp;</td>
 										<th>시즌<em class="required" title="필수"></em></th>
 										<td >
 											<select  name="seasonCd" id="seasonCd">
@@ -330,6 +329,12 @@
 											<input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
 										</td>
 									</tr>
+									<tr>
+										<th>구매등급</th>
+										<td colspan="5">
+											<div id="goodsCustGradeList"></div>
+										</td>
+									</tr>
 									</tbody>
 								</table>
 							</div>
@@ -437,33 +442,8 @@
 							<!-- //TAB4 CONTENTS AREA -->
 						</li>
 						<!-- //TAB4 : 고시정보 -->
-						<!-- 구매등급정보 -->
-						<li class="tab" id="goodstab5">
-							<div class="panelStyle">
-								<table class="frmStyle">
-									<colgroup>
-										<col style="width:10%"/>
-										<col style="width:13%"/>
-										<col/>
-									</colgroup>
-									<tr>
-										<th>구매등급</th>
-										<td>
-											<select id="custGrade" name="custGrade" >
-												<option value="" selected="selected">[선택]</option>
-												<option th:if="${custGradeList}" th:each="oneData, status : ${custGradeList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
-											</select>
-											<button type="button" class="btn btn-default btn-lg" onclick="fnGoodsOrderGrade()">선택</button>
-										</td>
-										<td>
-											<div class="memAddWrap" id="goodsCustGradeList"></div>
-										</td>
-									</tr>
-								</table>
-							</div>
-						</li>
 						<!-- TAB6 : 구성상품 -->
-						<li class="tab" id="goodstab6">
+						<li class="tab" id="goodstab5">
 							<!-- TAB6 CONTENTS AREA -->
 							<div class="panelStyle">
 								<!-- 내용 삽입 -->
@@ -481,7 +461,7 @@
 						</li>
 						<!-- //TAB7 : 추가정보 -->
 						<!-- TAB5 : 이력정보 -->
-						<li class="tab" id="goodstab7">
+						<li class="tab" id="goodstab6">
 							<!-- TAB8 CONTENTS AREA -->
 							<div class="panelStyle">
 								<!-- 내용 삽입 -->
@@ -904,15 +884,15 @@
 	var fnGoodsDetailOrderGradeSearchCallback = function(result) {
 		if (result == null) return;
 
-		var addHtml = "";
-		$('#goodsDetailForm').find('#goodsCustGradeList').html('');
-		
 		result.forEach(function(info){
-			addHtml = '<span class="memAdd"><input type="hidden" name="goodsOrderGrade" value="'+info.custGrade+'"/>'+ info.custGradeName+' <button type="button" onclick="$(this).parent().remove();return false;">삭제</button></span>';
-			addHtml += '\n';
+			
+			$("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
+				if (info.custGrade == $(this).val() ){
+					$(this).prop("checked", true);
+					$(this).parent("label").addClass("checked");
+				}
+			});
 		});
-
-		$('#goodsDetailForm').find('#goodsCustGradeList').append(addHtml);
 	}
 
 	//구매등급 변경여부
@@ -1805,6 +1785,8 @@
 	});
 	
 	$(document).ready(function() {
+		
+		cfnCreateCheckbox("/renderer/avail/commonCode/list/G101", $('#goodsCustGradeList'), "goodsOrderGrade");
 
 		gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
 		//gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);