fix: 관리자인 경우 등록, 변경 및 삭제 기능 disable 처리

dev
Jonguk. Lim 4 months ago
parent 75e8416226
commit 1812bf52b8

@ -89,8 +89,9 @@ spring:
datasource: datasource:
hikari: hikari:
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy #driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
jdbc-url: jdbc:log4jdbc:mariadb://211.119.124.9:4407/adds?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.9:4407/adds?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false
username: addsweb username: addsweb
password: addsweb1234 password: addsweb1234
auto-commit: false auto-commit: false

@ -218,9 +218,10 @@
$("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", true); $("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", true);
return; return;
} }
$("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", false); if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", false); $("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", false);
$("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", false);
}
let key = item.data.dscdmng_id; let key = item.data.dscdmng_id;
$("#tbody--${pageName}").setCurrentRow(key); $("#tbody--${pageName}").setCurrentRow(key);

@ -274,18 +274,19 @@
$P.detailControl.query = { "schDscdmngId" : dscdmngId}; $P.detailControl.query = { "schDscdmngId" : dscdmngId};
$P.detailControl.load(1); $P.detailControl.load(1);
if(item.data.PRGRS_STTS_CD == '21'){ if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnPrgsSttus--${pageName}").prop("disabled", false); if(item.data.PRGRS_STTS_CD == '21'){
}else{ $("#btnPrgsSttus--${pageName}").prop("disabled", false);
$("#btnPrgsSttus--${pageName}").prop("disabled", true); }else{
} $("#btnPrgsSttus--${pageName}").prop("disabled", true);
}
if(item.data.PRGRS_STTS_CD == '06' || item.data.PRGRS_STTS_CD == '21'){ if(item.data.PRGRS_STTS_CD == '06' || item.data.PRGRS_STTS_CD == '21'){
$("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", false); $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", false);
}else{ }else{
$("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", true); $("#btnCreateDsuseMgtMapping--${pageName}").prop("disabled", true);
}
} }
}; };
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트

@ -224,8 +224,6 @@
if (!item) return; if (!item) return;
$P.bsshFormFields.set($P.control, item); $P.bsshFormFields.set($P.control, item);
// 업무구분에 따른 URL 변경
//$P.fnSetURL(item.data.bsshCd);
} }
$P.productControl.onCurrentChange = item => { $P.productControl.onCurrentChange = item => {
@ -233,8 +231,6 @@
// Dataset 셋팅 // Dataset 셋팅
$P.productFormFields.set($P.productControl, item); $P.productFormFields.set($P.productControl, item);
// 업무구분에 따른 URL 변경
//$P.fnSetURL(item.data.bsshCd);
} }
// 저장 callback // 저장 callback
@ -389,13 +385,6 @@
$P.control.load(1); $P.control.load(1);
} }
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
// $P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록
// $P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정
}
// 전자우편 안내문 등록 버튼 이벤트
$P.fnSearchBssh = (title) => { $P.fnSearchBssh = (title) => {
$P.control.getBsshInfo(); $P.control.getBsshInfo();
} }
@ -547,7 +536,9 @@
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true);
}
} }

@ -643,6 +643,11 @@
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); $("#schDateTo--${pageName}").datepicker("setDate", new Date());
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");
if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$('#btnCreateDsuseMGT--${pageName}').prop('disabled', true);
$('#btnRemoveDsuseMGT--${pageName}').prop('disabled', true);
}
} }
/************************************************************************** /**************************************************************************

@ -52,7 +52,8 @@
<input type="text" class="form-control w-45 form-date" id="dsuseDe--${pageName}" name="dsuseDe" data-fmt-type="day" data-map="dsuseDe" autocomplete="off" title="종료 날짜 선택" /> <input type="text" class="form-control w-45 form-date" id="dsuseDe--${pageName}" name="dsuseDe" data-fmt-type="day" data-map="dsuseDe" autocomplete="off" title="종료 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div> </div>
<div class="col-md-6"> <div class="col-md-4"></div>
<div class="col-md-4">
<label for="dsuseSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기구분</label> <label for="dsuseSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기구분</label>
<select class="form-select" id="dsuseSeCd--${pageName}" name="dsuseSeCd"> <select class="form-select" id="dsuseSeCd--${pageName}" name="dsuseSeCd">
<c:forEach items="${ADDS03}" var="item"> <c:forEach items="${ADDS03}" var="item">
@ -60,7 +61,7 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-md-6"> <div class="col-md-4">
<label for="dsuseMthCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기방법</label> <label for="dsuseMthCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기방법</label>
<select class="form-select" id="dsuseMthCd--${pageName}" name="dsuseMthCd"> <select class="form-select" id="dsuseMthCd--${pageName}" name="dsuseMthCd">
<c:forEach items="${ADDS05}" var="item"> <c:forEach items="${ADDS05}" var="item">
@ -68,9 +69,9 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-md-10"> <div class="col-md-8">
<label for="dsuseLoc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기장소</label> <label for="dsuseLoc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기장소</label>
<input type="text" class="form-control w-80" id="dsuseLoc--${pageName}" name="dsuseLoc" data-map="dsuseLoc"> <input type="text" class="form-control w-30" id="dsuseLoc--${pageName}" name="dsuseLoc" data-map="dsuseLoc">
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<span class="d-inline-flex"> <span class="d-inline-flex">
@ -454,7 +455,9 @@
initDatepicker("frmEdit--${pageName}"); // 달력 초기화 initDatepicker("frmEdit--${pageName}"); // 달력 초기화
if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true);
}
} }

@ -271,11 +271,16 @@
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.detailControl.onCurrentChange = (item) => { $P.detailControl.onCurrentChange = (item) => {
if (!item) return; if (!item){
$('#btnCreateDsuseMGT--${pageName}').prop('disabled', true);
return;
}
let key = item.data.DSCDMNG_SN; let key = item.data.DSCDMNG_SN;
$("#tbody--${pageName}Detail").setCurrentRow(key); $("#tbody--${pageName}Detail").setCurrentRow(key);
if(!${currentUser.hasAuthorities("ROLE_MANAGER")} && !${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$('#btnCreateDsuseMGT--${pageName}').prop('disabled', false);
}
}; };
// 신청서 정보 dialog // 신청서 정보 dialog
@ -560,7 +565,6 @@
$('#schSttsCd--${pageName}').val('01'); $('#schSttsCd--${pageName}').val('01');
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");
} }
/************************************************************************** /**************************************************************************
* 최초 실행 함수 * 최초 실행 함수
**************************************************************************/ **************************************************************************/

Loading…
Cancel
Save