[BO] 임가등록 오류 수정

This commit is contained in:
kangsunlee
2025-07-18 10:24:29 +09:00
parent a9af5c0baa
commit 777abb225d
2 changed files with 18 additions and 1 deletions

View File

@@ -342,6 +342,11 @@
const checkHouseholdNum = () => {
const f = document.reqForm;
if($('#householdNum').val() === '') {
alert('임가번호를 입력해주세요.');
return;
}
ajaxUtil._ajaxMethod(
'/api/households/check',
{ householdNum : f.householdNum.value },
@@ -381,8 +386,13 @@
function(response) { // 성공
alert("등록이 완료되었습니다.");
location.href = '/households';
console.log("code", response)
},
function (code, rstData) {
console.log("code", code)
console.log("rstData", rstData)
if(code == 422) alert(rstData.responseText);
if(code == 400) alert(rstData.responseJSON.message); //임가번호 중복체크
},