배송비 계산 수정(1)

This commit is contained in:
김현욱
2026-02-10 16:41:51 +09:00
parent 12ae420a48
commit 1097660b22
10 changed files with 279 additions and 44 deletions

View File

@@ -150,7 +150,11 @@
$('.header').find('h1.header__title').text('주문결제');
const dlvylcZip = $('input[name="dlvylcZip"]').val();
const dlvylcAreaCd = $('input[name="dlvylcAreaCd"]').val();
const prefcd = $('input[name="prefcd"]').val();
localStorage.setItem("dlvylcZip", dlvylcZip);
localStorage.setItem("dlvylcAreaCd", dlvylcAreaCd);
localStorage.setItem("prefcd", prefcd);
const mbrDvCd = $('#mbrDvCd').val();
@@ -280,7 +284,11 @@
}
const dlvylcZip = $('input[name="dlvylcZip"]').val();
const dlvylcAreaCd = $('input[name="dlvylcAreaCd"]').val();
const prefcd = $('input[name="prefcd"]').val();
localStorage.setItem("dlvylcZip", dlvylcZip);
localStorage.setItem("dlvylcAreaCd", dlvylcAreaCd);
localStorage.setItem("prefcd", prefcd);
fn_get_setle_amt();
if ($(this).val() === 'Gift') {
@@ -1087,6 +1095,8 @@
let mngrFreeDlvyUseAt = $(form).find('input[name="mngrFreeDlvyUseAt"]').val();
let dlvylcZip = '';
let dlvylcAreaCd = '';
let prefcd = '';
let recpntNm = '';
let recpntMbtlnb = '';
let dlvylcAdresDvCd = '';
@@ -1097,6 +1107,8 @@
if ('Default' === dlvylcDvCd) {
dlvylcZip = $(form).find('input[name="dlvylcZip"]').val();
dlvylcAreaCd = $(form).find('input[name="dlvylcAreaCd"]').val();
prefcd = $(form).find('input[name="prefcd"]').val();
recpntNm = $(form).find('input[name="recpntNm"]').val();
recpntMbtlnb = $(form).find('input[name="recpntMbtlnb"]').val();
dlvylcAdresDvCd = $(form).find('input[name="dlvylcAdresDvCd"]').val();
@@ -1106,6 +1118,8 @@
dlvyMssageCn = $(form).find('input[name="dlvyMssageCn"]').val();
} else {
dlvylcZip = $(form).find('input[name="dlvylcZip"]').val();
dlvylcAreaCd = $(form).find('input[name="dlvylcAreaCd"]').val();
prefcd = $(form).find('input[name="prefcd"]').val();
recpntNm = $(form).find('input[name="recpntNm"]').val();
recpntMbtlnb = $(form).find('input[name="recpntMbtlnb"]').val();
dlvylcAdresDvCd = $(form).find('input[name="dlvylcAdresDvCd"]').val();
@@ -1124,6 +1138,8 @@
otrCouponSmtmUseAt: otrCouponSmtmUseAt,
mngrFreeDlvyUseAt: mngrFreeDlvyUseAt,
dlvylcZip: dlvylcZip,
dlvylcAreaCd: dlvylcAreaCd,
prefcd: prefcd,
recpntNm: recpntNm,
recpntMbtlnb: recpntMbtlnb,
dlvylcAdresDvCd: dlvylcAdresDvCd,
@@ -1501,6 +1517,8 @@
html += ' <input type="hidden" name="dlvylcAdresDvCd">';
html += ' <input type="hidden" name="dlvylcLnbAdres" title="도로명 or 지명 주소">';
html += ' <input type="hidden" name="dlvylcRnmAdres" title="도로명 or 지명 주소">';
html += ' <input type="hidden" name="dlvylcAreaCd">';
html += ' <input type="hidden" name="prefcd">';
html += ' </div>';
html += ' </div>';
html += ' <div class="userForm__inputBox__item">';
@@ -1802,6 +1820,8 @@
$(form).find('input[name="recpntTelnb"]').val(mbtlnb);
}
$(form).find('input[name="dlvylcZip"]').val(data.postcode);
$(form).find('input[name="dlvylcAreaCd"]').val(data.dlvylcAreaCd);
$(form).find('input[name="prefcd"]').val(data.prefcd);
$(form).find('input[name="dlvylcAdresDvCd"]').val(data.addressType);
$(form).find('input[name="dlvylcLnbAdres"]').val(data.jibunAddress);
$(form).find('input[name="dlvylcRnmAdres"]').val(data.roadAddress);
@@ -1831,6 +1851,8 @@
$(form).find('input[name="recpntTelnb"]').val(mbtlnb);
}
$(form).find('input[name="dlvylcZip"]').val(data.postcode);
$(form).find('input[name="dlvylcAreaCd"]').val(data.dlvylcAreaCd);
$(form).find('input[name="prefcd"]').val(data.prefcd);
$(form).find('input[name="dlvylcAdresDvCd"]').val(data.addressType);
$(form).find('input[name="dlvylcLnbAdres"]').val(data.jibunAddress);
$(form).find('input[name="dlvylcRnmAdres"]').val(data.roadAddress);
@@ -2454,7 +2476,11 @@
/* 결제예정금액 > 결제금액 조회 */
const fn_get_setle_amt = function() {
const dlvylcZip = $('input[name="dlvylcZip"]').val();
const dlvylcAreaCd = $('input[name="dlvylcAreaCd"]').val();
const prefcd = $('input[name="prefcd"]').val();
localStorage.setItem("dlvylcZip", dlvylcZip);
localStorage.setItem("dlvylcAreaCd", dlvylcAreaCd);
localStorage.setItem("prefcd", prefcd);
let setle = {};
@@ -2463,6 +2489,8 @@
setle['goodsList'] = JSON.parse(localStorage.getItem('goodsList'));
setle['enuri'] = JSON.parse(localStorage.getItem('enuri'));
setle['dlvylcZip'] = localStorage.getItem('dlvylcZip');
setle['dlvylcAreaCd'] = localStorage.getItem('dlvylcAreaCd');
setle['prefcd'] = localStorage.getItem('prefcd');
setle['multiOrdrDlvylc'] = JSON.parse(localStorage.getItem('multiOrdrDlvylc'));
setle['ordrTyCd'] = $('input[name="ordrTy"]:checked').val();
@@ -3624,6 +3652,8 @@
</p>
<input type="hidden" name="dlvylcAdresDvCd" value="<c:out value="${dftDlvylc.adresDv}"/>">
<input type="hidden" name="dlvylcZip" value="<c:out value="${dftDlvylc.zip}"/>">
<input type="hidden" name="dlvylcAreaCd" value="<c:out value="${dftDlvylc.dlvylcAreaCd}"/>">
<input type="hidden" name="prefcd" value="<c:out value="${dftDlvylc.prefcd}"/>">
<input type="hidden" name="dlvylcLnbAdres" title="도로명 or 지명 주소" value="<c:out value="${dftDlvylc.lnbAdres}"/>">
<input type="hidden" name="dlvylcRnmAdres" title="도로명 or 지명 주소" value="<c:out value="${dftDlvylc.rnmAdres}"/>">
<input type="hidden" name="dlvylcAdres" class="required" title="주소" value="<c:out value="${dftDlvylc.adres}"/>" >
@@ -3710,6 +3740,8 @@
<input type="hidden" name="dlvylcAdresDvCd">
<input type="hidden" name="dlvylcLnbAdres" title="도로명 or 지명 주소">
<input type="hidden" name="dlvylcRnmAdres" title="도로명 or 지명 주소">
<input type="hidden" name="dlvylcAreaCd">
<input type="hidden" name="prefcd">
</div>
</div>
<div class="userForm__inputBox__item">

View File

@@ -1413,7 +1413,8 @@
</li>
<li>
<span class="cartOrderBox__th">배송비</span>
<span class="cartOrderBox__td"><span id="dlvyAmtSapn" class="comma">0</span><span class="priceUnit">${curUnit}</span></span>
<%-- <span class="cartOrderBox__td"><span id="dlvyAmtSapn" class="comma">0</span><span class="priceUnit">${curUnit}</span></span>--%>
<span class="cartOrderBox__td"><span class="priceUnit">Calculated at next step</span></span>
</li>
<li>
<span class="cartOrderBox__th">총 할인금액</span>