2024-03-19 16:44 기소유예 취소 요청 처리 작업 중

This commit is contained in:
myname 2024-03-19 16:44:24 +09:00
parent 7a2dad9e27
commit 2faf60b77d
8 changed files with 639 additions and 70 deletions

View File

@ -15,6 +15,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -36,6 +37,7 @@ import kcc.ve.aplct.adultVisitEdu.eduAplct.service.EduAplctAdultService;
import kcc.ve.aplct.fndtnEnhanceTrn.service.FndtnEnhanceTrnService;
import kcc.ve.aplct.sspnIdtmt.service.SspnIdtmtService;
import kcc.ve.cmm.VeConstants;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctOnlnService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
@ -47,6 +49,7 @@ import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO;
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsMIXService;
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsOnlnCntntService;
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService;
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRprtVO;
import kcc.ve.oprtn.cndtnSspnIdtmt.trgtMng.service.CndtnTrgtMngService;
import kcc.ve.oprtn.cndtnSspnIdtmt.trgtMng.service.CndtnTrgtMngVO;
@ -748,6 +751,141 @@ public class SspnIdtmtController {
/**
* 결과보고 팝업
*/
@RequestMapping("/web/ve/aplct/sspnIdtmt/popup/eduCancelPop.do")
public String filePopup(
@ModelAttribute("vEEduRprtVO") VEEduRprtVO vEEduRprtVO
,@ModelAttribute("vEInstrAsgnmVO") VEInstrAsgnmVO vEInstrAsgnmVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
try {
/*
vEEduRprtVO = vEEduRsltRprtService.selectDetail(vEEduRprtVO);
//파일 정보 가져오기
int fileCnt = 0;
List<FileVO> result = null;
if (vEEduRprtVO != null) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(vEEduRprtVO.getAtchFileId());
result = fileService.selectFileInfs(fileVO);
fileCnt = result.size();
}
else {
fileCnt = 0;
}
model.addAttribute("fileList", result);
model.addAttribute("fileListCnt", fileCnt);
model.addAttribute("vEEduRprtVO", vEEduRprtVO);
model.addAttribute("vEInstrAsgnmVO", vEInstrAsgnmVO);
*/
}
catch(Exception ex) {
ex.printStackTrace();
}
return "/web/ve/aplct/sspnIdtmt/popup/eduCancelPop";
}
/**
* 결과보고 Ajax
*/
@RequestMapping("/web/ve/aplct/sspnIdtmt/popup/eduCancelPopupAjax.do")
public ModelAndView filePopupAjax(
@ModelAttribute("vEEduRprtVO") VEEduRprtVO vEEduRprtVO
, ModelMap model
//, RedirectAttributes redirectAttributes
, HttpServletRequest request
, final MultipartHttpServletRequest multiRequest
) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
//로그인 처리====================================
//로그인 정보 가져오기
/*
String s_userCheckNInfo = checkLoginUtil.userCheckNInfo(model, request);
if (!"".equals(s_userCheckNInfo)) {
modelAndView.addObject("result", "loginFail");
return modelAndView;
}
*/
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
//SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
//로그인 처리====================================
//step2.파일 처리====================================
//파일 정상 처리 여부와 첨부 파일 정보
//String atchFileId = this.takeFile(multiRequest, modelAndView, bmVO);
//파일 제한 수량 가져오기, 없으면 기본값 사용
int i_file_limit = checkFileUtil.getLimitCount(request); // file count
int i_limit_size = checkFileUtil.getLimitSize(request); // file MB
String s_file_exts = checkFileUtil.getS_exts(); // file exts
//step2.기존 첨부파일 체크 저장 하기
String s_atchFileId = "";
if ("".equals(s_atchFileId)) {
s_atchFileId = checkFileUtil.fileValCheckNdbInsert(
multiRequest, modelAndView
, "EDUCANCEL_" //file_name_prefix
, s_file_exts
, i_limit_size
, i_file_limit
); //EXT, MB size and ea
}else {
s_atchFileId = checkFileUtil.fileValCheckNdbUpdate(
multiRequest, modelAndView
, "EDUCANCEL_" //file_name_prefix
, s_file_exts
, i_limit_size
, i_file_limit
, s_atchFileId
);
}
if ("ERROR".equals(s_atchFileId)) return modelAndView;
//step2.파일 처리====================================
try {
System.out.println("vEEduRprtVO.getAprvlCn()");
System.out.println(vEEduRprtVO.getEduAplctOrd());
System.out.println(vEEduRprtVO.getAprvlCn());
System.out.println(s_atchFileId);
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(vEEduRprtVO.getEduAplctOrd());
vEEduAplctVO.setAplctCn(vEEduRprtVO.getAprvlCn());
vEEduAplctVO.setRsltAtchFileId(s_atchFileId);
vEEduAplctVO.setAprvlCd("35");
vEEduAplctVO.setLastUpdusrId(loginVO.getUniqId());
//취소요청 정보 저장
vEEduAplctService.update(vEEduAplctVO);
}catch(Exception ex) {
System.out.println("Exception vEEduRsltRprtService.insert");
}
modelAndView.addObject("result", "success");
return modelAndView;
}
/**
* +
* 기반강화연수과정 신청기간 등록
*/
@RequestMapping("/web/ve/aplct/sspnIdtmt/cnclUpdateAjax.do")

View File

@ -1304,8 +1304,12 @@ public class CndtnPrcsInfoMngController {
// 이수 상태라면 이수번호 생성
if("20".equals(vEEduAplctVO.getAplctStateCd())) {
vEEduAplctVO.setEduCmpltCrtfcNmbr(this.cmpltChkAndMakeNmber(vEEduAplctVO.getLctrDivCd()));
}else if("10".equals(vEEduAplctVO.getAplctStateCd())) {
}else if("10".equals(vEEduAplctVO.getAplctStateCd())) { //이미수
vEEduAplctVO.setEduCmpltCrtfcNmbr("DEL");
vEEduAplctVO.setEduStateCd("40");
}else if("60".equals(vEEduAplctVO.getAplctStateCd())) { //연기
vEEduAplctVO.setEduCmpltCrtfcNmbr("DEL");
vEEduAplctVO.setEduStateCd("50");
}
// 신청상세정보 상태값 update
@ -1536,8 +1540,12 @@ public class CndtnPrcsInfoMngController {
String eduCmpltCrtfcNmbr = "";
String currentYear = String.valueOf(java.time.Year.now());
if("20".equals(vEPrcsDetailVO.getAplctStateCd())) {
if("20".equals(vEPrcsDetailVO.getAplctStateCd())
|| "10".equals(vEPrcsDetailVO.getAplctStateCd())
|| "60".equals(vEPrcsDetailVO.getAplctStateCd())
) {
int j=0;
for(String eduAplctOrd : vEPrcsDetailVO.getEduAplctOrdList()) {
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
@ -1545,7 +1553,14 @@ public class CndtnPrcsInfoMngController {
vEEduAplctVO.setLastUpdusrId(loginVO.getUniqId());
vEEduAplctVO.setPrcsAplctPrdOrd(vEPrcsDetailVO.getPrcsAplctPrdOrd());
vEEduAplctVO.setEduAplctOrd(eduAplctOrd);
vEEduAplctVO.setLctrDivCd(vEPrcsDetailVO.getLctrDivCd());
String s_sspnIdtmtTrgtOrd = vEPrcsDetailVO.getSspnIdtmtTrgtOrdList().get(j);
j++;
vEEduAplctVO.setSspnIdtmtTrgtOrd(s_sspnIdtmtTrgtOrd);
/*
if(StringUtils.isEmpty(eduCmpltCrtfcNmbr)) {
eduCmpltCrtfcNmbr = this.cmpltChkAndMakeNmber(vEPrcsDetailVO.getLctrDivCd());
@ -1555,10 +1570,33 @@ public class CndtnPrcsInfoMngController {
vEEduAplctVO.setEduCmpltCrtfcNmbr(eduCmpltCrtfcNmbr);
vEEduMIXService.updateAplctStateCd(vEEduAplctVO);
*/
if("20".equals(vEEduAplctVO.getAplctStateCd())) {
vEEduAplctVO.setEduCmpltCrtfcNmbr(this.cmpltChkAndMakeNmber(vEEduAplctVO.getLctrDivCd()));
vEEduAplctVO.setEduStateCd("20");
}else if("10".equals(vEEduAplctVO.getAplctStateCd())) { //이미수
vEEduAplctVO.setEduCmpltCrtfcNmbr("DEL");
vEEduAplctVO.setEduStateCd("40");
}else if("60".equals(vEEduAplctVO.getAplctStateCd())) { //연기
vEEduAplctVO.setEduCmpltCrtfcNmbr("DEL");
vEEduAplctVO.setEduStateCd("50");
}
// 신청상세정보 상태값 update
vEEduAplctVO.setLastUpdusrId(loginVO.getUniqId());
vEEduMIXService.updateAplctStateCd(vEEduAplctVO);
// 기소유예 대상자 상태값 udpate
vEEduMIXService.updateEduStateCd(vEEduAplctVO);
}
/*
}else {
vEAPrcsAplctPrdInstrAsgnmService.updateAplctStateCdListAjax(vEPrcsDetailVO);
*/
}
@ -1575,11 +1613,13 @@ public class CndtnPrcsInfoMngController {
// 교육 신청 테이블에 신청자 상태값 update
/*
if(vEPrcsDetailVO.getSspnIdtmtTrgtOrdList() != null && !vEPrcsDetailVO.getSspnIdtmtTrgtOrdList().isEmpty())
{
// 대상자 테이블에 update
vEAPrcsAplctPrdInstrAsgnmService.updateEduStateCdListAjax(vEPrcsDetailVO);
}
*/
modelAndView.addObject("result", "success");
} catch (Exception ex) {

View File

@ -103,8 +103,9 @@
a.end_oprtn_dt AS endOprtnDt,
a.rprt_sbmt_dt AS rprtSbmtDt,
a.trans_atch_file_id AS transAtchFileId,
a.use_yn AS useYn
, a.aplct_cn AS aplctCn
a.use_yn AS useYn,
a.aplct_cn AS aplctCn,
a.rslt_atch_file_id AS rsltAtchFileId
</sql>

View File

@ -115,7 +115,7 @@
<select class="sel_type1" id="searchStatus2" name="searchStatus2">
<option ${vEEduAplctVO.searchStatus2 eq '' ? 'selected' : ''} value="">전체</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_SBMT ? 'selected' : ''} value="${VeConstants.STATUS_CD_SBMT}">교육신청</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_SBMT ? 'selected' : ''} value="${VeConstants.STATUS_CD_CAN}">교육취소</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_CAN ? 'selected' : ''} value="${VeConstants.STATUS_CD_CAN}">교육취소</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_EDT_REQ ? 'selected' : ''} value="${VeConstants.STATUS_CD_EDT_REQ}">수정요청</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_EDT_CMPT ? 'selected' : ''} value="${VeConstants.STATUS_CD_EDT_CMPT}">수정완료</option>
<option ${vEEduAplctVO.searchStatus2 eq VeConstants.STATUS_CD_EDU_SELCT ? 'selected' : ''} value="${VeConstants.STATUS_CD_EDU_SELCT}">교육확정</option>

View File

@ -688,7 +688,7 @@
<th>연락처</th>
<th>교육이수여부</th>
<th>교육이수상태변경</th>
<th>설문조사</th>
<th>취소요청상태</th>
<!-- <th>이수증</th> -->
</tr>
</thead>
@ -707,7 +707,7 @@
<%-- <br/>(<c:out value="${list.sspnIdtmtTrgtOrd}"/>) --%>
</td>
<td>
<c:out value="${list.dBirth}"/>
<c:out value="${list.DBirth}"/>
</td>
<td>
<c:out value="${list.email}"/>
@ -716,67 +716,75 @@
<c:out value="${list.phone}"/>
</td>
<td>
<c:choose>
<c:when test="${list.eduStateCd eq 50 }">
<ve:code codeId="VEA002" code="${list.eduStateCd}"/>
</c:when>
<c:otherwise>
<!-- 10 미이수, 20 이수 -->
<ve:code codeId="VEA003" code="${list.aplctStateCd}"/>
</c:otherwise>
</c:choose>
<ve:code codeId="VEA002" code="${list.eduStateCd}"/>
<%-- <c:choose> --%>
<%-- <c:when test="${list.eduStateCd eq 50 }"> --%>
<%-- <ve:code codeId="VEA002" code="${list.eduStateCd}"/> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<%-- <ve:code codeId="VEA003" code="${list.aplctStateCd}"/> --%>
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
</td>
<td>
<button type="button" class="btn_type04" onclick="fn_statusChg('20', '<c:out value="${list.eduAplctOrd }" />', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">이수</button>
<button type="button" class="btn_type05" onclick="fn_statusChg('10', '<c:out value="${list.eduAplctOrd }" />', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">미이수</button>
<button type="button" class="btn_type03" onclick="fn_statusOnlyChg('50', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">연기</button>
<button type="button" class="btn_type03" onclick="fn_statusChg('60', '<c:out value="${list.eduAplctOrd }" />', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">연기</button>
</td>
<td>
<%-- <c:choose> --%>
<%-- <c:when test="${list.qestRsltExists }"> --%>
<%-- <button type="button" class="btn_type04" onclick="fncInstrCostInfo('${list.eduAplctOrd }', '${list.userId }');">설문결과</button> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<!-- 미입력 -->
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<c:choose>
<c:when test="${list.aprvlCd eq 20 and list.qestRsltExists and list.aplctStateCd ne 10}">
<!-- 설문노출대상(승인처리를 받았음(20) && 교육기간이 지났음 list.qestRsltExists=true && 미이수가 아닌것(10) ) -->
<c:choose>
<c:when test="${list.aplctStateCd eq 20 and list.qestnrId10Cnt gt 0}">
<!-- 작성된 설문이 있다 -->
<button type="button" class="btn_type04" data-tooltip="sub37_pop20"
onclick="fncInstrCostNewInfo('${list.eduAplctOrd}','${list.eduChasiOrd}','10','select'
,'${list.qustnrTmplatId}','${list.qestnrId10}',''
)" title="팝업 열림">설문완료</button>
</c:when>
<c:when test="${empty list.qestnrId10 and list.aprvlCd eq 20}">
<!-- 대상 설문이 없다 -->
대상설문없음
</c:when>
<c:when test="${empty list.qestnrId10Cnt or list.qestnrId10Cnt eq 0}">
<!-- 작성된 설문이 없다 -->
등록된 설문없음
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
<c:when test="${list.aprvlCd eq '35'}"><!-- 취소 요청 -->
<ve:code codeId="VE0003" code="${list.aprvlCd}"/>
<!-- <br/> -->
<%-- <button type="button" class="btn_type04" onclick="fn_statusChg('20', '<c:out value="${list.eduAplctOrd }" />', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">이수</button> --%>
<%-- <button type="button" class="btn_type05" onclick="fn_statusChg('10', '<c:out value="${list.eduAplctOrd }" />', '<c:out value="${list.sspnIdtmtTrgtOrd }"/>')">미이수</button> --%>
</c:when>
<c:when test="${list.aprvlCd eq '40'}"><!-- 취소 승인 -->
<ve:code codeId="VE0003" code="${list.aprvlCd}"/>
</c:when>
<c:otherwise>
<!-- 설문노출대상 아님 -->
-
</c:otherwise>
</c:choose>
</td>
<!-- <td> -->
<%-- <c:choose> --%>
<%-- <c:when test="${list.aprvlCd eq 20 and list.qestRsltExists and list.aplctStateCd ne 10}"> --%>
<!-- 설문노출대상(승인처리를 받았음(20) && 교육기간이 지났음 list.qestRsltExists=true && 미이수가 아닌것(10) ) -->
<%-- <c:choose> --%>
<%-- <c:when test="${list.aplctStateCd eq 20 and list.qestnrId10Cnt gt 0}"> --%>
<!-- 작성된 설문이 있다 -->
<!-- <button type="button" class="btn_type04" data-tooltip="sub37_pop20" -->
<%-- onclick="fncInstrCostNewInfo('${list.eduAplctOrd}','${list.eduChasiOrd}','10','select' --%>
<%-- ,'${list.qustnrTmplatId}','${list.qestnrId10}','' --%>
<%-- )" title="팝업 열림">설문완료</button> --%>
<%-- </c:when> --%>
<%-- <c:when test="${empty list.qestnrId10 and list.aprvlCd eq 20}"> --%>
<!-- 대상 설문이 없다 -->
<!-- 대상설문없음 -->
<%-- </c:when> --%>
<%-- <c:when test="${empty list.qestnrId10Cnt or list.qestnrId10Cnt eq 0}"> --%>
<!-- 작성된 설문이 없다 -->
<!-- 등록된 설문없음 -->
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<!-- - -->
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<!-- 설문노출대상 아님 -->
<!-- - -->
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<!-- </td> -->
<!-- <td> -->
<%-- <c:choose> --%>

View File

@ -47,7 +47,7 @@
// 텍스트가 비어있는지 확인
if ($ddlnCdStts.text().trim() === ""
|| $ddlnCdStts.text().trim() === "반려") {
var dateText = $ddlnCdStts.closest('table').find("td:eq(2)").text().trim();
var dateText = $ddlnCdStts.closest('table').find("td:eq(3)").text().trim();
var strtPnttm = new Date(dateText.split("~")[0].trim().replace(/\./g, '-'));
var endPnttm = new Date(dateText.split("~")[1].trim().replace(/\./g, '-'));
@ -59,7 +59,6 @@
// new Date에서 년, 월, 일만 생성
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
if (currentDate < strtPnttm) {
$ddlnCdStts.text("접수전");
} else if (currentDate >= strtPnttm && currentDate <= endPnttm) {
@ -189,6 +188,7 @@
}
}
/*
function fncCancelStatusChange(
p_eduAplctOrd
, p_prcsAplctPrdOrd
@ -216,6 +216,46 @@
});
}
}
*/
function fncCancelStatusChange(
p_eduAplctOrd
, p_prcsAplctPrdOrd
, p_reqNo
){
commonPopLayeropen(
//"${pageContext.request.contextPath}/web/ve/instr/tngrVisitEdu/endInfo/popup/eduRsltRprtRegPop.do"
"${pageContext.request.contextPath}/web/ve/aplct/sspnIdtmt/popup/eduCancelPop.do"
, 650
, 664
, {
'eduAplctOrd' : p_eduAplctOrd
, 'prcsAplctPrdOrd' : p_prcsAplctPrdOrd
, 'reqNo' : p_reqNo
}
, "Y"
, "cancelStatusChangePop"
);
/*
if(confirm("교육 수강 취소 요청을 하시겠습니까?\n관리자 승인 후 취소가 가능합니다.")){
commonPopLayeropen(
//"${pageContext.request.contextPath}/web/ve/instr/tngrVisitEdu/endInfo/popup/eduRsltRprtRegPop.do"
"${pageContext.request.contextPath}/web/ve/aplct/sspnIdtmt/popup/eduCancelPop.do"
, 650
, 664
, {
'eduAplctOrd' : p_eduAplctOrd
, 'prcsAplctPrdOrd' : p_prcsAplctPrdOrd
, 'reqNo' : p_reqNo
}
, "Y"
, "cancelStatusChangePop"
);
}
*/
}
// function fncCancleSubmit(){
// if(confirm("교육신청 취소하시겠습니까?")){
@ -564,14 +604,10 @@
<button type="button" class="btnType05" onclick="fncCancelUser('${infoAplctOrd.eduAplctOrd}', '${infoAplctOrd.prcsOrd}', '2-1')">교육취소</button>
</c:if>
<c:if test="${prcsAplctVO.aprvlCd eq '20' and prcsAplctVO.ddlnCd eq '20'}">
<c:if test="${prcsAplctVO.aprvlCd eq '60' and prcsAplctVO.ddlnCd eq '20'}">
<button type="button" class="btnType05" onclick="fncCancelStatusChange('${infoAplctOrd.eduAplctOrd}', '${infoAplctOrd.prcsOrd}', '6-1')">취소요청</button>
</c:if>
</div>
<div class="btn_right" class="aplctBtn">
<%-- <button type="button" class="btnType04" id="regBtn" data-info="<c:out value="${info.prcsAplctPrdOrd}"/>" data-tooltip="target_confirm_popup" >신청</button> --%>

View File

@ -207,7 +207,7 @@ $(document).ready(function(){
<p>핸드폰</p>
</th>
<td>
<input type="text" class="twoRow" value="${vEPrcsDetailVO.clphone}" readonly/>
<input type="text" class="twoRow" value="${vEPrcsDetailVO.clphone}"/>
</td>
<th scope="row">
<p>이메일</p>

View File

@ -0,0 +1,346 @@
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%
/**
* @Class Name : eduCancelPop.jsp
* @Description : 교육취소요청 팝업
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.09 김봉호 최초 생성
* @author 김봉호
* @since 2021.08.21
* @version 1.0
* @see
*
*/
%>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
//파일첨부관련 설정들===============================================
$(".btn_add_file").on('click', function(){
$("#file_temp").click();
});
$("#limitcount").val("1");
//파일첨부관련 설정들===============================================
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub35_pop03"]');
activeTarget.hide();
$('[data-tooltip="sub35_pop03"]').focus();
});
$('#file_temp').change(function(e){
var objUpload = $(".upload_area");
var files = $('#file_temp')[0].files;
handleFileUpload(files,objUpload); //파일업로드
if($("#file_temp").length > 0){
$("#file_temp").val(""); //파일지우기
}
});
});
function fncPopClose(){
self.close();
}
function fncSave(flag){
/*
<!-- for validator #3 -->
*/
//if (!validateVEEduAplctVO(document.createForm)) return;
/*
<!-- for validator #3 -->
*/
//저장
if ($("#aprvlCn").val().length>300){
alert("취소사유는 300자까지만 가능합니다.");
return;
}
if ($("#aprvlCn").val().length<=0){
alert("취소사유는 반드시 넣어주세요.");
return;
}
//첨부파일 등록 처리
$('#file_temp').val(""); //첨부파일 중복 등록 방지를 위해 추가
$("#sbmtYn").val(flag);
//var data = new FormData(form);
var data = new FormData(document.getElementById("createForm"));
//첨부파일 등록 처리-step1
//if(!data.get("fileSize")){
/*
if($('#tbody_fiielist tr').length*1<=0){
alert("첨부파일을 등록해 주세요");
return false;
}
*/
//첨부파일 등록 처리-step2
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
// $("#mode").val(type);
/*
var data = new FormData(document.getElementById("createForm"));
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
*/
if(confirm("취소요청 제출 하시겠습니까?\n관리자 승인 후 취소처리가됩니다.")){
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "${pageContext.request.contextPath}/web/ve/aplct/sspnIdtmt/popup/eduCancelPopupAjax.do",
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success: function (returnData, status) {
if(status == 'success'){
alert("등록 되었습니다.");
location.reload();
} else if(status== 'fail'){
alert("등록에 실패하였습니다.");
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
}
</script>
<form:form id="createForm" name="createForm" method="post" commandName="vEEduRprtVO" onsubmit="return false;">
<input type="hidden" name="eduAplctOrd" value="<c:out value="${vEInstrAsgnmVO.eduAplctOrd}" />" />
<input type="hidden" name="eduChasiOrd" value="<c:out value="${vEInstrAsgnmVO.eduChasiOrd}" />" />
<input type="hidden" id="userId" name="userId" value="<c:out value="${vEInstrAsgnmVO.userId}" />" />
<input type="hidden" name="sbmtYn" id="sbmtYn" value="" />
<input type="hidden" name="limitcount" id="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" name="allrowFileExtsn" value="JPG,PNG,JPEG" /><!-- 확장자 제한-->
<div class="popup_wrap popType03" tabindex="0" data-tooltip-con="sub35_pop03" data-focus="sub35_pop03" data-focus-prev="sub35_pop03_close">
<div class="popup_tit">
<p>취소요청</p><button class="btn_popup_close tooltip-close" data-focus="sub35_pop03_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
<div class="pop_tb_type01">
<table>
<caption>첨부파일, 취소사유를 입력하는 표</caption>
<colgroup>
<col style="width: 120px;">
<col style="width: auto">
</colgroup>
<tbody>
<%-- <tr>
<th scope="row">
<p>첨부파일</p>
</th>
<td class="upload_area">
<div class="btn_wrap">
<button type="button" class="btnType01 btn_add_file">파일 찾기</button>
<!-- <p style="color:grey;padding:5px;">파일명은 <span style="color:red;font-weight:500">1기 홍길동 결과보고서(0328-0401)</span> 형태로 등록해주세요.</p> -->
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
</div>
<div class="file_wrap file_upload_box no_img_box">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 15%;">
<col style="width: 15%;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
</thead>
<tbody class="tb_file_before">
<tr>
<td colspan="3">
<p>첨부하실 파일을 <span>마우스끌어서</span> 넣어주세요.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="file_wrap fileAfter file_list_div" style="display: none;">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60px;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
<th scope="col">삭제</th>
</thead>
<tbody id="tbody_fiielist" class="tb_file_after">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
<td class="td_filename">
<span class="file_name_text">${fileList.orignlFileNm}</span>
</td>
<td class="td_filesort">
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
</td>
<td class="td_filesize">
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
</td>
<td>
<button type="button" class="btn_del" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;"><i></i></button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span>3</span>개</p>
<p><span>50MB</span>제한</p>
</div>
</div>
</td>
</tr> --%>
<tr>
<th scope="row">
<p class="req_text"><span>필수입력 항목</span>*</p>
<p>취소사유</p>
</th>
<td>
<textarea name="aprvlCn" id="aprvlCn" title="특이사항"></textarea>
</td>
</tr>
</tbody>
</table>
</div>
<dl class="filewrap_div filewrap_eduRsltRprtRegPop">
<dt>첨부파일</dt>
<dd class="upload_area">
<div class="btn_wrap">
<button type="button" class="btnType01 btn_add_file">파일 찾기</button>
<!-- <p style="color:grey;padding:5px;">파일명은 <span style="color:red;font-weight:500">1기 홍길동 결과보고서(0328-0401)</span> 형태로 등록해주세요.</p> -->
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
</div>
<div class="file_wrap file_upload_box no_img_box">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 15%;">
<col style="width: 15%;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
</thead>
<tbody class="tb_file_before">
<tr>
<td colspan="3">
<p>첨부하실 파일을 <span>마우스끌어서</span> 넣어주세요.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="file_wrap fileAfter file_list_div" style="display: none;">
<table>
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60px;">
</colgroup>
<thead>
<th scope="col">파일 명</th>
<th scope="col">종류</th>
<th scope="col">크기</th>
<th scope="col">삭제</th>
</thead>
<tbody id="tbody_fiielist" class="tb_file_after">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
<td class="td_filename">
<span class="file_name_text">${fileList.orignlFileNm}</span>
</td>
<td class="td_filesort">
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
</td>
<td class="td_filesize">
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
</td>
<td>
<button type="button" class="btn_del" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;"><i></i></button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span>1</span>개</p>
<p><span>50MB</span>제한</p>
</div>
</div>
</dd>
</dl>
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" onclick="fncSave('Y'); return false;" class="btnType05">제출</button>
</div>
<div class="btn_right">
<button type="button" class="btnType02 tooltip-close" data-focus="sub35_pop03_close" data-focus-next="sub35_pop03">취소</button>
</div>
</div>
</div>
</div>
</form:form>