|
|
@@ -1224,228 +1224,240 @@ var paymentInfoSet = function() {
|
|
|
}
|
|
|
|
|
|
// 배송주소등록
|
|
|
- if ($("#orderAmtForm .recipZipcode").text() == "00000") {
|
|
|
+ var recipZipcode = $("#orderAmtForm .recipZipcode").text();
|
|
|
+ if (recipZipcode == "00000") {
|
|
|
mcxDialog.alert("배송정보를 등록해 주세요.");
|
|
|
// 배송정보화면노출
|
|
|
deliveryAddrInfoDispYn("Y");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- // 선물받기일때 배송지주소 받지않음
|
|
|
- if (giftPackYn == "N") {
|
|
|
- if ($("#orderAmtForm .recipZipcode").text() == "0000" || gagajf.isNull($("#orderAmtForm .recipZipcode").text())) {
|
|
|
- mcxDialog.alert("배송정보를 입력해주세요.");
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (gagajf.isNull($("#orderForm #orderGiftInfo input[name=recipNm]").val())) {
|
|
|
- mcxDialog.alert("선물받을분 이름을 입력해주세요.");
|
|
|
- $("#orderForm #orderGiftInfo input[name=recipNm]").focus();
|
|
|
-
|
|
|
- orderGiftInfoDispYn("Y");
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (gagajf.isNull($("#orderForm #orderGiftInfo input[name=recipPhnno]").val())) {
|
|
|
- mcxDialog.alert("선물받을분 휴대폰번호를 입력해주세요.");
|
|
|
- $("#orderForm #orderGiftInfo input[name=recipPhnno]").focus();
|
|
|
-
|
|
|
- orderGiftInfoDispYn("Y");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- // 2021.07.05
|
|
|
- if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length < 9) {
|
|
|
- mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
- $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length > 12) {
|
|
|
- mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
- $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
+ // 출고불가지역 확인
|
|
|
+ let banData = {};
|
|
|
+ banData.recipZipcode = recipZipcode;
|
|
|
+
|
|
|
+ let banJsonData = JSON.stringify(banData);
|
|
|
+
|
|
|
+ gagajf.ajaxJsonSubmit('/order/delivery/ban', banJsonData, function(result) {
|
|
|
+ if (!gagajf.isNull(result.banZipcode) && result.banZipcode > 0 && giftPackYn == "N") {
|
|
|
+ mcxDialog.alert('죄송합니다. 정읍,익산,전주 지역은 주문/배송이 불가한 지역입니다. 다른 배송지로 주문을 진행해주세요.');
|
|
|
return false;
|
|
|
- }
|
|
|
-
|
|
|
- // 2021.08.11
|
|
|
- var recipPhnno = fnPhnnoSet($("#orderForm #orderGiftInfo input[name=recipPhnno]").val());
|
|
|
-
|
|
|
- $("#orderAmtForm .recipNm").text($("#orderForm #orderGiftInfo input[name=recipNm]").val());
|
|
|
- $("#orderAmtForm .recipPhnno").text(recipPhnno);
|
|
|
-
|
|
|
- if (gagajf.isNull($("textarea#giftMsg").val())) {
|
|
|
- giftMsg = "감사합니다.";
|
|
|
} else {
|
|
|
- giftMsg = $("textarea#giftMsg").val();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // TODO 개인통관번호 동의 체크시 통관번호 등록
|
|
|
- if (foreignBuyYn == "Y") {
|
|
|
- if ($("#orderForm input[name=rdi-overseas]:checked").val() == "Y") {
|
|
|
- if (gagajf.isNull($("#orderForm input[name=entryNo]").val())) {
|
|
|
- mcxDialog.alert("개인통관고유부호를 입력해주세요.");
|
|
|
- $('#orderForm input[name=entryNo]').focus();
|
|
|
+ // 선물받기일때 배송지주소 받지않음
|
|
|
+ if (giftPackYn == "N") {
|
|
|
+ if ($("#orderAmtForm .recipZipcode").text() == "0000" || gagajf.isNull($("#orderAmtForm .recipZipcode").text())) {
|
|
|
+ mcxDialog.alert("배송정보를 입력해주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (gagajf.isNull($("#orderForm #orderGiftInfo input[name=recipNm]").val())) {
|
|
|
+ mcxDialog.alert("선물받을분 이름을 입력해주세요.");
|
|
|
+ $("#orderForm #orderGiftInfo input[name=recipNm]").focus();
|
|
|
+
|
|
|
+ orderGiftInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (gagajf.isNull($("#orderForm #orderGiftInfo input[name=recipPhnno]").val())) {
|
|
|
+ mcxDialog.alert("선물받을분 휴대폰번호를 입력해주세요.");
|
|
|
+ $("#orderForm #orderGiftInfo input[name=recipPhnno]").focus();
|
|
|
+
|
|
|
+ orderGiftInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // 배송정보화면노출
|
|
|
- entryInfoDispYn("Y");
|
|
|
- return false;
|
|
|
+ // 2021.07.05
|
|
|
+ if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length < 9) {
|
|
|
+ mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
+ $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($("#orderForm #orderGiftInfo input[name=recipPhnno]").val().length > 12) {
|
|
|
+ mcxDialog.alert("선물받을분 휴대폰번호를 정확히 입력해주세요.");
|
|
|
+ $('#orderForm #orderGiftInfo input[name=recipPhnno]').focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.08.11
|
|
|
+ var recipPhnno = fnPhnnoSet($("#orderForm #orderGiftInfo input[name=recipPhnno]").val());
|
|
|
+
|
|
|
+ $("#orderAmtForm .recipNm").text($("#orderForm #orderGiftInfo input[name=recipNm]").val());
|
|
|
+ $("#orderAmtForm .recipPhnno").text(recipPhnno);
|
|
|
+
|
|
|
+ if (gagajf.isNull($("textarea#giftMsg").val())) {
|
|
|
+ giftMsg = "감사합니다.";
|
|
|
+ } else {
|
|
|
+ giftMsg = $("textarea#giftMsg").val();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- orgEntryNo = $("#orderForm input[name=entryNo]").val();
|
|
|
+ // TODO 개인통관번호 동의 체크시 통관번호 등록
|
|
|
+ if (foreignBuyYn == "Y") {
|
|
|
+ if ($("#orderForm input[name=rdi-overseas]:checked").val() == "Y") {
|
|
|
+ if (gagajf.isNull($("#orderForm input[name=entryNo]").val())) {
|
|
|
+ mcxDialog.alert("개인통관고유부호를 입력해주세요.");
|
|
|
+ $('#orderForm input[name=entryNo]').focus();
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ entryInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ orgEntryNo = $("#orderForm input[name=entryNo]").val();
|
|
|
+
|
|
|
+ if (orgEntryNo.substr(0, 1) != "P") {
|
|
|
+ mcxDialog.alert("개인통관고유부호가 유효하지 않습니다.");
|
|
|
+ $('#orderForm input[name=entryNo]').focus();
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ deliveryAddrInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (orgEntryNo.length < 13) {
|
|
|
+ mcxDialog.alert("개인통관고유부호가 유효하지 않습니다.");
|
|
|
+ $('#orderForm input[name=entryNo]').focus();
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ entryInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!$("#orderForm #chk-overs-agr").is(":checked")) {
|
|
|
+ mcxDialog.alert("개인통관정보고유부호 정보 동의/저장항목을 체크해주세요.");
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ entryInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if (orgEntryNo.substr(0,1) != "P") {
|
|
|
- mcxDialog.alert("개인통관고유부호가 유효하지 않습니다.");
|
|
|
- $('#orderForm input[name=entryNo]').focus();
|
|
|
-
|
|
|
- // 배송정보화면노출
|
|
|
- deliveryAddrInfoDispYn("Y");
|
|
|
- return false;
|
|
|
+ // 주문제작상품일때 주문제작정보동의
|
|
|
+ if (orderMadeYn == "Y") {
|
|
|
+ if (!$("#orderForm #chk-custom").is(":checked")) {
|
|
|
+ mcxDialog.alert("주문제작상품에 대한 동의를 하지 않으실 경우 해당 상품을 쇼핑백에서 제외하신 후 다시 결제를 시도해주세요.");
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ madeInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (orgEntryNo.length < 13) {
|
|
|
- mcxDialog.alert("개인통관고유부호가 유효하지 않습니다.");
|
|
|
- $('#orderForm input[name=entryNo]').focus();
|
|
|
-
|
|
|
- // 배송정보화면노출
|
|
|
- entryInfoDispYn("Y");
|
|
|
- return false;
|
|
|
+ // 사은품지급할 경우 체크
|
|
|
+ if ($("#orderAmtForm .freegiftValArr").text().length > 0) {
|
|
|
+ if (!$("#orderForm #chk-agree_gift").is(":checked")) {
|
|
|
+ mcxDialog.alert("사은품 지급 정보 동의를 체크해주세요.");
|
|
|
+
|
|
|
+ // 배송정보화면노출
|
|
|
+ freegiftInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (!$("#orderForm #chk-overs-agr").is(":checked")) {
|
|
|
- mcxDialog.alert("개인통관정보고유부호 정보 동의/저장항목을 체크해주세요.");
|
|
|
+ // 결재수단
|
|
|
+ var realOrdSumAmt = parseInt($("#orderAmtForm .realOrdSumAmt").text());
|
|
|
+ var pgGb = "";
|
|
|
+ var payMeans = "";
|
|
|
+ if (realOrdSumAmt > 0) {
|
|
|
+ if (gagajf.isNull(paynormal)) {
|
|
|
+ mcxDialog.alert("결제수단을 선택해 주세요.");
|
|
|
+
|
|
|
+ // 결제수단정보노출
|
|
|
+ paymentInfoDispYn("Y");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // 배송정보화면노출
|
|
|
- entryInfoDispYn("Y");
|
|
|
- return false;
|
|
|
+ paynormalArr = paynormal.split("|");
|
|
|
+ pgGb = paynormalArr[0];
|
|
|
+ payMeans = paynormalArr[1];
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 주문제작상품일때 주문제작정보동의
|
|
|
- if (orderMadeYn == "Y") {
|
|
|
- if (!$("#orderForm #chk-custom").is(":checked")) {
|
|
|
- mcxDialog.alert("주문제작상품에 대한 동의를 하지 않으실 경우 해당 상품을 쇼핑백에서 제외하신 후 다시 결제를 시도해주세요.");
|
|
|
|
|
|
- // 배송정보화면노출
|
|
|
- madeInfoDispYn("Y");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 사은품지급할 경우 체크
|
|
|
- if ($("#orderAmtForm .freegiftValArr").text().length > 0) {
|
|
|
- if (!$("#orderForm #chk-agree_gift").is(":checked")) {
|
|
|
- mcxDialog.alert("사은품 지급 정보 동의를 체크해주세요.");
|
|
|
+ var custPayMeans = "N";
|
|
|
|
|
|
- // 배송정보화면노출
|
|
|
- freegiftInfoDispYn("Y");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 결재수단
|
|
|
- var realOrdSumAmt = parseInt($("#orderAmtForm .realOrdSumAmt").text());
|
|
|
- var pgGb = "";
|
|
|
- var payMeans = "";
|
|
|
- if (realOrdSumAmt > 0) {
|
|
|
- if (gagajf.isNull(paynormal)) {
|
|
|
- mcxDialog.alert("결제수단을 선택해 주세요.");
|
|
|
-
|
|
|
- // 결제수단정보노출
|
|
|
- paymentInfoDispYn("Y");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- paynormalArr = paynormal.split("|");
|
|
|
- pgGb = paynormalArr[0];
|
|
|
- payMeans = paynormalArr[1];
|
|
|
- }
|
|
|
-
|
|
|
- var custPayMeans = "N";
|
|
|
-
|
|
|
- // 자주쓰는결제타입
|
|
|
- if ($("#orderForm #chk-agree_paymethod").is(":checked") == true) {
|
|
|
- custPayMeans = "Y";
|
|
|
- }
|
|
|
-
|
|
|
- // 주문상세데이타 생성
|
|
|
- $("#orderDetailInfo .cartSq").each(function(){
|
|
|
- // 주문상세단위 총알배송여부 변경
|
|
|
- var orderDetailShotDelvYn = $(this).parent().find(".shotDelvYn").text();
|
|
|
- if (orderDetailShotDelvYn == "Y") {
|
|
|
- if (shotDelvYn == "N") {
|
|
|
- orderDetailShotDelvYn = "N";
|
|
|
+ // 자주쓰는결제타입
|
|
|
+ if ($("#orderForm #chk-agree_paymethod").is(":checked") == true) {
|
|
|
+ custPayMeans = "Y";
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- // 개인통관번호
|
|
|
- if ($(this).parent().find(".foreignBuyYn").text() == "Y") {
|
|
|
- entryNo = orgEntryNo;
|
|
|
- } else {
|
|
|
- entryNo = "";
|
|
|
- }
|
|
|
-
|
|
|
- var orderDetailData = {
|
|
|
- "cartSq" : $(this).text()
|
|
|
- ,"currPrice" : $(this).parent().find(".orgCurrPrice").text()
|
|
|
- ,"optAddPrice" : $(this).parent().find(".optAddPrice").text()
|
|
|
- ,"ordAmt" : $(this).parent().find(".ordAmt").text()
|
|
|
- ,"cpn1CpnSq" : $(this).parent().find(".cpn1CpnSq").text()
|
|
|
- ,"cpn1DcAmt" : $(this).parent().find(".cpn1DcAmt").text()
|
|
|
- ,"goodsQty" : $(this).parent().find(".goodsQty").text()
|
|
|
- ,"tmtb1Sq" : $(this).parent().find(".tmtb1Sq").text()
|
|
|
- ,"tmtb1DcAmt" : $(this).parent().find(".tmtb1DcAmt").text()
|
|
|
- ,"tmtb2Sq" : $(this).parent().find(".tmtb2Sq").text()
|
|
|
- ,"tmtb2DcAmt" : $(this).parent().find(".tmtb2DcAmt").text()
|
|
|
- ,"goodsCpnSq" : $(this).parent().find(".goodsCpnSq").text()
|
|
|
- ,"goodsCpnDcAmt" : $(this).parent().find(".goodsCpnDcAmt").text()
|
|
|
- ,"cartCpnSq" : $(this).parent().find(".cartCpnSq").text()
|
|
|
- ,"cartCpnDcAmt" : $(this).parent().find(".cartCpnDcAmt").text()
|
|
|
- ,"prePntDcAmt" : $(this).parent().find(".prePntDcAmt1").text()
|
|
|
- ,"pntDcAmt" : $(this).parent().find(".pntDcAmt1").text()
|
|
|
- ,"gfcdUseAmt" : $(this).parent().find(".gfcdUseAmt1").text()
|
|
|
- ,"realOrdAmt" : $(this).parent().find(".realOrdAmt1").text()
|
|
|
- ,"savePntAmt" : $(this).parent().find(".savePntAmt1").text()
|
|
|
- ,"shotDelvYn" : orderDetailShotDelvYn
|
|
|
- ,"foreignBuyYn" : $(this).parent().find(".foreignBuyYn").text()
|
|
|
- ,"makeGoodsYn" : $(this).parent().find(".orderMadeYn").text()
|
|
|
- ,"delvFeeCd" : $(this).parent().find(".delvFeeCd").text()
|
|
|
- ,"goodsCd" : $(this).parent().find(".goodsCd").text()
|
|
|
- ,"itemCdArr" : $(this).parent().find(".itemCd").text().split(",")
|
|
|
- ,"optCdArr" : $(this).parent().find(".optCd").text().split(",")
|
|
|
- ,"itemQtyArr" : $(this).parent().find(".itemQtyr").text().split(",")
|
|
|
- ,"goodsType" : $(this).parent().find(".goodsType").text()
|
|
|
- ,"entryNo" : entryNo
|
|
|
- ,"giftPackYn" : giftPackYn
|
|
|
- }
|
|
|
-
|
|
|
- // 상품수
|
|
|
- ordGoodsQty++;
|
|
|
-
|
|
|
- orderDetailList.push(orderDetailData);
|
|
|
- });
|
|
|
-
|
|
|
- // 주문배송업체정보 생성
|
|
|
- $("#delvFeeCdInfo .delvFeeCd").each(function(){
|
|
|
- var delvFeeCdData = {
|
|
|
- "delvFeeCd" : $(this).text()
|
|
|
- ,"supplyCompCd" : $(this).parent().find(".supplyCompCd").text()
|
|
|
- ,"delvFee" : $(this).parent().find(".delvFee").text()
|
|
|
- ,"delvCpnSq" : $(this).parent().find(".delvCpnSq").text()
|
|
|
- ,"delvCpnDcAmt" : $(this).parent().find(".delvCpnDcAmt").text()
|
|
|
- ,"delvGfcdUseAmt" : $(this).parent().find(".delvGfcdUseAmt").text()
|
|
|
- }
|
|
|
-
|
|
|
- delvFeeCdList.push(delvFeeCdData);
|
|
|
- });
|
|
|
-
|
|
|
- // 2021.04.29 상픈품 체크박스 미동의시 사은품 미지급
|
|
|
- var freegiftValArr = $("#orderAmtForm .freegiftValArr").text().split(",");
|
|
|
- var freegiftSqArr = $("#orderAmtForm .freegiftSqArr").text().split(",");
|
|
|
- var freegiftGoodsArr = $("#orderAmtForm .freegiftGoodsArr").text().split(",");
|
|
|
- var freegiftUsePointArr = $("#orderAmtForm .freegiftUsePointArr").text().split(",");
|
|
|
-
|
|
|
- /*
|
|
|
+
|
|
|
+ // 주문상세데이타 생성
|
|
|
+ $("#orderDetailInfo .cartSq").each(function () {
|
|
|
+ // 주문상세단위 총알배송여부 변경
|
|
|
+ var orderDetailShotDelvYn = $(this).parent().find(".shotDelvYn").text();
|
|
|
+ if (orderDetailShotDelvYn == "Y") {
|
|
|
+ if (shotDelvYn == "N") {
|
|
|
+ orderDetailShotDelvYn = "N";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 개인통관번호
|
|
|
+ if ($(this).parent().find(".foreignBuyYn").text() == "Y") {
|
|
|
+ entryNo = orgEntryNo;
|
|
|
+ } else {
|
|
|
+ entryNo = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ var orderDetailData = {
|
|
|
+ "cartSq": $(this).text()
|
|
|
+ , "currPrice": $(this).parent().find(".orgCurrPrice").text()
|
|
|
+ , "optAddPrice": $(this).parent().find(".optAddPrice").text()
|
|
|
+ , "ordAmt": $(this).parent().find(".ordAmt").text()
|
|
|
+ , "cpn1CpnSq": $(this).parent().find(".cpn1CpnSq").text()
|
|
|
+ , "cpn1DcAmt": $(this).parent().find(".cpn1DcAmt").text()
|
|
|
+ , "goodsQty": $(this).parent().find(".goodsQty").text()
|
|
|
+ , "tmtb1Sq": $(this).parent().find(".tmtb1Sq").text()
|
|
|
+ , "tmtb1DcAmt": $(this).parent().find(".tmtb1DcAmt").text()
|
|
|
+ , "tmtb2Sq": $(this).parent().find(".tmtb2Sq").text()
|
|
|
+ , "tmtb2DcAmt": $(this).parent().find(".tmtb2DcAmt").text()
|
|
|
+ , "goodsCpnSq": $(this).parent().find(".goodsCpnSq").text()
|
|
|
+ , "goodsCpnDcAmt": $(this).parent().find(".goodsCpnDcAmt").text()
|
|
|
+ , "cartCpnSq": $(this).parent().find(".cartCpnSq").text()
|
|
|
+ , "cartCpnDcAmt": $(this).parent().find(".cartCpnDcAmt").text()
|
|
|
+ , "prePntDcAmt": $(this).parent().find(".prePntDcAmt1").text()
|
|
|
+ , "pntDcAmt": $(this).parent().find(".pntDcAmt1").text()
|
|
|
+ , "gfcdUseAmt": $(this).parent().find(".gfcdUseAmt1").text()
|
|
|
+ , "realOrdAmt": $(this).parent().find(".realOrdAmt1").text()
|
|
|
+ , "savePntAmt": $(this).parent().find(".savePntAmt1").text()
|
|
|
+ , "shotDelvYn": orderDetailShotDelvYn
|
|
|
+ , "foreignBuyYn": $(this).parent().find(".foreignBuyYn").text()
|
|
|
+ , "makeGoodsYn": $(this).parent().find(".orderMadeYn").text()
|
|
|
+ , "delvFeeCd": $(this).parent().find(".delvFeeCd").text()
|
|
|
+ , "goodsCd": $(this).parent().find(".goodsCd").text()
|
|
|
+ , "itemCdArr": $(this).parent().find(".itemCd").text().split(",")
|
|
|
+ , "optCdArr": $(this).parent().find(".optCd").text().split(",")
|
|
|
+ , "itemQtyArr": $(this).parent().find(".itemQtyr").text().split(",")
|
|
|
+ , "goodsType": $(this).parent().find(".goodsType").text()
|
|
|
+ , "entryNo": entryNo
|
|
|
+ , "giftPackYn": giftPackYn
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상품수
|
|
|
+ ordGoodsQty++;
|
|
|
+
|
|
|
+ orderDetailList.push(orderDetailData);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 주문배송업체정보 생성
|
|
|
+ $("#delvFeeCdInfo .delvFeeCd").each(function () {
|
|
|
+ var delvFeeCdData = {
|
|
|
+ "delvFeeCd": $(this).text()
|
|
|
+ , "supplyCompCd": $(this).parent().find(".supplyCompCd").text()
|
|
|
+ , "delvFee": $(this).parent().find(".delvFee").text()
|
|
|
+ , "delvCpnSq": $(this).parent().find(".delvCpnSq").text()
|
|
|
+ , "delvCpnDcAmt": $(this).parent().find(".delvCpnDcAmt").text()
|
|
|
+ , "delvGfcdUseAmt": $(this).parent().find(".delvGfcdUseAmt").text()
|
|
|
+ }
|
|
|
+
|
|
|
+ delvFeeCdList.push(delvFeeCdData);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 2021.04.29 상픈품 체크박스 미동의시 사은품 미지급
|
|
|
+ var freegiftValArr = $("#orderAmtForm .freegiftValArr").text().split(",");
|
|
|
+ var freegiftSqArr = $("#orderAmtForm .freegiftSqArr").text().split(",");
|
|
|
+ var freegiftGoodsArr = $("#orderAmtForm .freegiftGoodsArr").text().split(",");
|
|
|
+ var freegiftUsePointArr = $("#orderAmtForm .freegiftUsePointArr").text().split(",");
|
|
|
+
|
|
|
+ /*
|
|
|
if (!$("#orderForm #chk-agree_gift").is(":checked") == false) {
|
|
|
freegiftValArr = "";
|
|
|
freegiftSqArr = "";
|
|
|
@@ -1453,107 +1465,109 @@ var paymentInfoSet = function() {
|
|
|
freegiftUsePointArr = "";
|
|
|
}
|
|
|
*/
|
|
|
-
|
|
|
- // 2021.07.15 상품권 100% 결제시
|
|
|
- if (parseInt($("#orderAmtForm .realOrdSumAmt").text()) < 1) {
|
|
|
- pgGb = "KCP";
|
|
|
- payMeans = "G014_70";
|
|
|
- }
|
|
|
-
|
|
|
- // 주문데이타 생성
|
|
|
- var orderData = {
|
|
|
- "custNm" : $("#orderAmtForm .custNm").text()
|
|
|
- ,"email" : $("#orderAmtForm .email").text()
|
|
|
- ,"recipNm" : $("#orderAmtForm .recipNm").text()
|
|
|
- ,"recipPhnno" : $("#orderAmtForm .recipPhnno").text()
|
|
|
- ,"recipZipcode" : $("#orderAmtForm .recipZipcode").text()
|
|
|
- ,"recipBaseAddr" : $("#orderAmtForm .recipBaseAddr").text()
|
|
|
- ,"recipDtlAddr" : $("#orderAmtForm .recipDtlAddr").text()
|
|
|
- ,"delvMemo" : $("#orderAmtForm .delvMemo").text()
|
|
|
- ,"insuranceYn" : insuranceYn
|
|
|
- ,"sexGb" : $("#orderAmtForm .sexGb").text()
|
|
|
- ,"birthYmd" : $("#orderAmtForm .birthYmd").text()
|
|
|
- ,"prePntDcAmtYn" : prePntDcAmtYn
|
|
|
- ,"orderDetailList" : orderDetailList
|
|
|
- ,"delvFeeCdList" : delvFeeCdList
|
|
|
- ,"shotDelvYn" : shotDelvYn
|
|
|
- ,"entryNo" : entryNo
|
|
|
- ,"pgGb" : pgGb
|
|
|
- ,"payMeans" : payMeans // 네이버페이, 카카오페이
|
|
|
- ,"payAmt" : $("#orderAmtForm .realOrdSumAmt").text()
|
|
|
- ,"ordNm" : $("#orderAmtForm .custNm").text()
|
|
|
- ,"ordPhnno" : $("#orderAmtForm .cellPhnno").text()
|
|
|
- ,"goodsNm" : $("#orderAmtForm .goodsNm").eq(0).text()
|
|
|
- ,"ordGoodsQty" : ordGoodsQty
|
|
|
- ,"freegiftValArr" : freegiftValArr
|
|
|
- ,"freegiftSqArr" : freegiftSqArr
|
|
|
- ,"freegiftGoodsArr" : freegiftGoodsArr
|
|
|
- ,"freegiftUsePointArr" : freegiftUsePointArr
|
|
|
- ,"giftMsg" : giftMsg
|
|
|
- ,"custPayMeans" : custPayMeans
|
|
|
- ,"cartSqArr" : cartSqArr
|
|
|
- ,"orgGoodsSumAmt" : $("#orderAmtForm .orgGoodsSumAmt").text()
|
|
|
- ,"cpn1DcSumAmt" : $("#orderAmtForm .cpn1DcSumAmt").text()
|
|
|
- ,"tmtb1DcSumAmt" : $("#orderAmtForm .tmtb1DcSumAmt").text()
|
|
|
- ,"tmtb2DcSumAmt" : $("#orderAmtForm .tmtb2DcSumAmt").text()
|
|
|
- ,"goodsCpnDcSumAmt" : $("#orderAmtForm .goodsCpnDcSumAmt").text()
|
|
|
- ,"cartCpnDcSumAmt" : $("#orderAmtForm .cartCpnDcSumAmt").text()
|
|
|
- ,"prePntDcSumAmt" : $("#orderAmtForm .prePntDcSumAmt").text()
|
|
|
- ,"pntDcSumAmt" : $("#orderAmtForm .pntDcSumAmt").text()
|
|
|
- ,"gfcdUseSumAmt" : $("#orderAmtForm .gfcdUseSumAmt").text()
|
|
|
- ,"realOrdSumAmt" : $("#orderAmtForm .realOrdSumAmt").text()
|
|
|
- ,"delvSumAmt" : $("#orderAmtForm .delvSumAmt").text()
|
|
|
- };
|
|
|
-
|
|
|
- $.ajax( {
|
|
|
- type : "POST",
|
|
|
- url : '/order/create/preOrder',
|
|
|
- data : JSON.stringify(orderData),
|
|
|
- dataType : 'html',
|
|
|
- beforeSend : function(xhr, settings) {
|
|
|
- xhr.setRequestHeader("AJAX" , "true");
|
|
|
- xhr.setRequestHeader('Accept' , 'application/json');
|
|
|
- xhr.setRequestHeader('Content-Type' , 'application/json');
|
|
|
|
|
|
- // 2021.07.24 유효성체크 분리작업
|
|
|
- gagajf.showProgressbar(true);
|
|
|
- },
|
|
|
- success : function(result) {
|
|
|
-
|
|
|
- // 2021.07.24 유효성체크 분리작업
|
|
|
- gagajf.showProgressbar(false);
|
|
|
+ // 2021.07.15 상품권 100% 결제시
|
|
|
+ if (parseInt($("#orderAmtForm .realOrdSumAmt").text()) < 1) {
|
|
|
+ pgGb = "KCP";
|
|
|
+ payMeans = "G014_70";
|
|
|
+ }
|
|
|
|
|
|
- // 결재정보로드
|
|
|
- $("#order_info").html(result);
|
|
|
+ // 주문데이타 생성
|
|
|
+ var orderData = {
|
|
|
+ "custNm": $("#orderAmtForm .custNm").text()
|
|
|
+ , "email": $("#orderAmtForm .email").text()
|
|
|
+ , "recipNm": $("#orderAmtForm .recipNm").text()
|
|
|
+ , "recipPhnno": $("#orderAmtForm .recipPhnno").text()
|
|
|
+ , "recipZipcode": $("#orderAmtForm .recipZipcode").text()
|
|
|
+ , "recipBaseAddr": $("#orderAmtForm .recipBaseAddr").text()
|
|
|
+ , "recipDtlAddr": $("#orderAmtForm .recipDtlAddr").text()
|
|
|
+ , "delvMemo": $("#orderAmtForm .delvMemo").text()
|
|
|
+ , "insuranceYn": insuranceYn
|
|
|
+ , "sexGb": $("#orderAmtForm .sexGb").text()
|
|
|
+ , "birthYmd": $("#orderAmtForm .birthYmd").text()
|
|
|
+ , "prePntDcAmtYn": prePntDcAmtYn
|
|
|
+ , "orderDetailList": orderDetailList
|
|
|
+ , "delvFeeCdList": delvFeeCdList
|
|
|
+ , "shotDelvYn": shotDelvYn
|
|
|
+ , "entryNo": entryNo
|
|
|
+ , "pgGb": pgGb
|
|
|
+ , "payMeans": payMeans // 네이버페이, 카카오페이
|
|
|
+ , "payAmt": $("#orderAmtForm .realOrdSumAmt").text()
|
|
|
+ , "ordNm": $("#orderAmtForm .custNm").text()
|
|
|
+ , "ordPhnno": $("#orderAmtForm .cellPhnno").text()
|
|
|
+ , "goodsNm": $("#orderAmtForm .goodsNm").eq(0).text()
|
|
|
+ , "ordGoodsQty": ordGoodsQty
|
|
|
+ , "freegiftValArr": freegiftValArr
|
|
|
+ , "freegiftSqArr": freegiftSqArr
|
|
|
+ , "freegiftGoodsArr": freegiftGoodsArr
|
|
|
+ , "freegiftUsePointArr": freegiftUsePointArr
|
|
|
+ , "giftMsg": giftMsg
|
|
|
+ , "custPayMeans": custPayMeans
|
|
|
+ , "cartSqArr": cartSqArr
|
|
|
+ , "orgGoodsSumAmt": $("#orderAmtForm .orgGoodsSumAmt").text()
|
|
|
+ , "cpn1DcSumAmt": $("#orderAmtForm .cpn1DcSumAmt").text()
|
|
|
+ , "tmtb1DcSumAmt": $("#orderAmtForm .tmtb1DcSumAmt").text()
|
|
|
+ , "tmtb2DcSumAmt": $("#orderAmtForm .tmtb2DcSumAmt").text()
|
|
|
+ , "goodsCpnDcSumAmt": $("#orderAmtForm .goodsCpnDcSumAmt").text()
|
|
|
+ , "cartCpnDcSumAmt": $("#orderAmtForm .cartCpnDcSumAmt").text()
|
|
|
+ , "prePntDcSumAmt": $("#orderAmtForm .prePntDcSumAmt").text()
|
|
|
+ , "pntDcSumAmt": $("#orderAmtForm .pntDcSumAmt").text()
|
|
|
+ , "gfcdUseSumAmt": $("#orderAmtForm .gfcdUseSumAmt").text()
|
|
|
+ , "realOrdSumAmt": $("#orderAmtForm .realOrdSumAmt").text()
|
|
|
+ , "delvSumAmt": $("#orderAmtForm .delvSumAmt").text()
|
|
|
+ };
|
|
|
|
|
|
- var pgGb = $("#order_info input[name=pgGb]").val();
|
|
|
- if (pgGb == "NAVER") {
|
|
|
- fnNaverPaymentReady();
|
|
|
- } else if (pgGb == "KAKAO") {
|
|
|
- fnKakaoPaymentReady();
|
|
|
- } else if (pgGb == "KCP" || pgGb == "PAYCO") {
|
|
|
- if(payMeans == "G014_70") {
|
|
|
- $("#order_info input[name=tran_cd]").val("ISTYLE");
|
|
|
- $("#order_info input[name=pgTid]").val("ISTYLE");
|
|
|
- $("#order_info").submit();
|
|
|
- } else {
|
|
|
- // 2021.06.02 태팔요청
|
|
|
- var protocol = location.protocol;
|
|
|
- $("#order_info input[name=Ret_URL]").val(protocol + _frontUrl + "/order/pay/result/response");
|
|
|
-
|
|
|
- // IOS에 실시간계좌이체가 아니면 APP_URL 제거
|
|
|
- if(!(isIos && payMeans == "G014_10")) {
|
|
|
- $("#order_info #appUrl").remove();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/order/create/preOrder',
|
|
|
+ data: JSON.stringify(orderData),
|
|
|
+ dataType: 'html',
|
|
|
+ beforeSend: function (xhr, settings) {
|
|
|
+ xhr.setRequestHeader("AJAX", "true");
|
|
|
+ xhr.setRequestHeader('Accept', 'application/json');
|
|
|
+ xhr.setRequestHeader('Content-Type', 'application/json');
|
|
|
+
|
|
|
+ // 2021.07.24 유효성체크 분리작업
|
|
|
+ gagajf.showProgressbar(true);
|
|
|
+ },
|
|
|
+ success: function (result) {
|
|
|
+
|
|
|
+ // 2021.07.24 유효성체크 분리작업
|
|
|
+ gagajf.showProgressbar(false);
|
|
|
+
|
|
|
+ // 결재정보로드
|
|
|
+ $("#order_info").html(result);
|
|
|
+
|
|
|
+ var pgGb = $("#order_info input[name=pgGb]").val();
|
|
|
+ if (pgGb == "NAVER") {
|
|
|
+ fnNaverPaymentReady();
|
|
|
+ } else if (pgGb == "KAKAO") {
|
|
|
+ fnKakaoPaymentReady();
|
|
|
+ } else if (pgGb == "KCP" || pgGb == "PAYCO") {
|
|
|
+ if (payMeans == "G014_70") {
|
|
|
+ $("#order_info input[name=tran_cd]").val("ISTYLE");
|
|
|
+ $("#order_info input[name=pgTid]").val("ISTYLE");
|
|
|
+ $("#order_info").submit();
|
|
|
+ } else {
|
|
|
+ // 2021.06.02 태팔요청
|
|
|
+ var protocol = location.protocol;
|
|
|
+ $("#order_info input[name=Ret_URL]").val(protocol + _frontUrl + "/order/pay/result/response");
|
|
|
+
|
|
|
+ // IOS에 실시간계좌이체가 아니면 APP_URL 제거
|
|
|
+ if (!(isIos && payMeans == "G014_10")) {
|
|
|
+ $("#order_info #appUrl").remove();
|
|
|
+ }
|
|
|
+
|
|
|
+ kcp_AJAX();
|
|
|
+ }
|
|
|
+ }// 2021.07.15 상품권 100% 결제
|
|
|
+ else if (pgGb == "ISTYLE") {
|
|
|
+ $("#order_info input[name=tran_cd]").val("ISTYLE");
|
|
|
+ $("#order_info input[name=pgTid]").val("ISTYLE");
|
|
|
+ $("#order_info").submit();
|
|
|
}
|
|
|
-
|
|
|
- kcp_AJAX();
|
|
|
}
|
|
|
- }// 2021.07.15 상품권 100% 결제
|
|
|
- else if (pgGb == "ISTYLE") {
|
|
|
- $("#order_info input[name=tran_cd]").val("ISTYLE");
|
|
|
- $("#order_info input[name=pgTid]").val("ISTYLE");
|
|
|
- $("#order_info").submit();
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
});
|