|
|
@@ -15,6 +15,9 @@
|
|
|
-->
|
|
|
<body>
|
|
|
<th:block layout:fragment="content">
|
|
|
+ <!-- 즉시구매 form -->
|
|
|
+ <form id="cartInfoForm" method="post" action="/order/noMember"></form>
|
|
|
+
|
|
|
<form id="cartListForm" method="post" action="/order/noMember" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}, imgUrl=${@environment.getProperty('upload.image.view')}">
|
|
|
<div class="inner shotDelvSelect">
|
|
|
<div class="od_method">
|
|
|
@@ -125,10 +128,8 @@
|
|
|
<p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
</div>
|
|
|
<div class="od_exinfo">
|
|
|
- <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
- <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <span th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y')}" class="applyTmtb btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N')}" href="javascript:;" id="btn_moresale_pop" class="notApplyTmtb btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -148,7 +149,7 @@
|
|
|
<div><button type="button" class="btn btn_default btn_option_pop01" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div> <!-- 옵션변경_팝업01 호출 -->
|
|
|
<div>
|
|
|
<button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
- <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line" th:onclick="|fnSubmitNoMember(${cart.cartSq})|"><span>바로주문</span></button>
|
|
|
</div> <!-- 210406_ID 추가 -->
|
|
|
</div>
|
|
|
|
|
|
@@ -225,10 +226,8 @@
|
|
|
<p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
</div>
|
|
|
<div class="od_exinfo">
|
|
|
- <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
- <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <span th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y')}" class="applyTmtb btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N')}" href="javascript:;" id="btn_moresale_pop" class="notApplyTmtb btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -248,7 +247,7 @@
|
|
|
<div><button type="button" class="btn btn_default btn_option_pop01" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div> <!-- 옵션변경_팝업01 호출 -->
|
|
|
<div>
|
|
|
<button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
- <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line" th:onclick="|fnSubmitNoMember(${cart.cartSq})|"><span>바로주문</span></button>
|
|
|
</div> <!-- 210406_ID 추가 -->
|
|
|
</div>
|
|
|
|
|
|
@@ -273,13 +272,13 @@
|
|
|
<!-- 일반 배송 -->
|
|
|
|
|
|
<!-- 자사 배송비 -->
|
|
|
- <div class="goods_txt selfGoodsDelv" th:classappend="|delv_${order.cartDelvFeeCd}|">
|
|
|
- <span class="dlvr_fee" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
- <span class="dlvr_fee" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
+ <div class="goods_txt selfGoodsDelv delvArea" th:classappend="|delv_${order.cartDelvFeeCd}|" th:style="${'Y'.equals(order.delvYn) ? 'display:block' : 'display:none'}">
|
|
|
+ <span class="dlvr_fee delvFeeArea" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
+ <span class="dlvr_fee delvFeeArea" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
<span>STYLE24 배송</span>
|
|
|
</div>
|
|
|
|
|
|
- <div class="goods_dlvr_save" th:if="${order.wmsDelvFee > 0}">
|
|
|
+ <div class="goods_dlvr_save" th:style="${'Y'.equals(order.delvYn) and order.wmsDelvFee > 0 ? 'display:block' : 'display:none'}">
|
|
|
<a href="javascript:;" id="btn_dlvrSave_pop" class="btn_popup_save">배송비 SAVE 상품 보기</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -293,7 +292,7 @@
|
|
|
<div class="goods_date">업체직 배송</div>
|
|
|
</div>
|
|
|
<!-- 업체직배송 -->
|
|
|
- <div class="goods_area">
|
|
|
+ <div class="goods_area delvList">
|
|
|
<div class="goods_section delvCartInfo cartInfo" th:each="cart, status : ${order.delvCartList}">
|
|
|
<input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
<input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
@@ -345,10 +344,8 @@
|
|
|
<p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
</div>
|
|
|
<div class="od_exinfo">
|
|
|
- <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
- <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
- <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <span th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y')}" class="applyTmtb btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${(cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N') or (cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N')}" href="javascript:;" id="btn_moresale_pop" class="notApplyTmtb btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -368,7 +365,7 @@
|
|
|
<div><button type="button" class="btn btn_default" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div>
|
|
|
<div>
|
|
|
<button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
- <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" class="btn btn_primary_line" th:onclick="|fnSubmitNoMember(${cart.cartSq})|"><span>바로주문</span></button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -390,13 +387,13 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 입점업체 배송비 -->
|
|
|
- <div class="goods_txt" th:if="${'Y'.equals(cart.addDelvFeeYn)}" th:classappend="|delv_${cart.delvFeeCd}|">
|
|
|
- <span class="dlvr_fee" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
- <span class="dlvr_fee" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
+ <div class="goods_txt delvArea" th:if="${'Y'.equals(cart.addDelvFeeYn)}" th:classappend="|delv_${cart.delvFeeCd}|" th:style="${'Y'.equals(cart.delvYn) ? 'display:block' : 'display:none'}">
|
|
|
+ <span class="dlvr_fee delvFeeArea" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
+ <span class="dlvr_fee delvFeeArea" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
<span th:text="|${cart.supplyCompNm} 업체직배송|"></span>
|
|
|
</div>
|
|
|
|
|
|
- <div class="goods_dlvr_save" th:if="${'Y'.equals(cart.addDelvFeeYn) and cart.delvFee > 0}">
|
|
|
+ <div class="goods_dlvr_save" th:if="${'Y'.equals(cart.addDelvFeeYn)}" th:style="${'Y'.equals(cart.delvYn) and cart.delvFee > 0 ? 'display:block' : 'display:none'}">
|
|
|
<a href="javascript:;" id="btn_dlvrSave_pop" class="btn_popup_save">배송비 SAVE 상품 보기</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -410,7 +407,7 @@
|
|
|
<div class="tit_box">
|
|
|
<h3>결제 정보</h3>
|
|
|
<span>
|
|
|
- <em class="number" th:text="${order.totCartCnt}"></em>개의 상품
|
|
|
+ <em class="number checkSelectCartListCnt" th:text="${order.totCartCnt}"></em>개의 상품
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="od_amount_box">
|
|
|
@@ -620,7 +617,7 @@
|
|
|
</div>
|
|
|
<div class="od_calc_wrap" id="bottomOrderArea">
|
|
|
<button type="button" class="btn btn_dark"><span>합계 <em class="realOrderAmtText" th:text="${#numbers.formatInteger(order.sumRealPayAmt + order.totDelvFee, 1, 'COMMA')}">0</em>원</span></button>
|
|
|
- <button type="button" id="btn_purchase" class="btn btn_primary"><span>구매하기 (<em class="realOrderQtyText" th:text="${order.totCartCnt}"></em>개)</span></button> <!-- 210406_ID 추가 -->
|
|
|
+ <button type="button" id="btn_purchase" class="btn btn_primary" onclick="fnSubmitNoMember('all'); return false;"><span>구매하기 (<em class="realOrderQtyText" th:text="${order.totCartCnt}"></em>개)</span></button> <!-- 210406_ID 추가 -->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -629,9 +626,12 @@
|
|
|
<div class="modal-dialog" role="document">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
- <h5 class="modal-title" id="couponInfoLabel"></h5>
|
|
|
+ <h5 class="modal-title" id="couponInfoLabel">사용안내</h5>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
+ <div class="pop_head">
|
|
|
+ <h6 class="serialCpnNm"></h6>
|
|
|
+ </div>
|
|
|
<div class="pop_cont">
|
|
|
<dl>
|
|
|
<div>
|
|
|
@@ -664,21 +664,29 @@
|
|
|
<!-- //옵션변경 팝업 -->
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
- let sumRealPayAmt = [[${order.sumRealPayAmt + order.totDelvFee}]];
|
|
|
- let totDcAmt = [[${order.totDcAmt}]];
|
|
|
- let loginInfo = [[${loginInfo}]];
|
|
|
- let orderFlag = true;
|
|
|
+ var sumRealPayAmt = [[${order.sumRealPayAmt + order.totDelvFee}]];
|
|
|
+ var totDcAmt = [[${order.totDcAmt}]];
|
|
|
+ var loginInfo = new Object();
|
|
|
+ var orderFlag = true;
|
|
|
+
|
|
|
+ function setLoginInfo() {
|
|
|
+ gagajf.ajaxJsonSubmit("/cart/login/info", null, function (result) {
|
|
|
+ loginInfo = result;
|
|
|
+
|
|
|
+ if (!loginInfo || loginInfo.custNo == null || loginInfo.custNo == 0) {
|
|
|
+ $("#cartListForm .area_salecoupon").hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
+ setLoginInfo();
|
|
|
+
|
|
|
if([[${!order.shotCanYn.equals('Y')}]]) {
|
|
|
//$(".shotDelvSelect").hide();
|
|
|
}
|
|
|
|
|
|
$("#cartListForm .area_salecoupon .coupon_box").hide();
|
|
|
-
|
|
|
- if(!loginInfo || loginInfo.custNo == null || loginInfo.custNo == 0) {
|
|
|
- $("#cartListForm .area_salecoupon").parent().hide();
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
function cancelCartCpn() {
|
|
|
@@ -766,7 +774,7 @@
|
|
|
}
|
|
|
refValComment += "일부상품, 특가상품 제외";
|
|
|
|
|
|
- $(".cartCpnInfoModal .modal-header").html('<h5 class="modal-title" id="couponInfoLabel">' + cpnInfo.cpnNm + '</h5>');
|
|
|
+ $(".cartCpnInfoModal .modal-body .pop_head h6").text(cpnInfo.cpnNm);
|
|
|
|
|
|
if(conditionComment != "") { $(".cartCpnInfoModal .cpnCondition").html(conditionComment); }
|
|
|
else { $(".cartCpnInfoModal .cartCpnCondition").hide(); }
|
|
|
@@ -795,8 +803,13 @@
|
|
|
cartArr.push($(this).val());
|
|
|
});
|
|
|
|
|
|
+ if(cartArr.length == 0) {
|
|
|
+ cartArr.push(0);
|
|
|
+ $("#cartListForm .part_goods .goods_dlvr_save").hide();
|
|
|
+ }
|
|
|
+
|
|
|
// 선택된 장바구니 정보 가공
|
|
|
- let data = { cartSqArr : cartArr }
|
|
|
+ let data = { cartSqArr : cartArr, shotDelvUseYn : $("input[name=shotDelvUseYn]:checked").val() }
|
|
|
let jsonData = JSON.stringify(data);
|
|
|
|
|
|
$.ajax( {
|
|
|
@@ -821,41 +834,37 @@
|
|
|
$("#cartListForm .applyTmtb").hide();
|
|
|
$("#cartListForm .notApplyTmtb").hide();
|
|
|
|
|
|
+ // 배송비 정보 0원으로 모두 변경 (체크 되지 않은 업체는 0원처리)
|
|
|
+ $("#cartListForm .delvArea .delvFeeArea").text("배송비 0원");
|
|
|
+
|
|
|
// 장바구니 각 상품 가격 정보 할인 전으로 변경
|
|
|
$("#cartListForm .cartInfo input[name=cartSq]").each(function() {
|
|
|
- if($(this).parent().find(".calc_box .price_org").text() != "") {
|
|
|
- $(this).parent().find(".calc_box .price_sale").text($(this).parent().find(".calc_box .price_org").text());
|
|
|
- $(this).parent().find(".calc_box .price_org").remove();
|
|
|
+ if($(this).parent().find(".od_calc .sale_price>del>em").text() != "") {
|
|
|
+ $(this).parent().find(".od_calc .selling_price>em").text($(this).parent().find(".od_calc .sale_price>del>em").text());
|
|
|
+ $(this).parent().find(".od_calc .sale_price").hide();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- $("#cartListForm").find(".delvFeeArea").html("<div class='info_dlvr'><span class='dlvr_fee'>배송비 무료</span></div>");
|
|
|
for(let i = 0 ; i < shotList.length ; i++) {
|
|
|
cartList.push(shotList[i]);
|
|
|
$("#cartListForm .shotCartInfo input[name=cartSq]").each(function() {
|
|
|
if(shotList[i].cartSq == $(this).val()) {
|
|
|
let shot = shotList[i];
|
|
|
- $(this).parent().find(".od_moresale .applyTmtbNm > ul").html("");
|
|
|
- $(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
|
|
|
|
|
|
// 다다익선 적용 정보 생성성
|
|
|
- if(shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "Y") {
|
|
|
+ if((shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "Y") || (shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "Y")) {
|
|
|
$(this).parent().find(".applyTmtb").show();
|
|
|
}
|
|
|
- if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "Y") {
|
|
|
- $(this).parent().find(".applyTmtb").show();
|
|
|
- }
|
|
|
- if(shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "N") {
|
|
|
- $(this).parent().find(".notApplyTmtb").show();
|
|
|
- }
|
|
|
- if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "N") {
|
|
|
+
|
|
|
+ if((shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "N") || (shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "N")) {
|
|
|
$(this).parent().find(".notApplyTmtb").show();
|
|
|
}
|
|
|
|
|
|
// 다다익선 할인가 적용
|
|
|
if(shot.tmtbDcAmt < shot.currPrice) {
|
|
|
- $(this).parent().find(".calc_box .price_sale").text(Number(shot.tmtbDcAmt).toLocaleString() + " 원");
|
|
|
- $(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(shot.currPrice).toLocaleString() + "</em>원</span></p>");
|
|
|
+ $(this).parent().find(".od_calc .selling_price>em").text(Number(shot.tmtbDcAmt).toLocaleString());
|
|
|
+ $(this).parent().find(".od_calc .sale_price>del>em").text(Number(shot.currPrice).toLocaleString());
|
|
|
+ $(this).parent().find(".od_calc .sale_price").show();
|
|
|
$(this).parent().find("input[name=tmtbDcAmt]").val(shot.tmtbDcAmt);
|
|
|
}
|
|
|
}
|
|
|
@@ -871,23 +880,18 @@
|
|
|
$(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
|
|
|
|
|
|
// 다다익선 적용 정보 생성성
|
|
|
- if(wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "Y") {
|
|
|
- $(this).parent().find(".applyTmtb").show();
|
|
|
- }
|
|
|
- if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "Y") {
|
|
|
+ if((wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "Y") || (wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "Y")) {
|
|
|
$(this).parent().find(".applyTmtb").show();
|
|
|
}
|
|
|
- if(wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "N") {
|
|
|
- $(this).parent().find(".notApplyTmtb").show();
|
|
|
- }
|
|
|
- if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "N") {
|
|
|
+ if((wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "N") || (wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "N")) {
|
|
|
$(this).parent().find(".notApplyTmtb").show();
|
|
|
}
|
|
|
|
|
|
// 다다익선 할인가 적용
|
|
|
if(wms.tmtbDcAmt < wms.currPrice) {
|
|
|
- $(this).parent().find(".calc_box .price_sale").text(Number(wms.tmtbDcAmt).toLocaleString() + " 원");
|
|
|
- $(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(wms.currPrice).toLocaleString() + "</em>원</span></p>");
|
|
|
+ $(this).parent().find(".od_calc .selling_price>em").text(Number(wms.tmtbDcAmt).toLocaleString());
|
|
|
+ $(this).parent().find(".od_calc .sale_price>del>em").text(Number(wms.currPrice).toLocaleString());
|
|
|
+ $(this).parent().find(".od_calc .sale_price").show();
|
|
|
$(this).parent().find("input[name=tmtbDcAmt]").val(wms.tmtbDcAmt);
|
|
|
}
|
|
|
}
|
|
|
@@ -895,11 +899,14 @@
|
|
|
}
|
|
|
|
|
|
// 자사 상품 배송비
|
|
|
- if(order.wmsDelvFee == 0) {
|
|
|
- $(".selfGoodsDelv").html("<span class='dlvr_fee'>배송비 무료</span>");
|
|
|
- } else {
|
|
|
- let html = "<span class='dlvr_fee'>배송비 <em>" + Number(order.wmsDelvFee).toLocaleString() + "</em> 원</span><a href='#' class='btn_popup_save'>배송비 SAVE 상품 보기</a>";
|
|
|
- $(".selfGoodsDelv").html(html);
|
|
|
+ if(order.delvYn == "Y") {
|
|
|
+ if (order.wmsDelvFee == 0) {
|
|
|
+ $(".selfGoodsDelv").html("<span class='dlvr_fee delvFeeArea'>배송비 무료</span>");
|
|
|
+ } else {
|
|
|
+ let html = "<span class='dlvr_fee delvFeeArea'>배송비 <em>" + Number(order.wmsDelvFee).toLocaleString() + "</em> 원</span><span>STYLE24 배송</span>";
|
|
|
+ $(".selfGoodsDelv").parent().find(".goods_dlvr_save").show();
|
|
|
+ $(".selfGoodsDelv").html(html);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
for(let i = 0 ; i < delvList.length ; i++) {
|
|
|
@@ -911,29 +918,25 @@
|
|
|
$(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
|
|
|
|
|
|
// 다다익선 적용 정보 생성성
|
|
|
- if(delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "Y") {
|
|
|
+ if((delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "Y") || (delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "Y")) {
|
|
|
$(this).parent().find(".applyTmtb").show();
|
|
|
}
|
|
|
- if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "Y") {
|
|
|
- $(this).parent().find(".applyTmtb").show();
|
|
|
- }
|
|
|
- if(delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "N") {
|
|
|
+ if((delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "N") || (delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "N")) {
|
|
|
$(this).parent().find(".notApplyTmtb").show();
|
|
|
}
|
|
|
- if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "N") {
|
|
|
- }
|
|
|
|
|
|
// 다다익선 할인가 적용
|
|
|
if(delv.tmtbDcAmt < delv.currPrice) {
|
|
|
- $(this).parent().find(".calc_box .price_sale").text(Number(delv.tmtbDcAmt).toLocaleString() + " 원");
|
|
|
- $(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(delv.currPrice).toLocaleString() + "</em>원</span></p>");
|
|
|
+ $(this).parent().find(".od_calc .selling_price>em").text(Number(delv.tmtbDcAmt).toLocaleString());
|
|
|
+ $(this).parent().find(".od_calc .sale_price>del>em").text(Number(delv.currPrice).toLocaleString());
|
|
|
$(this).parent().find("input[name=tmtbDcAmt]").val(delv.tmtbDcAmt);
|
|
|
}
|
|
|
|
|
|
if(delv.delvFee == 0) {
|
|
|
- $(".delvList").find(".delv_" + delv.delvFeeCd).html("<span class='dlvr_fee'>배송비 무료</span><span class='dlvr_fee'><em>" + delv.supplyCompNm + "</em> 업체직배송</span>");
|
|
|
+ $(".delvList").find(".delv_" + delv.delvFeeCd).html("<span class='dlvr_fee delvFeeArea'>배송비 무료</span><span class='dlvr_fee'><em>" + delv.supplyCompNm + "</em> 업체직배송</span>");
|
|
|
} else {
|
|
|
- let html = "<div className='order_delivery'><span class='dlvr_fee'>배송비 <em>" + Number(delv.delvFee).toLocaleString() + "</em>원</span><span class='dlvr_shop'><em>" + delv.supplyCompNm + "</em> 업체직배송</span><a href='#' className='btn_popup_save'>배송비 SAVE 상품 보기</a></div>";
|
|
|
+ let html = "<span class='dlvr_fee delvFeeArea'>배송비 <em>" + Number(delv.delvFee).toLocaleString() + "</em>원</span><span class='dlvr_shop'><em>" + delv.supplyCompNm + "</em> 업체직배송</span>";
|
|
|
+ $(".delvList").find(".delv_" + delv.delvFeeCd).parent().find(".goods_dlvr_save").show();
|
|
|
$(".delvList").find(".delv_" + delv.delvFeeCd).html(html);
|
|
|
}
|
|
|
}
|
|
|
@@ -1070,9 +1073,11 @@
|
|
|
let cartSqArr = [];
|
|
|
orderFlag = true;
|
|
|
|
|
|
- if($("#cartListForm input[name=cartSqArr]:checked").length < 1) {
|
|
|
- mcxDialog.alert("구매하실 상품을 선택해주세요.");
|
|
|
- return false;
|
|
|
+ if(cartSq == 'all') {
|
|
|
+ if($("#cartListForm input[name=cartSqArr]:checked").length < 1) {
|
|
|
+ mcxDialog.alert("구매하실 상품을 선택해주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(loginInfo == null || loginInfo.custNo == null || loginInfo.custNo == 0) {
|
|
|
@@ -1173,42 +1178,10 @@
|
|
|
$("#od_item_all").on("change", function() {
|
|
|
if($("#od_item_all").is(":checked")) {
|
|
|
$("input[name=cartSqArr]").prop("checked", true);
|
|
|
- changeCartSqArr();
|
|
|
} else {
|
|
|
$("input[name=cartSqArr]").prop("checked", false);
|
|
|
- // 하단 합계금액, 구매하기 수량 변경
|
|
|
- $("#cartListForm .realOrderAmtText").text("0");
|
|
|
- $("#cartListForm .realOrderQtyText").text("0");
|
|
|
- $("#cartListForm .area_order .number").text("0");
|
|
|
- $("#cartListForm .od_amount_box .sumListPrice").text("0");
|
|
|
- $("#cartListForm .od_amount_box .totDelvFee").text("0");
|
|
|
- $("#cartListForm .od_amount_box .totDcAmt").text("0");
|
|
|
- $("#cartListForm .totalprice_box .sumRealPayAmt").text("0");
|
|
|
}
|
|
|
- });
|
|
|
-
|
|
|
- //수량조절 이벤트
|
|
|
- $(document).on('click','.optModifyPop01 .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();
|
|
|
- //수량1개 이하 감소버튼 비활성화
|
|
|
- if ($input.val() == 1) {
|
|
|
- $('.optModifyPop01 .number_count .minus').addClass('min_val');
|
|
|
- }
|
|
|
- return false;
|
|
|
- }).on('click','.optModifyPop01 .number_count .plus',function(e){
|
|
|
- var $input = $(this).parent().find('input');
|
|
|
- $input.val(parseInt($input.val()) + 1);
|
|
|
- $input.change();
|
|
|
- //수량2개 이상부터 감소버튼 활성화
|
|
|
- $('.optModifyPop01 .number_count .minus').removeClass('min_val');
|
|
|
- return false;
|
|
|
- }).on('keyup','.optModifyPop01 .number_count input[type=text]',function(e){
|
|
|
- //텍스트, 0 입력금지
|
|
|
- $(this).val($(this).val().replace(/[^1-9]/g,""));
|
|
|
+ changeCartSqArr();
|
|
|
});
|
|
|
|
|
|
/* 팝업 - 옵션변경 > 컬러선택 표기 */
|
|
|
@@ -1220,11 +1193,59 @@
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
- /* 쿠폰정보 닫기 */
|
|
|
- function cancelCartCpn() {
|
|
|
- $("#cartListForm #sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
- $("#cartListForm #totDcAmt").text(Number(totDcAmt).toLocaleString());
|
|
|
- $("#cartListForm .area_salecoupon .coupon_box").hide();
|
|
|
+ function deleteCartAjax(cartArr, menu) {
|
|
|
+ if(cartArr.length < 1) {
|
|
|
+ mcxDialog.alert("삭제하실 상품을 선택해 주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ cartSqArr : cartArr
|
|
|
+ }
|
|
|
+
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ $.ajax( {
|
|
|
+ type: "POST",
|
|
|
+ url : '/cart/deleteCart',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ data : jsonData,
|
|
|
+ success : function(result) {
|
|
|
+ mcxDialog.alert("삭제 되었습니다.");
|
|
|
+ let data = {shotDelvUseYn : $("input[name=shotDelvUseYn]:checked").val()};
|
|
|
+ getCartList(data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteCart(gbn, menu) {
|
|
|
+ let cartArr = [];
|
|
|
+ let confirmMessage = "";
|
|
|
+ if(gbn == "SELECT") {
|
|
|
+ $("#cartListForm input[name=cartSqArr]:checked").each(function () {
|
|
|
+ cartArr.push($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ if(cartArr.length < 1) {
|
|
|
+ mcxDialog.alert("선택된 상품이 없습니다.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ confirmMessage = "총 " + cartArr.length + "개의 상품을 삭제합니다.";
|
|
|
+ } else {
|
|
|
+ cartArr.push(gbn);
|
|
|
+ deleteCartAjax(cartArr, menu);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ mcxDialog.confirm(confirmMessage, {
|
|
|
+ cancelBtnText: "취소/닫기", //취소 또는 닫기 버튼명
|
|
|
+ sureBtnText : "확인", //처리문 버튼명
|
|
|
+ sureBtnClick : function () {
|
|
|
+ deleteCartAjax(cartArr, menu);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
</script>
|
|
|
</form>
|