eskim 5 лет назад
Родитель
Сommit
50e9e4df0a

+ 4 - 1
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -1228,8 +1228,11 @@ public class TsfGoodsController extends TsfBaseController {
 	@PostMapping("/detail/option1/list")
 	@ResponseBody
 	public GagaMap getGoodsOption1List(@RequestBody Goods goods) {
-
+		
 		GagaMap result = new GagaMap();
+		if (StringUtils.isEmpty(goods.getMastrGoodsCd())) {
+			goods.setMastrGoodsCd(goods.getGoodsCd());
+		}
 		result.set("dataList", goodsService.getGoodsOption1List(goods));
 
 		return result;

+ 4 - 5
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDetailFormMob.html

@@ -386,6 +386,9 @@
 							<button type="button" class="cart" id="btnGoodsWish" onclick="fnAddCart('C','Up');" >쇼핑백</button>
 							<button type="button" class="buyNow" id="btnGoodsCart" onclick="fnAddCart('O','Up');">바로구매</button>
 							</th:block>
+							<th:block  th:unless="${goodsInfo.stockQty > 0 and goodsInfo.goodsStat == 'G008_90'}">
+							<button class="cantbuying" style="display:block;">SOLD OUT</button>
+							</th:block>
 						</div>
 					</div>
 				</div>
@@ -398,7 +401,7 @@
 	<!-- ★ 컨텐츠 종료 -->	
 
 	<!-- 바닥메뉴 -->	
-	<div class="product_floormenu"><!--  ☞☞ 제품이 품절되면 soldout클래스 추가 -->
+	<div class="product_floormenu" th:classappend="${(goodsInfo.stockQty <= 0 or goodsInfo.goodsStat != 'G008_90')? 'soldout':''}"><!--  ☞☞ 제품이 품절되면 soldout클래스 추가 -->
 		<div class="share_like">
 			<button type="button" class="share">공유하기</button>
 			<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'likeit active' : ''"  
@@ -406,12 +409,8 @@
 					th:attr="goodsCd=${params.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc=${params.contentsLoc}, planDtlSq=${params.planDtlSq}">위시리스트</button>
 		</div>
 		<div class="prd_buy">
-			<th:block  th:if="${goodsInfo.stockQty > 0 and goodsInfo.goodsStat == 'G008_90'}">
 			<button type="button" class="buying btPop_auto" id="btn_purchase">구매하기</button>
-			</th:block>
-			<th:block  th:unless="${goodsInfo.stockQty > 0 and goodsInfo.goodsStat == 'G008_90'}">
 			<button type="button" class="cantbuying" style="display:block;">SOLD OUT</button>
-			</th:block>
 		</div>
 	</div>
 	<!-- //바닥메뉴 -->

+ 6 - 10
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -1261,7 +1261,7 @@
 	<!-- ★ 컨텐츠 종료 -->	
 
 	<!-- 바닥메뉴 -->	
-	<div class="product_floormenu"><!--  ☞☞ 제품이 품절되면 soldout클래스 추가 -->
+	<div class="product_floormenu" th:classappend="${(goodsInfo.stockQty <= 0 or goodsInfo.goodsStat != 'G008_90')? 'soldout':''}"><!--  ☞☞ 제품이 품절되면 soldout클래스 추가 -->
 		<div class="share_like">
 			<button type="button" class="share">공유하기</button>
 			<!-- <th:block th:include="~{web/goods/GoodsIncludeFormMob :: goodsSnsForm}"></th:block> -->
@@ -1270,12 +1270,8 @@
 					th:attr="goodsCd=${params.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc=${params.contentsLoc}, planDtlSq=${params.planDtlSq}">위시리스트</button>
 		</div>
 		<div class="prd_buy">
-			<th:block  th:if="${goodsInfo.stockQty > 0 and goodsInfo.goodsStat == 'G008_90'}">
 			<button type="button" class="buying btPop_auto" id="btn_purchase">구매하기</button>
-			</th:block>
-			<th:block  th:unless="${goodsInfo.stockQty > 0 and goodsInfo.goodsStat == 'G008_90'}">
-			<button type="button" class="cantbuying" style="display:block;">SOLD OUT</button>
-			</th:block>
+			<button type="button" class="cantbuying">SOLD OUT</button>
 		</div>
 		<!-- (공통) 공유팝업 -->
 		<div class="modal fade" id="tglShare" tabindex="-1" role="dialog" aria-labelledby="aModalLabel" aria-hidden="true">
@@ -1675,10 +1671,10 @@
 			target.each(function(){ 
 				let data = {goodsCd : $(this).attr('id')
 							,optionSoldoutSkip : optionSoldoutSkip 
-							,mastrGoodsCd : $('#cartFprm input[name=goodsCd]').val()
+							,mastrGoodsCd : $('#cartForm input[name=goodsCd]').val()
 							};
 				let jsonData = JSON.stringify(data);
-				 
+				
 				fnOption1Display(idx, jsonData, $(this).attr('id') );
 				
 				idx++;
@@ -1799,7 +1795,7 @@
 		let data = {goodsCd : goodsCd
 					,optCd1 : optCd1
 					,optionSoldoutSkip : optionSoldoutSkip
-					,mastrGoodsCd : $('#cartFprm input[name=goodsCd]').val()
+					,mastrGoodsCd : $('#cartForm input[name=goodsCd]').val()
 					};
 		let jsonData = JSON.stringify(data);
 		
@@ -1837,7 +1833,7 @@
 						$obj.remove();
 					//	$('.form_field .select_custom.item_opt2.' +item.goodsCd ).attr('disabled', false)
 						//------
-						tag += '<div class="select_custom item_opt2 item_opt2_'+ridx+ ' '+goodsCd+'">\n';	
+						tag += '<div class="select_custom item_opt2 item_opt2_'+ridx+ ' '+goodsCd+'" qty="'+minOrdQty+'">\n';	
 						tag += '<div class="combo">\n';
 						tag += '<div class="select">선택</div>\n';
 						tag += '<ul class="list">\n';