LookbookDetailFormWeb.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorator="web/common/layout/BrandLayoutWeb">
  6. <!--
  7. *******************************************************************************
  8. * @source : LookbookDetailFormWeb.html
  9. * @desc : 룩북 상세 Page
  10. *============================================================================
  11. * STYLE24
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.04.06 bin2107 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <div id="container" class="container br">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" id="navHome">홈</a></li>
  25. <li class="bread_2depth" th:if="${lookbookInfo.lookbookGb==BL}" th:text="${lookbookInfo.brandNm}">TBJ</li>
  26. <li class="bread_3depth">룩북</li>
  27. </ul>
  28. </div>
  29. <div class="wrap">
  30. <div class="content br_lookbook_view cont_visual" th:if="${lookbookDetailList != null}"> <!-- 페이지특정 클래스 = br_lookbook_view -->
  31. <div class="cont_head">
  32. <h3 class="displayH t_c" th:text="${lookbookInfo.title}">2020 F/W COLLECTION</h3>
  33. </div>
  34. <div class="cont_body">
  35. <div class="area_slider">
  36. <div class="swiper-container">
  37. <div class="swiper-wrapper">
  38. <th:block th:each="item, stat : ${lookbookDetailList}">
  39. <div class="swiper-slide">
  40. <div class="bt_lb_item">
  41. <img class="vLHTC lb_img" th:src="${@environment.getProperty('domain.image')+item.sysFileNm+'?RS=460'}" alt="BLUE-a"/>
  42. <th:block th:if="${item.lookbookGoodsList != null and !item.lookbookGoodsList.empty}" th:each="goodsItem, goodsStatus : ${item.lookbookGoodsList}">
  43. <div class="item_picker" th:style="${'left:'+goodsItem.xlim+'%; top:'+goodsItem.ylim+'%;'}">
  44. <button type="button" th:onclick="fnLookbookGoodsPopup([[${goodsItem.sysImgNm}]],[[${goodsItem.brandGroupNm}]],[[${goodsItem.goodsFullNm}]],[[${goodsItem.listPrice}]],[[${goodsItem.currPrice}]],[[${goodsItem.dcRate}]],[[${goodsItem.goodsCd}]],[[${goodsItem.stockQty}]],[[${goodsItem.soldoutYn}]])"><span class="ico ico_picker"></span></button>
  45. </div>
  46. </th:block>
  47. </div>
  48. </div>
  49. </th:block>
  50. </div>
  51. <div class="swiper-button-prev"></div>
  52. <div class="swiper-button-next"></div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="content br_lookbook_view cont_txts" id="lbImgDesc" th:if="${lookbookDetailList != null}">
  58. <div class="cont_body">
  59. <th:block th:each="item, stat : ${lookbookDetailList}">
  60. <div class="text_cont">
  61. <input type="hidden" name="title" th:value="${item.imgDesc}">
  62. </div>
  63. </th:block>
  64. </div>
  65. </div>
  66. <div class="content br_lookbook_view cont_items" th:if="${lookbookDetailList != null}">
  67. <th:block th:each="item, stat : ${lookbookDetailList}">
  68. <div class="cont_head ioTit">
  69. <h3>룩북 속 상품<span class="number">(<th:block th:text="${#lists.size(item.lookbookGoodsList)}"></th:block>)</span></h3>
  70. <button class="btn btn_primary" th:onclick="fnAddCartLookBookGoods1(this,[[${stat.count}]]);"><span>모두 쇼핑백 담기</span></button>
  71. </div>
  72. </th:block>
  73. <div class="cont_body">
  74. <div class="area_slider">
  75. <!-- 겉 상품 -->
  76. <div class="items_outside">
  77. <th:block th:each="item, stat : ${lookbookDetailList}">
  78. <div class="itemsOut" th:id="${'itemsList'+stat.count}">
  79. <div class="swiper-container items_inside">
  80. <div class="swiper-wrapper">
  81. <th:block th:if="${item.lookbookGoodsList != null and !item.lookbookGoodsList.empty}" th:each="goodsItem, goodsStatus : ${item.lookbookGoodsList}">
  82. <div class="swiper-slide">
  83. <div class="item_prod" th:attr="goodsCd=${goodsItem.goodsCd}, optCdInfo=${goodsItem.optCdInfo}, minOrdQty=${goodsItem.minOrdQty}, goodsType=${goodsItem.goodsType}">
  84. <div class="item_state" th:classappend="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}? 'soldout' : ''">
  85. <th:block th:each="optCd : ${#strings.arraySplit(goodsItem.optCdInfo,',')}">
  86. <input type="hidden" name="lookbookGoodsOptCd" th:value="${optCd}"/>
  87. </th:block>
  88. <!-- <th:block th:if="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}">-->
  89. <!-- <a href="javascript:void(0);" class="itemLink" >-->
  90. <!-- </th:block>-->
  91. <!-- <th:block th:unless="${(goodsItem.stockQty <= 0 or goodsItem.soldoutYn == 'Y')}">-->
  92. <a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${goodsItem.goodsCd}]])">
  93. <!-- </th:block>-->
  94. <div class="itemPic">
  95. <img alt="" class="vLHTC pd_img" th:src="${@environment.getProperty('upload.goods.view') + '/' + goodsItem.sysImgNm}">
  96. </div>
  97. <p class="itemBrand" th:text="${goodsItem.brandGroupNm}">BRAND NAME1</p>
  98. <div class="itemName" th:text="${goodsItem.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
  99. <p class="itemPrice">[[${#numbers.formatInteger(goodsItem.currPrice,0,'COMMA')} + 원]]
  100. <span class="itemPrice_original" th:if="${goodsItem.currPrice != goodsItem.listPrice}" th:text="${#numbers.formatInteger(goodsItem.listPrice,3,'COMMA')}">89,000</span>
  101. <span class="itemPercent" th:if="${goodsItem.currPrice != goodsItem.listPrice}" th:text="${(goodsItem.listPrice == 0 ? 0 : #numbers.formatDecimal((goodsItem.listPrice - goodsItem.currPrice) / (goodsItem.listPrice * 1.0) * 100, 1, 0)) + '%'}">10%</span>
  102. </p>
  103. </a>
  104. </div>
  105. </div>
  106. </div>
  107. </th:block>
  108. <!-- Add Scrollbar -->
  109. <div class="swiper-scrollbar"></div>
  110. </div>
  111. </div>
  112. </div>
  113. </th:block>
  114. </div>
  115. <!-- 겉 상품 종료 -->
  116. </div>
  117. </div>
  118. </div>
  119. <div class="content br_lookbook_view cont_others" th:if="${otherLookbookList}">
  120. <div class="cont_head">
  121. <h3 class="subH1 t_c mb40">다른 룩북 보기</h3>
  122. <button th:if="${lookbookInfo.lookbookGb=='BL'}" th:onclick="cfnGoToLookbookList([[${lookbookInfo.lookbookGb}]],[[${lookbookInfo.brandCd}]])"><span>전체보기</span></button>
  123. <button th:if="${lookbookInfo.lookbookGb=='L'}" th:onclick="cfnGoToLookbookList([[${lookbookInfo.lookbookGb}]])"><span>전체보기</span></button>
  124. </div>
  125. <div class="cont_body">
  126. <div class="area_slider">
  127. <div class="swiper-container">
  128. <div class="swiper-wrapper">
  129. <th:block th:if="${otherLookbookList}" th:each="oneData, status : ${otherLookbookList}">
  130. <div class="swiper-slide">
  131. <a th:href="|javascript:cfnGoToLookbookDetail('${lookbookInfo.lookbookGb}','${oneData.lookbookSq}','${oneData.brandCd}')|">
  132. <div class="thumb">
  133. <img th:src="${@environment.getProperty('domain.image')+oneData.sysFileNm}" alt="" style="height:307px;">
  134. </div>
  135. <div class="txt">
  136. <p class="title" th:text="${oneData.title}">2020 F/W COLLECTION 2020</p>
  137. </div>
  138. </a>
  139. </div>
  140. </th:block>
  141. </div>
  142. </div>
  143. <!-- Add Arrows -->
  144. <div class="swiper-button-next"></div>
  145. <div class="swiper-button-prev"></div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. <!-- 상단_LOOKBOOK_picker_상품_팝업 -->
  152. <div class="modal fade br_pop lookbook_item_pop" id="lookbookItemPop" tabindex="-1" role="dialog" aria-labelledby="lookbook_item_label" aria-hidden="true">
  153. <!-- <div class="modal-dialog" role="document">-->
  154. <!-- <div class="modal-content">-->
  155. <!-- <div class="modal-header">-->
  156. <!-- <h5 class="modal-title sr-only" id="lookbook_item_label">상품정보</h5>-->
  157. <!-- </div>-->
  158. <!-- <div class="modal-body">-->
  159. <!-- <div class="itemsGrp">-->
  160. <!-- <div class="item_prod">-->
  161. <!-- <div class="item_state">-->
  162. <!-- <div class="itemLink">-->
  163. <!-- <div class="itemPic">-->
  164. <!-- <img alt="BLACK-a" class=" vLHTC pd_img" src="/images/pc/thumb/ev_list_img05.jpg">-->
  165. <!-- </div>-->
  166. <!-- <p class="itemBrand">BRAND NAME</p>-->
  167. <!-- <div class="itemName">[온라인 단독] 여성 니트 후드 경량 다운 점퍼 여성 니트 후드 경량 다운 점퍼 여성 니트 후드 경량 다운 점퍼</div>-->
  168. <!-- <span class="itemPrice_original">89,000</span>-->
  169. <!-- <p class="itemPrice">80,100-->
  170. <!-- <span class="itemPercent">10%</span>-->
  171. <!-- </p>-->
  172. <!-- <button type="button" class="btn btn_default"><span>자세히 보기</span></button>-->
  173. <!-- </div>-->
  174. <!-- </div>-->
  175. <!-- </div>-->
  176. <!-- </div>-->
  177. <!-- </div>-->
  178. <!-- </div>-->
  179. <!-- </div>-->
  180. </div>
  181. <!-- //상단_LOOKBOOK_picker_상품_팝업 -->
  182. <script th:inline="javascript">
  183. /*<![CDATA[*/
  184. var lookbookGb = [[${lookbookInfo.lookbookGb}]];
  185. var brandCd = [[${lookbookInfo.brandCd}]];
  186. var goodsImgUrl = [[${@environment.getProperty('upload.goods.view')}]];
  187. var fnLookbookGoodsPopup = function(obj1,obj2,obj3,obj4,obj5,obj6,obj7,obj8,obj9){
  188. // $("#lookbookItemPop").modal("show");
  189. // $("#lookbookItemPop").find(".pd_img").attr('src',goodsImgUrl+'/'+obj1);
  190. // $("#lookbookItemPop").find(".itemBrand").text(obj2);
  191. // $("#lookbookItemPop").find(".itemName").text(obj3);
  192. // $("#lookbookItemPop").find(".itemPrice_original").text(obj4);
  193. // $("#lookbookItemPop").find(".itemPrice").text(obj5);
  194. // $("#lookbookItemPop").find(".itemPercent").text(obj6+'%');
  195. // $("#lookbookItemPop").find(".btn_default").attr('onclick','cfnGoToPage(_PAGE_GOODS_DETAIL+"'+obj7+'");');
  196. $("#lookbookItemPop .modal-dialog").remove();
  197. tag = '';
  198. tag += '<div class="modal-dialog" role="document">\n';
  199. tag += ' <div class="modal-content">\n';
  200. tag += ' <div class="modal-header">\n';
  201. tag += ' <h5 class="modal-title sr-only" id="lookbook_item_label">상품정보</h5>\n';
  202. tag += ' </div>\n';
  203. tag += ' <div class="modal-body">\n';
  204. tag += ' <div class="itemsGrp">\n';
  205. tag += ' <div class="item_prod">\n';
  206. tag += ' <div class="item_state';
  207. if(obj8 < 1 || obj9 == 'Y'){
  208. tag += ' soldout';
  209. }
  210. tag += '">\n';
  211. tag += ' <div class="itemLink">\n';
  212. tag += ' <div class="itemPic">\n';
  213. tag += ' <img alt="BLACK-a" class=" vLHTC pd_img" src="'+goodsImgUrl+'/'+obj1+'?RS=260" onerror="this.src=\'/images/pc/thumb/bg_item_none.png\'">\n';
  214. tag += ' </div>\n';
  215. tag += ' <p class="itemBrand">'+obj2+'</p>\n';
  216. tag += ' <div class="itemName">'+obj3+'</div>\n';
  217. if(obj4 != obj5) {
  218. tag += ' <span class="itemPrice_original">' + obj4.addComma() + '</span>\n';
  219. }
  220. tag += ' <p class="itemPrice">'+obj5.addComma()+'\n';
  221. if(obj6>0){
  222. tag += ' <span class="itemPercent">'+obj6+'%</span>\n';
  223. }
  224. tag += ' </p>\n';
  225. tag += ' <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\''+obj7+'\',\'\',\'\')"><span>자세히 보기</span></button>\n';
  226. tag += ' </div>\n';
  227. tag += ' </div>\n';
  228. tag += ' </div>\n';
  229. tag += ' </div>\n';
  230. tag += ' </div>\n';
  231. tag += ' </div>\n';
  232. tag += '</div>\n';
  233. $("#lookbookItemPop").append(tag);
  234. $('#lookbookItemPop').modal("show");
  235. }
  236. var fnAddCartLookBookGoods1 = function (obj, idx){
  237. let $obj = $(obj);
  238. let $target = $('.cont_items #itemsList'+idx).find('.item_prod');
  239. let goodsSize = $target.length;
  240. let btnType = "C";
  241. let params = [];
  242. let goodsIdx = 0;
  243. $target.each(function(){
  244. params = [];
  245. goodsIdx ++;
  246. if ($(this).find('.item_state').hasClass('soldout')) {
  247. }else{
  248. // 옵션확인
  249. let goodsCnt = $(this).find('input[name=lookbookGoodsOptCd]').length;
  250. if(goodsCnt == 1){
  251. let arrOpt = $(this).find('input[name=lookbookGoodsOptCd]').val();
  252. let arrOptInfo = arrOpt.split(':');
  253. let obj = new Object();
  254. obj.goodsCd = $(this).attr("goodsCd");
  255. obj.optCd = arrOptInfo[1];
  256. obj.goodsQty = $(this).attr("minOrdQty");
  257. obj.goodsType = $(this).attr("goodsType");
  258. obj.cartGb = btnType;
  259. obj.afLinkCd = '';
  260. obj.ithrCd = $(this).attr("ithrCd");
  261. obj.contentsLoc = $(this).attr("contentsLoc");
  262. obj.planDtlSq = '';
  263. obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
  264. if (goodsIdx == goodsSize){
  265. obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
  266. }
  267. params.push(obj);
  268. // 장바구니담기
  269. cfnAddCart(params);
  270. }else{
  271. let $goods = $(this);
  272. let cartGoodsList = [];
  273. let compsList = [];
  274. let goodsList = {
  275. cartCompsList : new Array()
  276. }
  277. let arrInfo = $(this).find('input[name=lookbookGoodsOptCd]').val().split(','); // 상품코드단위
  278. $.each(arrInfo, function(idx, item) {
  279. let arrOptInfo = item.split(':');
  280. let obj = new Object();
  281. obj.cartGb = btnType;
  282. obj.goodsType = $goods.attr("goodsType");
  283. obj.goodsCd = $goods.attr("goodsCd");
  284. obj.itemCd =arrOptInfo[0];
  285. obj.optCd = arrOptInfo[1];
  286. obj.goodsQty = $goods.attr("minOrdQty");
  287. obj.afLinkCd = '';
  288. obj.ithrCd = $goods.attr("ithrCd");
  289. obj.contentsLoc = $goods.attr("contentsLoc");
  290. obj.planDtlSq = ''
  291. obj.multiGoodsGb = 'O' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
  292. if (goodsIdx == goodsSize){
  293. obj.multiGoodsGb = 'E' // 단품, 세트 혼합쇼핑백처리일경우, 마지막이 아닌경우는 'O'아니고 NULL 아닌값
  294. }
  295. compsList.push(obj);
  296. });
  297. goodsList.cartCompsList = compsList;
  298. cartGoodsList.push(goodsList);
  299. // 장바구니담기
  300. cfnAddCart(cartGoodsList);
  301. }
  302. }
  303. });
  304. }
  305. // 컨텐츠 호출
  306. $(document).ready( function() {
  307. /* 슬라이드 - 상단_LOOKBOOK */
  308. var lookbook_visual_slide = new Swiper('.br_lookbook_view.cont_visual .swiper-container', {
  309. loop: true,
  310. loopAdditionalSlides : 1,
  311. slidesPerView: 'auto',
  312. spaceBetween: 20,
  313. speed : 800,
  314. autoWidth: true,
  315. autoHeight: true,
  316. observer: true,
  317. centeredSlides: true,
  318. autoplay: false,
  319. nested: true,
  320. navigation: {
  321. nextEl: '.br_lookbook_view.cont_visual .swiper-button-next',
  322. prevEl: '.br_lookbook_view.cont_visual .swiper-button-prev',
  323. },
  324. pagination: {
  325. el: '.br_lookbook_view.cont_visual .swiper-pagination',
  326. clickable: true,
  327. },
  328. on: {
  329. slideChange:function(){
  330. // 05.06_ 추가 : .ioTit
  331. $('.text_cont').removeClass('active');
  332. $('.ioTit').removeClass('active');
  333. $('.itemsOut').removeClass('active');
  334. $('.text_cont').eq(this.realIndex).addClass('active');
  335. $('.ioTit').eq(this.realIndex).addClass('active');
  336. $('.itemsOut').eq(this.realIndex).addClass('active');
  337. }
  338. },
  339. watchOverflow : true,
  340. watchSlidesVisibility: true,
  341. watchSlidesProgress: true,
  342. });
  343. /* 슬라이드 - 룩북 상품 inSide */
  344. var togetherIteminner = new Swiper('.br_lookbook_view.cont_items .items_inside', {
  345. observer: true,
  346. observeParents: true,
  347. slidesPerView: 6,
  348. spaceBetween: 20,
  349. scrollbar: {
  350. el: '.br_lookbook_view.cont_items .swiper-scrollbar',
  351. hide: true,
  352. },
  353. // nested: true,
  354. });
  355. /* 슬라이드 - 다른 룩북 보기 */
  356. var br_ohter_slide = new Swiper('.br_lookbook_view.cont_others .swiper-container', {
  357. slidesPerView: 5,
  358. spaceBetween: 20,
  359. navigation: {
  360. nextEl: '.br_lookbook_view.cont_others .swiper-button-next',
  361. prevEl: '.br_lookbook_view.cont_others .swiper-button-prev',
  362. },
  363. });
  364. // 슬라이드 - 상단_LOOKBOOK > picker - 룩북_피커_상품정보 팝업
  365. $(document).on('click','#btn_picker_item01',function(e){
  366. $("#lookbookItemPop").modal("show");
  367. return false;
  368. });
  369. if(lookbookGb=='BL'){
  370. $("#navHome").attr('onclick', 'cfnGoToBrandMain('+brandCd+');');
  371. }else{
  372. $("#navHome").attr('href', '/');
  373. }
  374. });
  375. $('#lbImgDesc .text_cont').each(function (){
  376. var brText = $(this).find("input[name=title]").val();
  377. let tag = brText.replace(/(?:\r\n|\r|\n)/g, '<br>');
  378. $(this).append(tag);
  379. });
  380. /*]]>*/
  381. </script>
  382. </th:block>
  383. </body>
  384. </html>