개인통관부호 처리 추가(1)

This commit is contained in:
김현욱
2026-03-03 18:15:11 +09:00
parent 1b0a6f9624
commit 38f85a7409
5 changed files with 95 additions and 4 deletions

View File

@@ -705,6 +705,10 @@
$('#recpntMbtlnb').val($('#mbtlnb').val());
$('.recpntMbtlnb_ordrInfo_text').text($('#mbtlnb').val());
$('#cstmclerCd').val($('#cstmclerCd').val());
$('.cstmclerCd_ordrInfo_text').text($('#cstmclerCd').val());
} else {
let data = {
@@ -723,6 +727,8 @@
$('.recpntNm_ordrInfo_text').text($('#recpntNm').val());
$('#recpntMbtlnb').val(parseJson.dftDlvylc.mbtlnb);
$('.recpntMbtlnb_ordrInfo_text').text($('#recpntMbtlnb').val());
$('#cstmclerCd').val(parseJson.dftDlvylc.cstmclerCd);
$('.cstmclerCd_ordrInfo_text').text($('#cstmclerCd').val());
}
});
@@ -1500,6 +1506,12 @@
html += ' <input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)">';
html += ' </td>';
html += ' </tr>';
html += ' <tr class="">';
html += ' <th> <span class="orderInfo__title">개인통관번호</span></th>';
html += ' <td>';
html += ' <input type="text" name="cstmclerCd" maxlength="13" class="m-input" title="개인통관번호" placeholder="P로 시작하는 13자리 부호를 입력하세요">';
html += ' </td>';
html += ' </tr>';
html += ' <!-- 신규 배송지 선택 시 End -->';
html += ' <tr>';
html += ' <th><span class="orderInfo__title">배송요청사항</span></th>';
@@ -1763,6 +1775,8 @@
$('.presentArea').hide();
$('.presentArea').find('input').prop('disabled', true);
$('.cstmclerArea').hide();
$('.cstmclerArea').find('input').prop('disabled', true);
$('.presentShowArea').show();
$('.presentShowArea').find('input').prop('disabled', false);
@@ -1783,6 +1797,8 @@
if (dlvylcDvCd === 'New') {
$('.presentArea').show();
$('.presentArea').find('input').prop('disabled', false);
$('.cstmclerArea').show();
$('.cstmclerArea').find('input').prop('disabled', false);
$('.presentShowArea').hide();
$('.presentShowArea').find('input').prop('disabled', true);
}
@@ -1833,6 +1849,17 @@
$(form).find('input[name="dlvylcAdresDtl"]').val(data.dtlAdres);
$(form).find('input[name="dlvylcAdres"]').val('01' === $(form).find('input[name="dlvylcAdresDvCd"]').val() ? $(form).find('input[name="dlvylcRnmAdres"]').val() : $(form).find('input[name="dlvylcLnbAdres"]').val());
let dlvylcAreaCd = $(form).find('input[name="dlvylcAreaCd"]').val();
if('JP' === dlvylcAreaCd){
$('.cstmclerArea').hide();
$('.cstmclerArea').find('input').prop('disabled', true);
} else {
$('.cstmclerArea').show();
$('.cstmclerArea').find('input').prop('disabled', false);
}
// 배송지 정보 세팅 이후 결제예정금액 재계산
fn_get_setle_amt();
}
@@ -2701,15 +2728,43 @@
/* 선물하기 > 정합성 검사 종료 */
} else {
// console.log("dlvylcDvCd : ",dlvylcDvCd);
if ('New' === dlvylcDvCd) {
const dlvylcAreaCd2 = $('#dlvylcForm').find('input[name="dlvylcAreaCd"]').val();
console.log("dlvylcAreaCd(new) : ",dlvylcAreaCd2);
$('#dlvylcForm').find('.rqrd').each(function () {
const val = $(this).val();
if (fn_is_empty(val)) {
const name = $(this).attr('name');
const title = $(this).attr('title');
alert(title + '을 입력해 주십시요');
if('JP' !== dlvylcAreaCd2 || 'cstmclerCd' !== name ) {
const title = $(this).attr('title');
alert(title + '을 입력해 주십시요');
$('#dlvylcForm').find('input[name="' + name + '"]').focus();
isValid = false;
return false;
}
}
});
} else {
const dlvylcAreaCd = $('#dlvylcAreaCd').val();
// console.log("dlvylcAreaCd(dft) : ",dlvylcAreaCd);
if('KR' === dlvylcAreaCd){
// console.log("KR");
const val = $('#cstmclerCd').val();
if (fn_is_empty(val)) {
alert('개인통관번호를 입력해 주십시요');
$('#dlvylcForm').find('input[name="' + name + '"]').focus();
@@ -2717,7 +2772,7 @@
return false;
}
});
}
}
}
@@ -3592,6 +3647,28 @@
<span class="orderInfo__text recpntMbtlnb_ordrInfo_text"><c:out value="${dftDlvylc.mbtlnb}"/></span>
</td>
</tr>
<c:choose>
<c:when test="${dftDlvylc.dlvylcAreaCd eq 'KR'}">
<tr class="deliveryAddressDefault">
<th><span class="orderInfo__title">개인통관번호</span></th>
<td>
<input type="hidden" id="cstmclerCd" class="dft" value="<c:out value="${dftDlvylc.cstmclerCd}"/>">
<%-- <span class="orderInfo__text cstmclerCd_ordrInfo_text"><c:out value="${dftDlvylc.cstmclerCd}"/></span>--%>
<c:choose>
<c:when test="${not empty dftDlvylc.cstmclerCd}">
<input type="text" name="cstmclerCd" maxlength="13" class="orderInfo__text cstmclerCd_ordrInfo_text" title="개인통관번호" value="<c:out value="${dftDlvylc.cstmclerCd}"/>" placeholder="배송지 관리에서 입력하세요.">
</c:when>
<c:otherwise>
<input type="text" name="cstmclerCd" maxlength="13" class="orderInfo__text cstmclerCd_ordrInfo_text" title="개인통관번호" value="<c:out value="${dftDlvylc.cstmclerCd}"/>" placeholder="배송지 관리에서 입력하세요." readonly>
</c:otherwise>
</c:choose>
</tr>
</td>
</c:when>
<c:otherwise>
<input type="hidden" id="cstmclerCd" name="cstmclerCd" class="dft" value="<c:out value="${dftDlvylc.cstmclerCd}"/>">
</c:otherwise>
</c:choose>
<!-- 기본 배송지 선택 시 End -->
<!-- 신규 배송지 선택 시 Start -->
<tr class="deliveryAddressNew" style="display:none;">
@@ -3624,6 +3701,12 @@
<input type="text" name="recpntMbtlnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" maxlength="13" class="new rqrd input-text number rqrd_gift" title="휴대폰번호" placeholder="휴대폰번호 입력 (’-’ 없이)" readonly>
</td>
</tr>
<tr class="deliveryAddressNew cstmclerArea" style="display:none;">
<th> <span class="orderInfo__title">개인통관번호</span></th>
<td>
<input type="text" name="cstmclerCd" maxlength="13" class="new rqrd input-text rqrd_gift" title="개인통관번호" placeholder="배송지 관리에서 입력하세요." readonly>
</td>
</tr>
<!-- 신규 배송지 선택 시 End -->
<tr class="presentShowArea" style="display:none;">
<th> <span class="orderInfo__title">선물메세지</span></th>