fix:외사분실현황 수정
parent
6df5896463
commit
ae1d49cb04
|
|
@ -92,7 +92,11 @@ public class FipTargetController {
|
||||||
@GetMapping("/partInfoEditModal")
|
@GetMapping("/partInfoEditModal")
|
||||||
public ModelAndView partInfoEditModal(@AuthenticationPrincipal UserInfo loginUser,PartInfo partInfo) {
|
public ModelAndView partInfoEditModal(@AuthenticationPrincipal UserInfo loginUser,PartInfo partInfo) {
|
||||||
ModelAndView mav = new ModelAndView("fipTarget/partInfoEditModal");
|
ModelAndView mav = new ModelAndView("fipTarget/partInfoEditModal");
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partInfoList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ $(document).on('click', '#addPartInfo', function (){
|
||||||
$("#partInfoEditModal").modal('show');
|
$("#partInfoEditModal").modal('show');
|
||||||
$("#rentPrice").hide();
|
$("#rentPrice").hide();
|
||||||
$("#utilityPrice").hide();
|
$("#utilityPrice").hide();
|
||||||
|
changeManager($("#mgtOrgan").val());
|
||||||
setUploadDiv();
|
setUploadDiv();
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
@ -39,6 +40,15 @@ $(document).on('change', '#utilityType', function (){
|
||||||
$(document).on('change', '#mgtOrgan', function (){
|
$(document).on('change', '#mgtOrgan', function (){
|
||||||
const ogCd = $(this).val();
|
const ogCd = $(this).val();
|
||||||
if(ogCd != ''){
|
if(ogCd != ''){
|
||||||
|
changeManager(ogCd);
|
||||||
|
}else{
|
||||||
|
$("#piUserSeq").prop('disabled',true);
|
||||||
|
$("#piUserSeq").val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function changeManager(ogCd){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/target/partInfoSelecBox',
|
url: '/target/partInfoSelecBox',
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -53,11 +63,7 @@ $(document).on('change', '#mgtOrgan', function (){
|
||||||
error:function(){
|
error:function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
|
||||||
$("#piUserSeq").prop('disabled',true);
|
|
||||||
$("#piUserSeq").val('');
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('change', '#mMgtOrgan', function (){
|
$(document).on('change', '#mMgtOrgan', function (){
|
||||||
const ogCd = $(this).val();
|
const ogCd = $(this).val();
|
||||||
|
|
@ -127,6 +133,7 @@ $(document).on('click', '#savePartInfo', function (){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("저장하시겠습니까?")){
|
||||||
|
document.getElementById("mgtOrgan").disabled = false;
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#partInfoSave")[0]);
|
const formData = new FormData($("#partInfoSave")[0]);
|
||||||
for(const file of files) {
|
for(const file of files) {
|
||||||
|
|
@ -262,6 +269,7 @@ $(document).on('click', '#updatePartInfo', function (){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(confirm("수정하시겠습니까?")){
|
if(confirm("수정하시겠습니까?")){
|
||||||
|
document.getElementById("mMgtOrgan").disabled = false;
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#partInfoUpdate")[0]);
|
const formData = new FormData($("#partInfoUpdate")[0]);
|
||||||
for(const file of files) {
|
for(const file of files) {
|
||||||
|
|
@ -346,7 +354,7 @@ $(document).on('click', '.historyInfoTr', function (){
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$('#historyFile').empty().append(
|
$('#historyFile').empty().append(
|
||||||
'<input type="text" class="form-control" value="업로드 파일없음." readonly>'
|
'<input type="text" class="form-control" value="업로드 파일없음" readonly>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -389,7 +397,7 @@ $(document).on('click', '.fileDownPartInfo', function (){
|
||||||
window.open(encodeURI(url));
|
window.open(encodeURI(url));
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#closeModal', function (){
|
$(document).on('click', '.btn-close', function (){
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
<div class="mb-2 row">
|
<div class="mb-2 row">
|
||||||
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan">
|
<select class="form-select form-select-sm" id="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq userOrgan}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<div class="mb-2 row">
|
<div class="mb-2 row">
|
||||||
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan">
|
<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue