회원가입 오류 수정.
parent
6b018d5276
commit
961f5cffe9
|
|
@ -43,7 +43,9 @@ public class KwmsService {
|
|||
userInfo.setOfcCd(codeMgtService.searchCodeToCategoryAndValue("OFC", positionAry[1]));
|
||||
}
|
||||
userInfo.setTitleCd(codeMgtService.searchCodeToCategoryAndValue("JT", empInfo.getJikgubnm()));
|
||||
userInfo.setOutturnCd(codeMgtService.searchCodeToCategoryAndValue("OTC", empInfo.getKyunggwa()));
|
||||
if(empInfo.getKyunggwa()!=null){
|
||||
userInfo.setOutturnCd(codeMgtService.searchCodeToCategoryAndValue("OTC", empInfo.getKyunggwa()));
|
||||
}
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
empInfo.setBirthdt(
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ $(document).on('click', '#dicCodeSearchBtn', function (){
|
|||
if(dicCode!==''){
|
||||
getJoinForm(dicCode);
|
||||
}else{
|
||||
alert("디지털식별코드를 입력해주세요.")
|
||||
alert("디지털식별코드를 입력해주세요.")
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -124,99 +124,101 @@ function valueCheck(){
|
|||
alert("직책을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
const seriesCd = targetForm.find("#seriesCd").val();
|
||||
if(!seriesCd){
|
||||
alert("직별을 선택해주세요.");
|
||||
return false;
|
||||
if(targetForm.find("#outturnCd").val()){
|
||||
const seriesCd = targetForm.find("#seriesCd").val();
|
||||
if(!seriesCd){
|
||||
alert("직별을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).on('click', '#findPwBtn', function (){
|
||||
if(!$("#fDicCode").val()){
|
||||
alert("공무원식별번호를 입력해주세요.");
|
||||
$('#fDicCode').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fUserId").val()){
|
||||
alert("아이디를 입력해주세요.");
|
||||
$('#fUserId').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fUserNm").val()){
|
||||
alert("이름을 입력해주세요.");
|
||||
$('#fUserNm').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fPhoneNo").val()){
|
||||
alert("휴대폰번호를 입력해주세요.");
|
||||
$('#fPhoneNo').focus();
|
||||
return false;
|
||||
}
|
||||
const dicCode = $("#fDicCode").val();
|
||||
const userId = $("#fUserId").val();
|
||||
const userNm = $("#fUserNm").val();
|
||||
const phoneNo = $("#fPhoneNo").val();
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : JSON.stringify({dicCode:dicCode,userId:userId,userNm:userNm,phoneNo:phoneNo}),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url : "/user/findUser",
|
||||
success : function(data) {
|
||||
if(data != ""){
|
||||
$("#findPasswordModal").modal('hide');
|
||||
$("#changeUserSeq").val(data);
|
||||
$("#changePasswordModal").modal('show');
|
||||
}else{
|
||||
alert("일치하는 정보가 없습니다.")
|
||||
};
|
||||
contentFade("out");
|
||||
},
|
||||
error : function(e) {
|
||||
alert("ajax 통신실패.")
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
alert("공무원식별번호를 입력해주세요.");
|
||||
$('#fDicCode').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fUserId").val()){
|
||||
alert("아이디를 입력해주세요.");
|
||||
$('#fUserId').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fUserNm").val()){
|
||||
alert("이름을 입력해주세요.");
|
||||
$('#fUserNm').focus();
|
||||
return false;
|
||||
}
|
||||
if(!$("#fPhoneNo").val()){
|
||||
alert("휴대폰번호를 입력해주세요.");
|
||||
$('#fPhoneNo').focus();
|
||||
return false;
|
||||
}
|
||||
const dicCode = $("#fDicCode").val();
|
||||
const userId = $("#fUserId").val();
|
||||
const userNm = $("#fUserNm").val();
|
||||
const phoneNo = $("#fPhoneNo").val();
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : JSON.stringify({dicCode:dicCode,userId:userId,userNm:userNm,phoneNo:phoneNo}),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url : "/user/findUser",
|
||||
success : function(data) {
|
||||
if(data != ""){
|
||||
$("#findPasswordModal").modal('hide');
|
||||
$("#changeUserSeq").val(data);
|
||||
$("#changePasswordModal").modal('show');
|
||||
}else{
|
||||
alert("일치하는 정보가 없습니다.")
|
||||
};
|
||||
contentFade("out");
|
||||
},
|
||||
error : function(e) {
|
||||
alert("ajax 통신실패.")
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$(document).on('click', '#changePwBtn', function (){
|
||||
const p1 = document.getElementById('cPw').value;
|
||||
const p2 = document.getElementById('chkPw').value;
|
||||
if(!p1){
|
||||
alert("비밀번호를 입력해주세요.");
|
||||
$('#cPw').focus();
|
||||
return false;
|
||||
}
|
||||
if(!p2){
|
||||
alert("비밀번호확인을 입력해주세요.");
|
||||
$('#chkPw').focus();
|
||||
return false;
|
||||
}
|
||||
if(p1!=p2) {
|
||||
alert("비밀번호가 일치하지 않습니다. 비밀번호를 재확인해주세요.")
|
||||
return false;
|
||||
}
|
||||
if(confirm("비밀번호를 변경하시겠습니까?")){
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#changePasswordFm")[0]);
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : formData,
|
||||
url : "/user/updateUserPw",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
beforeSend: function (xhr){
|
||||
const p1 = document.getElementById('cPw').value;
|
||||
const p2 = document.getElementById('chkPw').value;
|
||||
if(!p1){
|
||||
alert("비밀번호를 입력해주세요.");
|
||||
$('#cPw').focus();
|
||||
return false;
|
||||
}
|
||||
if(!p2){
|
||||
alert("비밀번호확인을 입력해주세요.");
|
||||
$('#chkPw').focus();
|
||||
return false;
|
||||
}
|
||||
if(p1!=p2) {
|
||||
alert("비밀번호가 일치하지 않습니다. 비밀번호를 재확인해주세요.")
|
||||
return false;
|
||||
}
|
||||
if(confirm("비밀번호를 변경하시겠습니까?")){
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#changePasswordFm")[0]);
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : formData,
|
||||
url : "/user/updateUserPw",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
beforeSend: function (xhr){
|
||||
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||
},
|
||||
success : function(result) {
|
||||
alert("비밀번호가 변경되었습니다.");
|
||||
contentFade("out");
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("비밀번호변경이 실패하였습니다.");
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
success : function(result) {
|
||||
alert("비밀번호가 변경되었습니다.");
|
||||
contentFade("out");
|
||||
location.reload();
|
||||
},
|
||||
error : function(xhr, status) {
|
||||
alert("비밀번호변경이 실패하였습니다.");
|
||||
contentFade("out");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
</div>
|
||||
<label for="seriesCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직별</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-select form-select-sm" id="seriesCd" name="seriesCd">
|
||||
<select class="form-select form-select-sm" id="seriesCd" name="seriesCd" th:disabled="${userInfo.outturnCd eq null}">
|
||||
<option value="">--선택--</option>
|
||||
<th:block th:each="code:${seriesList}">
|
||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.seriesCd}"></option>
|
||||
|
|
|
|||
Loading…
Reference in New Issue