PlanningShotGuideFormWeb.html 15 KB

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