Merge branch 'hylee' into advc

This commit is contained in:
hylee 2023-10-18 18:11:13 +09:00
commit c9c6641c99
7 changed files with 1905 additions and 2 deletions

View File

@ -0,0 +1,238 @@
package kcc.ve.instr.fndtnVisitEdu.endInfo.web;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kcc.com.cmm.EgovMessageSource;
import kcc.com.cmm.LoginVO;
import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.FileVO;
import kcc.com.cmm.util.IpUtil;
import kcc.com.cmm.web.EgovFileDownloadController;
import kcc.com.utl.user.service.CheckFileUtil;
import kcc.com.utl.user.service.CheckLoginUtil;
import kcc.kccadr.sch.service.SchduleManageService;
import kcc.kccadr.sch.service.SchduleManageVO;
import kcc.let.uat.uia.service.SsoLoginVO;
import kcc.let.utl.fcc.service.EgovCryptoUtil;
import kcc.let.utl.fcc.service.EgovCryptoUtil4VO;
import kcc.ve.cmm.VeConstants;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAcmdtAplctService;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEAsgnmMIXService;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrAsgnmVO;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeAcmdtVO;
import kcc.ve.instr.tngrVisitEdu.asgnmInfo.service.VEInstrFeeService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailService;
import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailVO;
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO;
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService;
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRprtVO;
import kcc.ve.instr.tngrVisitEdu.rprtInfo.service.VEEduRsltRprtService;
import kcc.ve.oprtn.asgnmnoti.service.VEAsgnmNotiService;
import kcc.ve.oprtn.asgnmnoti.service.VEAsgnmNotiVO;
@Controller
public class VEAdultEduEndController {
// eGov 공통 메세지
@Resource(name = "egovMessageSource")
EgovMessageSource egovMessageSource;
//로그인 체크 util
@Resource(name = "checkLoginUtil")
private CheckLoginUtil checkLoginUtil;
//암복호화 유틸
@Resource(name = "egovCryptoUtil")
EgovCryptoUtil egovCryptoUtil;
//강사상세 정보
@Resource(name="vEInstrDetailService")
private VEInstrDetailService vEInstrDetailService;
//결과보고
@Resource(name="vEEduRsltRprtService")
private VEEduRsltRprtService vEEduRsltRprtService;
//배정 MIX 정보
@Resource(name="vEAsgnmMIXService")
private VEAsgnmMIXService vEAsgnmMIXService;
//강의
@Resource(name="vEPrcsService")
private VEPrcsService vEPrcsService;
//강사료
@Resource(name="vEInstrFeeService")
private VEInstrFeeService vEInstrFeeService;
//숙박
@Resource(name="vEAcmdtAplctService")
private VEAcmdtAplctService vEAcmdtAplctService;
//VO /복호화
@Resource(name="egovCryptoUtil4VO")
private EgovCryptoUtil4VO egovCryptoUtil4VO;
// 파일첨부
@Resource(name = "EgovFileMngService")
private EgovFileMngService fileService;
//파일 체크 util
@Resource(name = "checkFileUtil")
private CheckFileUtil checkFileUtil;
//NOTI 서비스
@Resource(name="vEAsgnmNotiService")
private VEAsgnmNotiService vEAsgnmNotiService;
//일정 정보
@Resource(name = "schduleManageService")
private SchduleManageService schduleManageService;
private static final Logger LOGGER = LoggerFactory.getLogger(EgovFileDownloadController.class);
// 기반강화 강의목록(종료)
@RequestMapping("/web/ve/instr/fndtnVisitEdu/endInfo/instrEduEndList.do")
public String instrAsgnmList(
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
, ModelMap model
, HttpSession session
, HttpServletRequest request
) throws Exception {
//로그인 처리====================================
//로그인 정보 가져오기
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
if (loginVO == null || ssoLoginVO == null) {
return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다.
}
model.addAttribute("ssoLoginVO", ssoLoginVO);
model.addAttribute("loginVO", loginVO);
//로그인 처리====================================
//3.pageing step1
PaginationInfo paginationInfo = this.setPagingStep1(vEPrcsDetailVO);
//4. pageing step2
vEPrcsDetailVO = this.setPagingStep2(vEPrcsDetailVO, paginationInfo);
vEPrcsDetailVO.setUserId(loginVO.getUniqId());
vEPrcsDetailVO.setInstrDiv("20");
vEPrcsDetailVO.setAprvlCd("20");
vEPrcsDetailVO.setLctrDivCd("50"); //기반강화50. 기소유예 60
vEPrcsDetailVO.setSearchDiv("END"); // 강의내역 END 종료내역
try {
// System.out.println("session.getAttribute(menuNo).toString()");
// System.out.println(session.getAttribute("menuNo").toString());
// vEPrcsDetailVO.setMenuNo(session.getAttribute("menuNo").toString());
}catch(Exception ex) {
ex.printStackTrace();
}
//
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEAsgnmMIXService.selectFndtnVisitAsgnmPagingList(vEPrcsDetailVO);
//6.pageing step3
paginationInfo = this.setPagingStep3(vEPrcsDetailVOList, paginationInfo);
model.addAttribute("paginationInfo", paginationInfo);
//대상 리스트, 페이징 정보 전달
model.addAttribute("vEPrcsDetailVOList", vEPrcsDetailVOList);
return "/web/ve/instr/fndtnVisitEdu/endInfo/instrEduEndList";
}
//페이징을 위한 처리 step1 - 페이징 기본 정보 설정
private PaginationInfo setPagingStep1(
VEPrcsDetailVO p_vEPrcsDetailVO
)throws Exception{
// pageing step1
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(p_vEPrcsDetailVO.getPageIndex());
paginationInfo.setRecordCountPerPage(p_vEPrcsDetailVO.getPageUnit());
paginationInfo.setPageSize(p_vEPrcsDetailVO.getPageSize());
return paginationInfo;
}
//페이징을 위한 처리 step2 - 게시물 리스트 수량 설정 검색 조건 초기화
private VEPrcsDetailVO setPagingStep2(
VEPrcsDetailVO p_vEPrcsDetailVO
, PaginationInfo p_paginationInfo
)throws Exception{
// pageing step2
p_vEPrcsDetailVO.setFirstIndex(p_paginationInfo.getFirstRecordIndex());
p_vEPrcsDetailVO.setLastIndex(p_paginationInfo.getLastRecordIndex());
p_vEPrcsDetailVO.setRecordCountPerPage(p_paginationInfo.getRecordCountPerPage());
if("".equals(p_vEPrcsDetailVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
p_vEPrcsDetailVO.setSearchSortCnd("prcs_ord");
p_vEPrcsDetailVO.setSearchSortOrd("desc");
}
return p_vEPrcsDetailVO;
}
//페이징을 위한 처리 step3 - 전체 게시물 수량 설정하기
private PaginationInfo setPagingStep3(
List<VEPrcsDetailVO> p_vEPrcsDetailVOList
, PaginationInfo p_paginationInfo
)throws Exception{
// pageing step3
int totCnt = 0;
if(p_vEPrcsDetailVOList.size() > 0) totCnt = p_vEPrcsDetailVOList.get(0).getTotCnt();
p_paginationInfo.setTotalRecordCount(totCnt);
return p_paginationInfo;
}
}

View File

@ -305,8 +305,8 @@
<div class="t_dashboard_btm">
<div class="tb_list01" style="width:100%;">
<div class="tb_list01">
<div class="tb_list01" style="width:100%; margin-bottom: 40px;" >
<table>
<colgroup>
<col style="width: 220px;">
@ -347,6 +347,88 @@
</div>
<div class="tb_tit01">
<div class="tb_tit01_left">
<p>교육신청자</p>
</div>
</div>
<div class="tb_type01">
<div class="tb_list01" style="width:100%; margin-bottom: 40px;" >
<table>
<colgroup>
<col style="width: 5%">
<col style="width: 210px;">
<col style="width: auto;">
<col style="width: 210px;">
</colgroup>
<thead>
<tr>
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="chkAll(this);" /><label for="checkAll"></label></th>
<th>신청자</th>
<th>신청일</th>
<th>확정여부</th>
<!-- <th>이수여부</th> -->
<!-- <th>설문조사</th> -->
<!-- <th>이수증</th> -->
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${!empty listPrcsAplct}">
<c:forEach var="list" items="${listPrcsAplct}" varStatus="status">
<tr>
<td>
<input name="chk" class="${list.asgnmAprvlCd}"
value="${list.eduAplctOrd}" title="Check" type="checkbox"/>
</td>
<td>
<c:out value="${list.userNm}"/>
</td>
<td>
<c:out value="${list.sbmtPnttm}"/>
</td>
<td>
<ve:code codeId="VE0003" code="${list.aprvlCd}"/>
</td>
<%-- <td>
<ve:code codeId="VEA003" code="${list.aplctStateCd}"/>
</td>
<td>
<c:choose>
<c:when test="${list.qestnrId }">
<button type="button" class="btn_type04" onclick="fn_qestnr('<c:out value="${list.qestnrId }"/>');">설문결과</button>
</c:when>
<c:otherwise>
미입력
</c:otherwise>
</c:choose>
</td>
<td>
<c:choose>
<c:when test="${list.qestnrId }">
<button type="button" class="btnType04" onclick="fn_qestnr('<c:out value="${list.qestnrId }"/>');">출력</button>
<button type="button" class="btn_type04">출력</button>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</td> --%>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="4">신청자가 없습니다.</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,430 @@
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>강사프로필 목록</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
$(".btn_add_file").on('click', function(){
$("#file_temp").click();
});
$('#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(""); //파일지우기
}
});
var eduSlctAreaCd = '<ve:code codeId="VE0008" code="${info.eduSlctAreaCd}"/>';
var rsdne = '<c:out value="${info2.rsdne}" />';
var splitString = rsdne.split("(");
if(rsdne == splitString) {
$("#locale").text("동일지역");
} else {
$("#locale").text("타지역");
}
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub36_pop02"]');
activeTarget.hide();
$('[data-tooltip="sub36_pop02"]').focus();
});
});
function linkPage(pageNo){
var listForm = document.listForm ;
listForm.pageIndex.value = pageNo ;
listForm.action = "<c:url value='/web/ve/instr/adultVisitEdu/endInfo/instrEduEndList.do'/>";
listForm.submit();
}
function eduRsltRprtRegPop(){
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/endInfo/popup/eduRsltRprtRegPop.do"
, 650
, 664
, {'eduAplctOrd' : $("#eduAplctOrd").val(), 'eduChasiOrd' : $("#eduChasiOrd").val()}
, "Y"
, "eduRsltRprtRegPop"
);
}
function eduAcmdtRegPop(){
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/endInfo/popup/eduAcmdtRegPop.do"
, 650
, 664
, {'eduAplctOrd' : $("#eduAplctOrd").val(), 'eduChasiOrd' : $("#eduChasiOrd").val()}
, "Y"
, "eduAcmdtRegPop"
);
}
function fileDownload(atchFileId, fileSn, newFileNm){
window.open("<c:url value='/web/ve/instr/adultVisitEdu/endInfo/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"&newFileNm="+newFileNm+"'/>");
}
function fncSave(){
//첨부파일 등록 처리
$('#file_temp').val(""); //첨부파일 중복 등록 방지를 위해 추가
//var data = new FormData(form);
var data = new FormData(document.getElementById("listForm"));
//첨부파일 등록 처리-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);
});
if(confirm("강의계획서를 제출 하시겠습니까?")){
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/asgnmInfo/lctrPlanRegAjax.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>
</head>
<body>
<!-- cont -->
<div class="cont_wrap" id="sub">
<form:form id="listForm" name="listForm" commandName="vEEduAplctVO" method="post">
<input type="hidden" id="eduAplctOrd" name="eduAplctOrd" value="<c:out value="${eduAplctOrd}" />" />
<input type="hidden" id="eduChasiOrd" name="eduChasiOrd" value="<c:out value="${eduChasiOrd}" />" />
<input type="hidden" id="searchSubmitYn" name="searchSubmitYn" value="<c:out value="${vEInstrAsgnmVO.searchSubmitYn}" />" />
<input type="hidden" id="searchEduHopeStartDt" name="searchEduHopeStartDt" value="<c:out value="${vEInstrAsgnmVO.searchEduHopeStartDt}" />" />
<input type="hidden" id="searchEduHopeEndDt" name="searchEduHopeEndDt" value="<c:out value="${vEInstrAsgnmVO.searchEduHopeEndDt}" />" />
<input type="hidden" name="pageIndex" />
<input type="hidden" name="limitcount" id="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<div class="cont_tit">
<h2>종료교육상세</h2>
<div class="sns_go">
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/facebook_icon.png" alt="페이스북 바로가기"></button>
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/twitter_icon.png" alt="트위터 바로가기"></button>
</div>
</div>
<div class="tit_box">
<i class="tit_box_icon1"></i>
<div>
<p>찾아가는 저작권 교육</p>
<span>‘찾아가는 저작권 교육’은 저작권 교육이 필요한 <span>전국 초ㆍ중ㆍ고등학교, 청소년ㆍ아동복지ㆍ노인ㆍ장애인 기관 및 단체 등</span>에 직접 방문하여 무료로 강의를 지원하는 맞춤형 교육 서비스입니다.</span>
</div>
</div>
<div class="tb_tit01">
<div class="tb_tit01_left">
<p>교육내역</p>
</div>
</div>
<div class="tb_type01 tb_write">
<table>
<colgroup>
<col style="width: 220px;">
<col style="width: auto;">
<col style="width: 220px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr class="trLength4">
<th scope="row">
<p>교육일시</p>
</th>
<td>
${fn:substring(info.eduHopeDt,0,4)}년 ${fn:substring(info.eduHopeDt,4,6)}월 ${fn:substring(info.eduHopeDt,6,8)}일
</td>
<th scope="row">
<p>차시</p>
</th>
<td>
<fmt:parseDate value="${info.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
~<fmt:parseDate value="${info.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
(<c:out value='${info.lrnTm}'/>분)
</td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>교육일시</p>
</th>
<td colspan="3">
${fn:substring(info.eduHopeDt,0,4)}년 ${fn:substring(info.eduHopeDt,4,6)}월 ${fn:substring(info.eduHopeDt,6,8)}일
</td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>차시</p>
</th>
<td colspan="3">
<fmt:parseDate value="${info.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
~<fmt:parseDate value="${info.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
(<c:out value='${info.lrnTm}'/>분)
</td>
</tr>
<tr class="trLength4">
<th scope="row">
<p>기관(단체)명</p>
</th>
<td><c:out value="${info.insttNm}" /></td>
<th scope="row">
<p>지역</p>
</th>
<td><c:if test="${info.eduSlctCd eq '10'}">(온)</c:if><ve:code codeId="VE0008" code="${info.eduSlctAreaCd}"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>기관(단체)명</p>
</th>
<td colspan="3"><c:out value="${info.insttNm}" /></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>지역</p>
</th>
<td colspan="3"><p id="localeNm"><c:if test="${info.eduSlctCd eq '10'}">(온)</c:if><ve:code codeId="VE0008" code="${info.eduSlctAreaCd}"/></p></td>
</tr>
<tr>
<th scope="row">
<p>교육장소</p>
</th>
<td colspan="3"><c:out value="${info.addr}" /></td>
</tr>
<tr>
<th scope="row">
<p>강의주제</p>
</th>
<td colspan="3">${info.hopeSbjct}</td>
</tr>
<tr class="trLength4">
<th scope="row">
<p>교육대상</p>
</th>
<td><c:out value="${info.trgt}" /></td>
<th scope="row">
<p>인원</p>
</th>
<td><c:out value="${info.prsnl}" /></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>교육대상</p>
</th>
<td colspan="3"><c:out value="${info.trgt}" /></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>인원</p>
</th>
<td colspan="3"><c:out value="${info.prsnl}" /></td>
</tr>
<tr>
<th scope="row">
<p>담당자</p>
</th>
<td colspan="3"><c:out value="${cryptoUtil.decrypt(info.chrgNm)}"/></td>
</tr>
<tr class="trLength4">
<th scope="row">
<p>연락처</p>
</th>
<td><c:out value="${cryptoUtil.decrypt(info.phone)}"/></td>
<th scope="row">
<p>휴대전화</p>
</th>
<td><c:out value="${cryptoUtil.decrypt(info.clphone)}"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>연락처</p>
</th>
<td colspan="3"><c:out value="${cryptoUtil.decrypt(info.phone)}"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>휴대전화</p>
</th>
<td colspan="3"><c:out value="${cryptoUtil.decrypt(info.clphone)}"/></td>
</tr>
<tr>
<th scope="row">
<p>이메일</p>
</th>
<td colspan="3"><c:out value="${cryptoUtil.decrypt(info.email)}"/></td>
</tr>
</tbody>
</table>
</div>
<div class="tb_tit01">
<div class="tb_tit01_left">
<p>강사정보</p>
</div>
</div>
<div class="tb_type01 tb_write">
<table>
<caption>성인 강의 교육종료 상세 (th 명)을 보여주는 표</caption>
<colgroup>
<col style="width: 220px;">
<col style="width: auto;">
<col style="width: 220px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr class="trLength4">
<th scope="row">
<p>성명</p>
</th>
<td><c:out value="${info2.instrNm}" /></td>
<th scope="row">
<p>구분</p>
</th>
<td><ve:code codeId="VE0001" code="${info2.instrDiv}"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>성명</p>
</th>
<td colspan="3"><c:out value="${info2.instrNm}" /></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>구분</p>
</th>
<td colspan="3"><ve:code codeId="VE0001" code="${info2.instrDiv}"/></td>
</tr>
<tr>
<th scope="row">
<p>거주지</p>
</th>
<td colspan="3"><c:out value="${info2.rsdne}" /></td>
</tr>
<tr class="trLength4">
<th scope="row">
<p>강사료(a)</p>
</th>
<td>
<fmt:formatNumber value="${instrFee.instrFee}" pattern="#,###"/>
</td>
<th scope="row">
<p>출장비(b)</p>
</th>
<td>
<fmt:formatNumber value="${instrFee.bsnsTripFee}" pattern="#,###"/>
</td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>강사료(a)</p>
</th>
<td colspan="3"><fmt:formatNumber value="${instrFee.instrFee}" pattern="#,###"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>출장비(b)</p>
</th>
<td colspan="3"><fmt:formatNumber value="${instrFee.bsnsTripFee}" pattern="#,###"/></td>
</tr>
<tr class="trLength4">
<th scope="row">
<p>여비(c)</p>
</th>
<td>
<fmt:formatNumber value="${instrFee.spareFee}" pattern="#,###"/>
</td>
<th scope="row">
<p>총액(a)+(b)+(c)</p>
</th>
<td>
<fmt:formatNumber value="${instrFee.instrFeeSum}" pattern="#,###"/>
</td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>여비(c)</p>
</th>
<td colspan="3"><fmt:formatNumber value="${instrFee.spareFee}" pattern="#,###"/></td>
</tr>
<tr class="trLength2">
<th scope="row">
<p>총액(a)+(b)+(c)</p>
</th>
<td colspan="3"><fmt:formatNumber value="${instrFee.instrFeeSum}" pattern="#,###"/></td>
</tr>
<c:if test="${not empty fileList}">
<tr>
<th scope="row">
<p>강의계획서</p>
</th>
<td class="file_download" colspan="3">
<c:import url="/cmm/fms/selectScholSealInfs.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${info.lctrPlanAtchFileId}" />
</c:import>
</td>
</tr>
</c:if>
</tbody>
</table>
</div>
<div class="btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
</div>
<div class="btn_right">
<button type="button" class="btnType02 m_btn_block" onclick="linkPage(1)">목록</button>
</div>
</div>
</form:form>
</div>
</body>
</html>

View File

@ -0,0 +1,237 @@
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
//성인강사인지 체크
adultInstrCheck();
});
function fncGoCreate() {
$("#listForm").attr("action","${pageContext.request.contextPath}/web/kccadr/accdnt/acd/adjstChangeDateCreate.do").submit();
}
function fncGoDetail(eduAplctOrd,eduChasiOrd){
$("#eduAplctOrd").val(eduAplctOrd);
$("#eduChasiOrd").val(eduChasiOrd);
$("#listForm").attr("action","${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/endInfo/instrEduEndDetail.do").submit();
}
function linkPage(pageNo){
var listForm = document.listForm ;
listForm.pageIndex.value = pageNo ;
listForm.action = "<c:url value='/web/ve/instr/adultVisitEdu/endInfo/instrEduEndList.do'/>";
listForm.submit();
}
function schdlPage(){
var listForm = document.listForm ;
listForm.action = "<c:url value='/web/ve/instr/adultVisitEdu/endInfo/instrEduEndSchdl.do'/>";
listForm.submit();
}
function goReqStatus(){
$("#listForm").attr("action","${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/instrInfo/instrPrflReg.do").submit();
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
$(this).val('');
});
}
</script>
<!-- cont -->
<div class="cont_wrap" id="sub">
<form:form id="listForm" name="listForm" commandName="vEInstrAsgnmVO">
<input type="hidden" name="pageIndex" value="<c:out value='${vEInstrAsgnmVO.pageIndex}' default='1' />"/>
<input type="hidden" name="searchSortCnd" value="<c:out value="${vEInstrAsgnmVO.searchSortCnd}" />" />
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEInstrAsgnmVO.searchSortOrd}" />" />
<input type="hidden" name="searchStatus" value="<c:out value="${vEInstrAsgnmVO.searchStatus}" />" />
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="" />
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd" value="" />
<div class="cont_tit">
<h2>종료교육목록</h2>
<div class="sns_go">
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/facebook_icon.png" alt="페이스북 바로가기"></button>
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/twitter_icon.png" alt="트위터 바로가기"></button>
</div>
</div>
<div class="list_top">
<div class="list_top_left">
<label for="searchSubmitYn" class="label">검색조건 선택</label>
<select class="selType1" name="searchSubmitYn" id="searchSubmitYn">
<option value="" <c:if test="${vEInstrAsgnmVO.searchSubmitYn eq ''}">selected</c:if>>전체</option>
<option value="Y" <c:if test="${vEInstrAsgnmVO.searchSubmitYn eq 'Y'}">selected</c:if>>완료</option>
<option value="N" <c:if test="${vEInstrAsgnmVO.searchSubmitYn eq 'N'}">selected</c:if>>미완료</option>
</select>
</div>
<div class="btn_wrap">
<div class="calendar_wrap">
<%-- <input type="text" name="searchEduHopeStartDt" value="${vEInstrAsgnmVO.searchEduHopeStartDt}" class="calendar" title="시작일 선택"> --%>
<duet-date-picker identifier="date" name="searchEduHopeStartDt" class="startDate" value="${vEInstrAsgnmVO.searchEduHopeStartDt}"></duet-date-picker>
</div>
~
<div class="calendar_wrap">
<%-- <input type="text" name="searchEduHopeEndDt" value="${vEInstrAsgnmVO.searchEduHopeEndDt}" class="calendar" title="종료일 선택"> --%>
<duet-date-picker identifier="date" name="searchEduHopeEndDt" class="endDate" value="${vEInstrAsgnmVO.searchEduHopeEndDt}"></duet-date-picker>
</div>
<script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/duetdatepicker.js"></script>
<button type="button" class="btnType01" onclick="linkPage(1)">검색</button>
<button type="button" class="btnType02" onclick="fncReset(this);">초기화</button>
<button type="button" class="btnType01" onclick="schdlPage()">교육일정달력</button>
</div>
</div>
<div class="tb_list01">
<table>
<colgroup>
<col style="width: 5%;">
<col style="width: 10%;">
<col style="width: 8%;">
<col style="width: auto">
<col style="width: 10%;">
<col style="width: 20%;">
<col style="width: 15%;">
</colgroup>
<thead>
<tr>
<th scope="col">번호</th>
<th scope="col">교육일자</th>
<th scope="col">요일</th>
<th scope="col">시간</th>
<th scope="col">지역</th>
<th scope="col">기관(단체)명</th>
<th scope="col">총 금액</th>
</tr>
</thead>
<tbody>
<c:forEach var="list" items="${vEInstrAsgnmVOList}" varStatus="status">
<fmt:parseDate value="${list.eduHopeDt}" var="eduHopeDt" pattern="yyyy.MM.dd"/> <!-- 요일 구하기 -->
<c:choose>
<c:when test="${list.notiCnt == 0}">
<tr class="new_cont">
</c:when>
<c:otherwise>
<tr>
</c:otherwise>
</c:choose>
<td>
<p>
<c:if test="${vEInstrAsgnmVO.searchSortOrd eq 'desc' }">
<c:out value="${ ( paginationInfo.totalRecordCount - ((paginationInfo.currentPageNo -1)*paginationInfo.recordCountPerPage) ) - status.index }"/>
</c:if>
<c:if test="${vEInstrAsgnmVO.searchSortOrd eq 'asc' }">
<c:out value="${(paginationInfo.currentPageNo - 1) * paginationInfo.recordCountPerPage + status.count}"/>
</c:if>
</p>
</td>
<td><a href="javascript:fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');">${fn:substring(list.eduHopeDt,0,4)}-${fn:substring(list.eduHopeDt,4,6)}-${fn:substring(list.eduHopeDt,6,8)}</a></td>
<td><a href="javascript:fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');"><fmt:formatDate value="${eduHopeDt}" pattern="E"/></a></td>
<td><a href="javascript:fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');">
<fmt:parseDate value="${list.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
~<fmt:parseDate value="${list.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
(<c:out value='${list.lrnTm}'/>분)
</a></td>
<td><a href="javascript:fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');"><c:if test="${list.eduSlctCd eq '10'}">(온)</c:if><ve:code codeId="VE0008" code="${list.eduSlctAreaCd}"/></a></td>
<td><a href="javascript:fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');"><c:out value='${list.insttNm}'/></a></td>
<c:set var = "fee" value="" />
<c:choose>
<c:when test="${list.instrFeeSbmtYn ne 'Y'}">
<c:set var = "fee" value="정산중" />
</c:when>
<c:when test="${list.acmdtSbmtYn eq 'Y' and empty list.acmdtAprvlCd}">
<c:set var = "fee" value="정산중" />
</c:when>
<c:otherwise>
<c:set var = "fee" value="${list.instrFee + list.specialWorkAllow + list.distanceAllow + list.trafficFee + list.acmdtFee}" />
</c:otherwise>
</c:choose>
<td><p><c:out value="${fee}" /></p></td>
</tr>
</c:forEach>
<c:if test="${empty vEInstrAsgnmVOList}">
<tr>
<td colspan="7"><spring:message code="common.nodata.msg" /></td>
</tr>
</c:if>
</tbody>
</table>
</div>
<div class="tb_list01_m">
<c:forEach var="list" items="${vEInstrAsgnmVOList}" varStatus="status">
<fmt:parseDate value="${list.eduHopeDt}" var="eduHopeDt" pattern="yyyy.MM.dd"/> <!-- 요일 구하기 -->
<ul onclick="fncGoDetail('<c:out value="${list.eduAplctOrd}"/>', '<c:out value="${list.eduChasiOrd}"/>');">
<li>
<span>번호</span>
<span>
<c:if test="${vEInstrAsgnmVO.searchSortOrd eq 'desc' }">
<c:out value="${ ( paginationInfo.totalRecordCount - ((paginationInfo.currentPageNo -1)*paginationInfo.recordCountPerPage) ) - status.index }"/>
</c:if>
<c:if test="${vEInstrAsgnmVO.searchSortOrd eq 'asc' }">
<c:out value="${(paginationInfo.currentPageNo - 1) * paginationInfo.recordCountPerPage + status.count}"/>
</c:if>
</span>
</li>
<li>
<span>교육일자</span>
<span>${fn:substring(list.eduHopeDt,0,4)}-${fn:substring(list.eduHopeDt,4,6)}-${fn:substring(list.eduHopeDt,6,8)}</span>
</li>
<li>
<span>요일</span>
<span><fmt:formatDate value="${eduHopeDt}" pattern="E"/></span>
</li>
<li>
<span>시간</span>
<span>
<fmt:parseDate value="${list.strtTm}" var="strtTm" pattern="kkmm"/><fmt:formatDate value="${strtTm}" pattern="kk:mm"/>
~<fmt:parseDate value="${list.endTm}" var="endTm" pattern="kkmm"/><fmt:formatDate value="${endTm}" pattern="kk:mm"/>
(<c:out value='${list.lrnTm}'/>분)
</span>
</li>
<li>
<span>지역</span>
<span><c:if test="${list.eduSlctCd eq '10'}">(온)</c:if><ve:code codeId="VE0008" code="${list.eduSlctAreaCd}"/></span>
</li>
<li>
<span>기관명</span>
<span><c:out value='${list.insttNm}'/></span>
</li>
<li>
<span>총 금액</span>
<c:set var = "fee" value="" />
<c:choose>
<c:when test="${list.instrFeeSbmtYn ne 'Y'}">
<c:set var = "fee" value="정산중" />
</c:when>
<c:when test="${list.acmdtSbmtYn eq 'Y' and empty list.acmdtAprvlCd}">
<c:set var = "fee" value="정산중" />
</c:when>
<c:otherwise>
<c:set var = "fee" value="${list.instrFee + list.specialWorkAllow + list.distanceAllow + list.trafficFee + list.acmdtFee}" />
</c:otherwise>
</c:choose>
<span>
<c:out value='${fee}'/>
</span>
</li>
</ul>
</c:forEach>
</div>
<div class="page">
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
</div>
</form:form>
</div>

View File

@ -0,0 +1,280 @@
<!DOCTYPE html>
<%@ 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" %>
<%
/**
* @Class Name : eduSchdlMngList.jsp
* @Description : 관리자 일정관리
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.16 김봉호 최초 생성
* @author 김봉호
* @since 2021.08.16
* @version 1.0
* @see
*
*/
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.fc-day-sat { color:#0000FF; } /* 토요일 */
.fc-day-sun { color:#FF0000; } /* 일요일 */
</style>
<link type="text/css" rel="stylesheet" href="<c:url value='/js/fullcalendar/5.9.0/main.css' />" />
<script type="text/javascript" src="<c:url value='/js/fullcalendar/5.9.0/main.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/fullcalendar/5.9.0/locales-all.js'/>"></script>
<script type="text/javascript">
$(document).ready(function(){
});
var ex_s_todate;// = info.startStr;
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('schduleManager');
var calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'ko',
timezone : "local",
weekends : true,
editable : false,
firstDay : 0, //월요일이 먼저 오게 하려면 1
dayMaxEvents: true,
navLinks: true,
customButtons: {
myCustomButton: {
text: '오늘',
click: function(event, elm) {
alert('clicked the custom button!');
}
},viewWeekends : {
text : '주말',
click : function (event, elm) {
calendar.setOption("weekends" , calendar.getOption("weekends") ? false : true);
}
}
},buttonText: {
listMonth: '일정'
},
headerToolbar: {
left: 'prevYear nextYear today',
center: 'prev title next',
right: 'dayGridMonth,listMonth'
},
eventSources: [
{
events: function(info, successCallback, failureCallback) {
console.log(info);
/*
alert(info.start);
alert(info.startStr);
alert(JSON.stringify(info));
alert(JSON.stringify(info.startStr));
*/
var s_todate = info.startStr;
ex_s_todate = info.startStr;
var searchDt = $("#searchCalendarCode").val();
$.ajax({
url: '<c:url value="/web/ve/instr/adultVisitEdu/endInfo/adultSchduleManagerAjaxLoadData.do"/>',
type: 'POST',
dataType: 'json',
data: {
searchStartDt : "",
searchStartDt : s_todate,
todate : info.start,
//todate : info.startStr,
//todate : s_todate,
//todate : "",
searchYearMonth : function(){
return "";
}
},
success: function(data) {
successCallback(data);
// 날짜 계산
setCalDate(data, info.startStr);
}
});
}
}
],
eventContent: function(arg, createElement) {
event.preventDefault();
console.log(arg.event._def.url);
arg.event._def.url = "#none";
},
eventClick: function(info) {
info.jsEvent.preventDefault();
schDetailPop(info.event._def.extendedProps.schSeq, info.event._def.extendedProps.schChasiSeq);
return false;
},
});
calendar.render();
});
function schDetailPop(schSeq, schChasiSeq) {
window.open('', 'schDetailPop', "width=800, height=520, left=100, top=130","location = no","status= no","toolbars= no");
document.listForm.eduAplctOrd.value = schSeq ;
document.listForm.eduChasiOrd.value = schChasiSeq ;
document.listForm.method = "post";
document.listForm.action = "${pageContext.request.contextPath}/kccadr/oprtn/tngrVisitEdu/popup/SchduleManagerPopDetail.do";
document.listForm.target = "schDetailPop" ;
document.listForm.submit();
}
function excelDownLoad(){
var listForm = document.listForm ;
listForm.searchStartDt.value = ex_s_todate ;
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/tngrSchduleManagerExcelDownLoad.do'/>";
listForm.submit();
}
/*
*##############################################################################
* START
*##############################################################################
*/
// 날짜 계산
function setCalDate(data, startStr) {
// 현재월 구하기
startStr = startStr.substr(0, 10);
startStr = replaceAll(startStr, "-", "");
startStr = replaceAll(startStr, ".", "");
startStr = replaceAll(startStr, "/", "");
var todayYear = startStr.substring(0,4);
var todayMonth = 0;
var todayDay = startStr.substring(6,8);
if (todayDay == "01") {
todayMonth = startStr.substring(4,6);
}
else {
if (startStr.substring(4,6) == "12") {
todayMonth = "01";
}
else {
todayMonth = parseInt(startStr.substring(4,6), 10) + 1;
if (todayMonth < 10) {
todayMonth = "0" + todayMonth;
}
}
}
// End
//alert(todayMonth);
var monthCnt = 0;
var week1Cnt = 0, week2Cnt = 0, week3Cnt = 0, week4Cnt = 0, week5Cnt = 0, week6Cnt = 0;
var sHtml = "";
for (var j = 0; j < data.length; j++) {
var schStartDate = data[j].start.substr(0, 10);
schStartDate = replaceAll(schStartDate, "-", "");
schStartDate = replaceAll(schStartDate, ".", "");
schStartDate = replaceAll(schStartDate, "/", "");
var thisYear = schStartDate.substring(0,4);
var thisMonth = schStartDate.substring(4,6);
var thisDay = schStartDate.substring(6,8);
var thisWeek = getSecofWeek(schStartDate);
// 해당월 데이터만 처리
if (todayMonth == thisMonth) {
monthCnt++;
if (thisWeek == 1) {
week1Cnt++;
}
else if (thisWeek == 2) {
week2Cnt++;
}
else if (thisWeek == 3) {
week3Cnt++;
}
else if (thisWeek == 4) {
week4Cnt++;
}
else if (thisWeek == 5) {
week5Cnt++;
}
else if (thisWeek == 6) {
week6Cnt++;
}
}
}
sHtml += "전체 : " + monthCnt + "건";
sHtml += " &nbsp;(1주차 : " + week1Cnt + "건";
sHtml += ", &nbsp;&nbsp;2주차 : " + week2Cnt + "건";
sHtml += ", &nbsp;&nbsp;3주차 : " + week3Cnt + "건";
sHtml += ", &nbsp;&nbsp;4주차 : " + week4Cnt + "건";
sHtml += ", &nbsp;&nbsp;5주차 : " + week5Cnt + "건";
sHtml += ", &nbsp;&nbsp;6주차 : " + week6Cnt + "건)";
sHtml += '&nbsp;<button type="button" class="btn_down_excel" onclick="excelDownLoad();">일정현황 엑셀 다운로드</button>';
//$("#weekCnt").html(sHtml);
}
// 해당일 주차 계산
function getSecofWeek(date) {
var d = new Date( date.substring(0,4), parseInt(date.substring(4,6))-1, date.substring(6,8) );
var fd = new Date( date.substring(0,4), parseInt(date.substring(4,6))-1, 1 );
return Math.ceil((parseInt(date.substring(6,8))+fd.getDay())/7);
}
// ReplaceAll
function replaceAll(str, searchStr, replaceStr) {
return str.split(searchStr).join(replaceStr);
}
</script>
<title>일정현황</title>
</head>
<body>
<form:form id="listForm" name="listForm" method="post">
<input type="hidden" name="eduAplctOrd" value="" />
<input type="hidden" name="eduChasiOrd" value="" />
<input type="hidden" name="searchStartDt" value="" />
</form:form>
<div class="cont_wrap">
<div class="cont_tit">
<h2>성인 강의 종료교육 목록</h2>
<div class="sns_go">
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/facebook_icon.png" alt="페이스북 바로가기"></button>
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/twitter_icon.png" alt="트위터 바로가기"></button>
</div>
</div>
<div class="box">
<br />
<div style="float: right; padding-right: 40px; color: #777777;" id="weekCnt"></div>
<div class="cont">
<div id="schduleManager"></div>
</div>
</div>
</div>
<!-- //cont -->
</body>
</html>

View File

@ -0,0 +1,299 @@
<%@ 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"%>
<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 -->
*/
//저장
//첨부파일 등록 처리
$('#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("숙박 영수증을 등록 하시겠습니까?")){
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/endInfo/popup/eduAcmdtPopupAjax.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" name="sbmtYn" id="sbmtYn" value="" />
<input type="hidden" name="limitcount" id="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<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="exprnClsrmEndRslt_wrap">
<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>
<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">
<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>
<%-- <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>
<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">
<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>
</td>
</tr>
</tbody>
</table>
</div> --%>
<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>

View File

@ -0,0 +1,337 @@
<%@ 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 : filePopup.jsp
* @Description : 교육확정안 등록 팝업
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2021.08.09 김봉호 최초 생성
* @author 김봉호
* @since 2021.08.21
* @version 1.0
* @see
*
*/
%>
<script type="text/javascript">
</script>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
//파일첨부관련 설정들===============================================
$(".btn_add_file").on('click', function(){
$("#file_temp").click();
});
$("#limitcount").val("3");
//파일첨부관련 설정들===============================================
// 레이어팝업 포커싱 이동 수정
$(".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 -->
*/
//저장
//첨부파일 등록 처리
$('#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("결과보고 등록을 하시겠습니까?")){
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "${pageContext.request.contextPath}/web/ve/instr/adultVisitEdu/endInfo/popup/eduRsltRprtPopupAjax.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" name="sbmtYn" id="sbmtYn" value="" />
<input type="hidden" name="limitcount" id="limitcount" value="3" /><!-- 최대 업로드 파일갯수 -->
<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>
<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">
<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>특이사항</p>
</th>
<td>
<textarea name="unqIsues" title="특이사항"><c:out value="${vEEduRprtVO.unqIsues}" /></textarea>
</td>
</tr>
<tr>
<th scope="row">
<p>건의사항</p>
</th>
<td>
<textarea name="sgstnIsues" title="건의사항"><c:out value="${vEEduRprtVO.sgstnIsues}" /></textarea>
</td>
</tr>
</tbody>
</table>
</div>
<dl class="filewrap_div filewrap_eduRsltRprtRegPop">
<dt><p class="req_text"><span>필수입력 항목</span>*</p>첨부파일</dt>
<dd class="upload_area">
<div class="btn_wrap">
<button type="button" class="btnType01 btn_add_file">파일 찾기</button>
<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">
<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>
</dd>
</dl>
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" onclick="fncSave('I'); return false;" class="btnType01">임시저장</button>
<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>