사용자 상태 표시

main
이범준 4 months ago
parent 74309ad81e
commit 515a69e282

@ -99,11 +99,13 @@ SELECT A.USER_ID
<select id="getUserList" parameterType="map" resultType="dataobject">
/* 사용자 목록 조회(userMapper.getUserList) */
<include refid="selectUsers"/></select>
<include refid="selectUsers"/>
</select>
<select id="getUsers" parameterType="map" resultMap="userRow">
/* 사용자 가져오기(userMapper.getUsers) */
<include refid="selectUsers"/></select>
<include refid="selectUsers"/>
</select>
<select id="getUser" parameterType="map" resultMap="userRow">
/* 사용자 계정 가져오기(userMapper.getUser) */
@ -239,6 +241,7 @@ UPDATE TB_USER
, DEPT_CD = #{deptCode}
, CRTFC_DN = #{certificateDn}
, STTS = #{status}
<if test='"D" == status'>, USE_YN = 'N'</if>
, MDFCN_DT =<include refid="utility.now" />
, MDFR = #{modifiedBy}
WHERE USER_ID = #{id}</update>

@ -154,6 +154,10 @@
<input name="status" value="A" type="radio" data-map="STTS" class="form-check-input"/>
<label class="form-check-label" for="applied">신청</label>
</div>
<div class="form-check form-check-inline">
<input name="status" value="D" type="radio" data-map="STTS" class="form-check-input"/>
<label class="form-check-label" for="removed">삭제</label>
</div>
</c:if>
<c:if test='${!currentUser.hasAuthorities("ROLE_ADMIN")}'>
<input name="status" type="hidden" data-map="STTS" class="form-control" placeholder="상태"/>
@ -209,6 +213,14 @@ infoPrefixControl.setInfo = (obj) => {
$("#infoPrefix-form input[name='account']").prop("readonly", !create);
$("#infoPrefix-form input[name='name']").prop("readonly", !create);
if(create){
$("#infoPrefix-form :radio[name='status'][value='D']").attr("hidden","hidden");
$("#infoPrefix-form label[for='removed']").attr("hidden","hidden");
} else {
$("#infoPrefix-form :radio[name='status'][value='D']").removeAttr("hidden");
$("#infoPrefix-form label[for='removed']").removeAttr("hidden");
}
$("#infoPrefix-form input[type='password']").each(function(){
let password = $(this).prop("required", create);
let div = password.parent().parent().parent();
@ -233,7 +245,15 @@ infoPrefixControl.setInfo = (obj) => {
mobilePhoneNoDiv.attr("hidden","hidden");
}
$("#infoPrefix-form label[for='STTS']").html(obj.data.STTS == "P" ? "승인" : "신청");
let stts = "";
if(obj.data.STTS == "D"){
stts = "삭제";
} else if(obj.data.STTS == "P"){
stts = "승인";
} else {
stts = "신청";
}
$("#infoPrefix-form label[for='STTS']").html(stts);
$("#infoPrefix-form").find("input,select")
.change(function() {

@ -26,6 +26,7 @@
<thead id="${infoPrefix}Thead">
<tr>
<th tabindex="0" style="width: 158.828px; text-align:center;"><input onchange="${infoPrefix}Control.select(this.checked);" type="checkbox" class="form-check-input"></th>
<th class="sorting" style="width: 146.156px;">상태</th>
<th class="sorting" style="width: 146.156px;">사용자구분</th>
<th class="sorting" style="width: 146.156px;">기관</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">계정</th>
@ -41,6 +42,7 @@
<template id="${infoPrefix}Row">
<tr data-key="{USER_ID}">
<td style="text-align:center;"><input value="{USER_ID}" onchange="${infoPrefix}Control.select('{USER_ID}', this.checked);" type="checkbox" class="form-check-input"></td>
<td {onclick} {ondblclick}>{STTS_NM}</td>
<td {onclick} {ondblclick}>{USER_SE_NM}</td>
<td {onclick} {ondblclick}>{INST_NM}</td>
<td {onclick} {ondblclick}>{USER_ACNT}</td>
@ -53,7 +55,7 @@
</template>
<template id="${infoPrefix}NotFound">
<tr class="odd">
<td valign="top" colspan="8" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="10" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>

Loading…
Cancel
Save