|
|
@@ -509,9 +509,15 @@ var jsonObj = {};
|
|
|
// 컨텐츠 호출
|
|
|
$(document).ready( function() {
|
|
|
|
|
|
+ var dispYn = "N";
|
|
|
+
|
|
|
// 장바구니시퀀스 배열 변환
|
|
|
cartSqArr = String(cartSqArr).split(",");
|
|
|
|
|
|
+ if (isLogin == false) {
|
|
|
+ dispYn = "Y";
|
|
|
+ }
|
|
|
+
|
|
|
// AJAX 로드를 위한 변수 설정
|
|
|
jsonObj = {
|
|
|
"custNm" : custNm
|
|
|
@@ -521,7 +527,7 @@ $(document).ready( function() {
|
|
|
, "recipBaseAddr" : recipBaseAddr
|
|
|
, "recipDtlAddr" : recipDtlAddr
|
|
|
, "cartSqArr" : cartSqArr
|
|
|
- , "dispYn" : "N"
|
|
|
+ , "dispYn" : dispYn
|
|
|
, "shotDelvYn" : shotDelvUseYn
|
|
|
, "shotDelvUseYn" : shotDelvUseYn
|
|
|
, "foreignBuyYn" : foreignBuyYn
|
|
|
@@ -576,9 +582,9 @@ var custemerInfoSet = function() {
|
|
|
$("#custemerInfo").html(result);
|
|
|
|
|
|
// 고객정보설정
|
|
|
- $("#orderAmtForm .custNm").text($("input[name='custNm']").val());
|
|
|
- $("#orderAmtForm .email").text($("input[name='email']").val());
|
|
|
- $("#orderAmtForm .cellPhnno").text($("input[name='cellPhnno']").val());
|
|
|
+ $("#orderAmtForm .custNm").text($("#orderForm input[name='custNm']").val());
|
|
|
+ $("#orderAmtForm .email").text($("#orderForm input[name='email']").val());
|
|
|
+ $("#orderAmtForm .cellPhnno").text($("#orderForm input[name='cellPhnno']").val());
|
|
|
}
|
|
|
// 1.2 배송정보로드
|
|
|
deliveryAddrInfoSet(jsonObj, true);
|
|
|
@@ -701,7 +707,7 @@ var fnGetDailyDeliveryCheck = function (temp) {
|
|
|
}
|
|
|
} else {
|
|
|
// 배송지 우편번호 체크
|
|
|
- var zipcode = $("input[name='recipZipcode']").val();
|
|
|
+ var zipcode = $("#orderForm input[name='recipZipcode']").val();
|
|
|
|
|
|
// 총알배송여부 체크 배송지정보 존재여부 체크
|
|
|
if (zipcode == null || zipcode == '') {
|
|
|
@@ -764,9 +770,9 @@ var orderListInfoSet = function(orderListJsonData, temp) {
|
|
|
|
|
|
// 총알배송건수가 있으면 총알배송 태그 표시
|
|
|
if (parseInt($("#orderForm input[name=shotCnt]").val()) > 0 ) {
|
|
|
- $(".shotDelv").show();
|
|
|
+ $("#orderForm .shotDelv").show();
|
|
|
} else {
|
|
|
- $(".shotDelv").hide();
|
|
|
+ $("#orderForm .shotDelv").hide();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -906,7 +912,7 @@ var paymentInfoSet = function() {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if (!$("#chk-overs-agr").is(":checked")) {
|
|
|
+ if (!$("#orderForm #chk-overs-agr").is(":checked")) {
|
|
|
mcxDialog.alert("개인통관정보고유부호 정보 동의/저장항목을 체크해주세요.");
|
|
|
|
|
|
// 배송정보화면노출
|
|
|
@@ -918,7 +924,7 @@ var paymentInfoSet = function() {
|
|
|
|
|
|
// 주문제작상품일때 주문제작정보동의
|
|
|
if (orderMadeYn == "Y") {
|
|
|
- if (!$("#chk-custom-agr1").is(":checked")) {
|
|
|
+ if (!$("#orderForm #chk-custom-agr1").is(":checked")) {
|
|
|
mcxDialog.alert("주문제작상품 정보 동의를 체크해주세요.");
|
|
|
|
|
|
// 배송정보화면노출
|
|
|
@@ -928,8 +934,8 @@ var paymentInfoSet = function() {
|
|
|
}
|
|
|
|
|
|
// 사은품지급할 경우 체크
|
|
|
- if ($(".freegiftValArr").text().length > 0) {
|
|
|
- if (!$("#chk-agree_gift").is(":checked")) {
|
|
|
+ if ($("#orderAmtForm .freegiftValArr").text().length > 0) {
|
|
|
+ if (!$("#orderForm #chk-agree_gift").is(":checked")) {
|
|
|
mcxDialog.alert("사은품 지급 정보 동의를 체크해주세요.");
|
|
|
|
|
|
// 배송정보화면노출
|
|
|
@@ -1176,7 +1182,7 @@ var dcAmtInfoSet = function() {
|
|
|
});
|
|
|
|
|
|
// 장바구니쿠폰적용
|
|
|
- $('.cartCpn').each(function(index){
|
|
|
+ $('#orderAmtForm .cartCpn').each(function(index){
|
|
|
if ($(this).find("input[name=rdi-cart-coupon]").is(":checked")) {
|
|
|
custCpnApply($(this));
|
|
|
}
|
|
|
@@ -1214,9 +1220,9 @@ var dcAmtInfoSet = function() {
|
|
|
// 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($(".realOrdSumAmt").text());
|
|
|
+ var realOrdAmt = parseInt($("#orderAmtForm .realOrdSumAmt").text());
|
|
|
var applyPntDcAmt = (realOrdAmt * 40) / 100;
|
|
|
|
|
|
rmPntAmt = rmPntAmt - freegiftUsePnt;
|
|
|
@@ -1279,7 +1285,7 @@ var dcAmtInfoSet = function() {
|
|
|
}
|
|
|
|
|
|
// 입력여부체크
|
|
|
- if (gfcdUseAmt < 1 || $("input[name='gfcdUseAmtStr']").val() == "") {
|
|
|
+ if (gfcdUseAmt < 1 || $("#orderForm input[name='gfcdUseAmtStr']").val() == "") {
|
|
|
mcxDialog.alert("사용할 금액을 입력해주세요");
|
|
|
// 상품권리셋기능
|
|
|
gfcdUseAmtReset();
|
|
|
@@ -1330,7 +1336,7 @@ var custGoodsCpnInit = function() {
|
|
|
var cpnCartSq = $(this).find("input[name='cpnCartSq']").val();
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cpnCartSq == $(this).text()) {
|
|
|
$(this).parent().find(".goodsCpnSq").text("0"); // 상품쿠폰시퀀스
|
|
|
$(this).parent().find(".goodsCpnDcAmt").text("0"); // 상품쿠폰할인금액
|
|
|
@@ -1490,7 +1496,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());
|
|
|
@@ -1560,7 +1566,7 @@ var custCpnApply = function(obj) {
|
|
|
var cpnCartSq = obj.parent().parent().find("input[name='cpnCartSq']").val();
|
|
|
|
|
|
// 장바구니시퀀스 체크
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
if (cpnCartSq == $(this).text()) {
|
|
|
$(this).parent().find(".goodsCpnSq").text(obj.prop("value")); // 상품쿠폰시퀀스
|
|
|
$(this).parent().find(".goodsCpnDcAmt").text(obj.attr("data")); // 상품쿠폰할인금액
|
|
|
@@ -1589,7 +1595,7 @@ var custCpnApply = 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());
|
|
|
@@ -1631,7 +1637,7 @@ var custCpnApply = function(obj) {
|
|
|
}
|
|
|
|
|
|
// 선택안함
|
|
|
- $(".payTypeNm").text("선택없음");
|
|
|
+ $("#orderForm .payTypeNm").text("선택없음");
|
|
|
|
|
|
// 금액일때 할인금액 적용
|
|
|
if (dcWay == "G240_10") {
|
|
|
@@ -1645,7 +1651,7 @@ var custCpnApply = 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 tmtb1DcAmt = parseInt($(this).parent().find(".tmtb1DcAmt").text());
|
|
|
@@ -1689,7 +1695,7 @@ var custCpnApply = function(obj) {
|
|
|
var delvFeeCd = obj.attr("delvfeecd");
|
|
|
|
|
|
// 배송비쿠폰 테이블 적용
|
|
|
- $(".delvFeeCd").each(function(){
|
|
|
+ $("#orderAmtForm .delvFeeCd").each(function(){
|
|
|
// 배송비쿠폰적용
|
|
|
if ($(this).text() == delvFeeCd) {
|
|
|
$(this).parent().find(".delvCpnSq").text(obj.attr("value"));
|
|
|
@@ -1753,11 +1759,11 @@ var custCpnNotApply = function(obj) {
|
|
|
|
|
|
// 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(){
|
|
|
+ $("#orderForm input[name='rdi-beforpoint']").each(function(){
|
|
|
// 선포인트 초기 설정 사용함
|
|
|
if ($(this).val() == "Y") {
|
|
|
$(this).attr("checked", true);
|
|
|
@@ -1765,7 +1771,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") {
|
|
|
@@ -1787,8 +1793,8 @@ var prePntDcAmtReset = function() {
|
|
|
|
|
|
// 1.15 포인트리셋기능
|
|
|
var pntDcAmtReset = function() {
|
|
|
- $(".pntDcSumAmt").text("0");
|
|
|
- $("input[name='pntDcAmtStr']").val("");
|
|
|
+ $("#orderAmtForm .pntDcSumAmt").text("0");
|
|
|
+ $("#orderForm input[name='pntDcAmtStr']").val("");
|
|
|
$("#pntDcAmt").text("0 원");
|
|
|
|
|
|
// 상품권리셋기능
|
|
|
@@ -1797,8 +1803,8 @@ var pntDcAmtReset = function() {
|
|
|
|
|
|
// 1.16 상품권리셋기능
|
|
|
var gfcdUseAmtReset = function() {
|
|
|
- $(".gfcdUseSumAmt").text("0");
|
|
|
- $("input[name='gfcdUseAmtStr']").val("");
|
|
|
+ $("#orderAmtForm .gfcdUseSumAmt").text("0");
|
|
|
+ $("#orderForm input[name='gfcdUseAmtStr']").val("");
|
|
|
$("#gfcdUseAmt").text("0 원");
|
|
|
|
|
|
// 금액전체계산
|
|
|
@@ -1845,7 +1851,7 @@ var custCpnSumAmtCal = function() {
|
|
|
$("#couponDcSumAmt").text(cpnDcSumAmt.addComma() + " 원"); // 쿠폰할인금액합계
|
|
|
}
|
|
|
|
|
|
- $(".cpnDcSumAmt").text(cpnDcSumAmt);
|
|
|
+ $("#orderAmtForm .cpnDcSumAmt").text(cpnDcSumAmt);
|
|
|
|
|
|
var delvSumAmt = orgSumDelvFee;
|
|
|
|
|
|
@@ -1856,16 +1862,16 @@ var custCpnSumAmtCal = function() {
|
|
|
|
|
|
// 최종배송비
|
|
|
$("#delvSumAmt").text(delvSumAmt.addComma() + " 원");
|
|
|
- $(".delvSumAmt").text(delvSumAmt);
|
|
|
+ $("#orderAmtForm .delvSumAmt").text(delvSumAmt);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 2021.03.06 주문상세 테이블 적용
|
|
|
// 포인트금액 상품상세에 포인트금액 분배 작업
|
|
|
- var prePntDcAmtYn = $("input[name='rdi-beforpoint']:checked").val();
|
|
|
- var leftPntAmt = parseInt($(".pntDcSumAmt").text());
|
|
|
- var leftGfcdAmt = parseInt($(".gfcdUseSumAmt").text());
|
|
|
- var cartSqLenght = $(".cartSq").length;
|
|
|
+ var prePntDcAmtYn = $("#orderForm input[name='rdi-beforpoint']:checked").val();
|
|
|
+ var leftPntAmt = parseInt($("#orderAmtForm .pntDcSumAmt").text());
|
|
|
+ var leftGfcdAmt = parseInt($("#orderAmtForm .gfcdUseSumAmt").text());
|
|
|
+ var cartSqLenght = $("#orderAmtForm .cartSq").length;
|
|
|
var index = 1;
|
|
|
|
|
|
var orgGoodsSumAmt = 0;
|
|
|
@@ -1884,7 +1890,7 @@ var custCpnSumAmtCal = function() {
|
|
|
var realOrdSumAmt = 0;
|
|
|
var savePntSumAmt = 0;
|
|
|
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
var orgCurrPrice = parseInt($(this).parent().find(".orgCurrPrice").text());
|
|
|
var cpn1DcAmt = parseInt($(this).parent().find(".cpn1DcAmt").text());
|
|
|
var optAddPrice = parseInt($(this).parent().find(".optAddPrice").text());
|
|
|
@@ -1927,7 +1933,7 @@ var custCpnSumAmtCal = function() {
|
|
|
});
|
|
|
|
|
|
// 포인트, 상품권 금액 분배
|
|
|
- $(".cartSq").each(function(){
|
|
|
+ $("#orderAmtForm .cartSq").each(function(){
|
|
|
var ordAmt = parseInt($(this).parent().find(".ordAmt").text());
|
|
|
var dcSumAmt = parseInt($(this).parent().find(".dcSumAmt").text());
|
|
|
var tempDiv = parseInt((ordAmt / ordSumAmt) * 100);
|
|
|
@@ -1956,29 +1962,29 @@ var custCpnSumAmtCal = function() {
|
|
|
|
|
|
realOrdSumAmt = realOrdSumAmt + delvSumAmt;
|
|
|
|
|
|
- $(".orgGoodsSumAmt").text(orgGoodsSumAmt);
|
|
|
- $(".cpn1DcSumAmt").text(cpn1DcSumAmt);
|
|
|
- $(".ordSumAmt").text(ordSumAmt);
|
|
|
- $(".tmtb1DcSumAmt").text(tmtb1DcSumAmt);
|
|
|
- $(".tmtb2DcSumAmt").text(tmtb2DcSumAmt);
|
|
|
- $(".tmtbDcSumAmt").text(tmtbDcSumAmt);
|
|
|
- $(".goodsCpnDcSumAmt").text(goodsCpnDcSumAmt);
|
|
|
- $(".cartCpnDcSumAmt").text(cartCpnDcSumAmt);
|
|
|
- $(".cpnDcSumAmt").text(cpnDcSumAmt);
|
|
|
- $(".prePntDcSumAmt").text(prePntDcSumAmt);
|
|
|
- $(".realOrdSumAmt").text(realOrdSumAmt);
|
|
|
- $(".savePntSumAmt").text(savePntSumAmt);
|
|
|
+ $("#orderAmtForm .orgGoodsSumAmt").text(orgGoodsSumAmt);
|
|
|
+ $("#orderAmtForm .cpn1DcSumAmt").text(cpn1DcSumAmt);
|
|
|
+ $("#orderAmtForm .ordSumAmt").text(ordSumAmt);
|
|
|
+ $("#orderAmtForm .tmtb1DcSumAmt").text(tmtb1DcSumAmt);
|
|
|
+ $("#orderAmtForm .tmtb2DcSumAmt").text(tmtb2DcSumAmt);
|
|
|
+ $("#orderAmtForm .tmtbDcSumAmt").text(tmtbDcSumAmt);
|
|
|
+ $("#orderAmtForm .goodsCpnDcSumAmt").text(goodsCpnDcSumAmt);
|
|
|
+ $("#orderAmtForm .cartCpnDcSumAmt").text(cartCpnDcSumAmt);
|
|
|
+ $("#orderAmtForm .cpnDcSumAmt").text(cpnDcSumAmt);
|
|
|
+ $("#orderAmtForm .prePntDcSumAmt").text(prePntDcSumAmt);
|
|
|
+ $("#orderAmtForm .realOrdSumAmt").text(realOrdSumAmt);
|
|
|
+ $("#orderAmtForm .savePntSumAmt").text(savePntSumAmt);
|
|
|
|
|
|
$("#realOrdAmt").text(realOrdSumAmt.addComma()); // 총 결제 예정 금액
|
|
|
- $(".realOrdAmt").text(realOrdSumAmt.addComma() + " 원"); // 총 결제 예정 금액
|
|
|
+ $("#orderForm .realOrdAmt").text(realOrdSumAmt.addComma() + " 원"); // 총 결제 예정 금액
|
|
|
|
|
|
var tempSavePnt = savePntSumAmt - prePntDcAmt;
|
|
|
|
|
|
// 사은품사용 후 보유포인트
|
|
|
- var rmPntAmt = parseInt($("input[name='rmPntAmt']").val());
|
|
|
- var freegiftUsePnt = parseInt($(".freegiftUsePnt").text());
|
|
|
+ var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
+ var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
rmPntAmt = rmPntAmt - freegiftUsePnt;
|
|
|
- $(".rmPntAmt").text(rmPntAmt.addComma());
|
|
|
+ $("#orderForm .rmPntAmt").text(rmPntAmt.addComma());
|
|
|
|
|
|
// 걸제영역
|
|
|
//$("#btn_payment").text("동의 후 "+realOrdSumAmt.addComma()+" 원 결제하기");
|
|
|
@@ -2009,8 +2015,8 @@ var custCpnSumAmtCal = function() {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $(".freegiftValArr").text(freegiftValArr); // 사은품시퀀스배열
|
|
|
- $(".freegiftUsePointArr").text(freegiftUsePointArr); // 사은품사용포인트배열
|
|
|
+ $("#orderAmtForm .freegiftValArr").text(freegiftValArr); // 사은품시퀀스배열
|
|
|
+ $("#orderAmtForm .freegiftUsePointArr").text(freegiftUsePointArr); // 사은품사용포인트배열
|
|
|
};
|
|
|
|
|
|
// 1.18 배송지정보 설정
|
|
|
@@ -2036,7 +2042,7 @@ var delvMemoSet = function(delvMemoObj) {
|
|
|
|
|
|
$("#orderForm input[name=delvMemo]").val(delvMemoObj.delvMemo); // input 값에 설정
|
|
|
$("#delvMemo").text(delvMemoObj.delvMemo); // 메모 text 설정
|
|
|
- $(".delvMemo").text(delvMemoObj.delvMemo); // 메모 text 설정
|
|
|
+ $("#orderAmtForm .delvMemo").text(delvMemoObj.delvMemo); // 메모 text 설정
|
|
|
}
|
|
|
</script>
|
|
|
|