PlanningShotGuideFormWeb.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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/DefaultLayoutWeb">
  6. <!--
  7. *******************************************************************************
  8. * @source : PlanningShotGuideFormWeb.html
  9. * @desc : 총알배송 Page
  10. *============================================================================
  11. * Pastelmall
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.3.30 sowon 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <!-- // container -->
  22. <div id="container" class="container dp">
  23. <div class="breadcrumb">
  24. <ul>
  25. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  26. <li class="bread_2depth">총알배송</li>
  27. </ul>
  28. </div>
  29. <div class="wrap">
  30. <div class="content wide dp_Bulletship"> <!-- 페이지특정 클래스 = dp_Bulletship -->
  31. <div class="cont_head">
  32. <div>
  33. <h3>총알배송</h3>
  34. </div>
  35. </div>
  36. <div class="cont_body">
  37. <div class="bulletship">
  38. <div class="bulletship_head">
  39. <img src="/images/pc/thumb/bullet_bg1.png" alt="10시까지 주문하면 당일도착">
  40. </div>
  41. <div class="bulletship_body" id="shotHtml">
  42. <!-- 비로그인 상태 or 로그인을 했지만 주소정보를 못 가져오는 경우 -->
  43. <!-- <div class="txt_result">
  44. <p>오전10시 이전 주문 당일도착</p>
  45. <p><span>총알배송이 가능한 지역</span>인지<br>확인해보세요!</p>
  46. <div class="bulletshop_btn">
  47. <button type="button" class="btn btn_default btn_block"><span>내 배송지 확인하기</span></button>
  48. </div>
  49. <p>서울·경기·인천 중 일부지역은 총알배송이 불가합니다.</p>
  50. </div> -->
  51. <!-- 비로그인 상태 or 로그인을 했지만 주소정보를 못 가져오는 경우 -->
  52. </div>
  53. <div class="bulletship_foot"><div class="bulletship_foot"><br></div></div><div class="bulletship_foot"><br></div><div class="bulletship_foot">
  54. <img src="/images/pc/thumb/bullet_bg2.png" alt="주문/도착, 배송일, 대상상품">
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- 총알배송 가능 상품 리스트 -->
  60. <div class="content sticky_nav_list" id="cornerList">
  61. <!-- <div class="cont_head">
  62. <div class="sticky_nav">
  63. <ul>
  64. <li><a href="#brand01">모이몰른</a></li> 섹션이동
  65. </ul>
  66. </div>
  67. </div>
  68. <div class="cont_body">
  69. <div class="list_content">
  70. <div id="brand01">
  71. <div class="item_header"> 섹션이동
  72. <h4>모이몰른</h4>
  73. </div>
  74. <div class="itemsGrp"> itemsGrp rank hot deal
  75. <div class="item_prod">
  76. <div class="item_state">
  77. <button type="button" class="itemLike">관심상품 추가</button>
  78. <a href="#none" class="itemLink">
  79. <div class="rank ranker"><span>1</span></div>
  80. <div class="itemPic">
  81. <img alt="BLUE-a" class=" vLHTC pd_img" src="/images/pc/thumb/prod1.jpg">
  82. </div>
  83. <p class="itemBrand">BRAND NAME</p>
  84. <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
  85. <p class="itemPrice">80,100
  86. <span class="itemPrice_original">89,000</span>
  87. <span class=" itemPercent">10%</span>
  88. </p>
  89. <div class="itemcolorchip">
  90. <span class="chip_color35" value="ABM">BEIGE</span>
  91. <span class="chip_color54" value="BDS">BLACK</span>
  92. <span class="chip_color40" value="YBR">WHITE</span>
  93. </div>
  94. <p class="itemBadge">
  95. <span class="badge13">베스트 </span>
  96. </p>
  97. <div class="itemComment">#주문 폭주 상품</div>
  98. </a>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div> -->
  105. </div>
  106. <!-- //총알배송 가능 상품 리스트 -->
  107. </div>
  108. </div>
  109. <!-- 총알배송 가능여부 결과 팝업 -->
  110. <div class="modal fade bulletShip_pop" id="bulletShipPop" tabindex="-1" role="dialog" aria-labelledby="bulletShipPopLabel" aria-hidden="true">
  111. <div class="modal-dialog" role="document">
  112. <div class="modal-content">
  113. <div class="modal-header">
  114. <h5 class="modal-title" id="bulletShipLabel"><span class="sr-only">총알배송 가능여부 결과</span></h5>
  115. </div>
  116. <div class="modal-body">
  117. <div class="pop_cont">
  118. <div class="txt_result">
  119. <p>고객님이 찾으시는 지역은</p>
  120. <p><span id="shotAdr"></span>&nbsp;가능 지역</p>
  121. <div class="address">
  122. <p id="addr"></p>
  123. </div>
  124. <div class="info">
  125. <p id="infoTxt"></p>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <div class="modal-footer">
  131. <button type="button" id="" class="btn btn_dark" onclick="$.modal.close();"><span>계속 쇼핑하기</span></button>
  132. </div>
  133. </div>
  134. </div>
  135. <a href="#close-modal" rel="modal:close" id="bulletShipPop_close" class="close-modal">Close</a>
  136. </div>
  137. <!-- //총알배송 가능여부 결과 팝업 -->
  138. <script th:inline="javascript">
  139. /*<![CDATA[*/
  140. let custAddr = [[${custAddr}]];
  141. let customerInfo = [[${customerInfo}]];
  142. let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
  143. let planCornerList = [[${planCornerList}]];
  144. let planCornerGoodsList = [[${planCornerGoodsList}]];
  145. // 로그인 확인
  146. if(planCornerList.length>0){
  147. var html = '';
  148. html += '<div class="cont_head">';
  149. html += ' <div class="sticky_nav">';
  150. html += ' <ul> ';
  151. $.each(planCornerList, function(idx, item) {
  152. html += ' <li><a href="#brand'+idx+'">'+item.cornerNm+'</a></li>';
  153. })
  154. html += ' </ul>';
  155. html += ' </div>';
  156. html += '</div>';
  157. html += '<div class="cont_body">';
  158. html += ' <div class="list_content">';
  159. $.each(planCornerList, function(idx, item) {
  160. html += ' <div id="brand'+idx+'">';
  161. html += ' <div class="item_header">';
  162. html += ' <h4>'+item.cornerNm+'</h4>';
  163. html += ' </div>';
  164. html += ' <div class="itemsGrp">';
  165. $.each(planCornerGoodsList, function(idx2, item2) {
  166. html += ' <div class="item_prod">';
  167. html += ' <div class="item_state">';
  168. html += ' <button type="button" class="itemLike';
  169. if(item.likeIt == 'likeit'){
  170. html += ' likeit';
  171. }
  172. html += ' "';
  173. html += ' onClick="cfnPutWishList(this);" goodsCd=\''+item2.goodsCd+'\', ithrCd=\'\', contentsLoc=\'\', planDtlSq=\'\'>관심상품 추가</button>';
  174. html += ' <a href="javascript:void(0);" onclick="cfnGoToGoodsDetail(\'' + item2.goodsCd + '\')" class="itemLink">';
  175. html += ' <div class="itemPic">';
  176. html += ' <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item2.sysImgNm +'">';
  177. html += ' </div>';
  178. html += ' <p class="itemBrand">'+item2.brandGroupNm+'</p>';
  179. html += ' <div class="itemName">'+item2.goodsNm+'</div>';
  180. html += ' <p class="itemPrice">'+item2.currPrice.addComma();
  181. if (item2.currPrice != item2.listPrice) {
  182. html += ' <span class="itemPrice_original">'+item2.listPrice.addComma()+'</span>';
  183. }
  184. if (item2.dcRate != 0) {
  185. html += ' <span class=" itemPercent">'+item2.dcRate.addComma()+'%</span>';
  186. }
  187. html += ' </p>';
  188. html += ' <div class="itemcolorchip">';
  189. if(!gagajf.isNull(item2.colorChips)){
  190. var colorArr = item2.colorChips.split(",");
  191. var colorCd = '';
  192. var rgbColor = '';
  193. for(let i=0; i<colorArr.length; i++){
  194. var colorInfo = colorArr[i].split(":");
  195. colorCd = colorInfo[0];
  196. rgbColor = colorInfo[1];
  197. if(rgbColor=='#FFFFFF'){
  198. html += ' <span class="chip_color" style="background-color: '+rgbColor+';border:1px solid #aaa;" value="'+colorCd+'">'+colorCd+'</span>';
  199. }else{
  200. html += ' <span class="chip_color" style="background-color: '+rgbColor+'" value="'+colorCd+'">'+colorCd+'</span>';
  201. }
  202. }
  203. }
  204. html += ' </div>';
  205. if(!gagajf.isNull(item2.icon)){
  206. var iconArr = item2.icon.split(",");
  207. var iconGb = '';
  208. var iconNm = '';
  209. html += ' <p class="itemBadge">';
  210. for(let i=0; i<iconArr.length; i++){
  211. var iconInfo = iconArr[i].split(":");
  212. iconGb = iconInfo[0];
  213. iconNm = iconInfo[1];
  214. html += ' <span class="badge13" value="'+iconGb+'">'+iconNm+' </span>';
  215. }
  216. html += ' </p>';
  217. }
  218. if(item2.goodsTnm != null){
  219. html += ' <div class="itemComment">'+item2.goodsTnm+'</div>';
  220. }
  221. html += ' </a>';
  222. html += ' </div>';
  223. html += ' </div>';
  224. })
  225. html += ' </div>';
  226. html += ' </div>';
  227. })
  228. html += ' </div>';
  229. html += ' </div>';
  230. $("#cornerList").append(html);
  231. }
  232. var shotBody = function () {
  233. if (!cfCheckLogin() || (custAddr == null && custAddr == '')) {
  234. html = '';
  235. html += '<div class="txt_result"> ';
  236. html += ' <p>오전10시 이전 주문 당일도착</p> ';
  237. html += ' <p><span>총알배송이 가능한 지역</span>인지<br>확인해보세요!</p> ';
  238. html += ' <div class="bulletshop_btn"> ';
  239. html += ' <button type="button" class="btn btn_default btn_block" onclick="fnOpenDaumAddr();"><span>내 배송지 확인하기</span></button> ';
  240. html += ' </div> ';
  241. html += ' <p>서울&middot;경기&middot;인천 중 일부지역은 총알배송이 불가합니다.</p> ';
  242. html += ' </div> ';
  243. $("#shotHtml").append(html);
  244. }else{
  245. html = '';
  246. html += ' <div class="txt_result">';
  247. html += ' <p><span>'+customerInfo.custNm+'</span>님의 배송지는</p>';
  248. if (custAddr.shotDelvUseYn === 'Y') {
  249. html += ' <p><span>총알배송</span> 가능 지역</p>';
  250. }else{
  251. html += ' <p><span>일반배송</span> 지역</p>';
  252. }
  253. html += ' <div class="bullet_able">';
  254. html += ' <p>'+custAddr.recipBaseAddr+' '+custAddr.recipDtlAddr+'</p>';
  255. html += ' </div>';
  256. html += ' <div class="bulletshop_btn">';
  257. html += ' <button class="btn btn_default btn_block" onclick="fnOpenDaumAddr();"><span>다른 배송지 확인하기</span></button>';
  258. html += ' </div>';
  259. html += ' </div> ';
  260. $("#shotHtml").append(html);
  261. }
  262. }
  263. //우편번호 DAUM을 이용한 우편번호 팝업 레이어
  264. var fnOpenDaumAddr = function() {
  265. let daumZip = new daum.Postcode({
  266. oncomplete: function(data) {
  267. // data.zonecode
  268. $.ajax( {
  269. type : "GET",
  270. url : '/planning/shot/delivery/confirm?recipZipcode='+data.zonecode,
  271. dataType : 'json',
  272. success : function(result) {
  273. if (result != null) {
  274. $('#addr').text(cfnGetDaumRoadAddr(data));
  275. if(result.shotDelvUseYn == "Y"){
  276. $('#shotAdr').text("총알배송");
  277. $("#infoTxt").text("오늘 오전 10시까지 주문하시면 오늘 도착합니다. (토, 일, 공휴일 휴무)")
  278. }else{
  279. $('#shotAdr').text("일반배송");
  280. $("#infoTxt").text("주문시간/배송지에 따라 2~3일 이내 도착합니다. (일, 공휴일 휴무)")
  281. }
  282. $("#bulletShipPop").modal("show");
  283. }
  284. }
  285. });
  286. cfnCloseDaumAddr();
  287. },
  288. width: '100%'
  289. });
  290. cfnOpenDaumAddr(daumZip);
  291. }
  292. $(document).ready(function() {
  293. shotBody();
  294. $("#bulletShipPop_close").click(function() {
  295. $.modal.close();
  296. });
  297. });
  298. /*]]>*/
  299. </script>
  300. </th:block>
  301. </body>
  302. </html>