From df6340658e7fb81dac55dc4c561721b7f64a1d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=8C=80=ED=99=98?= Date: Wed, 4 Feb 2026 11:19:12 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=B0=B0=EC=86=A1=EC=A7=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D/=EC=88=98=EC=A0=95=20-=20=EC=9D=BC=EB=B3=B8?= =?UTF-8?q?=20=EC=A3=BC=EC=86=8C(=EC=9D=BC=EB=B3=B8=EC=96=B4)=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/js/dlvylc/dlvylc.js | 67 +++++++++++++++++++ .../static/js/mngr/js/crm/dlvylc/dlvylc_2.js | 67 +++++++++++++++++++ .../static/mngr/js/crm/dlvylc/dlvylc.js | 67 +++++++++++++++++++ .../static/mngr/js/crm/dlvylc/dlvylc_2.js | 67 +++++++++++++++++++ .../sopmal/mpage/mbr/DlvylcRegistPopupC.jsp | 36 ++++------ .../sopmal/mpage/mbr/DlvylcUpdtPopupU.jsp | 15 +++-- 6 files changed, 292 insertions(+), 27 deletions(-) diff --git a/src/main/resources/static/js/dlvylc/dlvylc.js b/src/main/resources/static/js/dlvylc/dlvylc.js index e1e51372..8185217e 100644 --- a/src/main/resources/static/js/dlvylc/dlvylc.js +++ b/src/main/resources/static/js/dlvylc/dlvylc.js @@ -133,6 +133,7 @@ const fn_move_dlvylc_regpage = function (dftDlvylcAt) { 배송지 등록 ***********************************************/ const fn_insert_dlvylc = function (msg, data, isMobile) { + $("#dlvylcUpdate").remove(); let paramData = null; const registForm = $("#dlvylcRegistForm").serialize(); if (data != null) { @@ -387,8 +388,74 @@ const fn_update_dlvylc = function (pageIndex,msg,isMobile) { 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; + }); } } \ No newline at end of file diff --git a/src/main/resources/static/js/mngr/js/crm/dlvylc/dlvylc_2.js b/src/main/resources/static/js/mngr/js/crm/dlvylc/dlvylc_2.js index ca72fb5d..489ce982 100644 --- a/src/main/resources/static/js/mngr/js/crm/dlvylc/dlvylc_2.js +++ b/src/main/resources/static/js/mngr/js/crm/dlvylc/dlvylc_2.js @@ -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; + }); } } \ No newline at end of file diff --git a/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc.js b/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc.js index c3165aa2..91497d6e 100644 --- a/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc.js +++ b/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc.js @@ -139,6 +139,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) { @@ -326,8 +327,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; + }); } } \ No newline at end of file diff --git a/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc_2.js b/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc_2.js index ca72fb5d..489ce982 100644 --- a/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc_2.js +++ b/src/main/resources/static/mngr/js/crm/dlvylc/dlvylc_2.js @@ -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; + }); } } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcRegistPopupC.jsp b/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcRegistPopupC.jsp index 44b82f9a..48fc7a37 100644 --- a/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcRegistPopupC.jsp +++ b/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcRegistPopupC.jsp @@ -19,27 +19,14 @@ - +
@@ -83,8 +70,9 @@ @@ -93,7 +81,8 @@ @@ -101,6 +90,7 @@ diff --git a/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcUpdtPopupU.jsp b/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcUpdtPopupU.jsp index 0ebd6e3a..ee56b554 100644 --- a/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcUpdtPopupU.jsp +++ b/src/main/webapp/WEB-INF/views/sopmal/mpage/mbr/DlvylcUpdtPopupU.jsp @@ -18,9 +18,13 @@ @@ -40,7 +44,7 @@ -
해당 테이블에 대한 내용
郵便番号* - - + + + 휴대전화번호* 電話番号* - + +

電話番号をハイフンなしで入力してください。

+
+
@@ -68,6 +72,7 @@ " maxlength="7" readonly> +

郵便番号を正しく入力してください。

'' @@ -81,8 +86,9 @@ @@ -91,6 +97,7 @@ " maxlength="13" placeholder="P로 시작하는 13자리 부호를 입력하세요"> +
해당 테이블에 대한 내용
휴대전화번호* 電話番号* - " + " maxlength="13" placeholder="휴대폰번호'-'없이 입력하세요"> +

電話番号をハイフンなしで入力してください。