fix:외사분실현황 수정
parent
6df5896463
commit
ae1d49cb04
|
|
@ -92,7 +92,11 @@ public class FipTargetController {
|
|||
@GetMapping("/partInfoEditModal")
|
||||
public ModelAndView partInfoEditModal(@AuthenticationPrincipal UserInfo loginUser,PartInfo partInfo) {
|
||||
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("accessAuth", accessAuth);
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ $(document).on('click', '#addPartInfo', function (){
|
|||
$("#partInfoEditModal").modal('show');
|
||||
$("#rentPrice").hide();
|
||||
$("#utilityPrice").hide();
|
||||
changeManager($("#mgtOrgan").val());
|
||||
setUploadDiv();
|
||||
},
|
||||
error:function(){
|
||||
|
|
@ -39,7 +40,16 @@ $(document).on('change', '#utilityType', function (){
|
|||
$(document).on('change', '#mgtOrgan', function (){
|
||||
const ogCd = $(this).val();
|
||||
if(ogCd != ''){
|
||||
$.ajax({
|
||||
changeManager(ogCd);
|
||||
}else{
|
||||
$("#piUserSeq").prop('disabled',true);
|
||||
$("#piUserSeq").val('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function changeManager(ogCd){
|
||||
$.ajax({
|
||||
url: '/target/partInfoSelecBox',
|
||||
data: {
|
||||
ogCd,
|
||||
|
|
@ -53,11 +63,7 @@ $(document).on('change', '#mgtOrgan', function (){
|
|||
error:function(){
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$("#piUserSeq").prop('disabled',true);
|
||||
$("#piUserSeq").val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('change', '#mMgtOrgan', function (){
|
||||
const ogCd = $(this).val();
|
||||
|
|
@ -127,6 +133,7 @@ $(document).on('click', '#savePartInfo', function (){
|
|||
}
|
||||
}
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
document.getElementById("mgtOrgan").disabled = false;
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#partInfoSave")[0]);
|
||||
for(const file of files) {
|
||||
|
|
@ -262,6 +269,7 @@ $(document).on('click', '#updatePartInfo', function (){
|
|||
}
|
||||
}
|
||||
if(confirm("수정하시겠습니까?")){
|
||||
document.getElementById("mMgtOrgan").disabled = false;
|
||||
contentFade("in");
|
||||
const formData = new FormData($("#partInfoUpdate")[0]);
|
||||
for(const file of files) {
|
||||
|
|
@ -346,7 +354,7 @@ $(document).on('click', '.historyInfoTr', function (){
|
|||
}
|
||||
}else{
|
||||
$('#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));
|
||||
})
|
||||
|
||||
$(document).on('click', '#closeModal', function (){
|
||||
$(document).on('click', '.btn-close', function (){
|
||||
location.reload();
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@
|
|||
<div class="mb-2 row">
|
||||
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
||||
<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>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq userOrgan}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<label for="ofcCd" class="col-sm-2 col-form-label text-center">육경서</label>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<div class="mb-2 row">
|
||||
<label for="ogCd" class="col-sm-2 col-form-label text-center">해경서</label>
|
||||
<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>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue