OrderNoMemberWeb.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <!DOCTYPE html>
  2. <html lang="ko" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="web/common/layout/DefaultLayoutWeb">
  3. <!--
  4. *******************************************************************************
  5. * @source : OrderNoMemberWeb.html
  6. * @desc : 비회원 주문/결제 Page
  7. *============================================================================
  8. * STYLE24
  9. * Copyright(C) 2020 TSIT, All rights reserved.
  10. *============================================================================
  11. * VER DATE AUTHOR DESCRIPTION
  12. * === =========== ========== =============================================
  13. * 1.0 2021.02.01 jsh77b 최초 작성
  14. *******************************************************************************
  15. -->
  16. <body>
  17. <th:block layout:fragment="content">
  18. <!-- 회원 -->
  19. <th:block th:if="${isLogin}">
  20. <form class="form_wrap form_col_c form_full" id="nomemberForm" th:action="@{'/order/form'}" th:method="post">
  21. <input type="hidden" name="shotDelvUseYn" th:value="${order.shotDelvUseYn}" /><!-- 장바구니화면 총알배송사용여부 -->
  22. <!-- 장바구니화면 시퀀스 배열 등록 -->
  23. <th:block th:each="cartSq , index : ${order.cartSqArr}">
  24. <input type="hidden" name="cartSqArr" th:value="${cartSq}" />
  25. </th:block>
  26. <script>$("#nomemberForm").submit();</script>
  27. </form>
  28. </th:block>
  29. <!-- //회원 -->
  30. <!-- 비회원 -->
  31. <th:block th:if="${!isLogin}">
  32. <!-- container -->
  33. <div id="container" class="container od">
  34. <!-- 비회원 -->
  35. <div class="wrap">
  36. <div class="content nonMBorder"> <!-- 페이지특정 클래스 = nonMBorder -->
  37. <div class="cont_head">
  38. <h2>비회원 주문하기</h2>
  39. <div class="text_box">
  40. <p>비회원 주문을 위한 주문자 정보 입력 및 개인정보 수집/이용 동의에<br>체크하신 후 주문을 완료하실 수 있습니다.</p>
  41. </div>
  42. </div>
  43. <div class="cont_body">
  44. <form class="form_wrap form_col_c form_full" id="orderForm" th:action="@{'/order/form'}" th:method="post">
  45. <input type="hidden" name="shotDelvUseYn" th:value="${order.shotDelvUseYn}" /><!-- 장바구니화면 총알배송사용여부 -->
  46. <input type="hidden" name="sexGb" />
  47. <input type="hidden" name="birthYmd" />
  48. <!-- 장바구니화면 시퀀스 배열 등록 -->
  49. <th:block th:each="cartSq , index : ${order.cartSqArr}">
  50. <input type="hidden" name="cartSqArr" th:value="${cartSq}" />
  51. </th:block>
  52. <div class="form_field">
  53. <label class="input_label sr-only">이름(주문자명)</label>
  54. <div class="input_wrap">
  55. <input type="text" class="form_control" name="custNm" placeholder="이름(주문자명)" value="" readonly="readonly" >
  56. </div>
  57. </div>
  58. <!-- 휴대폰 본인인증 대기 -->
  59. <div class="form_field">
  60. <label class="input_label sr-only">휴대폰 번호</label>
  61. <div class="ui_col_9">
  62. <div class="input_wrap">
  63. <input type="text" id="cellPhnno" name="cellPhnno" placeholder="휴대폰 인증을 해주세요." class="form_control" minlength="10" maxlength="11" required="required" data-valid-type="numeric" data-valid-name="휴대폰" readonly="readonly"/>
  64. </div>
  65. </div>
  66. <!-- 본인인증전-->
  67. <div class="ui_col_3 beforeAuth">
  68. <button type="button" class="btn btn_dark btn_block" onclick="cfnOpenCellphoneCertify();"><span>본인인증</span></button>
  69. </div>
  70. <!-- 본인인증후-->
  71. <div class="ui_col_3 afterAuth" style="display:none">
  72. <button type="button" class="btn btn_dark btn_block"><span>인증완료</span></button>
  73. </div>
  74. </div>
  75. <!-- //휴대폰 본인인증 대기 -->
  76. <div class="form_field">
  77. <label class="input_label sr-only">이메일주소</label>
  78. <div class="input_wrap">
  79. <input type="text" id="email" name="email" placeholder="이메일" class="form_control" required="required" data-valid-name="이메일" maxlength="30"/><!-- 잘못기입된 경우 class "err" 추가 -->
  80. </div>
  81. </div>
  82. <div class="form_field">
  83. <label class="input_label sr-only">배송주소</label>
  84. <div class="ui_col_9">
  85. <div class="input_wrap">
  86. <input type="hidden" class="form_control" name="recipZipcode" placeholder="우편번호" readonly="readonly" value="">
  87. <input type="hidden" class="form_control" name="recipBaseAddr" placeholder="기본주소" readonly="readonly" value="">
  88. <input type="text" class="form_control" name="recipAddr" placeholder="배송주소" readonly="readonly">
  89. </div>
  90. </div>
  91. <div class="ui_col_3">
  92. <button type="button" class="btn btn_dark btn_block" onclick="fnOpenDaumAddr();"><span>우편번호 찾기</span></button>
  93. </div>
  94. </div>
  95. <div class="form_field">
  96. <label class="input_label sr-only">상세주소</label>
  97. <div class="input_wrap">
  98. <input type="text" class="form_control" name="recipDtlAddr" placeholder="상세주소" value="">
  99. </div>
  100. </div>
  101. <div class="form_field">
  102. <div class="agree_nombPrivacy">
  103. <input id="chk-nombPrivacy-agr" type="checkbox">
  104. <label for="chk-nombPrivacy-agr"><span>비회원 개인정보 수집&#47;이용 동의&nbsp;&nbsp;<em class="tmark_required">(필수)</em></span></label>
  105. </div>
  106. </div>
  107. <div class="agree_nomb_txt_box">
  108. <div>
  109. <!-- 내용 -->
  110. (1) "iSTYLE24"는 비회원 주문의 경우에도 배송, 대금결제, 주문내역 조회 및 구매확인, 실명여부 확인을 위하여 필요한 개인정보만을 요청하고 있으며, 이 경우 그 정보는 대금결제 및 상품의 배송에 관련된 용도 이외에는 다른 어떠한 용도로도 사용되지 않습니다.<br>
  111. (2) 비회원의 개인정보 수집/이용 목적 및 항목<br>
  112. ① 성명<br>
  113. ② 원활한 구매/판매 진행, 본인의사의 확인, 불만 및 분쟁처리, 고지 및 정보 안내 등 : 전화번호, 이동전화번호, e-mail<br>
  114. ③ 대금결제서비스의 제공 등 : 은행계좌정보, 신용카드정보<br>
  115. ④ 상품, 경품배송 : 주소, 전화번호, e-mail<br>
  116. ⑤ 부정 이용방지, 전자금융거래기록보관 : IP address, 방문일시<br>
  117. (3) 비회원 서비스 이용의 경우에는 회원 서비스 내용을 제외한 "iSTYLE24" 개인정보 처리방침의 모든 내용이 동일하게 적용됩니다.<br>
  118. (4) "iSTYLE24"는 회원의 개인정보와 동일한 수준으로 비회원의 개인정보를 보호합니다.
  119. <!-- //내용 -->
  120. </div>
  121. </div>
  122. <div class="btn_group_block btn_group_md ui_row">
  123. <div class="ui_col_6">
  124. <button type="button" class="btn btn_default btn_block" id="btn_cancel"><span>취소</span></button>
  125. </div>
  126. <div class="ui_col_6">
  127. <button type="button" class="btn btn_dark btn_block" id="btn_order"><span>주문하기</span></button>
  128. </div>
  129. </div>
  130. </form>
  131. </div>
  132. <div class="cont_foot">
  133. <p>
  134. <span class="jointit1">STYLE24의 많은 혜택들이 기다리고 있습니다!</span>
  135. <span class="jointit2">STYLE24에 회원가입을 하시면 더 많은 혜택을 받아보세요!</span>
  136. </p>
  137. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);" title="회원가입" class="btn_gojoin" id="btn_join_member">회원가입</a>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </th:block>
  143. <!-- //비회원 -->
  144. <script th:inline="javascript">
  145. // 컨텐츠 호출
  146. $(document).ready( function() {
  147. // 2021.04.08 테스트데이타
  148. /*
  149. $("#orderForm input[name=custNm]").val("전석훈");
  150. $("#orderForm input[name=cellPhnno]").val("01065565294");
  151. $("#orderForm input[name=email]").val("email@email.com");
  152. $("#orderForm input[name=recipZipcode]").val("13245");
  153. $("#orderForm input[name=recipBaseAddr]").val("서울시 영등포구 은행로 11, 8층(여의도동, 일신빈딩)");
  154. $("#orderForm input[name=recipDtlAddr]").val("8층 ISTYLE24 개발실");
  155. $("#orderForm input[name=recipAddr]").val("13245" + ' ' + "서울시 영등포구 은행로 11, 8층(여의도동, 일신빈딩)");
  156. */
  157. });
  158. // 주문하기버튼
  159. $("#btn_order").on("click", function() {
  160. // TODO 유효성 체크 추가
  161. // 2021.04.08 본인인증을 완료후 이름정보 업데이트로 변경
  162. if (gagajf.isNull($("#orderForm input[name=cellPhnno]").val())) {
  163. mcxDialog.alert("본인인증을 완료해 주세요.");
  164. $('#orderForm input[name=cellPhnno]').focus();
  165. return false;
  166. }
  167. if (gagajf.isNull($("#orderForm input[name=email]").val())) {
  168. mcxDialog.alert("이메일을 입력해주세요.");
  169. $('#orderForm input[name=email]').focus();
  170. return false;
  171. }
  172. if (!fnCheckValidationEmail($("#orderForm input[name=email]").val())) {
  173. mcxDialog.alert("이메일 주소를 다시 확인해주세요.");
  174. $('#orderForm input[name=email]').focus();
  175. return false;
  176. }
  177. if (gagajf.isNull($("#orderForm input[name=recipZipcode]").val())) {
  178. mcxDialog.alert("배송주소를 입력해주세요.");
  179. $('#orderForm input[name=recipAddr]').focus();
  180. return false;
  181. }
  182. if (gagajf.isNull($("#orderForm input[name=recipBaseAddr]").val())) {
  183. mcxDialog.alert("배송주소를 입력해주세요.");
  184. $('#orderForm input[name=recipAddr]').focus();
  185. return false;
  186. }
  187. if (gagajf.isNull($("#orderForm input[name=recipDtlAddr]").val())) {
  188. mcxDialog.alert("상세주소를 입력해주세요.");
  189. $('#orderForm input[name=recipDtlAddr]').focus();
  190. return false;
  191. }
  192. if (!$("#chk-nombPrivacy-agr").is(":checked")) {
  193. mcxDialog.alert("비회원 개인정보 수집 이용에 동의해주세요.");
  194. return false;
  195. }
  196. // 주문서전송
  197. $("#orderForm").submit();
  198. });
  199. // 나이스 본인인증 후 콜백
  200. var fnNiceCallBack = function(encData) {
  201. if (!gagajf.isNull(encData)) {
  202. let custInfo = {};
  203. custInfo.encData = encData;
  204. let jsonData = JSON.stringify(custInfo);
  205. gagajf.ajaxJsonSubmit('/order/customer/auth', jsonData, fnUpdateAuthInfoCallback);
  206. }
  207. };
  208. // 고객정보 데이터
  209. var fnUpdateAuthInfoCallback = function (result) {
  210. // 인정후처리
  211. $("#orderForm .beforeAuth").hide();
  212. $("#orderForm .afterAuth").show();
  213. $('#orderForm input[name=custNm]').val(result.sName);
  214. $('#orderForm input[name=cellPhnno]').val(result.sMobileNo);
  215. $('#orderForm input[name=sexGb]').val(result.sGender);
  216. $('#orderForm input[name=birthYmd]').val(result.sBirthDate);
  217. }
  218. // 우편번호 DAUM을 이용한 우편번호 팝업 레이어
  219. var fnOpenDaumAddr = function() {
  220. let daumZip = new daum.Postcode({
  221. oncomplete: function(data) {
  222. $("#orderForm input[name=recipAddr]").val(data.zonecode + ' ' + cfnGetDaumRoadAddr(data));
  223. $('#orderForm input[name=recipZipcode]').val(data.zonecode);
  224. $('#orderForm input[name=recipBaseAddr]').val(cfnGetDaumRoadAddr(data));
  225. $('#orderForm input[name=recipDtlAddr]').focus();
  226. cfnCloseDaumAddr();
  227. },
  228. width: '100%'
  229. });
  230. cfnOpenDaumAddr(daumZip);
  231. }
  232. /**
  233. * 이메일 유효성 체크
  234. * @param email - 이메일
  235. * @return boolean - 통과(true)/실패(false)
  236. * @author jsshin
  237. * @since 2021. 02. 15
  238. */
  239. var fnCheckValidationEmail = function (email) {
  240. const regexp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
  241. let result = true;
  242. if (!regexp.test(email)) {
  243. result = false;
  244. }
  245. return result;
  246. };
  247. </script>
  248. </th:block>
  249. </body>
  250. </html>