fix : SRI 작업완료
parent
0c02c373ba
commit
2ab3c28587
|
|
@ -88,7 +88,8 @@ public class SecurityConfig{
|
||||||
"/affairResult/**",
|
"/affairResult/**",
|
||||||
"/faStatistics/**",
|
"/faStatistics/**",
|
||||||
"/translator/**",
|
"/translator/**",
|
||||||
"/faisp/**"
|
"/faisp/**",
|
||||||
|
"/sri/**"
|
||||||
).hasRole(Role.USER.name()) // USER 접근 허용
|
).hasRole(Role.USER.name()) // USER 접근 허용
|
||||||
.antMatchers(
|
.antMatchers(
|
||||||
"/authMgt/**",
|
"/authMgt/**",
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,9 @@ package com.dbnt.faisp.main.fpiMgt.sri;
|
||||||
|
|
||||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||||
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
||||||
import com.dbnt.faisp.main.faRpt.model.FaRptBoard;
|
|
||||||
import com.dbnt.faisp.main.faRpt.model.FaRptReadUser;
|
import com.dbnt.faisp.main.faRpt.model.FaRptReadUser;
|
||||||
import com.dbnt.faisp.main.faRpt.service.FaRptService;
|
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.model.Sri;
|
import com.dbnt.faisp.main.fpiMgt.sri.model.Sri;
|
||||||
|
import com.dbnt.faisp.main.fpiMgt.sri.model.SriReadUser;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.service.SriService;
|
import com.dbnt.faisp.main.fpiMgt.sri.service.SriService;
|
||||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -22,7 +21,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/sri")
|
@RequestMapping("/sri")
|
||||||
public class SriController {
|
public class SriController {
|
||||||
private final FaRptService faRptService;
|
|
||||||
private final SriService sriService;
|
private final SriService sriService;
|
||||||
private final AuthMgtService authMgtService;
|
private final AuthMgtService authMgtService;
|
||||||
private final CodeMgtService codeMgtService;
|
private final CodeMgtService codeMgtService;
|
||||||
|
|
@ -34,7 +33,7 @@ public class SriController {
|
||||||
if(sri.getActiveTab()==null){
|
if(sri.getActiveTab()==null){
|
||||||
sri.setActiveTab("send");
|
sri.setActiveTab("send");
|
||||||
}
|
}
|
||||||
mav.addObject("searchUrl", "/faRpt/faRptBoard");
|
mav.addObject("searchUrl", "/sri/sriBoard");
|
||||||
String accessAuth = authMgtService.selectAccessConfigList
|
String accessAuth = authMgtService.selectAccessConfigList
|
||||||
(loginUser.getUserSeq(), "/sri/sriBoard").get(0).getAccessAuth();
|
(loginUser.getUserSeq(), "/sri/sriBoard").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
@ -67,20 +66,19 @@ public class SriController {
|
||||||
public ModelAndView faRptEditModal(@AuthenticationPrincipal UserInfo loginUser, Sri sri){
|
public ModelAndView faRptEditModal(@AuthenticationPrincipal UserInfo loginUser, Sri sri){
|
||||||
ModelAndView mav = new ModelAndView("sri/sriEditModal");
|
ModelAndView mav = new ModelAndView("sri/sriEditModal");
|
||||||
if(sri.getFaSriKey()!=null){
|
if(sri.getFaSriKey()!=null){
|
||||||
//faRptBoard = faRptService.selectFaRptBoard(faRptBoard.getFaRptKey(), null);
|
sri = sriService.selectFaSriBoard(sri.getFaSriKey(), null);
|
||||||
}else{
|
}else{
|
||||||
/*
|
if(sri.getRefKey()!=null){
|
||||||
if(faRptBoard.getRefKey()!=null){
|
SriReadUser readUser = new SriReadUser();
|
||||||
FaRptReadUser readUser = new FaRptReadUser();
|
readUser.setUserSeq(sri.getWrtUserSeq());
|
||||||
readUser.setUserSeq(faRptBoard.getWrtUserSeq());
|
readUser.setOgCd(sri.getWrtOrgan());
|
||||||
readUser.setOgCd(faRptBoard.getWrtOrgan());
|
readUser.setOfcCd(sri.getWrtPart());
|
||||||
readUser.setOfcCd(faRptBoard.getWrtPart());
|
readUser.setTitleCd(sri.getWrtTitle());
|
||||||
readUser.setTitleCd(faRptBoard.getWrtUserGrd());
|
readUser.setUserNm(sri.getWrtUserNm());
|
||||||
readUser.setUserNm(faRptBoard.getWrtUserNm());
|
sri.setReadUserList(new ArrayList<>());
|
||||||
faRptBoard.setReadUserList(new ArrayList<>());
|
sri.getReadUserList().add(readUser);
|
||||||
faRptBoard.getReadUserList().add(readUser);
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
sri.setWrtUserSeq(loginUser.getUserSeq());
|
sri.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
sri.setWrtOrgan(loginUser.getOgCd());
|
sri.setWrtOrgan(loginUser.getOgCd());
|
||||||
sri.setWrtPart(loginUser.getOfcCd());
|
sri.setWrtPart(loginUser.getOfcCd());
|
||||||
|
|
@ -120,6 +118,11 @@ public class SriController {
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sriDelete")
|
||||||
|
public void sriDelete(@AuthenticationPrincipal UserInfo loginUser, @RequestBody List<Sri> sri){
|
||||||
|
sriService.sriDelete(sri);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ public class Sri extends BaseModel {
|
||||||
@Column(name = "wrt_dt")
|
@Column(name = "wrt_dt")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
private LocalDateTime wrtDt;
|
private LocalDateTime wrtDt;
|
||||||
|
@Column(name = "ref_key")
|
||||||
|
private Integer refKey;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private Integer receiveUserSeq;
|
private Integer receiveUserSeq;
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,6 @@ package com.dbnt.faisp.main.fpiMgt.sri.service;
|
||||||
|
|
||||||
import com.dbnt.faisp.config.BaseService;
|
import com.dbnt.faisp.config.BaseService;
|
||||||
import com.dbnt.faisp.config.FileInfo;
|
import com.dbnt.faisp.config.FileInfo;
|
||||||
import com.dbnt.faisp.main.faRpt.mapper.FaRptMapper;
|
|
||||||
import com.dbnt.faisp.main.faRpt.model.FaRptBoard;
|
|
||||||
import com.dbnt.faisp.main.faRpt.model.FaRptFile;
|
|
||||||
import com.dbnt.faisp.main.faRpt.model.FaRptReadUser;
|
|
||||||
import com.dbnt.faisp.main.faRpt.model.HashTagLinkFaRpt;
|
|
||||||
import com.dbnt.faisp.main.faRpt.repository.FaRptBoardRepository;
|
|
||||||
import com.dbnt.faisp.main.faRpt.repository.FaRptFileRepository;
|
|
||||||
import com.dbnt.faisp.main.faRpt.repository.FaRptReadUserRepository;
|
|
||||||
import com.dbnt.faisp.main.faRpt.repository.HashTagLinkFaRptRepository;
|
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.mapper.SriMapper;
|
import com.dbnt.faisp.main.fpiMgt.sri.mapper.SriMapper;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.model.Sri;
|
import com.dbnt.faisp.main.fpiMgt.sri.model.Sri;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.model.SriFile;
|
import com.dbnt.faisp.main.fpiMgt.sri.model.SriFile;
|
||||||
|
|
@ -18,8 +9,9 @@ import com.dbnt.faisp.main.fpiMgt.sri.model.SriReadUser;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriFileRepository;
|
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriFileRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriReadUserRepository;
|
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriReadUserRepository;
|
||||||
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriRepository;
|
import com.dbnt.faisp.main.fpiMgt.sri.repository.SriRepository;
|
||||||
import com.dbnt.faisp.main.hashTag.service.HashTagService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -32,17 +24,17 @@ import java.util.UUID;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SriService extends BaseService {
|
public class SriService extends BaseService {
|
||||||
private final HashTagService hashTagService;
|
|
||||||
private final FaRptBoardRepository faRptBoardRepository;
|
|
||||||
private final FaRptFileRepository faRptFileRepository;
|
|
||||||
private final FaRptReadUserRepository faRptReadUserRepository;
|
|
||||||
private final HashTagLinkFaRptRepository hashTagLinkFaRptRepository;
|
|
||||||
private final FaRptMapper faRptMapper;
|
|
||||||
private final SriRepository sriRepository;
|
private final SriRepository sriRepository;
|
||||||
private final SriReadUserRepository sriReadUserRepository;
|
private final SriReadUserRepository sriReadUserRepository;
|
||||||
private final SriFileRepository sriFileRepository;
|
private final SriFileRepository sriFileRepository;
|
||||||
private final SriMapper sriMapper;
|
private final SriMapper sriMapper;
|
||||||
|
|
||||||
|
@Value("${file.dir}")
|
||||||
|
protected String fileDir;
|
||||||
|
@Value("${file.dir.sri}")
|
||||||
|
protected String sriDir;
|
||||||
|
|
||||||
|
|
||||||
public List<Sri> selectSriList(Sri sri) {
|
public List<Sri> selectSriList(Sri sri) {
|
||||||
return sriMapper.selectSriList(sri);
|
return sriMapper.selectSriList(sri);
|
||||||
|
|
@ -62,7 +54,7 @@ public class SriService extends BaseService {
|
||||||
saveUploadFiles(faSriKey, sri.getMultipartFileList());
|
saveUploadFiles(faSriKey, sri.getMultipartFileList());
|
||||||
}
|
}
|
||||||
if(sri.getReadUserList() != null){
|
if(sri.getReadUserList() != null){
|
||||||
saveFaRptReadUser(faSriKey, sri.getReadUserList());
|
saveSriReadUser(faSriKey, sri.getReadUserList());
|
||||||
}
|
}
|
||||||
|
|
||||||
return faSriKey;
|
return faSriKey;
|
||||||
|
|
@ -88,7 +80,7 @@ public class SriService extends BaseService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void saveFaRptReadUser(Integer faSriKey, List<SriReadUser> readUserList) {
|
private void saveSriReadUser(Integer faSriKey, List<SriReadUser> readUserList) {
|
||||||
sriReadUserRepository.deleteByFaSriKey(faSriKey);
|
sriReadUserRepository.deleteByFaSriKey(faSriKey);
|
||||||
for(SriReadUser readUser: readUserList){
|
for(SriReadUser readUser: readUserList){
|
||||||
readUser.setFaSriKey(faSriKey);
|
readUser.setFaSriKey(faSriKey);
|
||||||
|
|
@ -101,7 +93,7 @@ public class SriService extends BaseService {
|
||||||
int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1);
|
int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1);
|
||||||
for(MultipartFile file: multipartFileList){
|
for(MultipartFile file: multipartFileList){
|
||||||
String saveName = UUID.randomUUID().toString();
|
String saveName = UUID.randomUUID().toString();
|
||||||
String path = locationPath+File.separator+"faRpt"+File.separator;
|
String path = fileDir+sriDir;
|
||||||
saveFile(file, new File(path+File.separator+saveName));
|
saveFile(file, new File(path+File.separator+saveName));
|
||||||
|
|
||||||
String originalFilename = file.getOriginalFilename();
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
|
@ -132,6 +124,15 @@ public class SriService extends BaseService {
|
||||||
return sriFileRepository.findById(new SriFile.SriFileId(faSriKey, fileSeq)).orElse(null);
|
return sriFileRepository.findById(new SriFile.SriFileId(faSriKey, fileSeq)).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void sriDelete(List<Sri> sri) {
|
||||||
|
for(Sri sriData : sri) {
|
||||||
|
Sri dbSri = sriRepository.findById(sriData.getFaSriKey()).orElse(null);
|
||||||
|
dbSri.setStatus("DST008");
|
||||||
|
sriRepository.save(dbSri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ file.dir.equip=/equip
|
||||||
file.dir.sailor=sailor
|
file.dir.sailor=sailor
|
||||||
file.dir.affair=affair
|
file.dir.affair=affair
|
||||||
file.dir.editor=editor
|
file.dir.editor=editor
|
||||||
|
file.dir.sri=/sri
|
||||||
|
|
||||||
editor.img.view=/file/editorFileDisplay?fileNm=
|
editor.img.view=/file/editorFileDisplay?fileNm=
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ function getSriEditModal(faSriKey){
|
||||||
dataType:"html",
|
dataType:"html",
|
||||||
success: function(html){
|
success: function(html){
|
||||||
$("#sriEditModalContent").empty().append(html)
|
$("#sriEditModalContent").empty().append(html)
|
||||||
$("#sriEditModal").modal('show');
|
|
||||||
$("#faSriEdate").datepicker({
|
$("#faSriEdate").datepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd",
|
||||||
language: "ko",
|
language: "ko",
|
||||||
|
|
@ -31,6 +30,7 @@ function getSriEditModal(faSriKey){
|
||||||
})*/
|
})*/
|
||||||
CrossEditor.EditorStart();
|
CrossEditor.EditorStart();
|
||||||
setUploadDiv();
|
setUploadDiv();
|
||||||
|
$("#sriEditModal").modal('show');
|
||||||
},
|
},
|
||||||
error:function(){
|
error:function(){
|
||||||
|
|
||||||
|
|
@ -69,9 +69,22 @@ $(document).on('click', '#saveSriBtn', function (){
|
||||||
})
|
})
|
||||||
|
|
||||||
function saveSri(faSriState){
|
function saveSri(faSriState){
|
||||||
if(contentCheck()){
|
if(faSriState == 'DST001'){
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("임시저장하시겠습니까?")){
|
||||||
$("#status").val(faSriState);
|
save(faSriState);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(contentCheck()){
|
||||||
|
if(confirm("저장하시겠습니까?")){
|
||||||
|
save(faSriState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save(faSriState){
|
||||||
|
$("#status").val(faSriState);
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#sriEditForm")[0]);
|
const formData = new FormData($("#sriEditForm")[0]);
|
||||||
for(const file of files) {
|
for(const file of files) {
|
||||||
|
|
@ -96,27 +109,31 @@ function saveSri(faSriState){
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
alert("저장되었습니다.");
|
if(faSriState == 'DST001'){
|
||||||
|
alert("임시저장되었습니다.");
|
||||||
|
}else{
|
||||||
|
alert("저장되었습니다.");
|
||||||
|
}
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
$("#sriEditModal").modal('hide');
|
$("#sriEditModal").modal('hide');
|
||||||
//getFaRptViewModal(result);
|
getSriViewModal(result);
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("저장에 실패하였습니다.")
|
if(faSriState == 'DST001'){
|
||||||
|
alert("임시저장에 실패하였습니다.")
|
||||||
|
}else{
|
||||||
|
alert("저장에 실패하였습니다.")
|
||||||
|
}
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '.faSriTr', function (){
|
$(document).on('click', '.faSriTr', function (event){
|
||||||
const chkBox = $(this).find(".rowChkBox");
|
const target = event.target;
|
||||||
if(chkBox.length>0){
|
if(!(target.className === "sriChk" ||$(target).parents("td").length>0)){
|
||||||
$(".trChkBox").prop("checked", false);
|
getSriViewModal(Number($(this).find(".faSriKey").val()));
|
||||||
chkBox[0].checked = !chkBox[0].checked;
|
}
|
||||||
}
|
|
||||||
getSriViewModal(Number($(this).find(".faSriKey").val()));
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function getSriViewModal(faSriKey){
|
function getSriViewModal(faSriKey){
|
||||||
|
|
@ -145,8 +162,77 @@ $(document).on('click', '#allTab', function (){
|
||||||
location.href = "/sri/sriBoard?activeTab=all";
|
location.href = "/sri/sriBoard?activeTab=all";
|
||||||
})
|
})
|
||||||
|
|
||||||
//
|
$(document).on('click', '#editFaSriBtn', function (){
|
||||||
|
$("#sriViewModal").modal('hide');
|
||||||
|
getSriEditModal({faSriKey: Number($(this).attr("data-fasrikey"))});
|
||||||
|
})
|
||||||
|
|
||||||
|
function OnInitCompleted(e){
|
||||||
|
e.editorTarget.SetBodyValue(document.getElementById("content").value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#reSendBtn', function (){
|
||||||
|
$("#sriViewModal").modal('hide');
|
||||||
|
const faSri = {
|
||||||
|
refKey: Number($(this).attr("data-fasrikey")),
|
||||||
|
wrtUserSeq: $("#wrtUserSeq").val(),
|
||||||
|
wrtOrgan: $("#wrtOrgan").val(),
|
||||||
|
wrtPart: $("#wrtPart").val(),
|
||||||
|
wrtTitle: $("#wrtTitle").val(),
|
||||||
|
wrtUserNm: $("#wrtUserNm").val()
|
||||||
|
}
|
||||||
|
getSriEditModal(faSri);
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#saveTempBtn', function (){
|
||||||
|
saveSri('DST001')
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#sriDeleteBtn', function (){
|
||||||
|
if($('input:checkbox[name=sriChk]:checked').length < 1){
|
||||||
|
alert("게시물을 선택해주세요");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(confirm("삭제시 되돌릴 수 없습니다. 대상을 삭제처리 하시겠습니까?")){
|
||||||
|
const checkArr = [];
|
||||||
|
$('input:checkbox[name=sriChk]:checked').each(function (idx, el){
|
||||||
|
checkArr.push({});
|
||||||
|
const target = $(el);
|
||||||
|
checkArr[idx].faSriKey = Number(target.parents('tr').find('.faSriKey').val());
|
||||||
|
})
|
||||||
|
deleteSri(checkArr);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#deleteSri', function (){
|
||||||
|
if(confirm("삭제시 되돌릴 수 없습니다. 대상을 삭제처리 하시겠습니까?")){
|
||||||
|
const checkArr = [];
|
||||||
|
checkArr.push({});
|
||||||
|
checkArr[0].faSriKey = Number($(this).attr("data-fasrikey"));
|
||||||
|
deleteSri(checkArr);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function deleteSri(checkArr){
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
url : "/sri/sriDelete",
|
||||||
|
data : JSON.stringify(checkArr),
|
||||||
|
contentType: 'application/json',
|
||||||
|
beforeSend: function (xhr){
|
||||||
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
||||||
|
},
|
||||||
|
success : function() {
|
||||||
|
alert("삭제처리 되었습니다.");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status) {
|
||||||
|
alert("삭제처리에 실패하였습니다");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#dateSelectorDiv").datepicker({
|
$("#dateSelectorDiv").datepicker({
|
||||||
|
|
@ -156,10 +242,6 @@ $(function(){
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#editFaRptBtn', function (){
|
|
||||||
$("#faRptViewModal").modal('hide');
|
|
||||||
getFaRptEditModal({faRptKey: Number($(this).attr("data-farptkey"))});
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('click', '.rowDeleteBtn', function (){
|
$(document).on('click', '.rowDeleteBtn', function (){
|
||||||
$(this).parents(".readUserRow").remove()
|
$(this).parents(".readUserRow").remove()
|
||||||
|
|
@ -167,22 +249,6 @@ $(document).on('click', '.rowDeleteBtn', function (){
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '#saveTempBtn', function (){
|
|
||||||
saveFaRpt('DST001')
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('click', '#reSendBtn', function (){
|
|
||||||
$("#faRptViewModal").modal('hide');
|
|
||||||
const faRpt = {
|
|
||||||
refKey: Number($(this).attr("data-farptkey")),
|
|
||||||
wrtUserSeq: $("#wrtUserSeq").val(),
|
|
||||||
wrtOrgan: $("#wrtOrgan").val(),
|
|
||||||
wrtPart: $("#wrtPart").val(),
|
|
||||||
wrtUserGrd: $("#wrtUserGrd").val(),
|
|
||||||
wrtUserNm: $("#wrtUserNm").val()
|
|
||||||
}
|
|
||||||
getFaRptEditModal(faRpt);
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
function setReadUserRowNum(){
|
function setReadUserRowNum(){
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@
|
||||||
<th:block>
|
<th:block>
|
||||||
<input type="hidden" class="faSriKey" th:value="${sri.faSriKey}">
|
<input type="hidden" class="faSriKey" th:value="${sri.faSriKey}">
|
||||||
</th:block>
|
</th:block>
|
||||||
<td><input type="checkbox" class="trChkBox"></td>
|
<th:block th:unless="${sri.status eq 'DST008'}">
|
||||||
|
<td class="sriChk"><input type="checkbox" name="sriChk" class="trChkBox"></td>
|
||||||
<td th:if="${sri.status ne 'receive'}">
|
<td th:if="${sri.status ne 'receive'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
||||||
<th:text th:if="${commonCode.itemCd eq sri.status}" th:text="${commonCode.itemValue}"></th:text>
|
<th:text th:if="${commonCode.itemCd eq sri.status}" th:text="${commonCode.itemValue}"></th:text>
|
||||||
|
|
@ -114,12 +115,15 @@
|
||||||
</th:block>
|
</th:block>
|
||||||
<td th:text="${sri.wrtUserNm}"></td>
|
<td th:text="${sri.wrtUserNm}"></td>
|
||||||
<td th:text="${#temporals.format(sri.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
<td th:text="${#temporals.format(sri.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
|
</th:block>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col-auto"></div>
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-danger" id="sriDeleteBtn">삭제</button>
|
||||||
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<nav aria-label="Page navigation">
|
<nav aria-label="Page navigation">
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<input type="hidden" name="wrtUserSeq" th:value="${sri.wrtUserSeq}">
|
<input type="hidden" name="wrtUserSeq" th:value="${sri.wrtUserSeq}">
|
||||||
<input type="hidden" name="wrtTitle" th:value="${sri.wrtTitle}">
|
<input type="hidden" name="wrtTitle" th:value="${sri.wrtTitle}">
|
||||||
<input type="hidden" name="status" id="status" th:value="${sri.status}">
|
<input type="hidden" name="status" id="status" th:value="${sri.status}">
|
||||||
|
<input type="hidden" name="refKey" th:value="${sri.refKey}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
|
|
@ -26,6 +27,7 @@
|
||||||
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(sri.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(sri.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<th:block th:if="${sri.refKey eq null}">
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
|
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
|
|
@ -36,15 +38,21 @@
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
|
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="text" class="form-control form-control-sm" id="faSriEdate" name="faSriEdate" th:value="${sri.faSriEdate}" readonly>
|
<input type="text" class="form-control form-control-sm" id="faSriEdate" name="faSriEdate" th:value="${sri.faSriEdate}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</th:block>
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
|
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
<th:block th:if="${sri.refKey eq null}">
|
||||||
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="${sri.title}">
|
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="${sri.title}">
|
||||||
|
</th:block>
|
||||||
|
<th:block th:unless="${sri.refKey eq null}">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title" th:value="[회신]">
|
||||||
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 row justify-content-center">
|
<div class="mb-3 row justify-content-center">
|
||||||
|
|
@ -62,7 +70,7 @@
|
||||||
<br>파일을 업로드 해주세요.
|
<br>파일을 업로드 해주세요.
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${#arrays.isEmpty(sri.fileList)}">
|
<th:block th:unless="${#arrays.isEmpty(sri.fileList)}">
|
||||||
<div class='row-col-6' th:each="faRptFile:${sri.fileList}">
|
<div class='row-col-6' th:each="sriFile:${sri.fileList}">
|
||||||
<span th:data-fileseq="${sriFile.fileSeq}" th:text="|${sriFile.origNm}.${sriFile.fileExtn} ${sriFile.fileSize}|"></span>
|
<span th:data-fileseq="${sriFile.fileSeq}" th:text="|${sriFile.origNm}.${sriFile.fileExtn} ${sriFile.fileSize}|"></span>
|
||||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer justify-content-between">
|
||||||
|
<div class="col-auto">
|
||||||
|
<th:block th:unless="${FaSri.status eq 'DST008'}">
|
||||||
|
<button type="button" class="btn btn-danger" id="deleteSri" th:if="${userSeq eq FaSri.wrtUserSeq} and ${accessAuth eq 'ACC003'}" th:data-fasrikey="${FaSri.faSriKey}">삭제</button>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
<th:block th:if="${userSeq eq FaSri.wrtUserSeq}">
|
<th:block th:if="${userSeq eq FaSri.wrtUserSeq}">
|
||||||
<button type="button" class="btn btn-warning" id="editFaRptBtn" th:data-farptkey="${FaSri.faSriKey}">수정</button>
|
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:data-fasrikey="${FaSri.faSriKey}">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:if="${userSeq ne FaSri.wrtUserSeq}">
|
<th:block th:if="${userSeq ne FaSri.wrtUserSeq}">
|
||||||
<button type="button" class="btn btn-success" id="reSendBtn" th:data-farptkey="${FaSri.faSriKey}">회신</button>
|
<th:block th:unless="${FaSri.faSriEdate eq null}">
|
||||||
|
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${FaSri.faSriEdate} >= ${#temporals.createToday()}" th:data-fasrikey="${FaSri.faSriKey}">회신</button>
|
||||||
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue