|
|
@@ -31,6 +31,7 @@
|
|
|
|
|
|
<!-- 주문금액정보표현 -->
|
|
|
<form id="orderAmtForm" name="orderAmtForm">
|
|
|
+ <!-- 주문자정보 -->
|
|
|
<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="orderInfo" id="orderInfo">
|
|
|
<tbody>
|
|
|
<tr style="height:30px;">
|
|
|
@@ -43,6 +44,8 @@
|
|
|
<th>recipBaseAddr</th>
|
|
|
<th>recipDtlAddr</th>
|
|
|
<th>delvMemo</th>
|
|
|
+ <th>sexGb</th>
|
|
|
+ <th>birthYmd</th>
|
|
|
</tr>
|
|
|
<tr style="height:30px;">
|
|
|
<td class="custNm"></td>
|
|
|
@@ -54,9 +57,12 @@
|
|
|
<td class="recipBaseAddr"></td>
|
|
|
<td class="recipDtlAddr"></td>
|
|
|
<td class="delvMemo"></td>
|
|
|
+ <td class="sexGb"></td>
|
|
|
+ <td class="birthYmd"></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
+ <!-- //주문자정보 -->
|
|
|
|
|
|
<!-- 사은품정보 -->
|
|
|
<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="freegiftInfo">
|
|
|
@@ -73,6 +79,7 @@
|
|
|
<td class="freegiftGoodsArr"></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ <!-- //사은품정보 -->
|
|
|
|
|
|
<!-- 주문상세금액 -->
|
|
|
<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="orderDetailInfo" id="orderDetailInfo">
|
|
|
@@ -165,6 +172,7 @@
|
|
|
</th:block>
|
|
|
</th:block>
|
|
|
</table>
|
|
|
+ <!-- //주문상세금액 -->
|
|
|
|
|
|
<!-- 배송단위목록 -->
|
|
|
<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="delvFeeCdInfo" id="delvFeeCdInfo">
|
|
|
@@ -185,6 +193,7 @@
|
|
|
</tr>
|
|
|
</th:block>
|
|
|
</table>
|
|
|
+ <!-- //배송단위목록 -->
|
|
|
|
|
|
<!-- 주문금액합계 -->
|
|
|
<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="orderSumAmtInfo" id="orderSumAmtInfo">
|
|
|
@@ -227,6 +236,7 @@
|
|
|
<td class="savePntSumAmt">0</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ <!-- //주문금액합계 -->
|
|
|
</form>
|
|
|
<!-- //주문금액정보표현 -->
|
|
|
|
|
|
@@ -585,6 +595,9 @@ var custemerInfoSet = function() {
|
|
|
$("#orderAmtForm .custNm").text($("#orderForm input[name='custNm']").val());
|
|
|
$("#orderAmtForm .email").text($("#orderForm input[name='email']").val());
|
|
|
$("#orderAmtForm .cellPhnno").text($("#orderForm input[name='cellPhnno']").val());
|
|
|
+
|
|
|
+ $("#orderAmtForm .sexGb").text($("#orderForm input[name='sexGb']").val());
|
|
|
+ $("#orderAmtForm .birthYmd").text($("#orderForm input[name='birthYmd']").val());
|
|
|
}
|
|
|
// 1.2 배송정보로드
|
|
|
deliveryAddrInfoSet(jsonObj, true);
|
|
|
@@ -1036,6 +1049,8 @@ var paymentInfoSet = function() {
|
|
|
,"recipBaseAddr" : $("#orderAmtForm .recipBaseAddr").text()
|
|
|
,"recipDtlAddr" : $("#orderAmtForm .recipDtlAddr").text()
|
|
|
,"delvMemo" : $("#orderAmtForm .delvMemo").text()
|
|
|
+ ,"sexGb" : $("#orderAmtForm .sexGb").text()
|
|
|
+ ,"birthYmd" : $("#orderAmtForm .birthYmd").text()
|
|
|
,"prePntDcAmtYn" : prePntDcAmtYn
|
|
|
,"orderDetailList" : orderDetailList
|
|
|
,"delvFeeCdList" : delvFeeCdList
|
|
|
@@ -1221,7 +1236,7 @@ var dcAmtInfoSet = function() {
|
|
|
$("#btn_point_apply").on("click", function(){
|
|
|
var rmPntAmt = parseInt($("#orderForm input[name='rmPntAmt']").val());
|
|
|
var freegiftUsePnt = parseInt($("#orderAmtForm .freegiftUsePnt").text());
|
|
|
- var pntDcAmt = parseInt($("#orderForm input[name='pntDcAmtStr']").val());
|
|
|
+ var pntDcAmt = parseInt(uncomma($("#orderForm input[name='pntDcAmtStr']").val()));
|
|
|
var realOrdAmt = parseInt($("#orderAmtForm .realOrdSumAmt").text());
|
|
|
var applyPntDcAmt = (realOrdAmt * 40) / 100;
|
|
|
|
|
|
@@ -1267,7 +1282,7 @@ var dcAmtInfoSet = function() {
|
|
|
|
|
|
// 포인트 적용
|
|
|
$("#orderAmtForm .pntDcSumAmt").text(pntDcAmt);
|
|
|
- $("#pntDcAmt").text("-"+pntDcAmt.addComma()+" 원");
|
|
|
+ $("#pntDcAmt").text(getZeroMinusDelAmt(pntDcAmt)+" 원");
|
|
|
|
|
|
// 상품권리렛기능
|
|
|
gfcdUseAmtReset();
|
|
|
@@ -1276,7 +1291,7 @@ var dcAmtInfoSet = function() {
|
|
|
// 1.8.8 상품권 적용버튼 기능
|
|
|
$("#btn_gfcd_apply").on("click", function(){
|
|
|
var rmGfcdAmt = parseInt($("#orderForm input[name='rmGfcdAmt']").val());
|
|
|
- var gfcdUseAmt = parseInt($("#orderForm input[name='gfcdUseAmtStr']").val());
|
|
|
+ var gfcdUseAmt = parseInt(uncomma($("#orderForm input[name='gfcdUseAmtStr']").val()));
|
|
|
|
|
|
if (gagajf.isNull($("#orderForm input[name=gfcdUseAmtStr]").val())) {
|
|
|
mcxDialog.alert("사용할 금액을 입력해주세요.");
|
|
|
@@ -1548,7 +1563,7 @@ var custCpnApplyTemp = function(obj) {
|
|
|
});
|
|
|
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
- $(".modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
|
|
|
+ $(".modal-footer .goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt));
|
|
|
}
|
|
|
|
|
|
// 1.11 쿠폰중복체크 후 적용가능
|
|
|
@@ -1759,7 +1774,12 @@ var custCpnNotApply = function(obj) {
|
|
|
|
|
|
// 1.14 선포인트리셋기능 (사용안함)
|
|
|
var prePntDcAmtReset = function() {
|
|
|
- var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
+ var rmPrePntAmt = 0;
|
|
|
+
|
|
|
+ if ($("#orderForm input[name='rmPrePntAmt']") != null) {
|
|
|
+ parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
+ }
|
|
|
+
|
|
|
$("#orderForm input[name='prePntDcAmt']").val(rmPrePntAmt);
|
|
|
|
|
|
// 선포인트사용여부 체크 후 적용
|
|
|
@@ -1771,13 +1791,13 @@ var prePntDcAmtReset = function() {
|
|
|
|
|
|
// 버튼기능 구현
|
|
|
$(this).on("click", function(){
|
|
|
- var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
+ var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
|
|
|
|
|
|
// 선포인트적용
|
|
|
if ($(this).val() == "Y") {
|
|
|
- $("#prePntDcAmt").text("-"+rmPrePntAmt.addComma()+"원");
|
|
|
+ $("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+" 원");
|
|
|
} else {
|
|
|
- $("#prePntDcAmt").text("0원");
|
|
|
+ $("#prePntDcAmt").text("0 원");
|
|
|
}
|
|
|
|
|
|
// 쿠폰할인금액 SUM
|
|
|
@@ -1785,8 +1805,8 @@ var prePntDcAmtReset = function() {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $("#prePntDcAmt").text("-"+rmPrePntAmt.addComma()+"원");
|
|
|
-
|
|
|
+ $("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+" 원");
|
|
|
+
|
|
|
// 포인트기능 리렛
|
|
|
pntDcAmtReset();
|
|
|
}
|
|
|
@@ -1834,22 +1854,12 @@ var custCpnSumAmtCal = function() {
|
|
|
});
|
|
|
|
|
|
// 상품, 장바구니쿠폰 할인 금액만 합계 적용
|
|
|
- if (goodsCartCpnSumAmt > 0) {
|
|
|
- $(".maxdisc_amount .goodsCartCpnDcAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $(".goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- } else {
|
|
|
- $(".maxdisc_amount .goodsCartCpnDcAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $(".goodsCartCpnSumAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- }
|
|
|
+ $(".maxdisc_amount .goodsCartCpnDcAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt)); // 쿠폰할인금액합계
|
|
|
+ $(".goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt)); // 쿠폰할인금액합계
|
|
|
|
|
|
// 전체쿠폰 할인 금액 합계 적용
|
|
|
- if (cpnDcSumAmt > 0) {
|
|
|
- $(".maxdisc_amount .cpnDcAmt").text("-"+cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $("#couponDcSumAmt").text("-" + cpnDcSumAmt.addComma() + " 원"); // 쿠폰할인금액합계
|
|
|
- } else {
|
|
|
- $(".maxdisc_amount .cpnDcAmt").text(cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
|
|
|
- $("#couponDcSumAmt").text(cpnDcSumAmt.addComma() + " 원"); // 쿠폰할인금액합계
|
|
|
- }
|
|
|
+ $(".maxdisc_amount .cpnDcAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)); // 쿠폰할인금액합계
|
|
|
+ $("#couponDcSumAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)+ " 원"); // 쿠폰할인금액합계
|
|
|
|
|
|
$("#orderAmtForm .cpnDcSumAmt").text(cpnDcSumAmt);
|
|
|
|
|
|
@@ -2213,6 +2223,37 @@ var fnNaverPaymentRequest = function(paymentId) {
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+// 0원이하이면 '-' 처리 삭제 함수
|
|
|
+var getZeroMinusDelAmt = function(tempAmt) {
|
|
|
+ var rtnAmtStr = "";
|
|
|
+
|
|
|
+ if (tempAmt > 0) {
|
|
|
+ rtnAmtStr = "-" + tempAmt.addComma();
|
|
|
+ } else {
|
|
|
+ rtnAmtStr = tempAmt.addComma();
|
|
|
+ }
|
|
|
+
|
|
|
+ return rtnAmtStr;
|
|
|
+}
|
|
|
+
|
|
|
+//START ::: 2021.04.09 숫자입려 천단위 찍기
|
|
|
+var inputNumberFormat = function(obj) {
|
|
|
+ obj.value = comma(uncomma(obj.value));
|
|
|
+}
|
|
|
+
|
|
|
+var comma = function(str) {
|
|
|
+ str = String(str);
|
|
|
+ return str.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, '$1,');
|
|
|
+}
|
|
|
+
|
|
|
+var uncomma = function(str) {
|
|
|
+ str = String(str);
|
|
|
+ return str.replace(/[^\d]+/g, '');
|
|
|
+}
|
|
|
+// 2021.04.09 숫자입려 천단위 찍기 ::: END
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
</th:block>
|