|
|
@@ -0,0 +1,580 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="mob/common/layout/SubLayoutMob">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : OrderGiftCompleteMob.html
|
|
|
+ * @desc : 선물받기주문완료 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2021.04.15 jsh77b 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+<body>
|
|
|
+<th:block layout:fragment="content">
|
|
|
+
|
|
|
+<form class="form_wrap form_full" name="orderGiftForm" id="orderGiftForm">
|
|
|
+ <main role="" id="" class="container od">
|
|
|
+ <section class="content od_gift">
|
|
|
+ <!-- 배송지 입력기한이 경과 -->
|
|
|
+ <th:block th:if="${orderInfo.giftPackCloseYn} == 'N'">
|
|
|
+ <div class="inner wide">
|
|
|
+ <div class="gift_banner">
|
|
|
+ <img src="/images/mo/logo_STYLE24_white.png" alt="스타일24 로고">
|
|
|
+ <p>고객님께 선물이 도착했습니다!</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <!-- //배송지 입력기한이 경과 -->
|
|
|
+
|
|
|
+ <!-- 배송지 입력기한이 경과 -->
|
|
|
+ <th:block th:if="${orderInfo.giftPackCloseYn} == 'Y'">
|
|
|
+ <div class="inner wide">
|
|
|
+ <div class="gift_banner timeout">
|
|
|
+ <img src="/images/mo/ico_big_check.png" alt="배송지 입력기한 경과">
|
|
|
+ <p>배송지 입력기한이 경과해<br>선물을 수령하실 수 없습니다.</p>
|
|
|
+ <dl>
|
|
|
+ <dt>배송지 입력기한</dt>
|
|
|
+ <dd th:text="${orderInfo.giftPackCloseDt}"></dd>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <!-- 배송지 입력기한이 경과 -->
|
|
|
+
|
|
|
+ <div class="inner wide">
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ <div class="ui_row">
|
|
|
+ <div class="foldGroup giftfold">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="fold_head">
|
|
|
+ <a href="javascript:void(0)">
|
|
|
+ <div>
|
|
|
+ <div class="fold_tit">
|
|
|
+ <span>선물받으실 상품</span>
|
|
|
+ </div>
|
|
|
+ <div class="data">
|
|
|
+ <em class="c_primary" th:text="${orderListCnt}"></em>개의 상품
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="fold_cont">
|
|
|
+ <div class="part_goods">
|
|
|
+ <th:block th:each="goods, i : ${orderList}">
|
|
|
+ <div class="goods_section">
|
|
|
+ <div class="goods_detail">
|
|
|
+ <div class="thumb_box">
|
|
|
+ <a href="javascript:;">
|
|
|
+ <img src="/images/mo/thumb/tmp_pdClickother1.jpg" alt="tmp_pdClickother1">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="info_box">
|
|
|
+ <div class="od_name">
|
|
|
+ <div class="brand"><span th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></span></div>
|
|
|
+ <div class="name" th:text="${goods.goodsNm}"></div>
|
|
|
+ </div>
|
|
|
+ <div class="od_opt">
|
|
|
+ <div class="option" th:each="colorNm, index : ${goods.colorNmArr}">
|
|
|
+ <em th:text="${colorNm}"></em>
|
|
|
+ <em th:text="${goods.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="od_calc">
|
|
|
+ <p class="count">수량 <em th:text="${goods.ordQty} - ${goods.cnclRtnQty}"></em>개</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 배송지 입력기한이 경과 -->
|
|
|
+ <th:block th:if="${orderInfo.giftPackCloseYn} == 'N'">
|
|
|
+ <div class="goods_btn_wrap btn_group_flex">
|
|
|
+ <div>
|
|
|
+ <button type="button" class="btn btn_default btn_option_pop02">
|
|
|
+ <span>옵션변경</span>
|
|
|
+ </button>
|
|
|
+ </div> <!-- 옵션변경_팝업02 호출 -->
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <!-- //배송지 입력기한이 경과 -->
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ </div>
|
|
|
+ <div class="inner wide">
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ <div class="ui_row">
|
|
|
+ <div class="foldGroup giftfold">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="fold_head">
|
|
|
+ <a href="javascript:void(0)">
|
|
|
+ <div class="fold_tit"><span>선물하신 분</span></div>
|
|
|
+ <div class="data fixed"><span th:text="${orderInfo.ordNm}"></span></div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="fold_cont">
|
|
|
+ <div class="gift_order_message">
|
|
|
+ <p th:text="${orderInfo.giftMsg}" id="giftMsg"></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 배송지 입력기한이 경과 -->
|
|
|
+ <th:block th:if="${orderInfo.giftPackCloseYn} == 'N'">
|
|
|
+ <!-- //배송지 정보 변경불가 -->
|
|
|
+ <th:block th:if="${delvRegYn} == 'Y'">
|
|
|
+ <div class="inner wide">
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ <div class="ui_row">
|
|
|
+ <div class="foldGroup shipfold">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="fold_head">
|
|
|
+ <a href="javascript:void(0)">
|
|
|
+ <div class="fold_tit"><span>선물 받으실 분 배송지</span></div>
|
|
|
+ <div class="data">
|
|
|
+ <span class="recipAddr" th:text="${orderInfo.recipBaseAddr} + ' ' + ${orderInfo.recipDtlAddr}"></span>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="fold_cont">
|
|
|
+ <div class="ship_info">
|
|
|
+ <button type="button" id="btn_adrsChange_pop" class="btn_popup"><span>배송지 변경</span></button>
|
|
|
+ <dl>
|
|
|
+ <div class="company">
|
|
|
+ <dt><span class="sr-only">배송지명</span></dt>
|
|
|
+ <dd id="recipNm" th:text="${orderInfo.recipNm}"></dd>
|
|
|
+ </div>
|
|
|
+ <div class="phone">
|
|
|
+ <dt><span class="sr-only">휴대폰 번호</span></dt>
|
|
|
+ <dd id="recipPhnno" th:text="${orderInfo.recipPhnno}"></dd>
|
|
|
+ </div>
|
|
|
+ <div class="addr">
|
|
|
+ <dt><span class="sr-only">배송주소</span></dt>
|
|
|
+ <dd id="recipAddr" th:text="${orderInfo.recipBaseAddr} + ' ' + ${orderInfo.recipDtlAddr}"></dd>
|
|
|
+ </div>
|
|
|
+ <div class="ship_request">
|
|
|
+ <dt>배송요청 사항</dt>
|
|
|
+ <dd id="delvMemo" th:text="${orderInfo.delvMemo}"></dd>
|
|
|
+ </div>
|
|
|
+ </dl>
|
|
|
+ <div class="btn_group btn_group_flex">
|
|
|
+ <div>
|
|
|
+ <button type="button" class="btn btn_primary" id="btn_plz_delv">
|
|
|
+ <span>선물 배송 요청</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="info_txt">
|
|
|
+ <ul>
|
|
|
+ <li>배송지 등록이 완료되면 선물상품 배송이 시작됩니다.</li>
|
|
|
+ <li>배송이 시작된 후는 배송지 변경이 불가능합니다.</li>
|
|
|
+ <li>배송기한 내(선물받은 날로부터 3일) 배송지 미입력시 선물받기가 불가능합니다.</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 폴딩리스트 -->
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <!-- //배송지 정보 변경불가 -->
|
|
|
+
|
|
|
+ <!-- (배송지 변경 클릭 후) 선물 받으실 분 배송지 입력 -->
|
|
|
+ <th:block th:if="${delvRegYn} == 'N'">
|
|
|
+ <div class="inner wide">
|
|
|
+ <div class="ui_row">
|
|
|
+ <div class="foldGroup shipfold">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="fold_head">
|
|
|
+ <a href="javascript:void(0)">
|
|
|
+ <div>
|
|
|
+ <div class="fold_tit">
|
|
|
+ <div class="lap2"><span>선물 받으실 분 배송지</span></div>
|
|
|
+ </div>
|
|
|
+ <div class="data"><span id="recipAddr"></span></div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="fold_cont">
|
|
|
+ <div class="tbl_wrap">
|
|
|
+ <div class="tbl tbl_dlvr">
|
|
|
+ <table>
|
|
|
+ <colgroup>
|
|
|
+ <col width="*">
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span class="sr-only">배송지명(이름 등)</span>
|
|
|
+ <input type="text" class="form_control" name="recipNm" placeholder="배송지명(이름 등)" th:value="${orderInfo.recipNm}">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span class="sr-only">휴대폰 번호</span>
|
|
|
+ <input type="text" class="form_control" name="recipPhnno" placeholder="휴대폰 번호" th:value="${orderInfo.recipPhnno}">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span class="sr-only">배송 주소</span>
|
|
|
+ <div class="input_wrap">
|
|
|
+ <input type="hidden" class="form_control" name="recipZipcode" placeholder="우편번호" readonly="readonly">
|
|
|
+ <input type="hidden" class="form_control" name="recipBaseAddr" placeholder="기본주소" readonly="readonly">
|
|
|
+ <input type="text" class="form_control" name="recipAddr" placeholder="배송주소" readonly="readonly">
|
|
|
+ <input type="text" class="form_control" name="recipDtlAddr" placeholder="상세주소">
|
|
|
+ <button type="button" class="btn btn_sch" onclick="fnOpenDaumAddr();">
|
|
|
+ <span class="sr-only">우편번호 찾기</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tbl_wrap">
|
|
|
+ <div class="tbl_tit"><h3>배송 요청사항</h3></div>
|
|
|
+ <div class="tbl tbl_request">
|
|
|
+ <table>
|
|
|
+ <colgroup>
|
|
|
+ <col width="*">
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">문 앞</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" name="rdi-request1" id="rdi-12" value="문 앞">
|
|
|
+ <label for="rdi-12">
|
|
|
+ <span>문 앞</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">직접 받고 부재 시 문 앞</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" name="rdi-request1" id="rdi-22" value="직접 받고 부재 시 문 앞">
|
|
|
+ <label for="rdi-22">
|
|
|
+ <span>직접 받고 부재 시 문 앞</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">경비실</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" name="rdi-request1" id="rdi-32" value="경비실">
|
|
|
+ <label for="rdi-32">
|
|
|
+ <span>경비실</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">택배함</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" name="rdi-request1" id="rdi-42" value="택배함">
|
|
|
+ <label for="rdi-42">
|
|
|
+ <span>택배함</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">기타사항</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" name="rdi-request1" id="rdi-52" value="기타사항">
|
|
|
+ <label for="rdi-52">
|
|
|
+ <span>기타사항</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">보관 장소만 입력(필수)</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_text">
|
|
|
+ <input type="text" name="delvMemoText" placeholder="보관 장소만 입력 (필수)" disabled>
|
|
|
+ <p class="desc_txt">보관 장소 외 다른 내용 입력시 통보 없이 삭제 될 수 있습니다.</p>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div class="btn_group btn_group_flex">
|
|
|
+ <div>
|
|
|
+ <button type="button" id="btn_delivery_addr_save" class="btn btn_dark">
|
|
|
+ <span>배송지 등록</span>
|
|
|
+ </button>
|
|
|
+ </div> <!-- 210406_ID 추가 -->
|
|
|
+ </div>
|
|
|
+ <div class="info_txt">
|
|
|
+ <ul>
|
|
|
+ <li>배송지 등록이 완료되면 선물상품 배송이 시작됩니다.</li>
|
|
|
+ <li>배송이 시작된 후는 배송지 변경이 불가능합니다.</li>
|
|
|
+ <li>배송기한 내(선물받은 날로부터 3일) 배송지 미입력시 선물받기가 불가능합니다.</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <!-- //(배송지 변경 클릭 후) 선물 받으실 분 배송지 입력 -->
|
|
|
+ </th:block>
|
|
|
+ <!-- //배송지 입력기한이 경과 -->
|
|
|
+
|
|
|
+ </section>
|
|
|
+ </main>
|
|
|
+</form>
|
|
|
+
|
|
|
+
|
|
|
+<script th:inline="javascript">
|
|
|
+// 배송관련정보 변수선언
|
|
|
+var ordNo = [[${orderInfo.ordNo}]] // 배송목록
|
|
|
+var delvAddrSq = [[${orderInfo.delvAddrSq}]]; // 배송지번호
|
|
|
+var giftMsg = [[${orderInfo.giftMsg}]]; // 선물메세지
|
|
|
+
|
|
|
+// item.questContent.replaceAll("\n", "</br>")
|
|
|
+
|
|
|
+//컨텐츠 호출
|
|
|
+$(document).ready( function() {
|
|
|
+ // 선물메시지
|
|
|
+ $("#giftMsg").html(giftMsg.replaceAll("\n", "</br>"));
|
|
|
+
|
|
|
+ // 배송요청사항 버튼기능
|
|
|
+ $("#orderGiftForm input[name=rdi-request1]").each(function(){
|
|
|
+ // 기타기능 버튼기능
|
|
|
+ $(this).on("click", function(){
|
|
|
+ var temp = $(this).parent().find('span').text();
|
|
|
+ $("#orderGiftForm input[name=delvMemoText]").val("");
|
|
|
+ if (temp == "기타사항") {
|
|
|
+ $("#orderGiftForm input[name=delvMemoText]").attr("disabled", false);
|
|
|
+ } else {
|
|
|
+ $("#orderGiftForm input[name=delvMemoText]").attr("disabled", true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+// 2.1 회원 배송지변경 팝업열기
|
|
|
+$('#btn_adrsChange_pop').on("click", function(){
|
|
|
+ // 비회원 case 적용
|
|
|
+ $.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");
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+// 배송요청버튼
|
|
|
+$("#btn_plz_delv").on("click", function() {
|
|
|
+
|
|
|
+ mcxDialog.confirm("입력된 주소로 상품이 배송이 시작됩니다. 배송요청을 하시겠습니까?", {
|
|
|
+ cancelBtnText : "취소",
|
|
|
+ sureBtnText : "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ var jsonObj = {
|
|
|
+ "ordNo" : ordNo
|
|
|
+ }
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ "/order/giftDelvComplete"
|
|
|
+ , JSON.stringify(jsonObj)
|
|
|
+ , function (result) {
|
|
|
+ mcxDialog.alertC("선물 배송 요청이 완료 되었습니다.", {
|
|
|
+ sureBtnText : "확인",
|
|
|
+ sureBtnClick : function() {
|
|
|
+ location.href = "/";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+// 1.18 배송지정보 설정
|
|
|
+var delvAddrSet = function(delvObj) {
|
|
|
+
|
|
|
+ var rtnStr = "";
|
|
|
+ rtnStr += "| recipNm ::: " + delvObj.recipNm;
|
|
|
+ rtnStr += "| recipPhnno ::: " + delvObj.recipPhnno;
|
|
|
+ rtnStr += "| recipZipcode ::: " + delvObj.recipZipcode;
|
|
|
+ rtnStr += "| recipBaseAddr ::: " + delvObj.recipBaseAddr;
|
|
|
+ rtnStr += "| recipDtlAddr ::: " + delvObj.recipDtlAddr;
|
|
|
+ rtnStr += "| delvMemo ::: " + delvObj.delvMemo;
|
|
|
+
|
|
|
+ $("#recipNm").text(delvObj.recipNm);
|
|
|
+ $("#recipPhnno").text(delvObj.recipPhnno);
|
|
|
+ $("#recipAddr").text(delvObj.recipBaseAddr + ' ' + delvObj.recipDtlAddr);
|
|
|
+ $("#delvMemo").text(delvObj.delvMemo);
|
|
|
+
|
|
|
+ // 변수값 설정
|
|
|
+ var jsonObj = {
|
|
|
+ "delvAddrSq" : delvAddrSq
|
|
|
+ , "recipNm" : delvObj.recipNm
|
|
|
+ , "recipPhnno" : delvObj.recipPhnno
|
|
|
+ , "recipZipcode" : delvObj.recipZipcode
|
|
|
+ , "recipBaseAddr" : delvObj.recipBaseAddr
|
|
|
+ , "recipDtlAddr" : delvObj.recipDtlAddr
|
|
|
+ , "delvMemo" : delvObj.delvMemo
|
|
|
+ }
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ "/common/updateDeliverAddr"
|
|
|
+ , JSON.stringify(jsonObj)
|
|
|
+ , function (result) {
|
|
|
+ mcxDialog.alert("수정되었습니다.");
|
|
|
+ }
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+// 배송지등록버튼
|
|
|
+$("#btn_delivery_addr_save").on("click", function(){
|
|
|
+
|
|
|
+ // 유효성체크
|
|
|
+ if (!deliveryAddFormCheck()){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 기타사항일때 텍스트 등록
|
|
|
+ var delvMemo = $("#orderGiftForm input[name=rdi-request1]:checked").parent().find('span').text();
|
|
|
+ if ("기타사항" == delvMemo) {
|
|
|
+ delvMemo = $("#orderGiftForm input[name=delvMemoText]").val();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 변수값 설정
|
|
|
+ var jsonObj = {
|
|
|
+ "delvAddrSq" : delvAddrSq
|
|
|
+ , "recipNm" : $("#orderGiftForm input[name=recipNm]").val()
|
|
|
+ , "recipPhnno" : $("#orderGiftForm input[name=recipPhnno]").val()
|
|
|
+ , "recipZipcode" : $("#orderGiftForm input[name=recipZipcode]").val()
|
|
|
+ , "recipBaseAddr" : $("#orderGiftForm input[name=recipBaseAddr]").val()
|
|
|
+ , "recipDtlAddr" : $("#orderGiftForm input[name=recipDtlAddr]").val()
|
|
|
+ , "delvMemo" : delvMemo
|
|
|
+ }
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ "/common/updateDeliverAddr"
|
|
|
+ , JSON.stringify(jsonObj)
|
|
|
+ , function (result) {
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
+ "/common/updateDeliverAddr"
|
|
|
+ , JSON.stringify(jsonObj)
|
|
|
+ , function (result) {
|
|
|
+ mcxDialog.alert("수정되었습니다.");
|
|
|
+ location.href = "/order/giftComplete?" + "ordNo=" + ordNo;
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ )
|
|
|
+});
|
|
|
+
|
|
|
+// 유효성체크 함수
|
|
|
+var deliveryAddFormCheck = function() {
|
|
|
+ // TODO 유효성 체크 추가
|
|
|
+ if (gagajf.isNull($("#orderGiftForm input[name=recipNm]").val())) {
|
|
|
+ mcxDialog.alert("이름을 입력해주세요.");
|
|
|
+ $('#orderGiftForm input[name=custNm]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gagajf.isNull($("#orderGiftForm input[name=recipPhnno]").val())) {
|
|
|
+ mcxDialog.alert("휴대폰번호를 입력해주세요.");
|
|
|
+ $('#orderGiftForm input[name=recipPhnno]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gagajf.isNull($("#orderGiftForm input[name=recipZipcode]").val())) {
|
|
|
+ mcxDialog.alert("배송주소를 입력해주세요.");
|
|
|
+ $('#orderGiftForm input[name=recipAddr]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gagajf.isNull($("#orderGiftForm input[name=recipBaseAddr]").val())) {
|
|
|
+ mcxDialog.alert("배송주소를 입력해주세요.");
|
|
|
+ $('#orderGiftForm input[name=recipAddr]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gagajf.isNull($("#orderGiftForm input[name=recipDtlAddr]").val())) {
|
|
|
+ mcxDialog.alert("상세주소를 입력해주세요.");
|
|
|
+ $('#orderGiftForm input[name=recipDtlAddr]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+// 우편번호 DAUM을 이용한 우편번호 팝업 레이어
|
|
|
+var fnOpenDaumAddr = function() {
|
|
|
+ $("body").css("overflow", "hidden");
|
|
|
+
|
|
|
+ let daumZip = new daum.Postcode({
|
|
|
+ oncomplete: function(data) {
|
|
|
+ $('#orderGiftForm input[name=recipAddr]').val(data.zonecode + ' ' + cfnGetDaumRoadAddr(data));
|
|
|
+ $('#orderGiftForm input[name=recipZipcode]').val(data.zonecode);
|
|
|
+ $('#orderGiftForm input[name=recipBaseAddr]').val(cfnGetDaumRoadAddr(data));
|
|
|
+ $('#orderGiftForm input[name=recipDtlAddr]').focus();
|
|
|
+
|
|
|
+ cfnCloseDaumAddr();
|
|
|
+
|
|
|
+ $("body").css("overflow", "");
|
|
|
+ $(".close-modal").trigger("click");
|
|
|
+ },
|
|
|
+ width: '100%'
|
|
|
+ });
|
|
|
+ cfnOpenDaumAddr(daumZip);
|
|
|
+}
|
|
|
+
|
|
|
+//2021.04.09 하이픈처리
|
|
|
+$(document).on("keyup", "#orderGiftForm input[name=recipPhnno]", function() {
|
|
|
+ $(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") );
|
|
|
+});
|
|
|
+</script>
|
|
|
+</th:block>
|
|
|
+</body>
|
|
|
+</html>
|