fix : 배송지 등록/수정 - 일본 주소(일본어) 옵션 추가
This commit is contained in:
@@ -150,6 +150,7 @@ const fn_move_dlvylc_regpage_pop = function (isPop, mbrInnb, mbrDvCd, dftDlvylcA
|
||||
배송지 등록 ok
|
||||
***********************************************/
|
||||
const fn_insert_dlvylc = function (mbrInnb, mbrDvCd, msg, data) {
|
||||
$("#dlvylcUpdate").remove();
|
||||
let paramData = null;
|
||||
const registForm = $("#dlvylcRegistForm").serialize();
|
||||
if (data != null) {
|
||||
@@ -336,8 +337,74 @@ const fn_toggle_langHeader = function () {
|
||||
if (id == 'langJp') {
|
||||
$('#cstmclerCd').prop('disabled', true);
|
||||
$('#zip').prop('readonly', false);
|
||||
$('#dtlAdres').attr('placeholder', '以降の住所を入力してください。');
|
||||
$('#mbtlnb').attr('placeholder', '');
|
||||
$('#prefcode').prop('disabled', true);
|
||||
} else {
|
||||
$('#cstmclerCd').prop('disabled', false);
|
||||
$('#zip').prop('readonly', true);
|
||||
$('#dtlAdres').attr('placeholder', '나머지 주소를 입력해 주세요');
|
||||
$('#mbtlnb').attr('placeholder', '휴대폰번호\'-\'없이 입력하세요');
|
||||
$('#prefcode').prop('disabled', false);
|
||||
|
||||
$('#postcodeAlert').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출
|
||||
***********************************************/
|
||||
const fn_select_postcodeJp = function () {
|
||||
$('#postcodeAlert').hide();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=' + $('#zip').val()
|
||||
+'&callback=' + 'fn_set_postcodeJp',
|
||||
dataType: 'jsonp'
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
ibsnet api 호출 콜백 (화면에 주소 결과값 세팅)
|
||||
***********************************************/
|
||||
const fn_set_postcodeJp = function (Data) {
|
||||
if(Data.status == 200) {
|
||||
let result = Data.results[0];
|
||||
|
||||
let adres = result.address1;
|
||||
let dtlAdres = [result.address2, result.address3].join(" ");
|
||||
let prefcode = result.prefcode;
|
||||
|
||||
$("#adres").val(adres);
|
||||
$("#dtlAdres").val(dtlAdres);
|
||||
$("#prefcode").val(prefcode);
|
||||
} else {
|
||||
$('#postcodeAlert').show();
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
배송지 관리 팝업 언어별 form 초기화
|
||||
***********************************************/
|
||||
let dlvylcFormPreValues = {};
|
||||
const fn_clear_dlvylcForm = function () {
|
||||
const tableInputs = $("#dlvylcFormTable").find("input[name]");
|
||||
|
||||
if (Object.keys(dlvylcFormPreValues).length == 0) {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
dlvylcFormPreValues[name] = input.val();
|
||||
input.val("");
|
||||
});
|
||||
} else {
|
||||
tableInputs.each(function () {
|
||||
const input = $(this);
|
||||
const name = input.attr("name");
|
||||
const currentValue = input.val();
|
||||
input.val(dlvylcFormPreValues[name] ?? "");
|
||||
dlvylcFormPreValues[name] = currentValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user