|
|
@@ -66,16 +66,18 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="content br_lookbook_view cont_items" th:if="${lookbookDetailList != null}">
|
|
|
- <div class="cont_head">
|
|
|
- <h3>룩북 속 상품<span class="number">()</span></h3> <!--<th:block th:text="${#lists.size(lookbookDetailList.lookbookGoodsList)}"></th:block>-->
|
|
|
- <button class="btn btn_primary"><span>모두 쇼핑백 담기</span></button>
|
|
|
+ <th:block th:each="item, stat : ${lookbookDetailList}">
|
|
|
+ <div class="cont_head ioTit">
|
|
|
+ <h3>룩북 속 상품<span class="number">(<th:block th:text="${#lists.size(item.lookbookGoodsList)}"></th:block>)</span></h3>
|
|
|
+ <button class="btn btn_primary" th:onclick="fnAddCartLookBookGoods1(this,[[${stat.count}]]);"><span>모두 쇼핑백 담기</span></button>
|
|
|
</div>
|
|
|
+ </th:block>
|
|
|
<div class="cont_body">
|
|
|
<div class="area_slider">
|
|
|
<!-- 겉 상품 -->
|
|
|
<div class="items_outside">
|
|
|
<th:block th:each="item, stat : ${lookbookDetailList}">
|
|
|
- <div class="itemsOut">
|
|
|
+ <div class="itemsOut" th:id="${'itemsList'+stat.count}">
|
|
|
<div class="swiper-container items_inside">
|
|
|
<div class="swiper-wrapper">
|
|
|
<th:block th:if="${item.lookbookGoodsList != null and !item.lookbookGoodsList.empty}" th:each="goodsItem, goodsStatus : ${item.lookbookGoodsList}">
|
|
|
@@ -83,6 +85,15 @@
|
|
|
<div class="item_prod" th:classappend="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}? 'unable' : ''"
|
|
|
th:attr="goodsCd=${goodsItem.goodsCd}, optCdInfo=${goodsItem.optCdInfo}, minOrdQty=${goodsItem.minOrdQty}, goodsType=${goodsItem.goodsType}">
|
|
|
<div class="item_state">
|
|
|
+ <th:block th:each="optCd : ${#strings.arraySplit(goodsItem.optCdInfo,',')}">
|
|
|
+ <input type="hidden" name="lookbookGoodsOptCd" th:value="${optCd}"/>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}">
|
|
|
+ <a href="javascript:void(0);" class="itemLink" >
|
|
|
+ </th:block>
|
|
|
+ <th:block th:unless="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}">
|
|
|
+ <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsItem.goodsCd}]])">
|
|
|
+ </th:block>
|
|
|
<a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsItem.goodsCd}]]);">
|
|
|
<div class="itemPic">
|
|
|
<img alt="" class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsItem.sysImgNm}">
|
|
|
@@ -228,6 +239,87 @@
|
|
|
$("#lookbookItemPop").append(tag);
|
|
|
$('#lookbookItemPop').modal("show");
|
|
|
}
|
|
|
+
|
|
|
+ var fnAddCartLookBookGoods1 = function (obj, idx){
|
|
|
+ let $obj = $(obj);
|
|
|
+ let $target = $('.cont_items #itemsList'+idx).find('.item_prod');
|
|
|
+ let goodsSize = $target.length;
|
|
|
+ let btnType = "C";
|
|
|
+ let params = [];
|
|
|
+ let goodsIdx = 0;
|
|
|
+
|
|
|
+ $target.each(function(){
|
|
|
+ goodsIdx ++;
|
|
|
+ if ($(this).hasClass('unable')) {
|
|
|
+
|
|
|
+ }else{
|
|
|
+ // 옵션확인
|
|
|
+ let goodsCnt = $(this).find('input[name=lookbookGoodsOptCd]').length;
|
|
|
+ if(goodsCnt == 1){
|
|
|
+ let arrOpt = $(this).find('input[name=lookbookGoodsOptCd]').val();
|
|
|
+ let arrOptInfo = arrOpt.split(':');
|
|
|
+
|
|
|
+ let obj = new Object();
|
|
|
+ obj.goodsCd = $(this).attr("goodsCd");
|
|
|
+ obj.optCd = arrOptInfo[1];
|
|
|
+ obj.goodsQty = $(this).attr("minOrdQty");
|
|
|
+ obj.goodsType = $(this).attr("goodsType");
|
|
|
+ obj.cartGb = btnType;
|
|
|
+ obj.afLinkCd = '';
|
|
|
+ obj.ithrCd = $(this).attr("ithrCd");
|
|
|
+ obj.contentsLoc = $(this).attr("contentsLoc");
|
|
|
+ obj.planDtlSq = '';
|
|
|
+ obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ if (goodsIdx == goodsSize){
|
|
|
+ obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ }
|
|
|
+ params.push(obj);
|
|
|
+
|
|
|
+ // 장바구니담기
|
|
|
+ cfnAddCart(params);
|
|
|
+ }else{
|
|
|
+ let $goods = $(this);
|
|
|
+ let cartGoodsList = [];
|
|
|
+ let compsList = [];
|
|
|
+ let goodsList = {
|
|
|
+ cartCompsList : new Array()
|
|
|
+ }
|
|
|
+
|
|
|
+ let arrInfo = $(this).find('input[name=lookbookGoodsOptCd]').val().split(','); // 상품코드단위
|
|
|
+
|
|
|
+
|
|
|
+ $.each(arrInfo, function(idx, item) {
|
|
|
+ let arrOptInfo = item.split(':');
|
|
|
+
|
|
|
+ let obj = new Object();
|
|
|
+ obj.cartGb = btnType;
|
|
|
+ obj.goodsType = $goods.attr("goodsType");
|
|
|
+ obj.goodsCd = $goods.attr("goodsCd");
|
|
|
+ obj.itemCd =arrOptInfo[0];
|
|
|
+ obj.optCd = arrOptInfo[1];
|
|
|
+ obj.goodsQty = $goods.attr("minOrdQty");
|
|
|
+ obj.afLinkCd = '';
|
|
|
+ obj.ithrCd = $goods.attr("ithrCd");
|
|
|
+ obj.contentsLoc = $goods.attr("contentsLoc");
|
|
|
+ obj.planDtlSq = ''
|
|
|
+ obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ if (goodsIdx == goodsSize){
|
|
|
+ obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
|
|
|
+ }
|
|
|
+ compsList.push(obj);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ goodsList.cartCompsList = compsList;
|
|
|
+ cartGoodsList.push(goodsList);
|
|
|
+
|
|
|
+ // 장바구니담기
|
|
|
+ cfnAddCart(cartGoodsList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
// 컨텐츠 호출
|
|
|
$(document).ready( function() {
|
|
|
/* 슬라이드 - 상단_LOOKBOOK */
|
|
|
@@ -253,9 +345,12 @@
|
|
|
},
|
|
|
on: {
|
|
|
slideChange:function(){
|
|
|
+ // 05.06_ 추가 : .ioTit
|
|
|
$('.text_cont').removeClass('active');
|
|
|
+ $('.ioTit').removeClass('active');
|
|
|
$('.itemsOut').removeClass('active');
|
|
|
$('.text_cont').eq(this.realIndex).addClass('active');
|
|
|
+ $('.ioTit').eq(this.realIndex).addClass('active');
|
|
|
$('.itemsOut').eq(this.realIndex).addClass('active');
|
|
|
}
|
|
|
},
|
|
|
@@ -263,7 +358,7 @@
|
|
|
watchSlidesVisibility: true,
|
|
|
watchSlidesProgress: true,
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
/* 슬라이드 - 룩북 상품 inSide */
|
|
|
var togetherIteminner = new Swiper('.br_lookbook_view.cont_items .items_inside', {
|
|
|
observer: true,
|
|
|
@@ -276,7 +371,7 @@
|
|
|
},
|
|
|
// nested: true,
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
/* 슬라이드 - 다른 룩북 보기 */
|
|
|
var br_ohter_slide = new Swiper('.br_lookbook_view.cont_others .swiper-container', {
|
|
|
slidesPerView: 5,
|
|
|
@@ -286,7 +381,7 @@
|
|
|
prevEl: '.br_lookbook_view.cont_others .swiper-button-prev',
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// 슬라이드 - 상단_LOOKBOOK > picker - 룩북_피커_상품정보 팝업
|
|
|
$(document).on('click','#btn_picker_item01',function(e){
|
|
|
$("#lookbookItemPop").modal("show");
|