|
|
@@ -316,8 +316,7 @@
|
|
|
</a>
|
|
|
<div class="payinfo_blk_parent">
|
|
|
<div class="payinfo_blk">
|
|
|
- <a href=""> 개인정보 제공에 대한 동의 <span>보기</span>
|
|
|
- </a>
|
|
|
+ <a href=""> 개인정보 제공에 대한 동의 <span>보기</span></a>
|
|
|
<div class="infotxt">개인정보제공에 대한 동의 내용입니다.개인정보제공에 대한 동의
|
|
|
내용입니다.개인정보제공에 대한 동의 내용입니다.개인정보제공에 대한 동의 내용입니다.개인정보제공에 대한 동의
|
|
|
내용입니다.개인정보제공에 대한 동의 내용입니다.개인정보제공에 대한 동의 내용입니다.개인정보제공에 대한 동의
|
|
|
@@ -333,8 +332,7 @@
|
|
|
내용입니다.개인정보제공에 대한 동의 내용입니다.</div>
|
|
|
</div>
|
|
|
<div class="payinfo_blk">
|
|
|
- <a href=""> 결제대행 서비스 약관 동의 <span>보기</span>
|
|
|
- </a>
|
|
|
+ <a href=""> 결제대행 서비스 약관 동의 <span>보기</span></a>
|
|
|
<div class="infotxt">결제대행서비스 약관 동의 내용입니다.결제대행서비스 약관 동의
|
|
|
내용입니다.결제대행서비스 약관 동의 내용입니다.결제대행서비스 약관 동의 내용입니다.결제대행서비스 약관 동의
|
|
|
내용입니다.결제대행서비스 약관 동의 내용입니다.결제대행서비스 약관 동의 내용입니다.결제대행서비스 약관 동의
|
|
|
@@ -351,11 +349,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="agree_payment">위 주문내역을 확인 하였으며, 회원 본인은 결제에 동의합니다.
|
|
|
</div>
|
|
|
+ <div class="agree_payment">위 주문내역을 확인 하였으며, 회원 본인은 결제에 동의합니다.</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -1092,12 +1087,21 @@ var dcAmtInfoSet = function() {
|
|
|
$("#couponModifyPop").html(result);
|
|
|
|
|
|
// 1.8.1 선포인트기능초기화
|
|
|
- //prePntDcAmtReset();
|
|
|
+ prePntDcAmtReset();
|
|
|
|
|
|
// 1.8.2 쿠폰적용초기화(할인율최고)(상품,장바구니)
|
|
|
custGoodsCpnInit();
|
|
|
|
|
|
- // 상품상세쿠폰 팝업 열기
|
|
|
+ // 상품쿠폰, 장바구니쿠폰 팝업 열기
|
|
|
+ $("#btn_couponModify_pop").on("click", function(){
|
|
|
+ $("#couponModifyPop").modal("show");
|
|
|
+
|
|
|
+ // 쿠폰적용초기화(할인율최고)(상품,장바구니)
|
|
|
+ custGoodsCpnInit();
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ // 1.8.3 상품상세쿠폰 팝업 열기
|
|
|
$("#couponModifyPop .area_item_coupon .form_field .select_custom").on("click", function() {
|
|
|
var index = parseInt($(this).attr("value"));
|
|
|
var obj = $(".couponSelectPop").eq(index);
|
|
|
@@ -1109,9 +1113,8 @@ var dcAmtInfoSet = function() {
|
|
|
|
|
|
// 1.8.4 쿠폰적용버튼
|
|
|
$("#btn_coupon_apply").on("click", function(){
|
|
|
-
|
|
|
// 상품쿠폰적용
|
|
|
- $('.goodsCpn ul li.selected').each(function(index){
|
|
|
+ $('#couponModifyPop .couponSelectPop ul li.selected').each(function(index){
|
|
|
custCpnApply($(this));
|
|
|
});
|
|
|
|
|
|
@@ -1123,21 +1126,26 @@ var dcAmtInfoSet = function() {
|
|
|
});
|
|
|
|
|
|
// 최대할인혜택적용 체크해제
|
|
|
- if ($("#chk-maxdisc").is(":checked")) {
|
|
|
+ if ($("#chk-maxdisc01").is(":checked")) {
|
|
|
$("#chk-maxdisc").attr("checked", false);
|
|
|
+ $("#chk-maxdisc01").attr("checked", false);
|
|
|
}
|
|
|
|
|
|
- $(".close-modal").trigger("click"); // 팝업닫기
|
|
|
+ $("#couponModifyPop .close-modal").trigger("click"); // 팝업닫기
|
|
|
});
|
|
|
|
|
|
// 1.8.5 쿠폰 최대할인금액 초기화 버튼 설정
|
|
|
- $("#chk-maxdisc").on("click", function(){
|
|
|
+ $("#chk-maxdisc01").on("click", function(){
|
|
|
if ($(this).is(":checked")) {
|
|
|
// 상품&장바구니쿠폰 초기환
|
|
|
custGoodsCpnInit();
|
|
|
|
|
|
// 배송비쿠폰 초기환
|
|
|
custDelvCpnInit();
|
|
|
+
|
|
|
+ $("#chk-maxdisc").attr("checked", true);
|
|
|
+ } else {
|
|
|
+ $("#chk-maxdisc").attr("checked", false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -1162,26 +1170,17 @@ var dcAmtInfoSet = function() {
|
|
|
custDelvCpnInit();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- // 상품쿠폰, 장바구니쿠폰 팝업 열기
|
|
|
- $("#btn_couponModify_pop").on("click", function(){
|
|
|
- $("#couponModifyPop").modal("show");
|
|
|
- return false;
|
|
|
- });
|
|
|
|
|
|
// 배송비상세쿠폰 팝업 열기
|
|
|
$(".od .area_seldiscount .dlvr_fee_box .select_custom").on("click", function() {
|
|
|
$('#couponSelectPop02').show().addClass("active");
|
|
|
$("body").css({"overflow":"hidden"});
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /*
|
|
|
+
|
|
|
// 1.8.7 포인트 적용버튼 기능
|
|
|
$("#btn_point_apply").on("click", function(){
|
|
|
var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
- var freegiftUsePnt = parseInt($(".freegiftUsePnt").text());
|
|
|
+ var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
var pntDcAmt = parseInt($("#orderForm input[name='pntDcAmtStr']").val());
|
|
|
var realOrdAmt = parseInt($("#orderAmtForm .realOrdSumAmt").text());
|
|
|
var applyPntDcAmt = (realOrdAmt * 40) / 100;
|
|
|
@@ -1277,7 +1276,6 @@ var dcAmtInfoSet = function() {
|
|
|
// 금액전체계산
|
|
|
custCpnSumAmtCal();
|
|
|
});
|
|
|
- */
|
|
|
|
|
|
// 금액계산초기화
|
|
|
custCpnSumAmtCal();
|
|
|
@@ -1292,6 +1290,7 @@ var custGoodsCpnInit = function() {
|
|
|
|
|
|
// 쿠폰최대할인 적용
|
|
|
$("#chk-maxdisc").attr("checked", true);
|
|
|
+ $("#chk-maxdisc01").attr("checked", true);
|
|
|
|
|
|
// 쿠폰초기화
|
|
|
$("#couponModifyPop .goodsCpn").each(function(index){
|
|
|
@@ -1313,41 +1312,26 @@ var custGoodsCpnInit = function() {
|
|
|
var index = parseInt($(this).attr("value"));
|
|
|
var cpnObj = $(".couponSelectPop").eq(index);
|
|
|
var emptyHtml = cpnObj.find("ul li:last-child").html();
|
|
|
+
|
|
|
+ // 선택기능
|
|
|
+ $(this).find("ul li").removeClass("selected");
|
|
|
+ cpnObj.find("ul li:last-child").addClass("selected");
|
|
|
|
|
|
$(this).find(".select .item_coupon").html(emptyHtml);
|
|
|
});
|
|
|
|
|
|
// 상품쿠폰 최대할인율 쿠폰적용
|
|
|
- $('#couponModifyPop .goodsCpn').each(function(index){
|
|
|
- cpnApplyTemp = false;
|
|
|
+ $('#couponModifyPop .goodsCpn').each(function(idx){
|
|
|
+ cpnApplyTemp = false;
|
|
|
|
|
|
// select box 적용
|
|
|
- $("#couponModifyPop .couponSelectPop ul li").each(function(){
|
|
|
- cpnIndex++;
|
|
|
-
|
|
|
- if (cpnApplyTemp == false) {
|
|
|
- if (custCpnDuplicationCheck($(this).attr("value"), index)) {
|
|
|
- // 쿠폰적용
|
|
|
- custCpnApply($(this), index);
|
|
|
- // 쿠폰할인적용
|
|
|
- cpnApplyTemp = true;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /*
|
|
|
- // select 박스 반복문 실행
|
|
|
- $(this).find("ul li").each(function(i){
|
|
|
- cpnIndex++;
|
|
|
+ $("#couponModifyPop .couponSelectPop").eq(idx).find("ul li").each(function(){
|
|
|
+ // 쿠포적용안되었으면실행
|
|
|
if (cpnApplyTemp == false) {
|
|
|
- if (custCpnDuplicationCheck($(this).attr("value"), cpnIndex)) {
|
|
|
+ // 쿠폰중복적용체크
|
|
|
+ if (custCpnDuplicationCheck($(this).attr("value"), idx)) {
|
|
|
// 쿠폰적용
|
|
|
- custCpnApply($(this));
|
|
|
+ custCpnApply($(this), idx, "goodsCpn");
|
|
|
// 쿠폰할인적용
|
|
|
cpnApplyTemp = true;
|
|
|
}
|
|
|
@@ -1355,17 +1339,14 @@ var custGoodsCpnInit = function() {
|
|
|
|
|
|
// 쿠폰 select 버튼기능
|
|
|
$(this).on("click", function(){
|
|
|
- if (custCpnDuplicationCheck($(this).attr("value"), cpnIndex)) {
|
|
|
- // 쿠폰적용
|
|
|
- custCpnApplyTemp($(this));
|
|
|
- // 쿠폰할인적용
|
|
|
- cpnApplyTemp = true;
|
|
|
+ if (custCpnDuplicationCheck($(this).attr("value"), idx)) {
|
|
|
+ // 쿠폰적용(임시)
|
|
|
+ custCpnApplyTemp($(this), idx, "goodsCpn");
|
|
|
} else {
|
|
|
- custCpnNotApply($(this));
|
|
|
+ custCpnNotApply($(this), idx);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- */
|
|
|
});
|
|
|
|
|
|
// 장바구니쿠폰초기화
|
|
|
@@ -1377,17 +1358,18 @@ var custCartCpnInit = function() {
|
|
|
// 장바구니쿠폰 초기화 적용
|
|
|
$("#couponModifyPop .cartCpn").each(function(index) {
|
|
|
if (index == 0) {
|
|
|
- custCpnApply($(this)); // 쿠폰적용
|
|
|
+ custCpnApply($(this), index, "cartCpn"); // 쿠폰적용
|
|
|
}
|
|
|
|
|
|
// 쿠폰 select 버튼기능
|
|
|
$(this).on("click", function(){
|
|
|
- custCpnApplyTemp($(this)); // 쿠폰적용
|
|
|
+ custCpnApplyTemp($(this), index, "cartCpn"); // 쿠폰적용
|
|
|
|
|
|
// 최대할인혜택적용 체크해제
|
|
|
- if ($("#chk-maxdisc").is(":checked")) {
|
|
|
+ if ($("#chk-maxdisc01").is(":checked")) {
|
|
|
+ $("#chk-maxdisc01").attr("checked", false);
|
|
|
$("#chk-maxdisc").attr("checked", false);
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -1398,16 +1380,16 @@ var custCartCpnInit = function() {
|
|
|
// 1.9.3 배송비쿠폰초기화
|
|
|
var custDelvCpnInit = function() {
|
|
|
// 배송비쿠폰 초기화 적용
|
|
|
- $(".delvCpn").each(function(index) {
|
|
|
+ $("#couponSelectPop02 .delvCpn").each(function(index) {
|
|
|
if (index == 0) {
|
|
|
// 쿠폰적용
|
|
|
- custCpnApply($(this));
|
|
|
+ custCpnApply($(this), index, "delvCpn");
|
|
|
}
|
|
|
|
|
|
// 쿠폰 select 버튼기능
|
|
|
$(this).on("click", function(){
|
|
|
// 쿠폰적용
|
|
|
- custCpnApply($(this));
|
|
|
+ custCpnApply($(this), index, "delvCpn");
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
@@ -1443,26 +1425,28 @@ var custCpnDuplicationCheck = function(custCpnSq, index) {
|
|
|
}
|
|
|
|
|
|
// 1.11.0 임시로 쿠폰적용
|
|
|
-var custCpnApplyTemp = function(obj) {
|
|
|
- // select box 쿠폰 적용
|
|
|
- var cpnType = obj.parent().find("input[name='cpnType']").val();
|
|
|
+var custCpnApplyTemp = function(obj, idx, cpnType) {
|
|
|
|
|
|
// 상품쿠폰적용
|
|
|
if (cpnType == "goodsCpn") {
|
|
|
- var itemHtml = obj.find(".item_coupon").html();
|
|
|
- obj.parent().parent().find(".select .item_coupon").html(itemHtml);
|
|
|
- obj.parent().find("input[name='cpnDcAmt']").val(obj.attr("data"));
|
|
|
- obj.parent().find("input[name='custCpnSq']").val(obj.attr("value"));
|
|
|
+ var itemHtml = obj.find(".dlvr_coupon").html();
|
|
|
+
|
|
|
+ $("#couponModifyPop .goodsCpn .select .item_coupon").eq(idx).html(itemHtml);
|
|
|
+ $("#couponModifyPop .goodsCpn input[name='cpnDcAmt']").eq(idx).val(obj.attr("data"));
|
|
|
+ $("#couponModifyPop .goodsCpn input[name='custCpnSq']").eq(idx).val(obj.attr("value"));
|
|
|
|
|
|
// 장바구니쿠폰 초기화 적용
|
|
|
- $(".cartCpn").each(function(index) {
|
|
|
+ $("#couponModifyPop .cartCpn").each(function(index) {
|
|
|
if (index == 0) {
|
|
|
custCpnApplyTemp($(this)); // 쿠폰적용
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- //상품쿠폰 선택불가 처리
|
|
|
+ // 상품쿠폰 선택불가 처리
|
|
|
custCpnSqLiDisabled();
|
|
|
+
|
|
|
+ // 상품상세쿠폰 팝업 닫기
|
|
|
+ $("#couponModifyPop .lap .popup_close").eq(idx).trigger("click");
|
|
|
}
|
|
|
// 장바구니쿠폰적용
|
|
|
else if (cpnType == "cartCpn") {
|
|
|
@@ -1480,7 +1464,7 @@ var custCpnApplyTemp = function(obj) {
|
|
|
var cartCpnDcAmt = 0;
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cartCpnCartSq == $(this).text()) {
|
|
|
var orgCurrPrice = parseInt($(this).parent().find(".orgCurrPrice").text());
|
|
|
var cpn1DcAmt = parseInt($(this).parent().find(".cpn1DcAmt").text());
|
|
|
@@ -1489,7 +1473,7 @@ var custCpnApplyTemp = function(obj) {
|
|
|
var tmtb2DcAmt = parseInt($(this).parent().find(".tmtb2DcAmt").text());
|
|
|
var goodsCpnDcAmt = 0;
|
|
|
|
|
|
- $(".goodsCpn input[name=cpnCartSq]").each(function(){
|
|
|
+ $("#couponModifyPop .goodsCpn input[name=cpnCartSq]").each(function(){
|
|
|
if ($(this).val() == cartCpnCartSq) {
|
|
|
goodsCpnDcAmt = parseInt($(this).parent().find("input[name=cpnDcAmt]").val());
|
|
|
}
|
|
|
@@ -1522,7 +1506,7 @@ var custCpnApplyTemp = function(obj) {
|
|
|
var goodsCartCpnSumAmt = 0;
|
|
|
var cpnType = "";
|
|
|
|
|
|
- $("#orderForm input[name='cpnDcAmt']").each(function(){
|
|
|
+ $("#couponModifyPop input[name='cpnDcAmt']").each(function(index){
|
|
|
cpnType = $(this).parent().find("input[name=cpnType]").val();
|
|
|
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
@@ -1532,34 +1516,38 @@ var custCpnApplyTemp = function(obj) {
|
|
|
});
|
|
|
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
- $(".modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
|
|
|
+ if (parseInt(goodsCartCpnSumAmt) > 0) {
|
|
|
+ $("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
|
|
|
+ } else {
|
|
|
+ $("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text(goodsCartCpnSumAmt.addComma());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 1.11 쿠폰중복체크 후 적용가능
|
|
|
-var custCpnApply = function(obj, index) {
|
|
|
- // select box 쿠폰 적용
|
|
|
- var cpnType = $("input[name=cpnType]").val();
|
|
|
+var custCpnApply = function(obj, idx, cpnType) {
|
|
|
|
|
|
// 상품쿠폰적용
|
|
|
if (cpnType == "goodsCpn") {
|
|
|
- // 적용안함 적용
|
|
|
- var cpnObj = $(".couponSelectPop").eq(index);
|
|
|
- var itemHtml = obj.find(".dlvr_coupon").html();
|
|
|
+ var itemHtml = obj.find(".dlvr_coupon").html();
|
|
|
|
|
|
- $("#couponModifyPop .goodsCpn .select .item_coupon").eq(index).html(itemHtml);
|
|
|
- $("#couponModifyPop .goodsCpn input[name='cpnDcAmt']").eq(index).val(obj.attr("data"));
|
|
|
- $("#couponModifyPop .goodsCpn input[name='custCpnSq']").eq(index).val(obj.attr("value"));
|
|
|
+ $("#couponModifyPop .goodsCpn .select .item_coupon").eq(idx).html(itemHtml);
|
|
|
+ $("#couponModifyPop .goodsCpn input[name='cpnDcAmt']").eq(idx).val(obj.attr("data"));
|
|
|
+ $("#couponModifyPop .goodsCpn input[name='custCpnSq']").eq(idx).val(obj.attr("value"));
|
|
|
|
|
|
- var cpnCartSq = $("#couponModifyPop .goodsCpn input[name='cpnCartSq']").eq(index).val()
|
|
|
+ var cpnCartSq = $("#couponModifyPop .goodsCpn input[name='cpnCartSq']").eq(idx).val();
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $("#orderForm .cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cpnCartSq == $(this).text()) {
|
|
|
- $(this).parent().find(".goodsCpnSq").text(obj.prop("value")); // 상품쿠폰시퀀스
|
|
|
+ $(this).parent().find(".goodsCpnSq").text(obj.attr("value")); // 상품쿠폰시퀀스
|
|
|
$(this).parent().find(".goodsCpnDcAmt").text(obj.attr("data")); // 상품쿠폰할인금액
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // selected 클래스 처리
|
|
|
+ $("#couponModifyPop .couponSelectPop").eq(idx).find("ul li").removeClass("selected");
|
|
|
+ obj.addClass("selected");
|
|
|
+
|
|
|
// 상품쿠폰 선택불가 처리
|
|
|
custCpnSqLiDisabled();
|
|
|
}
|
|
|
@@ -1569,7 +1557,7 @@ var custCpnApply = function(obj, index) {
|
|
|
var dcVal = obj.find("input[name='dcVal']").val();
|
|
|
var cartCpnDcSumAmt = 0;
|
|
|
var tempSumAmt = 0;
|
|
|
- var cartSqLen = $(".cartSq").length;
|
|
|
+ var cartSqLen = $("#orderAmtForm .cartSq").length;
|
|
|
var leftAmt = 0;
|
|
|
var index = 1;
|
|
|
|
|
|
@@ -1579,7 +1567,7 @@ var custCpnApply = function(obj, index) {
|
|
|
var cartCpnDcAmt = 0;
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cartCpnCartSq == $(this).text()) {
|
|
|
var orgCurrPrice = parseInt($(this).parent().find(".orgCurrPrice").text());
|
|
|
var cpn1DcAmt = parseInt($(this).parent().find(".cpn1DcAmt").text());
|
|
|
@@ -1621,7 +1609,7 @@ var custCpnApply = function(obj, index) {
|
|
|
}
|
|
|
|
|
|
// 선택안함
|
|
|
- $(".payTypeNm").text("선택없음");
|
|
|
+ $("#orderForm .payTypeNm").text("선택없음");
|
|
|
|
|
|
// 금액일때 할인금액 적용
|
|
|
if (dcWay == "G240_10") {
|
|
|
@@ -1635,7 +1623,7 @@ var custCpnApply = function(obj, index) {
|
|
|
var cartCpnDcAmt = 0;
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cartCpnCartSq == $(this).text()) {
|
|
|
var orgCurrPrice = parseInt($(this).parent().find(".orgCurrPrice").text());
|
|
|
var tmtb1DcAmt = parseInt($(this).parent().find(".tmtb1DcAmt").text());
|
|
|
@@ -1662,7 +1650,7 @@ var custCpnApply = function(obj, index) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- obj.find("input[name=rdi-cart-coupon]").prop("checked", true);
|
|
|
+ obj.find("input[name=rdi-cart-coupon]").attr("checked", true);
|
|
|
obj.parent().find("input[name=cpnDcAmt]").val(cartCpnDcSumAmt);
|
|
|
obj.parent().find("input[name=custCpnSq]").val(obj.attr("value"));
|
|
|
}
|
|
|
@@ -1692,29 +1680,29 @@ var custCpnApply = function(obj, index) {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- $('.couponSelectPop02 .popup_close').trigger("click");
|
|
|
+ // 배송비팝업닫기
|
|
|
+ $('#couponSelectPop02 .popup_close').trigger("click");
|
|
|
}
|
|
|
|
|
|
// 포인트기능 리렛
|
|
|
pntDcAmtReset();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// 1.11.1 상품쿠폰 선택불가 처리
|
|
|
var custCpnSqLiDisabled = function() {
|
|
|
// 상품쿠폰 선택불가 처리
|
|
|
- $(".goodsCpn ul li").each(function(){
|
|
|
+ $("#couponModifyPop .couponSelectPop ul li").each(function(){
|
|
|
var custCpnSq = $(this).attr("value");
|
|
|
var liObj = $(this);
|
|
|
|
|
|
liObj.attr("aria-disabled", false);
|
|
|
|
|
|
- // 선택된 li 제외
|
|
|
+ // 선택된 li 제외 (2021.04.08 수정)
|
|
|
if ($(this).hasClass("selected") == false) {
|
|
|
// 적용안함 제외
|
|
|
if (custCpnSq > 0) {
|
|
|
// 선택된 custCpnSq li와 같으면 선택불가처리
|
|
|
- $(".area_item_coupon input[name=custCpnSq]").each(function(){
|
|
|
+ $("#couponModifyPop .goodsCpn input[name=custCpnSq]").each(function(){
|
|
|
var inputCustCpSq = $(this).val();
|
|
|
if (custCpnSq == inputCustCpSq) {
|
|
|
// 선택불가처리
|
|
|
@@ -1727,7 +1715,8 @@ var custCpnSqLiDisabled = function() {
|
|
|
}
|
|
|
|
|
|
// 1.12 쿠폰중복체크 후 적용불가
|
|
|
-var custCpnNotApply = function(obj) {
|
|
|
+var custCpnNotApply = function(obj, idx) {
|
|
|
+ /*
|
|
|
// 이전에 등록된 쿠폰시퀀스
|
|
|
var custCpnSq = obj.parent().find("input[name='custCpnSq']").val();
|
|
|
|
|
|
@@ -1738,18 +1727,18 @@ var custCpnNotApply = function(obj) {
|
|
|
obj.parent().parent().find(".select .item_coupon").html(itemHtml);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
// 포인트기능 리렛
|
|
|
pntDcAmtReset();
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
// 1.14 선포인트리셋기능 (사용안함)
|
|
|
var prePntDcAmtReset = function() {
|
|
|
- var rmPrePntAmt = parseInt($("input[name='rmPrePntAmt']").val());
|
|
|
- $("input[name='prePntDcAmt']").val(rmPrePntAmt);
|
|
|
+ var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
+ $("#orderForm input[name='prePntDcAmt']").val(rmPrePntAmt);
|
|
|
|
|
|
// 선포인트사용여부 체크 후 적용
|
|
|
- $("input[name='rdi-beforpoint']").each(function(){
|
|
|
+ $("#orderFrom input[name='rdi-beforpoint']").each(function(){
|
|
|
// 선포인트 초기 설정 사용함
|
|
|
if ($(this).val() == "Y") {
|
|
|
$(this).attr("checked", true);
|
|
|
@@ -1757,7 +1746,7 @@ var prePntDcAmtReset = function() {
|
|
|
|
|
|
// 버튼기능 구현
|
|
|
$(this).on("click", function(){
|
|
|
- var rmPrePntAmt = parseInt($("input[name='rmPrePntAmt']").val());
|
|
|
+ var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
|
|
|
// 선포인트적용
|
|
|
if ($(this).val() == "Y") {
|
|
|
@@ -1780,7 +1769,7 @@ var prePntDcAmtReset = function() {
|
|
|
// 1.15 포인트리셋기능
|
|
|
var pntDcAmtReset = function() {
|
|
|
$("#orderAmtForm .pntDcSumAmt").text("0");
|
|
|
- $("#orderFrom input[name='pntDcAmtStr']").val("");
|
|
|
+ $("#orderForm input[name='pntDcAmtStr']").val("");
|
|
|
$("#pntDcAmt").text("0");
|
|
|
|
|
|
// 상품권리셋기능
|
|
|
@@ -1804,7 +1793,8 @@ var custCpnSumAmtCal = function() {
|
|
|
var goodsCartCpnSumAmt = 0;
|
|
|
var cpnType = "";
|
|
|
|
|
|
- $("#orderForm input[name='cpnDcAmt']").each(function(){
|
|
|
+ // 상품쿠폰, 장바구니쿠폰 할인금액 합계
|
|
|
+ $("#couponModifyPop input[name='cpnDcAmt']").each(function(){
|
|
|
cpnType = $(this).parent().find("input[name=cpnType]").val();
|
|
|
cpnDcSumAmt = cpnDcSumAmt + parseInt($(this).val());
|
|
|
|
|
|
@@ -1813,19 +1803,25 @@ var custCpnSumAmtCal = function() {
|
|
|
cpnApplyCnt++;
|
|
|
}
|
|
|
|
|
|
+ // 상품, 장바구니 쿠폰할인금액 저장
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
if (cpnType == "goodsCpn" || cpnType == "cartCpn") {
|
|
|
goodsCartCpnSumAmt = goodsCartCpnSumAmt + parseInt($(this).val());
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ // 배송비쿠폰 할인금액 합계
|
|
|
+ $("#couponSelectPop02 input[name='cpnDcAmt']").each(function(){
|
|
|
+ cpnDcSumAmt = cpnDcSumAmt + parseInt($(this).val());
|
|
|
+ });
|
|
|
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
if (goodsCartCpnSumAmt > 0) {
|
|
|
$(".maxdisc_amount .goodsCartCpnDcAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $("#orderAmtForm .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
+ $("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
|
|
|
} else {
|
|
|
$(".maxdisc_amount .goodsCartCpnDcAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $("#orderAmtForm .goodsCartCpnSumAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
+ $("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
|
|
|
}
|
|
|
|
|
|
// 전체쿠폰 할인 금액 합계 적용
|
|
|
@@ -1972,7 +1968,7 @@ var custCpnSumAmtCal = function() {
|
|
|
var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
rmPntAmt = rmPntAmt - freegiftUsePnt;
|
|
|
- $("#orderAmtForm .rmPntAmt").text(rmPntAmt.addComma());
|
|
|
+ $("#orderForm .rmPntAmt").text(rmPntAmt.addComma());
|
|
|
|
|
|
// 적립포인트
|
|
|
$("#savePntSumAmt").text(savePntSumAmt.addComma()+" P");
|