|
|
@@ -544,6 +544,12 @@ var madeInfoSet = function() {
|
|
|
success : function(result) {
|
|
|
$("#madeInfo").css("display", "block");
|
|
|
$("#madeInfo").html(result);
|
|
|
+
|
|
|
+ // 2021.07.05 체크박스 동작 일치
|
|
|
+ // 주문제작상품동의
|
|
|
+ $("#chk-custom").on("click", function(){
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -841,43 +847,40 @@ var freegiftInfoSet = function() {
|
|
|
custCpnSumAmtCal();
|
|
|
});
|
|
|
|
|
|
+ // 2021.07.05 선택사은품 무료가 2개일때 첫번째 무료만 선택
|
|
|
+ var countArr = [];
|
|
|
+ var temp = true;
|
|
|
+
|
|
|
// 2021.04.29 무료사은품 기본선택
|
|
|
- $("#orderForm .freegiftRdo").each(function(){
|
|
|
+ $("#orderForm .gift_box .freegiftRdo").each(function(){
|
|
|
var usepoint = parseInt($(this).attr("usepoint"));
|
|
|
var count = parseInt($(this).attr("count"));
|
|
|
+
|
|
|
+ temp = true;
|
|
|
|
|
|
// 첫번째 무료 선택
|
|
|
- if (usepoint == 0 && count == 1) {
|
|
|
- $(this).trigger("click");
|
|
|
-
|
|
|
- // 2021.04.14 사은품 사용 포인트가 보유포인트보다 작아야 한다.
|
|
|
- var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
- var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
- var usepoint = parseInt($(this).attr("usepoint"));
|
|
|
- rmPntAmt = rmPntAmt - freegiftUsePnt - usepoint;
|
|
|
-
|
|
|
- if (rmPntAmt < 0) {
|
|
|
- mcxDialog.alert("보유포인트가 부족합니다.");
|
|
|
- return false;
|
|
|
+ if (usepoint == 0 && count != 100) {
|
|
|
+ for (i=0 ; i<countArr.length ; i++) {
|
|
|
+ if (count == countArr[i]) {
|
|
|
+ temp = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- // 라디오버튼 사은품 체크
|
|
|
- if ($(this).is(":checked")) {
|
|
|
- // 수령거부가 아닐때 체크
|
|
|
- if ($(this).val() != "noSel") {
|
|
|
- total_gift += 1;
|
|
|
- total_deduct += parseInt($(this).attr("usepoint"));
|
|
|
+ if (temp) {
|
|
|
+ countArr.push(count);
|
|
|
+ $(this).trigger("click");
|
|
|
+
|
|
|
+ // 2021.04.14 사은품 사용 포인트가 보유포인트보다 작아야 한다.
|
|
|
+ var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
+ var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
+ var usepoint = parseInt($(this).attr("usepoint"));
|
|
|
+ rmPntAmt = rmPntAmt - freegiftUsePnt - usepoint;
|
|
|
+
|
|
|
+ if (rmPntAmt < 0) {
|
|
|
+ mcxDialog.alert("보유포인트가 부족합니다.");
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- $("#orderForm .total_gift").text(total_gift); // 사은품총선택개수
|
|
|
- $("#orderForm .total_deduct").text(total_deduct.addComma()); // 사은품총사용포인트
|
|
|
- $("#orderAmtForm .freegiftUsePnt").text(total_deduct);
|
|
|
-
|
|
|
- // 포인트초기화기능
|
|
|
- pntDcAmtReset();
|
|
|
- */
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -940,6 +943,13 @@ var paymentInfoSet = function() {
|
|
|
$("#paymentInfo").html(result);
|
|
|
|
|
|
var payType = "";
|
|
|
+
|
|
|
+ // 2021.07.05 결제타입초기값 체크
|
|
|
+ if ($(".payTypeNm").text() != "선택없음") {
|
|
|
+ if ($("#chk-agree_paymethod123").is(":checked") == false) {
|
|
|
+ $("#chk-agree_paymethod123").trigger("click");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 결제타입명칭 설정
|
|
|
$("#orderForm .area_paymethod .paymethod_box ul li").on("click", function(){
|
|
|
@@ -949,7 +959,9 @@ var paymentInfoSet = function() {
|
|
|
}
|
|
|
|
|
|
// 2021.04.29 수정
|
|
|
- $("#orderForm input[name=insuranceYn]").attr("checked", false);
|
|
|
+ if ($("#orderForm input[name=insuranceYn]").is(":checked")) {
|
|
|
+ $("#orderForm input[name=insuranceYn]").trigger("click");
|
|
|
+ }
|
|
|
$("#orderForm .area_paymentinfo .agree1").hide();
|
|
|
|
|
|
// 2021.04.25 실시간계좌이체, 무통장입금시 보증보험 신청 약관 노출
|
|
|
@@ -960,9 +972,9 @@ var paymentInfoSet = function() {
|
|
|
}
|
|
|
|
|
|
if (delvCnt > 0) {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").show();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").show();
|
|
|
} else {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").hide();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").hide();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -984,9 +996,9 @@ var paymentInfoSet = function() {
|
|
|
|
|
|
if (displayTemp == false) {
|
|
|
if (delvCnt > 0) {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").show();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").show();
|
|
|
} else {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").hide();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").hide();
|
|
|
}
|
|
|
$("#orderForm .area_paymentinfo .agree1").hide();
|
|
|
}
|
|
|
@@ -996,9 +1008,9 @@ var paymentInfoSet = function() {
|
|
|
$("#orderForm .area_paymethod .agree_insurance").hide();
|
|
|
|
|
|
if (delvCnt > 0) {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").show();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").show();
|
|
|
} else {
|
|
|
- $("#orderForm .area_paymentinfo .paymentinfo").hide();
|
|
|
+ $("#orderForm .area_paymentinfo .paymentinfo.agree2").hide();
|
|
|
}
|
|
|
|
|
|
$("#orderForm .area_paymentinfo .agree1").hide();
|
|
|
@@ -1052,6 +1064,19 @@ var paymentInfoSet = function() {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ // 2021.07.05
|
|
|
+ if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length < 12) {
|
|
|
+ mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
+ $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length > 13) {
|
|
|
+ mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
+ $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
$("#orderAmtForm .recipNm").text($("#orderForm #orderGiftInfo input[name=recipNm]").val());
|
|
|
$("#orderAmtForm .recipPhnno").text($("#orderForm #orderGiftInfo input[name=recipPhnno]").val());
|
|
|
|
|
|
@@ -1432,46 +1457,18 @@ var dcAmtInfoSet = function() {
|
|
|
|
|
|
// 최대할인혜택적용 체크해제
|
|
|
if ($("#chk-maxdisc01").is(":checked")) {
|
|
|
- $("#chk-maxdisc").attr("checked", false);
|
|
|
- $("#chk-maxdisc01").attr("checked", false);
|
|
|
-
|
|
|
$("#chk-maxdisc01").trigger("click");
|
|
|
}
|
|
|
|
|
|
$("#couponModifyPop .close-modal").trigger("click"); // 팝업닫기
|
|
|
});
|
|
|
|
|
|
- // 1.8.5 쿠폰 최대할인금액 초기화 버튼 설정
|
|
|
- $("#chk-maxdisc01").on("click", function(){
|
|
|
- // 2021.04.23 보유쿠폰이 없을때 적용
|
|
|
- var custCpnCnt = parseInt($("#orderForm input[name=custCpnCnt]").val());
|
|
|
- var custDelvCpnCnt = parseInt($("#orderForm input[name=custDelvCpnCnt]").val());
|
|
|
- if ((custCpnCnt + custDelvCpnCnt) < 1) {
|
|
|
- mcxDialog.alert("적용 가능한 쿠폰이 없습니다.");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if ($(this).is(":checked")) {
|
|
|
- // 2021.04.23
|
|
|
- mcxDialog.alert("선택한 쿠폰이 아닌 보유한 쿠폰을 통해 최대할인 혜택을 받을 수 있도록 쿠폰이 자동 적용됩니다.");
|
|
|
-
|
|
|
- // 상품&장바구니쿠폰 초기환
|
|
|
- custGoodsCpnInit();
|
|
|
-
|
|
|
- // 배송비쿠폰 초기환
|
|
|
- custDelvCpnInit();
|
|
|
-
|
|
|
- $("#chk-maxdisc").attr("checked", true);
|
|
|
- } else {
|
|
|
- $("#chk-maxdisc").attr("checked", false);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
// 1.8.5 쿠폰 최대할인금액 초기화 버튼 설정
|
|
|
$("#chk-maxdisc").on("click", function(){
|
|
|
// 2021.04.23 보유쿠폰이 없을때 적용
|
|
|
var custCpnCnt = parseInt($("#orderForm input[name=custCpnCnt]").val());
|
|
|
var custDelvCpnCnt = parseInt($("#orderForm input[name=custDelvCpnCnt]").val());
|
|
|
+
|
|
|
if ((custCpnCnt + custDelvCpnCnt) < 1) {
|
|
|
mcxDialog.alert("적용 가능한 쿠폰이 없습니다.");
|
|
|
return false;
|
|
|
@@ -1486,10 +1483,8 @@ var dcAmtInfoSet = function() {
|
|
|
|
|
|
// 배송비쿠폰 초기환
|
|
|
custDelvCpnInit();
|
|
|
-
|
|
|
- $("#chk-maxdisc01").attr("checked", true);
|
|
|
} else {
|
|
|
- $("#chk-maxdisc01").attr("checked", false);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -1519,6 +1514,17 @@ var dcAmtInfoSet = function() {
|
|
|
$('#couponSelectPop02').show().addClass("active");
|
|
|
$("body").css({"overflow":"hidden"});
|
|
|
});
|
|
|
+
|
|
|
+ // 2021.07.05 alert 문구 추가
|
|
|
+ $("#orderForm input[name=pointNotApply]").on("click", function(){
|
|
|
+ mcxDialog.alert("3만원 이상 결제시에만 포인트 사용이 가능합니다.");
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#btn_point_not_apply").on("click", function(){
|
|
|
+ mcxDialog.alert("3만원 이상 결제시에만 포인트 사용이 가능합니다.");
|
|
|
+ return false;
|
|
|
+ });
|
|
|
|
|
|
// 1.8.7 포인트 적용버튼 기능
|
|
|
$("#btn_point_apply").on("click", function(){
|