|
@@ -53,7 +53,15 @@
|
|
|
<tbody>
|
|
<tbody>
|
|
|
<th:block th:each="cart, status : ${wmsCartList}">
|
|
<th:block th:each="cart, status : ${wmsCartList}">
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td>
|
|
|
|
|
|
|
+ <input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
|
|
+ <input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
|
|
+ <input type="hidden" name="qtyTmtbSq" th:value="${cart.qtyTmtbSq}" />
|
|
|
|
|
+ <input type="hidden" name="qtyTmtbNm" th:value="${cart.qtyTmtbNm}" />
|
|
|
|
|
+ <input type="hidden" name="amtTmtbSq" th:value="${cart.amtTmtbSq}" />
|
|
|
|
|
+ <input type="hidden" name="amtTmtbNm" th:value="${cart.amtTmtbNm}" />
|
|
|
|
|
+ <input type="hidden" name="currPrice" th:value="${cart.currPrice}" />
|
|
|
|
|
+
|
|
|
|
|
+ <td style="border-left:none;">
|
|
|
<!-- 주문가능 상품 -->
|
|
<!-- 주문가능 상품 -->
|
|
|
<div class="info_item" th:classappend="${cart.soldoutYn.equals('Y')} ? unable"> <!-- 주문불가시 class="unable" 추가 / 인풋, 버튼 disable 처리 -->
|
|
<div class="info_item" th:classappend="${cart.soldoutYn.equals('Y')} ? unable"> <!-- 주문불가시 class="unable" 추가 / 인풋, 버튼 disable 처리 -->
|
|
|
<div class="form_box">
|
|
<div class="form_box">
|
|
@@ -82,7 +90,7 @@
|
|
|
<span class="count">수량:<em th:text="${cart.itemQtyArr[index.index]} * ${cart.goodsQty}"></em>개</span>
|
|
<span class="count">수량:<em th:text="${cart.itemQtyArr[index.index]} * ${cart.goodsQty}"></em>개</span>
|
|
|
</p>
|
|
</p>
|
|
|
<p class="od_modify">
|
|
<p class="od_modify">
|
|
|
- <button type="button"><span>옵션/수량변경</span></button>
|
|
|
|
|
|
|
+ <button type="button" class="btn_opt_pop"><span>옵션/수량변경</span></button>
|
|
|
</p>
|
|
</p>
|
|
|
<!-- 다다익선 적용 -->
|
|
<!-- 다다익선 적용 -->
|
|
|
<div class="od_moresale" th:if="${cart.applyQtySectionYn == 'Y' or cart.applyAmtSectionYn == 'Y'}">
|
|
<div class="od_moresale" th:if="${cart.applyQtySectionYn == 'Y' or cart.applyAmtSectionYn == 'Y'}">
|
|
@@ -103,8 +111,8 @@
|
|
|
</a>
|
|
</a>
|
|
|
<div class="li_moresale">
|
|
<div class="li_moresale">
|
|
|
<ul>
|
|
<ul>
|
|
|
- <li th:if="${cart.applyQtySectionYn == 'N'}" th:text="${cart.qtyTmtbNm}"><a href="">대상 상품 보기</a></li>
|
|
|
|
|
- <li th:if="${cart.applyAmtSectionYn == 'N'}" th:text="${cart.amtTmtbNm}"><a href="">대상 상품 보기</a></li>
|
|
|
|
|
|
|
+ <li th:if="${cart.applyQtySectionYn == 'N'}" th:inline="text">[[${cart.qtyTmtbNm}]]<a href=''>대상 상품 보기</a></li>
|
|
|
|
|
+ <li th:if="${cart.applyAmtSectionYn == 'N'}" th:inline="text">[[${cart.amtTmtbNm}]]<a href=''>대상 상품 보기</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -172,7 +180,14 @@
|
|
|
<tbody>
|
|
<tbody>
|
|
|
<th:block th:each="cart, status : ${delvCartList}">
|
|
<th:block th:each="cart, status : ${delvCartList}">
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td>
|
|
|
|
|
|
|
+ <input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
|
|
+ <input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
|
|
+ <input type="hidden" name="qtyTmtbSq" th:value="${cart.qtyTmtbSq}" />
|
|
|
|
|
+ <input type="hidden" name="qtyTmtbNm" th:value="${cart.qtyTmtbNm}" />
|
|
|
|
|
+ <input type="hidden" name="amtTmtbSq" th:value="${cart.amtTmtbSq}" />
|
|
|
|
|
+ <input type="hidden" name="amtTmtbNm" th:value="${cart.amtTmtbNm}" />
|
|
|
|
|
+ <input type="hidden" name="currPrice" th:value="${cart.currPrice}" />
|
|
|
|
|
+ <td style="border-left:none;">
|
|
|
<div class="info_item">
|
|
<div class="info_item">
|
|
|
<div class="form_box">
|
|
<div class="form_box">
|
|
|
<p class="form_field">
|
|
<p class="form_field">
|
|
@@ -199,7 +214,7 @@
|
|
|
<span class="count">수량:<em th:text="${cart.itemQtyArr[index.index]} * ${cart.goodsQty}"></em>개</span>
|
|
<span class="count">수량:<em th:text="${cart.itemQtyArr[index.index]} * ${cart.goodsQty}"></em>개</span>
|
|
|
</p>
|
|
</p>
|
|
|
<p class="od_modify">
|
|
<p class="od_modify">
|
|
|
- <button type="button" id="btn_opt_pop"><span>옵션/수량변경</span></button>
|
|
|
|
|
|
|
+ <button type="button" class="btn_opt_pop"><span>옵션/수량변경</span></button>
|
|
|
</p>
|
|
</p>
|
|
|
<!-- 다다익선 적용 -->
|
|
<!-- 다다익선 적용 -->
|
|
|
<div class="od_moresale" th:if="${cart.applyQtySectionYn == 'Y' or cart.applyAmtSectionYn == 'Y'}">
|
|
<div class="od_moresale" th:if="${cart.applyQtySectionYn == 'Y' or cart.applyAmtSectionYn == 'Y'}">
|
|
@@ -322,22 +337,21 @@
|
|
|
<div class="coupon_box">
|
|
<div class="coupon_box">
|
|
|
<div class="coupon">
|
|
<div class="coupon">
|
|
|
<div>
|
|
<div>
|
|
|
- <p class="cp_name">
|
|
|
|
|
- TBJ 시즌오프 20% 할인쿠폰
|
|
|
|
|
- </p>
|
|
|
|
|
|
|
+ <p class="cp_name"></p>
|
|
|
<p class="cp_cont">
|
|
<p class="cp_cont">
|
|
|
- <span><em>12,399,900</em>원</span>
|
|
|
|
|
- <span><em>40%</em></span>
|
|
|
|
|
|
|
+ <!--<span><em>12,399,900</em>원</span>
|
|
|
|
|
+ <span><em>40%</em></span>-->
|
|
|
|
|
+ <span class="cp_dc_val"></span>
|
|
|
</p>
|
|
</p>
|
|
|
<p class="cp_condition">
|
|
<p class="cp_condition">
|
|
|
- 500,000원 이상 구매 시 최대 50,000원 할인
|
|
|
|
|
- <span><em class="tag">99장 보유</em></span>
|
|
|
|
|
|
|
+ <!--500,000원 이상 구매 시 최대 50,000원 할인
|
|
|
|
|
+ <span><em class="tag">99장 보유</em></span>-->
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
<p class="cp_date">
|
|
<p class="cp_date">
|
|
|
- <span>2021.01.01</span> ~ <span>2021.12.30</span>
|
|
|
|
|
|
|
+ <span class="availStdt"></span> ~ <span class="availEddt"></span>
|
|
|
</p>
|
|
</p>
|
|
|
- <button type="button" class="btn_close_code">
|
|
|
|
|
|
|
+ <button type="button" class="btn_close_code" onClick="cancelCartCpn()">
|
|
|
<span>
|
|
<span>
|
|
|
<i class="ico ico_close1"></i>
|
|
<i class="ico ico_close1"></i>
|
|
|
<em class="sr-only">닫기</em>
|
|
<em class="sr-only">닫기</em>
|
|
@@ -352,83 +366,183 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="area_saleitem">
|
|
<div class="area_saleitem">
|
|
|
- <h4>다다익선 할인 대상이 있습니다.</h4>
|
|
|
|
|
- <div class="more_sale">
|
|
|
|
|
- <div class="item_gd">
|
|
|
|
|
- <figure>
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <span class="thumb"><img src="/images/pc/thumb/tmp_odSide2.jpg" alt=""></span>
|
|
|
|
|
- </a>
|
|
|
|
|
- <figcaption>
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <div class="brand">CURLYSUE 컬리수</div>
|
|
|
|
|
- <div class="name">[★2020 겨울신상★] 리버시블 경량점퍼 CPW0XQJM51 [겨울] 리버시블 경량점퍼 CPW0XQJM51 [겨울]</div>
|
|
|
|
|
- <div class="price">
|
|
|
|
|
- <del>7,000,000</del>
|
|
|
|
|
- <span class="selling_price">1,000,000</span>
|
|
|
|
|
- <span class="discount">30%</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </a>
|
|
|
|
|
- </figcaption>
|
|
|
|
|
- </figure>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="item_gd">
|
|
|
|
|
- <figure>
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <span class="thumb"><img src="/images/pc/thumb/tmp_odSide2.jpg" alt=""></span>
|
|
|
|
|
- </a>
|
|
|
|
|
- <figcaption>
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <div class="brand">CURLYSUE 컬리수</div>
|
|
|
|
|
- <div class="name">[★2020 겨울신상★] 리버시블 경량점퍼 CPW0XQJM51 [겨울] 리버시블 경량점퍼 CPW0XQJM51 [겨울]</div>
|
|
|
|
|
- <div class="price">
|
|
|
|
|
- <span class="selling_price">1,000,000</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </a>
|
|
|
|
|
- </figcaption>
|
|
|
|
|
- </figure>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="txt">
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <i class="ico ico_saletag"></i>
|
|
|
|
|
- <span>TBJ 브랜드 구매시 30,000원 할인</span>
|
|
|
|
|
- </a>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="more_sale">
|
|
|
|
|
- <div class="txt">
|
|
|
|
|
- <a href="">
|
|
|
|
|
- <i class="ico ico_saletag"></i>
|
|
|
|
|
- <span>300,000이상 구매시 30% 할인</span>
|
|
|
|
|
- <span>500,000이상 구매시 추가 10% 할인</span>
|
|
|
|
|
- </a>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
|
<!-- // CONT-BODY -->
|
|
<!-- // CONT-BODY -->
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
-<script type="text/javascript">
|
|
|
|
|
|
|
+<script th:inline="javascript">
|
|
|
let sumRealPayAmt = [[${order.sumRealPayAmt}]];
|
|
let sumRealPayAmt = [[${order.sumRealPayAmt}]];
|
|
|
let totDcAmt = [[${order.totDcAmt}]];
|
|
let totDcAmt = [[${order.totDcAmt}]];
|
|
|
|
|
|
|
|
|
|
+ function NotApplyTmtbCartList() {
|
|
|
|
|
+ let tmtbSq = 0;
|
|
|
|
|
+ let tmtbNm = "";
|
|
|
|
|
+ let goodsList = {
|
|
|
|
|
+ brandNm : "",
|
|
|
|
|
+ goodsNm : "",
|
|
|
|
|
+ currPrice : 0,
|
|
|
|
|
+ imgPath : ""
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
- $("#sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
|
|
- $("#totDcAmt").text(Number(totDcAmt).toLocaleString());
|
|
|
|
|
- //$("#cartListForm").submit();
|
|
|
|
|
- /* $.ajax( {
|
|
|
|
|
- type: "POST",
|
|
|
|
|
- url : '/cart/goods/list',
|
|
|
|
|
- dataType : 'html',
|
|
|
|
|
- success : function(result) {
|
|
|
|
|
- if (result != null) {
|
|
|
|
|
- $("#cartAjaxList").html(result);
|
|
|
|
|
|
|
+ $(".area_salecoupon .coupon_box").hide();
|
|
|
|
|
+ /* TODO 로그인 안했으면 .area_salecoupon (할인코드 입력 부 및 쿠폰정보영역) hide 시킬것 */
|
|
|
|
|
+
|
|
|
|
|
+ // 다다익선 할인 대상(미적용) 리스트
|
|
|
|
|
+ notApplyTmtbAreaList();
|
|
|
|
|
+
|
|
|
|
|
+ /*$("#sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
|
|
+ $("#totDcAmt").text(Number(totDcAmt).toLocaleString());*/
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ function notApplyTmtbAreaList() {
|
|
|
|
|
+ let notApplyQtyTmtbList = new Array();
|
|
|
|
|
+ let notApplyAmtTmtbList = new Array();
|
|
|
|
|
+
|
|
|
|
|
+ // 수량 다다익선 조회
|
|
|
|
|
+ $("#cartListForm input[name=qtyTmtbSq]").each(function (index) {
|
|
|
|
|
+ if($(this).val() != "0" && $(this).parent().find("input[name=applyQtySectionYn]").val() != "Y") {
|
|
|
|
|
+ let obj = new Object();
|
|
|
|
|
+ obj.tmtbSq = $(this).val();
|
|
|
|
|
+ obj.tmtbNm = $(this).parent().find("input[name=qtyTmtbNm]").val();
|
|
|
|
|
+ obj.currPrice = $(this).parent().find("input[name=currPrice]").val();
|
|
|
|
|
+ obj.goodsNm = $(this).parent().find(".info_box").find(".name").text();
|
|
|
|
|
+ obj.brandNm = $(this).parent().find(".info_box").find(".brand").text();
|
|
|
|
|
+ obj.imgPath = $(this).parent().find(".info_item").find(".thumb_box img").attr("src");
|
|
|
|
|
+
|
|
|
|
|
+ notApplyQtyTmtbList.push(obj);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if($(this).parent().find("input[name=applyAmtSectionYn]").val() == "N") { // 다다익선 금액은 기본상품만 가져오면됨 (N은 기본상품에 걸려있음)
|
|
|
|
|
+ let obj = new Object();
|
|
|
|
|
+ obj.tmtbSq = $(this).parent().find("input[name=amtTmtbSq]").val();
|
|
|
|
|
+ obj.tmtbNm = $(this).parent().find("input[name=amtTmtbNm]").val();
|
|
|
|
|
+
|
|
|
|
|
+ notApplyAmtTmtbList.push(obj);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 수량 다다익선 정렬
|
|
|
|
|
+ var t = new Object();
|
|
|
|
|
+ for (let i = 0; i < notApplyQtyTmtbList.length; i++) {
|
|
|
|
|
+ for (let j = 0; j < notApplyQtyTmtbList.length - i - 1; j++) {
|
|
|
|
|
+ if (notApplyQtyTmtbList[j].tmtbSq > notApplyQtyTmtbList[j + 1].tmtbSq) {
|
|
|
|
|
+ t = notApplyQtyTmtbList[j];
|
|
|
|
|
+ notApplyQtyTmtbList[j] = notApplyQtyTmtbList[j + 1];
|
|
|
|
|
+ notApplyQtyTmtbList[j + 1] = t;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- });*/
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 정렬 후 같은 다다익선 상품은 한 배열로 묶음
|
|
|
|
|
+ let tmtbQtyList = new Array();
|
|
|
|
|
+ for (let i = 0; i < notApplyQtyTmtbList.length; i++) {
|
|
|
|
|
+ let goods = notApplyQtyTmtbList[i];
|
|
|
|
|
+ let tmtbInfo = new Object();
|
|
|
|
|
+ let chk = false;
|
|
|
|
|
+ for (let j = 0; j < tmtbQtyList.length; j++) {
|
|
|
|
|
+ let tmtb = tmtbQtyList[j];
|
|
|
|
|
+ if (goods.tmtbSq == tmtb.tmtbSq) {
|
|
|
|
|
+ tmtbInfo = tmtbQtyList[j];
|
|
|
|
|
+ chk = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 현재 상품 정보
|
|
|
|
|
+ let goodsInfo = new Object();
|
|
|
|
|
+ goodsInfo.brandNm = goods.brandNm;
|
|
|
|
|
+ goodsInfo.goodsNm = goods.goodsNm;
|
|
|
|
|
+ goodsInfo.imgPath = goods.imgPath;
|
|
|
|
|
+ goodsInfo.currPrice = goods.currPrice;
|
|
|
|
|
+
|
|
|
|
|
+ // 현재 상품 정보 다다익선 정보에 세팅
|
|
|
|
|
+ if (chk) {
|
|
|
|
|
+ tmtbInfo.goodsList.push(goodsInfo);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let obj = new Object();
|
|
|
|
|
+ obj.tmtbSq = goods.tmtbSq;
|
|
|
|
|
+ obj.tmtbNm = goods.tmtbNm;
|
|
|
|
|
+ obj.goodsList = new Array();
|
|
|
|
|
+ obj.goodsList.push(goodsInfo);
|
|
|
|
|
+ tmtbQtyList.push(obj);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 수량 다다익선 HTML 작성
|
|
|
|
|
+ let tmtbHtml = "<h4>다다익선 할인 대상이 있습니다.</h4>";
|
|
|
|
|
+ for(let i = 0 ; i < tmtbQtyList.length ; i++) {
|
|
|
|
|
+ let tmtb = tmtbQtyList[i];
|
|
|
|
|
+ tmtbHtml += '<div class="more_sale qtyNotApplyTmtbList">';
|
|
|
|
|
+ for(let j = 0 ; j < tmtb.goodsList.length ; j++) {
|
|
|
|
|
+ let goods = tmtb.goodsList[j];
|
|
|
|
|
+ tmtbHtml += '<div class="item_gd">\n' +
|
|
|
|
|
+ ' <figure>\n' +
|
|
|
|
|
+ ' <a href="">\n' +
|
|
|
|
|
+ ' <span class="thumb"><img src="';
|
|
|
|
|
+ tmtbHtml += goods.imgPath;
|
|
|
|
|
+ tmtbHtml += '" alt=""></span>\n' +
|
|
|
|
|
+ ' </a>\n' +
|
|
|
|
|
+ ' <figcaption>\n' +
|
|
|
|
|
+ ' <a href="">\n' +
|
|
|
|
|
+ ' <div class="brand">';
|
|
|
|
|
+ tmtbHtml += goods.brandNm;
|
|
|
|
|
+ tmtbHtml += '</div>\n' +
|
|
|
|
|
+ ' <div class="name">';
|
|
|
|
|
+ tmtbHtml += goods.goodsNm;
|
|
|
|
|
+ tmtbHtml += '</div>\n' +
|
|
|
|
|
+ ' <div class="price">\n' +
|
|
|
|
|
+ ' <span class="selling_price">';
|
|
|
|
|
+ tmtbHtml += Number(goods.currPrice).toLocaleString();
|
|
|
|
|
+ tmtbHtml += '</span>\n' +
|
|
|
|
|
+ ' </div>\n' +
|
|
|
|
|
+ ' </a>\n' +
|
|
|
|
|
+ ' </figcaption>\n' +
|
|
|
|
|
+ ' </figure>\n' +
|
|
|
|
|
+ ' </div>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ tmtbHtml += '<div class="txt">\n' +
|
|
|
|
|
+ ' <a href="">\n' +
|
|
|
|
|
+ ' <i class="ico ico_saletag"></i>\n' +
|
|
|
|
|
+ ' <input type="hidden" name="tmtbSq" value="' + tmtb.tmtbSq + '" />' +
|
|
|
|
|
+ ' <span>\n';
|
|
|
|
|
+ tmtbHtml += tmtb.tmtbNm;
|
|
|
|
|
+ tmtbHtml += '</span>\n' +
|
|
|
|
|
+ ' </a>\n' +
|
|
|
|
|
+ ' </div>\n' +
|
|
|
|
|
+ ' </div>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 금액 다다익선 정보 HTML 작성
|
|
|
|
|
+ for(let i = 0 ; i < notApplyAmtTmtbList.length ; i++) {
|
|
|
|
|
+ let tmtb = notApplyAmtTmtbList[i];
|
|
|
|
|
+ tmtbHtml += '<div class="more_sale amtNotApplyTmtbList">\n' +
|
|
|
|
|
+ ' <div class="txt">\n' +
|
|
|
|
|
+ ' <a href="">\n' +
|
|
|
|
|
+ ' <i class="ico ico_saletag"></i>\n' +
|
|
|
|
|
+ ' <input type="hidden" name="tmtbSq" value="' + tmtb.tmtbSq + '" />' +
|
|
|
|
|
+ ' <span>';
|
|
|
|
|
+ tmtbHtml += tmtb.tmtbNm;
|
|
|
|
|
+ tmtbHtml += '</span>\n' +
|
|
|
|
|
+ ' </a>\n' +
|
|
|
|
|
+ ' </div>\n' +
|
|
|
|
|
+ ' </div>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $(".area_saleitem").html(tmtbHtml);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function cancelCartCpn() {
|
|
|
|
|
+ $("#sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
|
|
+ $("#totDcAmt").text(Number(totDcAmt).toLocaleString());
|
|
|
|
|
+ $(".area_salecoupon .coupon_box").hide();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
function serialCpnApply() {
|
|
function serialCpnApply() {
|
|
|
let testArr = [];
|
|
let testArr = [];
|
|
@@ -450,11 +564,73 @@
|
|
|
dataType : 'json',
|
|
dataType : 'json',
|
|
|
data : jsonData,
|
|
data : jsonData,
|
|
|
success : function(result) {
|
|
success : function(result) {
|
|
|
- alert(result.serialCpnInfo.result + " / " + result.serialCpnInfo.dcAmt);
|
|
|
|
|
|
|
+ $(".area_salecoupon .coupon_box").show();
|
|
|
|
|
+
|
|
|
|
|
+ // 합계 금액
|
|
|
$("#sumRealPayAmt").text(Number(sumRealPayAmt - result.serialCpnInfo.dcAmt).toLocaleString());
|
|
$("#sumRealPayAmt").text(Number(sumRealPayAmt - result.serialCpnInfo.dcAmt).toLocaleString());
|
|
|
$("#totDcAmt").text(Number(totDcAmt - result.serialCpnInfo.dcAmt).toLocaleString());
|
|
$("#totDcAmt").text(Number(totDcAmt - result.serialCpnInfo.dcAmt).toLocaleString());
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠폰 정보
|
|
|
|
|
+ $(".area_salecoupon .cp_name").text(result.serialCpnInfo.cpnNm);
|
|
|
|
|
+ $(".area_salecoupon .cp_condition").html(result.serialCpnInfo.cpnDesc + "<span><em class='tag'>1장 보유</em></span>");
|
|
|
|
|
+ $(".area_salecoupon .availStdt").text(result.serialCpnInfo.availStdt);
|
|
|
|
|
+ $(".area_salecoupon .availEddt").text(result.serialCpnInfo.availEddt);
|
|
|
|
|
+ if(result.serialCpnInfo.dcWay == "G240_10") {
|
|
|
|
|
+ $(".area_salecoupon .cp_dc_val").html( "<em>" + Number(result.serialCpnInfo.dcVal).toLocaleString() + "</em> 원");
|
|
|
|
|
+ } else if (result.serialCpnInfo.dcWay == "G240_11") {
|
|
|
|
|
+ $(".area_salecoupon .cp_dc_val").html( "<em>" + result.serialCpnInfo.dcVal + "%</em>");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ //다다익선 적용내역 보기
|
|
|
|
|
+ $(document).on('click','.shopping_bag .part_deliver .btn_moresale',function(e){
|
|
|
|
|
+ $(this).toggleClass('active');
|
|
|
|
|
+ $(this).parents('.od_moresale').find('.li_moresale').toggle();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //관심상품 등록
|
|
|
|
|
+ $(document).on('click','.shopping_bag .part_deliver .btn_favorite',function(e){
|
|
|
|
|
+ $(this).toggleClass('active');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //쿠폰사용안내 팝업열기
|
|
|
|
|
+ $(document).on('click','#btn_cpinfo_pop',function(e){
|
|
|
|
|
+ $("#cpinfoPop").modal("show");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //옵션변경 팝업열기
|
|
|
|
|
+ $(document).on('click','.btn_opt_pop',function(e){
|
|
|
|
|
+ $("#optModifyPop").modal("show");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //상품옵션변경 팝업 > 수량조절
|
|
|
|
|
+ $(document).on('click','.opt_modify_pop .number_count .minus',function(e){
|
|
|
|
|
+ var $input = $(this).parent().find('input');
|
|
|
|
|
+ var count = parseInt($input.val()) - 1;
|
|
|
|
|
+ count = count < 1 ? 1 : count;
|
|
|
|
|
+ $input.val(count);
|
|
|
|
|
+ $input.change();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }).on('click','.opt_modify_pop .number_count .plus',function(e){
|
|
|
|
|
+ var $input = $(this).parent().find('input');
|
|
|
|
|
+ $input.val(parseInt($input.val()) + 1);
|
|
|
|
|
+ $input.change();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //상품옵션변경 팝업 > 컬러선택 표기
|
|
|
|
|
+ $(document).on('click','.opt_modify_pop .opt_color ul li a',function(e){
|
|
|
|
|
+ $(this).parents('.opt_color').find('li a').removeClass('on');
|
|
|
|
|
+ $(this).addClass('on');
|
|
|
|
|
+ var optColor = $('.opt_modify_pop .opt_color ul li a.on img').attr('alt');
|
|
|
|
|
+ $('.opt_modify_pop .opt_color .opt_header .color').text(optColor);
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
</script>
|
|
</script>
|
|
|
</html>
|
|
</html>
|