fix : 배송지 등록/수정 - 일본 주소(일본어) 옵션 추가(모바일)

This commit is contained in:
이대환
2026-02-04 17:59:00 +09:00
parent df6340658e
commit 3b8eba8e0b
11 changed files with 155 additions and 75 deletions

View File

@@ -40,7 +40,7 @@ public class BOCrmDlvylcVO extends AbstractVO{
private String telnb;
/** 우편번호 */
@NotBlank(message = "우편번호")
@Length(min=1, max=5)
@Length(min=1, max=7)
private String zip;
/** 도로명,지번 구분*/
private String adresDv;
@@ -53,8 +53,9 @@ public class BOCrmDlvylcVO extends AbstractVO{
/** 상세주소 */
private String dtlAdres;
/** 개인통관부호(개인통관번호) */
@NotBlank(message = "개인통관부호(개인통관번호)")
private String cstmclerCd;
/** 도도부현 코드(일본) */
private String prefcd;
/** 기본배송지여부 */
private String dftDlvylcAt = "N";
/** 최근배송지여부 */

View File

@@ -32,7 +32,7 @@ public class DlvylcVO extends AbstractVO{
private String telnb;
/** 우편번호 */
@NotBlank(message = "우편번호")
@Length(min=1, max=5)
@Length(min=1, max=7)
private String zip;
/** 도로명,지번 구분 */
private String adresDv;
@@ -46,8 +46,9 @@ public class DlvylcVO extends AbstractVO{
@NotBlank(message = "상세주소")
private String dtlAdres;
/** 개인통관부호(개인통관번호) */
@NotBlank(message = "개인통관부호(개인통관번호)")
private String cstmclerCd;
/** 도도부현 코드(일본) */
private String prefcd;
/** 기본배송지여부 */
private String dftDlvylcAt = "N";
/** 최근배송지여부 */

View File

@@ -182,6 +182,7 @@
DLVYLC_AREA_CD,
RECPNT_NM,
ZIP,
PREFCD,
DLVYLC_DC_CN,
LNB_ADRES,
RNM_ADRES,
@@ -229,6 +230,7 @@
TELNB,
MBTLNB,
ZIP,
PREFCD,
ADRES_DV,
LNB_ADRES,
RNM_ADRES,
@@ -250,6 +252,7 @@
#{telnb},
HEX(AES_ENCRYPT(REPLACE(#{mbtlnb},'-',''), '1df5be2f7e90ae36')),
#{zip},
#{prefcd},
#{adresDv},
#{lnbAdres},
#{rnmAdres},
@@ -274,6 +277,7 @@
RECPNT_NM = #{recpntNm},
MBTLNB = HEX(AES_ENCRYPT(REPLACE(#{mbtlnb},'-',''), '1df5be2f7e90ae36')),
ZIP = #{zip},
PREFCD = #{prefcd},
ADRES_DV = #{adresDv},
RNM_ADRES = #{rnmAdres},
LNB_ADRES = #{lnbAdres},

View File

@@ -386,17 +386,17 @@ const fn_update_dlvylc = function (pageIndex,msg,isMobile) {
$('.' + id).show();
if (id == 'langJp') {
$('#cstmclerCd').prop('disabled', true);
$('#zip').prop('readonly', false);
$('#dtlAdres').attr('placeholder', '以降の住所を入力してください。');
$('#mbtlnb').attr('placeholder', '');
$('#prefcode').prop('disabled', true);
$('#mbtlnb').attr('placeholder', '電話番号をハイフンなしで入力してください。');
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#cstmclerCd').prop('disabled', false);
$('#zip').prop('readonly', true);
$('#dtlAdres').attr('placeholder', '나머지 주소를 입력해 주세요');
$('#mbtlnb').attr('placeholder', '휴대폰번호\'-\'없이 입력하세요');
$('#prefcode').prop('disabled', false);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
@@ -430,6 +430,7 @@ const fn_update_dlvylc = function (pageIndex,msg,isMobile) {
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}

View File

@@ -335,17 +335,17 @@ const fn_toggle_langHeader = function () {
$('.' + id).show();
if (id == 'langJp') {
$('#cstmclerCd').prop('disabled', true);
$('#zip').prop('readonly', false);
$('#dtlAdres').attr('placeholder', '以降の住所を入力してください。');
$('#mbtlnb').attr('placeholder', '');
$('#prefcode').prop('disabled', true);
$('#mbtlnb').attr('placeholder', '電話番号をハイフンなしで入力してください。');
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#cstmclerCd').prop('disabled', false);
$('#zip').prop('readonly', true);
$('#dtlAdres').attr('placeholder', '나머지 주소를 입력해 주세요');
$('#mbtlnb').attr('placeholder', '휴대폰번호\'-\'없이 입력하세요');
$('#prefcode').prop('disabled', false);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
@@ -379,6 +379,7 @@ const fn_set_postcodeJp = function (Data) {
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}

View File

@@ -325,17 +325,17 @@ const fn_toggle_langHeader = function () {
$('.' + id).show();
if (id == 'langJp') {
$('#cstmclerCd').prop('disabled', true);
$('#zip').prop('readonly', false);
$('#dtlAdres').attr('placeholder', '以降の住所を入力してください。');
$('#mbtlnb').attr('placeholder', '');
$('#prefcode').prop('disabled', true);
$('#mbtlnb').attr('placeholder', '電話番号をハイフンなしで入力してください。');
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#cstmclerCd').prop('disabled', false);
$('#zip').prop('readonly', true);
$('#dtlAdres').attr('placeholder', '나머지 주소를 입력해 주세요');
$('#mbtlnb').attr('placeholder', '휴대폰번호\'-\'없이 입력하세요');
$('#prefcode').prop('disabled', false);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
@@ -369,6 +369,7 @@ const fn_set_postcodeJp = function (Data) {
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}

View File

@@ -335,17 +335,17 @@ const fn_toggle_langHeader = function () {
$('.' + id).show();
if (id == 'langJp') {
$('#cstmclerCd').prop('disabled', true);
$('#zip').prop('readonly', false);
$('#dtlAdres').attr('placeholder', '以降の住所を入力してください。');
$('#mbtlnb').attr('placeholder', '');
$('#prefcode').prop('disabled', true);
$('#mbtlnb').attr('placeholder', '電話番号をハイフンなしで入力してください。');
$('#cstmclerCd').prop('disabled', true);
$('#prefcode').prop('disabled', false);
} else {
$('#cstmclerCd').prop('disabled', false);
$('#zip').prop('readonly', true);
$('#dtlAdres').attr('placeholder', '나머지 주소를 입력해 주세요');
$('#mbtlnb').attr('placeholder', '휴대폰번호\'-\'없이 입력하세요');
$('#prefcode').prop('disabled', false);
$('#cstmclerCd').prop('disabled', false);
$('#prefcode').prop('disabled', true);
$('#postcodeAlert').hide();
}
@@ -379,6 +379,7 @@ const fn_set_postcodeJp = function (Data) {
$("#adres").val(adres);
$("#dtlAdres").val(dtlAdres);
$("#prefcode").val(prefcode);
$("#adresDv").val("01");
} else {
$('#postcodeAlert').show();
}

View File

@@ -26,6 +26,13 @@
$('[name=dlvylcAreaCd]').on('change', fn_toggle_langHeader)
.on('change', fn_clear_dlvylcForm);
fn_toggle_langHeader();
/*ENTER 키 입력 시 submit 방지*/
$('#dlvylcRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
}
});
});
</script>
<div id="dlvylcRegist" class="modal default" style="max-width: 600px;">

View File

@@ -26,6 +26,13 @@
$('[name=dlvylcAreaCd]').on('change', fn_toggle_langHeader)
.on('change', fn_clear_dlvylcForm);
fn_toggle_langHeader();
/*ENTER 키 입력 시 submit 방지*/
$('#dlvylcRegistForm').on('keydown', function(e) {
if (e.keyCode == 13) {
e.preventDefault();
}
});
});
</script>
<div id="dlvylcUpdate" class="modal default" style="max-width: 600px;">

View File

@@ -24,7 +24,7 @@
<script>
$(document).ready(function () {
/*헤더에 타이틀 set*/
fn_set_header_title("배송지 추가");
fn_set_header_title("배송지 등록 (配送先登録)");
fn_set_event(".telno", 'input', fn_fmt_telno);
@@ -32,6 +32,14 @@
MicroModal.close("successModal");
location.href = '/sopmal/mpage/mbr/selectDlvylcManagePopupForm';
});
$('#mbtlnbAlert').hide();
$('#postcodeAlert').hide();
dlvylcFormPreValues = {};
$('[name=dlvylcAreaCd]').on('change', fn_toggle_langHeader)
.on('change', fn_clear_dlvylcForm);
fn_toggle_langHeader();
});
</script>
<body>
@@ -48,32 +56,44 @@
<form id="dlvylcRegistForm">
<div class="sub-page">
<div class="addressManage">
<div class="userForm">
<div class="custom-radio-container">
<div class="custom-radio is-medium listW chk_on">
<input type="radio" id="langKr" name="dlvylcAreaCd" value="KR" checked>
<label for="langKr">KR</label>
</div>
<div class="custom-radio is-medium listW chk_on">
<input type="radio" id="langJp" name="dlvylcAreaCd" value="JP">
<label for="langJp">JP</label>
</div>
</div>
<div class="userForm" id="dlvylcFormTable">
<div class="userForm__inputBox">
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">배송지명<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">배송지명<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">配送先名<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" name="dlvylcDcCn" title="배송지명"
maxlength="67">
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">받으시는 분<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">받으시는 분<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">お届け先<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" title="받으시는 분" name="recpntNm" maxlength="13">
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">배송지 주소<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">배송지 주소<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">郵便番号<span class="required-asterisk">*</span></div>
<div class="inputAddress">
<div class="inputAddress__postalCode">
<input type="text" class="input-text" id="zip" name="zip" title="우편번호"
maxlength="5" readonly>
<button type="button" class="btn md theme outline"
maxlength="7" readonly>
<button type="button" class="btn md theme outline langKr"
data-micromodal-trigger="modalDiv"
onclick="fn_select_post_mobile(fn_select_dlvylc_postcode, '#postCodeCn', '#modalDiv'); return false;">
우편번호 찾기
</button>
<button type="button" class="btn md theme outline langJp" onclick="fn_select_postcodeJp(); return false;">検索</button>
</div>
<p class="signUp__inputBox__alertText" id="postcodeAlert">郵便番号を正しく入力してください。</p>
<input type="text" class="input-text full" id="adres" name="adres"
maxlength="66" title="주소" readonly>
<input type="text" class="input-text full" id="dtlAdres" name="dtlAdres"
@@ -81,13 +101,22 @@
</div>
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">휴대전화번호<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">휴대전화번호<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">電話番号<span class="required-asterisk">*</span></div>
<div class="inputWithBtn">
<input name="mbtlnb" type="text" class="input-text full telno" title="휴대전화번호"
id="mbtlnb"
maxlength="13" placeholder="휴대폰번호'-'없이 입력하세요">
</div>
<p class="userform__inputBox__alertText langJp" id="mbtlnbAlert">電話番号をハイフンなしで入力してください。</p>
</div>
<div class="userForm__inputBox__item langKr">
<div class="userForm__inputBox__itemTitle">개인통관번호 (개인통관부호)<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" id="cstmclerCd" name="cstmclerCd" title="개인통관번호(개인통관부호)" maxlength="13" placeholder="P로 시작하는 13자리 부호를 입력하세요">
<button type="button" class="btn md theme outline" onclick="window.open('https://unipass.customs.go.kr/per/persIndex.do', '_blank'); return false;">통관번호 조회</button>
<input type="hidden" class="m-input" id="prefcode" name="prefcd">
</div>
</div>
</div>
<div class="userForm__inputBox__item">
<div class="b-checkbox-container userForm__inputBox__checks">
@@ -98,8 +127,6 @@
</label>
</div>
</div>
</div>
</div>
<div class="bottomBtnControls">
<button type="button" class="btn lg full theme" onclick="openModal('dlvyConfirmModal');">
<spring:message code="button.insert"/>하기

View File

@@ -24,7 +24,7 @@
<script>
$(document).ready(function () {
/*헤더에 타이틀 set*/
fn_set_header_title("배송지 수정");
fn_set_header_title("배송지 수정 (配送先変更)");
/* 마이크로 모달 초기화 */
MicroModal.init({
disableScroll: true,
@@ -44,6 +44,14 @@
if($("#mbtlnb").val() !== undefined){
$("#mbtlnb").val(fn_format_mbtlnb($("#mbtlnb").val()));
}
$('#mbtlnbAlert').hide();
$('#postcodeAlert').hide();
dlvylcFormPreValues = {};
$('[name=dlvylcAreaCd]').on('change', fn_toggle_langHeader)
.on('change', fn_clear_dlvylcForm);
fn_toggle_langHeader();
});
</script>
<body>
@@ -60,34 +68,47 @@
<form id="dlvylcUpdtForm">
<div class="sub-page">
<div class="addressManage">
<div class="userForm">
<div class="custom-radio-container">
<div class="custom-radio is-medium listW chk_on">
<input type="radio" id="langKr" name="dlvylcAreaCd" value="KR" <c:if test="${'KR' eq dtlDlvylc.resultVO.dlvylcAreaCd}">checked</c:if>>
<label for="langKr">KR</label>
</div>
<div class="custom-radio is-medium listW chk_on">
<input type="radio" id="langJp" name="dlvylcAreaCd" value="JP" <c:if test="${'JP' eq dtlDlvylc.resultVO.dlvylcAreaCd}">checked</c:if>>
<label for="langJp">JP</label>
</div>
</div>
<div class="userForm" id="dlvylcFormTable">
<div class="userForm__inputBox">
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">배송지명<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">배송지명<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">配送先名<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" name="dlvylcDcCn" title="배송지명"
value="<c:out value = "${dtlDlvylc.resultVO.dlvylcDcCn}" />" maxlength="67">
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">받으시는 분<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">받으시는 분<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">お届け先<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" title="받으시는 분" name="recpntNm"
title="받으시는 분" value="<c:out value="${dtlDlvylc.resultVO.recpntNm}" />" maxlength="13">
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">배송지 주소<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">배송지 주소<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">郵便番号<span class="required-asterisk">*</span></div>
<div class="inputAddress">
<div class="inputAddress__postalCode">
<input type="text" class="input-text" id="zip" name="zip" title="우편번호"
maxlength="5" value="<c:out value = "${dtlDlvylc.resultVO.zip}"/>" readonly>
<button type="button" class="btn md theme outline"
maxlength="7" value="<c:out value = "${dtlDlvylc.resultVO.zip}"/>" readonly>
<button type="button" class="btn md theme outline langKr"
data-micromodal-trigger="modalDiv"
onclick="fn_select_post_mobile(fn_select_dlvylc_postcode, '#postCodeCn', '#modalDiv'); return false;">
우편번호 찾기
</button>
<button type="button" class="btn md theme outline langJp" onclick="fn_select_postcodeJp(); return false;">検索</button>
</div>
<p class="signUp__inputBox__alertText" id="postcodeAlert" style="color: red;">郵便番号を正しく入力してください。</p>
<input type="text" class="input-text full" id="adres" name="adres"
maxlength="66" title="주소" readonly value=<c:choose>
<c:when test = "${dtlDlvylc.resultVO.adresDv eq '01'}">"<c:out value = '${dtlDlvylc.resultVO.rnmAdres}'/>"</c:when>
@@ -98,12 +119,22 @@
</div>
</div>
<div class="userForm__inputBox__item">
<div class="userForm__inputBox__itemTitle">휴대전화번호<span
class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langKr">휴대전화번호<span class="required-asterisk">*</span></div>
<div class="userForm__inputBox__itemTitle langJp">電話番号<span class="required-asterisk">*</span></div>
<div class="inputWithBtn">
<input name="mbtlnb" type="text" class="input-text full telno" title="휴대전화번호" id = "mbtlnb"
value="<c:out value ='${dtlDlvylc.resultVO.mbtlnb}'/>" maxlength="13" placeholder="휴대폰번호'-'없이 입력하세요">
</div>
<p class="userform__inputBox__alertText langJp" id="mbtlnbAlert">電話番号をハイフンなしで入力してください。</p>
</div>
<div class="userForm__inputBox__item langKr">
<div class="userForm__inputBox__itemTitle">개인통관번호 (개인통관부호)<span class="required-asterisk">*</span></div>
<input type="text" class="input-text full" id="cstmclerCd" name="cstmclerCd" title="개인통관번호(개인통관부호)" value="<c:out value = "${dtlDlvylc.resultVO.cstmclerCd}"/>"
maxlength="13" placeholder="P로 시작하는 13자리 부호를 입력하세요">
<button type="button" class="btn md theme outline" onclick="window.open('https://unipass.customs.go.kr/per/persIndex.do', '_blank'); return false;">통관번호 조회</button>
<input type="hidden" class="m-input" id="prefcode" name="prefcd" value="<c:out value = '${dtlDlvylc.resultVO.prefcd}'/>">
</div>
</div>
</div>
<div class="userForm__inputBox__item">
<div class="b-checkbox-container userForm__inputBox__checks">
@@ -123,8 +154,6 @@
</label>
</div>
</div>
</div>
</div>
<div class="bottomBtnControls">
<button type="button" class="btn lg full theme" data-micromodal-trigger="updtConfirmModal">
<spring:message code="button.update"/>하기