|
|
@@ -0,0 +1,182 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
|
|
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
+ layout:decorator="web/common/layout/MypageLayoutWeb">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : MypageCustDeliveryAddrFormWeb.html
|
|
|
+ * @desc : 마이페이지 > 배송지 관리 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2021 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2021.04.02 jsshin 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+
|
|
|
+<body>
|
|
|
+<th:block layout:fragment="content">
|
|
|
+<div class="content myAddressList"> <!-- 페이지특정 클래스 = myAddressList -->
|
|
|
+ <div class="cont_body">
|
|
|
+ <!-- CONT-BODY -->
|
|
|
+ <div class="lnb">
|
|
|
+ <div class="lnb_tit">
|
|
|
+ <h2>마이페이지</h2>
|
|
|
+ </div>
|
|
|
+ <div class="lnb_list">
|
|
|
+ <ul id="mypageLnbList"></ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="cont">
|
|
|
+ <div class="sec_head">
|
|
|
+ <h3 class="subH1">배송지 관리</h3>
|
|
|
+ </div>
|
|
|
+ <div class="sec_body">
|
|
|
+ <h4 class="subH3">배송지 목록</h4>
|
|
|
+ <!-- 데이터 있을 시 -->
|
|
|
+ <div id="data" class="tbl type1">
|
|
|
+ <table>
|
|
|
+ <colgroup>
|
|
|
+ <col width="*">
|
|
|
+ <col width="170">
|
|
|
+ </colgroup>
|
|
|
+ <tbody id="custDeliveryList">
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <!-- //데이터 있을 시 -->
|
|
|
+ <!-- 데이터 없을 시 -->
|
|
|
+ <div id="nodata" class="nodata">
|
|
|
+ <div class="txt_box">
|
|
|
+ <p>
|
|
|
+ 현재 노출 할 수 있는 데이터가 없습니다.<br>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- //데이터 없을 시 -->
|
|
|
+ </div>
|
|
|
+ <div class="btn_footer_area">
|
|
|
+ <button type="button" id="btnAdrsaddPop" class="btn btn_dark btn_md"><span>배송지 추가</span></button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- // CONT-BODY -->
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+ <script th:inline="javascript">
|
|
|
+ /*<![CDATA[*/
|
|
|
+
|
|
|
+ var fnCustDeliveryAddList = function () {
|
|
|
+ $.get('/mypage/customer/delivery/addr/list', fnCustDeliveryAddListCallback);
|
|
|
+ }
|
|
|
+
|
|
|
+ var fnCustDeliveryAddListCallback = function (result) {
|
|
|
+ console.log('result', result);
|
|
|
+ if (result.length < 1) {
|
|
|
+ $('#nodata').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $('#nodata').hide();
|
|
|
+ $('#custDeliveryList').html('');
|
|
|
+ let html = '';
|
|
|
+ $.each(result, function (idx, custDeliveryAddr){
|
|
|
+ if (custDeliveryAddr.defaultYn === 'Y') {
|
|
|
+ html += '<tr class="addrs_default">\n';
|
|
|
+ } else {
|
|
|
+ html += '<tr>\n';
|
|
|
+ }
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="block_line">\n';
|
|
|
+ html += ' <ul>\n';
|
|
|
+ html += ' <li>\n';
|
|
|
+ html += ' <span>'+custDeliveryAddr.recipNm +'</span>\n';
|
|
|
+ if (custDeliveryAddr.defaultYn === 'Y') {
|
|
|
+ html += ' <span class="tag">기본 배송지</span>\n';
|
|
|
+ }
|
|
|
+ if (custDeliveryAddr.shotDelvUseYn === 'Y') {
|
|
|
+ html += ' <span class="tag primary_line">총알배송</span>\n';
|
|
|
+ }
|
|
|
+ html += ' </li>\n';
|
|
|
+ html += ' <li>\n';
|
|
|
+ html += ' <span class="phone_number">'+custDeliveryAddr.recipPhnno+'</span>\n';
|
|
|
+ html += ' </li>\n';
|
|
|
+ html += ' <li>\n';
|
|
|
+ html += ' <span>'+custDeliveryAddr.recipBaseAddr + custDeliveryAddr.recipDtlAddr +'</span>\n';
|
|
|
+ html += ' </li>\n';
|
|
|
+ html += ' <li>\n';
|
|
|
+ html += ' 배송요청 사항 : <span>'+ custDeliveryAddr.delvMemo +'</span>\n';
|
|
|
+ html += ' </li>\n';
|
|
|
+ html += ' </ul>\n';
|
|
|
+ html += ' </div>\n';
|
|
|
+ html += ' </td>\n';
|
|
|
+ html += ' <td>\n';
|
|
|
+ html += ' <div class="button_box">\n';
|
|
|
+ html += ' <p>';
|
|
|
+ html += ' <button type="button" class="btn btn_default btn_sm" onclick="fnChangeDeliveryAddr(custDeliveryAddr.custDelvAddrSq)">';
|
|
|
+ html += ' <span>수정</span>';
|
|
|
+ html += ' </button>';
|
|
|
+ html += ' </p>';
|
|
|
+ html += ' <p>';
|
|
|
+ html += ' <button type="button" class="btn btn_dark btn_sm">';
|
|
|
+ html += ' <span>삭제</span>';
|
|
|
+ html += ' </button>';
|
|
|
+ html += ' </p>';
|
|
|
+ html += ' </div>\n';
|
|
|
+ html += ' </td>\n';
|
|
|
+ html += '</tr>\n';
|
|
|
+ });
|
|
|
+ $('#custDeliveryList').html(html);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 배송지 추가
|
|
|
+ $('#btnAdrsaddPop').on('click', function () {
|
|
|
+ $.ajax( {
|
|
|
+ type : "POST",
|
|
|
+ url : '/common/delvAddrAddPop',
|
|
|
+ dataType : 'html',
|
|
|
+ beforeSend : function(xhr, settings) {
|
|
|
+ xhr.setRequestHeader("AJAX" , "true");
|
|
|
+ xhr.setRequestHeader('Accept' , 'application/json');
|
|
|
+ xhr.setRequestHeader('Content-Type' , 'application/json');
|
|
|
+ gagajf.showProgressbar(true);
|
|
|
+ },
|
|
|
+ success : function(result) {
|
|
|
+ $("#adrsAddPop .modal-dialog .modal-content").html(result);
|
|
|
+ $("#adrsAddPop").modal("show");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ var delvAddrSet = function (delvObj) {
|
|
|
+ if(!gagajf.isNull(delvObj.custDelvAddrSq)) {
|
|
|
+ fnCustDeliveryAddList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+
|
|
|
+ // 마이페이지 LNB 설정
|
|
|
+ fnSetMypageLnbList(8);
|
|
|
+
|
|
|
+ // 마이페이지 location 설정
|
|
|
+ fnSetMypageLocation('배송지 관리');
|
|
|
+
|
|
|
+ // 배송목록 조회
|
|
|
+ fnCustDeliveryAddList();
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /*]]>*/
|
|
|
+</script>
|
|
|
+</th:block>
|
|
|
+</body>
|
|
|
+</html>
|
|
|
+
|
|
|
+
|