관리자 회원정보 수정 양식 변경.

master
강석 최 2023-02-22 11:08:28 +09:00
parent 300ec5caf5
commit 1a995eb75b
4 changed files with 74 additions and 51 deletions

View File

@ -61,7 +61,7 @@ public class KwmsController {
mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC")); mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC"));
mav.addObject("seriesList", codeMgtService.selectCodeMgtList(userInfo.getOutturnCd())); mav.addObject("seriesList", codeMgtService.selectCodeMgtList(userInfo.getOutturnCd()));
mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG")); mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG"));
mav.addObject("eduGrdList", codeMgtService.selectCodeMgtList("EDU")); mav.addObject("eduGrdList", codeMgtService.selectCodeMgtList("UED"));
}else{ }else{
mav.addObject("joinFlag", "F"); mav.addObject("joinFlag", "F");
mav.addObject("userInfo", empInfo); mav.addObject("userInfo", empInfo);

View File

@ -51,14 +51,6 @@ public class UserMgtController {
@GetMapping("/userEditModal") @GetMapping("/userEditModal")
public ModelAndView userEditModal(UserInfo userInfo){ public ModelAndView userEditModal(UserInfo userInfo){
ModelAndView mav = new ModelAndView("adminPage/userMgt/userEditModal"); ModelAndView mav = new ModelAndView("adminPage/userMgt/userEditModal");
mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG"));
mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC"));
mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT"));
mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC"));
mav.addObject("seriesList", codeMgtService.selectCodeMgtList("SRC"));
mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG"));
mav.addObject("statusList", codeMgtService.selectCodeMgtList("USC"));
mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq())); mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq()));
return mav; return mav;
} }

View File

@ -169,7 +169,9 @@ function saveUserInfo(){
} }
if(confirm(actionMsg+"하시겠습니까?")){ if(confirm(actionMsg+"하시겠습니까?")){
contentFade("in"); contentFade("in");
const formData = new FormData($("#userInfoUpdate")[0]); const form = $("#userInfoUpdate")
form.find('input, select').removeAttr("disabled");
const formData = new FormData(form[0]);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
data : formData, data : formData,

View File

@ -29,148 +29,177 @@
</div> </div>
<div class="mb-3 mt-3 row"> <div class="mb-3 mt-3 row">
<label for="dicCode" class="col-sm-2 col-form-label col-form-label-sm text-center ">디지털식별코드</label> <label for="dicCode" class="col-sm-2 col-form-label col-form-label-sm text-center ">디지털식별코드</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="dicCode" name="dicCode" autocomplete="off" th:value="${userInfo.dicCode}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm" id="dicCode" name="dicCode" autocomplete="off" th:value="${userInfo.dicCode}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="userId" class="col-sm-2 col-form-label col-form-label-sm text-center ">아이디</label> <label for="userId" class="col-sm-2 col-form-label col-form-label-sm text-center ">아이디</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="userId" name="userId" autocomplete="off" th:value="${userInfo.userId}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm" id="userId" name="userId" autocomplete="off" th:value="${userInfo.userId}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
<label for="userNm" class="col-sm-2 col-form-label col-form-label-sm text-center">이름</label> <label for="userNm" class="col-sm-2 col-form-label col-form-label-sm text-center">이름</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class=" form-control form-control-sm" id="userNm" name="userNm" autocomplete="off" th:value="${userInfo.userNm}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class=" form-control form-control-sm" id="userNm" name="userNm" autocomplete="off" th:value="${userInfo.userNm}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row">
<label for="modalPassword" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호</label> <label for="modalPassword" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="password" class="form-control form-control-sm" id="modalPassword" name="password" autocomplete="new-password"> <input type="password" class="form-control form-control-sm" id="modalPassword" name="password" autocomplete="new-password">
<label for="userId" style="font-size: 12px">8~16자 사이의 알파벳, 숫자, 특수문자 조합</label>
</div> </div>
<label for="passwordConfirm" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호 확인</label> <label for="passwordConfirm" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호 확인</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="password" class="form-control form-control-sm" id="passwordConfirm"> <input type="password" class="form-control form-control-sm" id="passwordConfirm">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="phoneNo" class="col-sm-2 col-form-label col-form-label-sm text-center">휴대전화</label> <div class="col-sm-2"></div>
<div class="col-sm-4"> <label for="modalPassword" class="col-sm-4 col-form-label col-form-label-sm" style="font-size: 12px">8~16자 사이의 알파벳, 숫자, 특수문자 조합</label>
<input type="tel" class="form-control form-control-sm" id="phoneNo" name="phoneNo" th:value="${userInfo.phoneNo}">
</div>
<label for="email" class="col-sm-2 col-form-label col-form-label-sm text-center">이메일</label>
<div class="col-sm-4">
<input type="email" class="form-control form-control-sm" id="email" name="email" autocomplete="off" th:value="${userInfo.email}">
</div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">성별</label> <label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">성별</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="sex" name="sex" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <select class="form-select form-select-sm" id="sex" name="sex" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
<option value="SEX002" th:selected="${userInfo.sex eq 'SEX002'}"></option> <option value="SEX002" th:selected="${userInfo.sex eq 'SEX002'}"></option>
<option value="SEX001" th:selected="${userInfo.sex eq 'SEX001'}"></option> <option value="SEX001" th:selected="${userInfo.sex eq 'SEX001'}"></option>
</select> </select>
</div> </div>
<label for="phoneNo" class="col-sm-2 col-form-label col-form-label-sm text-center">휴대전화</label>
<div class="col-sm-2">
<input type="tel" class="form-control form-control-sm" id="phoneNo" name="phoneNo" th:value="${userInfo.phoneNo}" placeholder="-없이 숫자만 입력">
</div>
<label for="email" class="col-sm-2 col-form-label col-form-label-sm text-center">이메일</label>
<div class="col-sm-2">
<input type="email" class="form-control form-control-sm" id="email" name="email" autocomplete="off" th:value="${userInfo.email}">
</div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="birthDate" class="col-sm-2 col-form-label col-form-label-sm text-center">생년월일</label> <label for="birthDate" class="col-sm-2 col-form-label col-form-label-sm text-center">생년월일</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="birthDate" name="birthDate" th:value="${userInfo.birthDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm dateSelector" id="birthDate" name="birthDate" th:value="${userInfo.birthDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
<label for="policeInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">해양경찰배명일</label> <label for="policeInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">해양경찰배명일</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="policeInDate" name="policeInDate" th:value="${userInfo.policeInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm dateSelector" id="policeInDate" name="policeInDate" th:value="${userInfo.policeInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">관서</label> <label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">관서</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="ogCd" name="ogCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <select class="form-select form-select-sm" id="ogCd" name="ogCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${ogList}"> <th:block th:each="code:${session.commonCode.get('OG')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ogCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ogCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<label for="organInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현관서전입일</label> <label for="organInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현관서전입일</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="organInDate" name="organInDate" th:value="${userInfo.organInDate}" readonly> <input type="text" class="form-control form-control-sm dateSelector" id="organInDate" name="organInDate" th:value="${userInfo.organInDate}" readonly>
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="ofcCd" class="col-sm-2 col-form-label col-form-label-sm text-center">부서</label> <label for="ofcCd" class="col-sm-2 col-form-label col-form-label-sm text-center">부서</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="ofcCd" name="ofcCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <select class="form-select form-select-sm" id="ofcCd" name="ofcCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${ofcList}"> <th:block th:each="code:${session.commonCode.get('OFC')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ofcCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ofcCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<label for="ofcInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현부서임용일</label> <label for="ofcInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현부서임용일</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="ofcInDate" name="ofcInDate" th:value="${userInfo.ofcInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm dateSelector" id="ofcInDate" name="ofcInDate" th:value="${userInfo.ofcInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label> <label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="titleCd" name="titleCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <select class="form-select form-select-sm" id="titleCd" name="titleCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${titleList}"> <th:block th:each="code:${session.commonCode.get('JT')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.titleCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.titleCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<label for="titleInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현계급임용일</label> <label for="titleInDate" class="col-sm-2 col-form-label col-form-label-sm text-center">현계급임용일</label>
<div class="col-sm-4"> <div class="col-sm-2">
<input type="text" class="form-control form-control-sm dateSelector" id="titleInDate" name="titleInDate" th:value="${userInfo.titleInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <input type="text" class="form-control form-control-sm dateSelector" id="titleInDate" name="titleInDate" th:value="${userInfo.titleInDate}" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="outturnCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직책</label> <label for="dutyCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직책</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="dutyCd" name="dutyCd"> <select class="form-select form-select-sm" id="dutyCd" name="dutyCd">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${session.commonCode.get('DT')}"> <th:block th:each="code:${session.commonCode.get('DT')}">
<th:block th:if="${code.useChk eq 'T'}"> <option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.dutyCd}"></option>
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.dutyCd}"></option>
</th:block>
</th:block> </th:block>
</select> </select>
</div> </div>
</div>
<div class="row mb-1">
<label for="outturnCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경과</label> <label for="outturnCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경과</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="outturnCd" name="outturnCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}"> <select class="form-select form-select-sm" id="outturnCd" name="outturnCd" th:disabled="${!#strings.isEmpty(userInfo.dicCode)}">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${outturnList}"> <th:block th:each="code:${session.commonCode.get('OTC')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.outturnCd}"></option> <option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.outturnCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<label for="seriesCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직별</label> <label for="seriesCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직별</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="seriesCd" name="seriesCd"> <select class="form-select form-select-sm" id="seriesCd" name="seriesCd">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${session.commonCode.get(userInfo.outturnCd)}"> <th:block th:each="code:${session.commonCode.get(userInfo.outturnCd)}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.seriesCd}"></option> <option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.seriesCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
</div> </div>
<div class="row mb-1"> <div class="row mb-1">
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어특채</label> <label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어특채</label>
<div class="col-sm-4"> <div class="col-sm-2">
<select class="form-select form-select-sm" id="languageCd" name="languageCd"> <select class="form-select form-select-sm" id="languageCd" name="languageCd">
<option value="">--선택--</option> <option value="">--선택--</option>
<th:block th:each="code:${languageList}"> <th:block th:each="code:${session.commonCode.get('LNG')}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.languageCd}"></option> <option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.languageCd}"></option>
</th:block> </th:block>
</select> </select>
</div> </div>
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">구사 외국어</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" name="useLanguage" th:value="${userInfo.useLanguage}">
</div>
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">수준</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="languageGrd">
<option value="">해당없음</option>
<option value="1" th:selected="${userInfo.languageGrd eq '1'}"></option>
<option value="2" th:selected="${userInfo.languageGrd eq '2'}"></option>
<option value="3" th:selected="${userInfo.languageGrd eq '3'}"></option>
</select>
</div>
</div>
<div class="row mb-1">
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">학력사항</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" name="educationGrd">
<option value="">해당없음</option>
<th:block th:each="code:${session.commonCode.get('UED')}">
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.educationGrd}"></option>
</th:block>
</select>
</div>
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">학교</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" name="school" th:value="${userInfo.school}">
</div>
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">전공</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" name="specialism" th:value="${userInfo.specialism}">
</div>
</div> </div>
</form> </form>
</div> </div>