|
|
@@ -323,7 +323,7 @@
|
|
|
<div class="form_field">
|
|
|
<input id="chk-maxdisc" type="checkbox" checked="">
|
|
|
<label for="chk-maxdisc">
|
|
|
- <span>최대 할인혜택을 바로 적용하세요 <em class="maxdisc_amount">(-3,000원)</em></span>
|
|
|
+ <span>최대 할인혜택을 바로 적용하세요 <em class="maxdisc_amount"></em></span>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -376,6 +376,7 @@
|
|
|
<div class="form_field">
|
|
|
<div class="select_custom type1">
|
|
|
<div class="combo">
|
|
|
+ <input type="hidden" name="cpnCartSq" th:value="${goods.cartSq}"/>
|
|
|
<input type="hidden" name="custCpnSq" value="0"/>
|
|
|
<input type="hidden" name="cpnDcAmt" value="0"/>
|
|
|
|
|
|
@@ -413,7 +414,12 @@
|
|
|
<ul class="list">
|
|
|
<li value="0">선택없음</li>
|
|
|
<th:block th:each="cartCpn, k : ${cartCpnList}">
|
|
|
- <li th:value="${cartCpn.custCpnSq}" th:data="${cartCpn.cpnDcAmt}" th:text="${cartCpn.cpnNm}"></li>
|
|
|
+ <li th:value="${cartCpn.custCpnSq}" th:data="${cartCpn.cpnDcAmt}">
|
|
|
+ <th:block th:text="${cartCpn.cpnNm}"></th:block>
|
|
|
+ <th:block th:each="cartCpnCartSq, kokok : ${cartCpn.cartCpnCartSqArr}">
|
|
|
+ <input type="text" name="cartCpnCartSq" th:value="${cartCpnCartSq}" />
|
|
|
+ </th:block>
|
|
|
+ </li>
|
|
|
</th:block>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -798,148 +804,91 @@
|
|
|
<div class="area_order">
|
|
|
<div class="tit_box">
|
|
|
<h3 class="subH2">주문내역</h3>
|
|
|
- <span> <em class="number" th:text="${delvTotCnt}"></em>개의 상품
|
|
|
- </span>
|
|
|
+ <span> <em class="number" th:text="${delvTotCnt}"></em>개의 상품</span>
|
|
|
</div>
|
|
|
<div class="od_item_box">
|
|
|
- <!-- 총알배송, 일반배송-->
|
|
|
- <th:block th:if="${wmsCartList != null and #lists.size(wmsCartList) > 0}">
|
|
|
- <div class="part_dlvr">
|
|
|
- <h4 class="subH3 mb20" id="shotDelvTitle">STYLE24 총알배송<span>오늘 자정까지 도착</span></h4>
|
|
|
- <h4 class="subH3 mb20" id="wmsDelvTitle">STYLE24 일반배송</h4>
|
|
|
- <div class="gd_list">
|
|
|
- <th:block th:each="goods, i : ${wmsCartList}">
|
|
|
- <div class="item_gd">
|
|
|
- <input type="text" name="cartSq" th:value="${goods.cartSq}"/>
|
|
|
- <input type="text" name="goodscd" th:value="${goods.goodsCd}"/>
|
|
|
- <input type="text" name="ordQty" th:value="${goods.goodsQty}"/>
|
|
|
- <input type="text" name="itemCd" th:value="${goods.itemCd}"/>
|
|
|
- <input type="text" name="optCd" th:value="${goods.optCd}"/>
|
|
|
- <input type="text" name="optCd1" th:value="${goods.optCd1}"/>
|
|
|
- <input type="text" name="optCd2" th:value="${goods.optCd2}"/>
|
|
|
-
|
|
|
- <input type="text" name="currPrice" th:value="${goods.orgCurrPrice}"/>
|
|
|
- <input type="text" name="cpn1CpnSq" th:value="${goods.cpn1CpnSq}"/>
|
|
|
- <input type="text" name="cpn1DcAmt" th:value="${goods.orgCurrPrice} - ${goods.currPrice}"/>
|
|
|
-
|
|
|
- <th:block th:if="${goods.applyQtySectionYn} == 'Y' and ${goods.qtyTmtbSq} > 0">
|
|
|
- <input type="text" name="tmtb1Sq" th:value="${goods.qtyTmtbSq}"/>
|
|
|
- <input type="text" name="tmtb1DcAmt" th:value="${goods.tmtb1DcAmt}"/>
|
|
|
- </th:block>
|
|
|
- <th:block th:if="${goods.applyQtySectionYn} != 'Y'">
|
|
|
- <input type="text" name="tmtb1Sq" value="0"/>
|
|
|
- <input type="text" name="tmtb1DcAmt" value="0"/>
|
|
|
- </th:block>
|
|
|
-
|
|
|
- <th:block th:if="${goods.applyAmtSectionYn} == 'Y' and ${goods.amtTmtbSq} > 0">
|
|
|
- <input type="text" name="tmtb2Sq" th:value="${goods.amtTmtbSq}"/>
|
|
|
- <input type="text" name="tmtb2DcAmt" th:value="${goods.tmtb2DcAmt}"/>
|
|
|
- </th:block>
|
|
|
- <th:block th:if="${goods.applyAmtSectionYn} != 'Y'">
|
|
|
- <input type="text" name="tmtb2Sq" value="0"/>
|
|
|
- <input type="text" name="tmtb2DcAmt" value="0"/>
|
|
|
- </th:block>
|
|
|
-
|
|
|
- <input type="text" name="goodsCpnSq" value=""/>
|
|
|
- <input type="text" name="goodsCpnDcAmt" value=""/>
|
|
|
- <input type="text" name="cartCpnSq" value=""/>
|
|
|
- <input type="text" name="cartCpnDcAmt" value=""/>
|
|
|
-
|
|
|
- <figure>
|
|
|
- <span class="thumb"><img src="/images/pc/thumb/tmp_odSide1.jpg" alt=""></span>
|
|
|
- <figcaption>
|
|
|
- <div class="brand" th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></div>
|
|
|
- <div class="name" th:text="${goods.goodsNm}"></div>
|
|
|
- <div class="option" th:each="opt, index : ${goods.itemNmArr}">
|
|
|
- <span th:text="${goods.optCdArr[index.index]}"></span>
|
|
|
- <span>수량:<em th:text="${goods.goodsQty}"></em>개</span>
|
|
|
- </div>
|
|
|
- <div class="price">
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} > 0">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.tmtbDcAmt, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} < 1">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.currPrice, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- </div>
|
|
|
- </figcaption>
|
|
|
- </figure>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <!-- 전체배송목록 sort -->
|
|
|
+ <th:block th:each="delvAllCart, i : ${delvAllCartList}">
|
|
|
+ <th:block th:if="${delvAllCart != null and #lists.size(delvAllCart) > 0}">
|
|
|
+ <div class="part_dlvr">
|
|
|
+ <th:block th:if="${i.index} == 0">
|
|
|
+ <th:block th:if="${delvAllCart != null and #lists.size(delvAllCart) > 0}">
|
|
|
+ <h4 class="subH3 mb20">STYLE24 총알배송<span>오늘 자정까지 도착</span></h4>
|
|
|
+ </th:block>
|
|
|
</th:block>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </th:block>
|
|
|
- <!-- //총알배송, 일반배송 -->
|
|
|
-
|
|
|
- <!-- 업체직배송 -->
|
|
|
- <th:block th:if="${delvCartList != null and #lists.size(delvCartList) > 0}">
|
|
|
- <div class="part_dlvr">
|
|
|
- <h4 class="subH3 mb20">업체직배송</h4>
|
|
|
- <div class="gd_list">
|
|
|
- <th:block th:each="goods, i : ${delvCartList}">
|
|
|
- <div class="item_gd">
|
|
|
- <figure>
|
|
|
- <span class="thumb"><img src="/images/pc/thumb/tmp_odSide1.jpg" alt=""></span>
|
|
|
- <figcaption>
|
|
|
- <div class="brand" th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></div>
|
|
|
- <div class="name" th:text="${goods.goodsNm}"></div>
|
|
|
- <div class="option">
|
|
|
- <span th:text="${goods.optCd}"></span>
|
|
|
- <span>수량:<em th:text="${goods.goodsQty}"></em>개</span>
|
|
|
- </div>
|
|
|
- <div class="price">
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} > 0">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.tmtbDcAmt, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} < 1">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.currPrice, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- </div>
|
|
|
- </figcaption>
|
|
|
- </figure>
|
|
|
- </div>
|
|
|
+ <th:block th:if="${i.index} == 1">
|
|
|
+ <th:block th:if="${delvAllCart != null and #lists.size(delvAllCart) > 0}">
|
|
|
+ <h4 class="subH3 mb20" id="wmsDelvTitle">STYLE24 일반배송</h4>
|
|
|
+ </th:block>
|
|
|
</th:block>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </th:block>
|
|
|
- <!-- //업체직배송 -->
|
|
|
-
|
|
|
- <!-- 예약배송 -->
|
|
|
- <th:block th:if="${resCartList != null and #lists.size(resCartList) > 0}">
|
|
|
- <div class="part_dlvr">
|
|
|
- <h4 class="subH3 mb20">예약배송</h4>
|
|
|
- <div class="gd_list">
|
|
|
- <th:block th:each="goods, i : ${resCartList}">
|
|
|
- <div class="item_gd">
|
|
|
- <figure>
|
|
|
- <span class="thumb"><img src="/images/pc/thumb/tmp_odSide1.jpg" alt=""></span>
|
|
|
- <figcaption>
|
|
|
- <div class="brand" th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></div>
|
|
|
- <div class="name" th:text="${goods.goodsNm}"></div>
|
|
|
- <div class="option">
|
|
|
- <span th:text="${goods.optCd}"></span>
|
|
|
- <span>수량:<em th:text="${goods.goodsQty}"></em>개</span>
|
|
|
- </div>
|
|
|
- <div class="price">
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} > 0">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.tmtbDcAmt, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- <th:block th:if="${goods.tmtbDcAmt} < 1">
|
|
|
- <span class="selling_price" th:text="${#numbers.formatInteger(goods.currPrice, 1, 'COMMA')}"></span>
|
|
|
- </th:block>
|
|
|
- </div>
|
|
|
- </figcaption>
|
|
|
- </figure>
|
|
|
- <p class="info_reserv">
|
|
|
- <i class="ico ico_calender"></i><span th:text="${goods.delvResDt}"></span>
|
|
|
- 배송예정상품
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ <th:block th:if="${i.index} == 2">
|
|
|
+ <th:block th:if="${delvAllCart != null and #lists.size(delvAllCart) > 0}">
|
|
|
+ <h4 class="subH3 mb20">업체직배송</h4>
|
|
|
+ </th:block>
|
|
|
</th:block>
|
|
|
+ <th:block th:if="${i.index} == 3">
|
|
|
+ <th:block th:if="${delvAllCart != null and #lists.size(delvAllCart) > 0}">
|
|
|
+ <h4 class="subH3 mb20">예약배송</h4>
|
|
|
+ </th:block>
|
|
|
+ </th:block>
|
|
|
+
|
|
|
+ <div class="gd_list">
|
|
|
+ <th:block th:each="goods, i : ${delvAllCart}">
|
|
|
+ <div class="item_gd">
|
|
|
+ <input type="text" name="cartSq" th:value="${goods.cartSq}"/>
|
|
|
+ <input type="text" name="cpn1CpnSq" th:value="${goods.cpn1CpnSq}"/>
|
|
|
+ <input type="text" name="cpn1DcAmt" th:value="${goods.orgCurrPrice} - ${goods.currPrice}"/>
|
|
|
+
|
|
|
+ <th:block th:if="${goods.applyQtySectionYn} == 'Y' and ${goods.qtyTmtbSq} > 0">
|
|
|
+ <input type="text" name="tmtb1Sq" th:value="${goods.qtyTmtbSq}"/>
|
|
|
+ <input type="text" name="tmtb1DcAmt" th:value="${goods.tmtb1DcAmt}"/>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${goods.applyQtySectionYn} != 'Y'">
|
|
|
+ <input type="text" name="tmtb1Sq" value="0"/>
|
|
|
+ <input type="text" name="tmtb1DcAmt" value="0"/>
|
|
|
+ </th:block>
|
|
|
+
|
|
|
+ <th:block th:if="${goods.applyAmtSectionYn} == 'Y' and ${goods.amtTmtbSq} > 0">
|
|
|
+ <input type="text" name="tmtb2Sq" th:value="${goods.amtTmtbSq}"/>
|
|
|
+ <input type="text" name="tmtb2DcAmt" th:value="${goods.tmtb2DcAmt}"/>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${goods.applyAmtSectionYn} != 'Y'">
|
|
|
+ <input type="text" name="tmtb2Sq" value="0"/>
|
|
|
+ <input type="text" name="tmtb2DcAmt" value="0"/>
|
|
|
+ </th:block>
|
|
|
+
|
|
|
+ <input type="text" name="goodsCpnSq" value=""/>
|
|
|
+ <input type="text" name="goodsCpnDcAmt" value=""/>
|
|
|
+ <input type="text" name="cartCpnSq" value=""/>
|
|
|
+ <input type="text" name="cartCpnDcAmt" value=""/>
|
|
|
+
|
|
|
+ <figure>
|
|
|
+ <span class="thumb"><img src="/images/pc/thumb/tmp_odSide1.jpg" alt=""></span>
|
|
|
+ <figcaption>
|
|
|
+ <div class="brand" th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></div>
|
|
|
+ <div class="name" th:text="${goods.goodsNm}"></div>
|
|
|
+ <div class="option" th:each="opt, index : ${goods.itemNmArr}">
|
|
|
+ <span th:text="${goods.optCdArr[index.index]}"></span>
|
|
|
+ <span>수량:<em th:text="${goods.goodsQty}"></em>개</span>
|
|
|
+ </div>
|
|
|
+ <div class="price">
|
|
|
+ <th:block th:if="${goods.tmtbDcAmt} > 0">
|
|
|
+ <span class="selling_price" th:text="${#numbers.formatInteger(goods.tmtbDcAmt, 1, 'COMMA')}"></span>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${goods.tmtbDcAmt} < 1">
|
|
|
+ <span class="selling_price" th:text="${#numbers.formatInteger(goods.currPrice, 1, 'COMMA')}"></span>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
+ </figcaption>
|
|
|
+ </figure>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </th:block>
|
|
|
</th:block>
|
|
|
- <!-- //예약배송 -->
|
|
|
+ <!-- //전체배송목록 sort -->
|
|
|
</div>
|
|
|
|
|
|
<div class="od_amount_box">
|
|
|
@@ -1267,59 +1216,47 @@ $(document).ready( function() {
|
|
|
</script>
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
- var custCpnSq = 0;
|
|
|
- var cpnIndex = 0;
|
|
|
+ var custCpnSq = 0;
|
|
|
+ var cpnIndex = 0;
|
|
|
+ var cpnApplyTemp = false;
|
|
|
|
|
|
// 컨텐츠 호출
|
|
|
$(document).ready( function() {
|
|
|
// 1. 총알배송가능 지역, 총알배송 가능 시간 체크
|
|
|
fnGetDailyDeliveryCheck();
|
|
|
|
|
|
- // 2. 배송목록 화면 노출, 비노출 처리
|
|
|
- // 2.1 자사일반배송노출
|
|
|
- if (wmsCnt > 0) {
|
|
|
- $("#wmsDelvArea").css("display", "block");
|
|
|
- }
|
|
|
-
|
|
|
- // 2.2 입점업체일반배송노출
|
|
|
- if (delvCnt > 0) {
|
|
|
- $("#delvDelvArea").css("display", "block");
|
|
|
- }
|
|
|
-
|
|
|
- // 2.3 자사예약배송노출
|
|
|
- if (resCnt > 0) {
|
|
|
- $("#resDelvArea").css("display", "block");
|
|
|
- }
|
|
|
-
|
|
|
- // 3. 쿠폰 SELECT BOX 설정
|
|
|
+ // 2. 쿠폰 SELECT BOX 기능 설정(js적용)
|
|
|
$('.select_custom.type1').each(function(index){
|
|
|
var selecter01 = new sCombo($(this));
|
|
|
- var cpnIndex = 0;
|
|
|
|
|
|
- // select 박스 반복문 실행
|
|
|
+ // 선택박스 버튼기능 구현
|
|
|
$(this).find("ul li").each(function(i){
|
|
|
- cpnIndex++;
|
|
|
-
|
|
|
- // 1이상부터 중복 체크
|
|
|
- if (cpnIndex > 1) {
|
|
|
- if (cpnDuplicationCheck($(this).prop("value"), index)) {
|
|
|
- // 쿠폰적용
|
|
|
- custCpnApply($(this));
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
// SELECT BOX 버튼 기능 설정
|
|
|
$(this).on("click", function(){
|
|
|
- // 선택없음
|
|
|
+ // 쿠폰 선택없음
|
|
|
if ($(this).prop("value") == 0) {
|
|
|
+ // select box 쿠폰 적용
|
|
|
+ var cpnCartSq = $(this).parent().parent().find("input[name='cpnCartSq']").val();
|
|
|
+
|
|
|
+ // 장바구니시퀀스 체크
|
|
|
+ $("input[name='cartSq']").each(function(){
|
|
|
+ if (cpnCartSq == $(this).val()) {
|
|
|
+ $(this).parent().find("input[name='goodsCpnSq']").val("0"); // 상품쿠폰시퀀스
|
|
|
+ $(this).parent().find("input[name='goodsCpnDcAmt']").val("0"); // 상품쿠폰할인금액
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
$(this).parent().parent().find("input[name='custCpnSq']").val("0");
|
|
|
$(this).parent().parent().find("input[name='cpnDcAmt']").val("0");
|
|
|
|
|
|
$(this).parent().parent().find(".select").text("선택없음");
|
|
|
$(this).parent().parent().parent().parent().parent().find(".cp_discount").css("display", "none");
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ // 쿠폰선택
|
|
|
+ else {
|
|
|
// 쿠폰중복체크 후 적용
|
|
|
- if (cpnDuplicationCheck($(this).prop("value"), index)) {
|
|
|
+ if (custCpnDuplicationCheck($(this).prop("value"), index)) {
|
|
|
// 쿠폰적용
|
|
|
custCpnApply($(this));
|
|
|
} else {
|
|
|
@@ -1329,13 +1266,81 @@ $(document).ready( function() {
|
|
|
custCpnNotApply($(this));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 최대할인혜택적용 체크해제
|
|
|
+ if ($("#chk-maxdisc").is(":checked")) {
|
|
|
+ $("#chk-maxdisc").attr("checked", false);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 쿠폰할인금액 SUM
|
|
|
+ custCpnSumAmtCal();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ // 3. 쿠폰 최대할인금액 초기화 버튼 설정
|
|
|
+ $("#chk-maxdisc").on("click", function(){
|
|
|
+ if ($(this).is(":checked")) {
|
|
|
+ custCpnInit();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 3. 쿠폰적용초기화(할인율최고)
|
|
|
+ custCpnInit();
|
|
|
});
|
|
|
|
|
|
+ // 쿠폰 최대할인율 쿠폰적용
|
|
|
+ var custCpnInit = function() {
|
|
|
+
|
|
|
+ // 쿠폰적용없음적용
|
|
|
+ $(".select_custom.type1").each(function(index){
|
|
|
+ // select box 쿠폰 적용
|
|
|
+ var cpnCartSq = $(this).find("input[name='cpnCartSq']").val();
|
|
|
+
|
|
|
+ // 장바구니시퀀스 체크
|
|
|
+ $("input[name='cartSq']").each(function(){
|
|
|
+ if (cpnCartSq == $(this).val()) {
|
|
|
+ $(this).parent().find("input[name='goodsCpnSq']").val("0"); // 상품쿠폰시퀀스
|
|
|
+ $(this).parent().find("input[name='goodsCpnDcAmt']").val("0"); // 상품쿠폰할인금액
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $(this).find("input[name='custCpnSq']").val("0");
|
|
|
+ $(this).find("input[name='cpnDcAmt']").val("0");
|
|
|
+
|
|
|
+ $(this).find(".select").text("선택없음");
|
|
|
+ $(this).find(".cp_discount").css("display", "none");
|
|
|
+ });
|
|
|
+
|
|
|
+ // 최대할인율 쿠폰적용
|
|
|
+ $('.select_custom.type1').each(function(index){
|
|
|
+ cpnIndex = 0;
|
|
|
+ cpnApplyTemp = false;
|
|
|
+
|
|
|
+ // select 박스 반복문 실행
|
|
|
+ $(this).find("ul li").each(function(i){
|
|
|
+ cpnIndex++;
|
|
|
+
|
|
|
+ // 1이상부터 중복 체크
|
|
|
+ if (cpnApplyTemp == false) {
|
|
|
+ if (cpnIndex > 1) {
|
|
|
+ if (custCpnDuplicationCheck($(this).prop("value"), index)) {
|
|
|
+ // 쿠폰적용
|
|
|
+ custCpnApply($(this));
|
|
|
+
|
|
|
+ cpnApplyTemp = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 쿠폰할인금액 SUM
|
|
|
+ custCpnSumAmtCal();
|
|
|
+ }
|
|
|
+
|
|
|
// 쿠폰중복사용체크
|
|
|
- var cpnDuplicationCheck = function(custCpnSq, index) {
|
|
|
+ var custCpnDuplicationCheck = function(custCpnSq, index) {
|
|
|
var selCustSq = 0;
|
|
|
var cnt = 0;
|
|
|
|
|
|
@@ -1365,6 +1370,17 @@ $(document).ready( function() {
|
|
|
var dcAmtStr = "- " + parseInt(obj.attr("data")).addComma() + " 원 할인적용";
|
|
|
obj.parent().parent().parent().parent().parent().find(".cp_amount").text(dcAmtStr);
|
|
|
|
|
|
+ // select box 쿠폰 적용
|
|
|
+ var cpnCartSq = obj.parent().parent().find("input[name='cpnCartSq']").val();
|
|
|
+
|
|
|
+ // 장바구니시퀀스 체크
|
|
|
+ $("input[name='cartSq']").each(function(){
|
|
|
+ if (cpnCartSq == $(this).val()) {
|
|
|
+ $(this).parent().find("input[name='goodsCpnSq']").val(obj.prop("value")); // 상품쿠폰시퀀스
|
|
|
+ $(this).parent().find("input[name='goodsCpnDcAmt']").val(obj.attr("data")); // 상품쿠폰할인금액
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// select box 쿠폰 적용
|
|
|
obj.parent().parent().find("input[name='custCpnSq']").val(obj.prop("value"));
|
|
|
obj.parent().parent().find("input[name='cpnDcAmt']").val(obj.attr("data"));
|
|
|
@@ -1379,7 +1395,7 @@ $(document).ready( function() {
|
|
|
var custCpnNotApply = function(obj) {
|
|
|
// 이전에 등록된 쿠폰시퀀스
|
|
|
var custCpnSq = obj.parent().parent().find("input[name='custCpnSq']").val();
|
|
|
-
|
|
|
+
|
|
|
// 이전에 등록된 쿠폰시퀀스 비교후 데이타 원복
|
|
|
obj.parent().find("li").each(function(){
|
|
|
if ($(this).prop("value") == custCpnSq) {
|
|
|
@@ -1394,6 +1410,15 @@ $(document).ready( function() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ // 쿠폰할인금액합계설정
|
|
|
+ var custCpnSumAmtCal = function() {
|
|
|
+ var cpnDcSumAmt = 0;
|
|
|
+ $("input[name='cpnDcAmt']").each(function(){
|
|
|
+ cpnDcSumAmt = cpnDcSumAmt + parseInt($(this).val());
|
|
|
+ });
|
|
|
+ $(".maxdisc_amount").text("(-" + cpnDcSumAmt.addComma() + "원)");
|
|
|
+ };
|
|
|
+
|
|
|
// 사은품선택 라디오 버튼 기능
|
|
|
$(".freegiftRdo").on("click", function() {
|
|
|
var total_gift = 0;
|