2023-12-19 09:48 설문 내용 수정

This commit is contained in:
myname 2023-12-19 09:49:00 +09:00
parent 22eaf6c190
commit 68cc9998c3
7 changed files with 1523 additions and 313 deletions

View File

@ -426,6 +426,146 @@ public class ScholInfoController {
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/qustnrPrintPopList"; return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/qustnrPrintPopList";
} }
/**
* 설문 출력 팝업 리스트
*/
@RequestMapping("popup/qustnrAdultPrintPopList.do")
public String qustnrAdultPrintPopList(
@ModelAttribute("vEEduChasiVO") VEEduChasiVO vEEduChasiVO
, QustnrRespondInfoVO qustnrRespondInfoVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
String s_action = request.getParameter("action"); //insert or select
System.out.println("s_action");
System.out.println("qustnrPrintPopList");
System.out.println(vEEduChasiVO.getSiteIdCd());
System.out.println(s_action);
System.out.println(vEEduChasiVO.getQustnrTmplatId());
System.out.println(vEEduChasiVO.getQestnrId());
System.out.println(vEEduChasiVO.getQustnrRespondId());
System.out.println(qustnrRespondInfoVO.getQustnrTmplatId());
System.out.println(qustnrRespondInfoVO.getQestnrId());
System.out.println(qustnrRespondInfoVO.getQustnrRespondId());
//차시 정보
try {
vEEduChasiVO.setInstrDiv(VeConstants.LCTR_DIV_CD_10); //10-청소년 강사, 20-성인강사 VE0001
VEEduChasiVO ChasiInfo = vEEduMIXService.selectChasiInfo(vEEduChasiVO);
ChasiInfo.setInstrNm(egovCryptoUtil.decrypt(ChasiInfo.getInstrNm()));
ChasiInfo.setStrtTm(ChasiInfo.getStrtTm().substring(0,2)+":"+ChasiInfo.getStrtTm().substring(2,4));
ChasiInfo.setEndTm(ChasiInfo.getEndTm().substring(0,2)+":"+ChasiInfo.getEndTm().substring(2,4));
model.addAttribute("chasiInfo", ChasiInfo);
}catch(Exception ex) {
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
}
//참석 답변 정보
try {
List<QustnrRespondInfoVO> chasiSrvyList = egovQustnrRespondInfoService.selectChasiSrvyList202312(qustnrRespondInfoVO);
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
model.addAttribute("chasiSrvyList", chasiSrvyList);
}catch(Exception ex) {
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
}
//설문 참여 정보
/*
try {
model = qustnrCommonUtil._qustnrQesItm(
model
, VeConstants.LCTR_DIV_CD_10 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, "QTMPLA_0000000000001"
, vEALettnQestnrMIXService
, egovQustnrRespondInfoService
);
}catch(Exception ex) {
ex.printStackTrace();
}
*/
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/qustnrAdultPrintPopList";
}
/**
* 설문 출력 팝업 리스트(QR출력)
*/
@RequestMapping("popup/qustnrQRPrintPopList.do")
public String qustnrQRPrintPopList(
@ModelAttribute("vEEduChasiVO") VEEduChasiVO vEEduChasiVO
, QustnrRespondInfoVO qustnrRespondInfoVO
, ModelMap model
, HttpServletRequest request
) throws Exception {
String s_action = request.getParameter("action"); //insert or select
System.out.println("s_action");
System.out.println("qustnrPrintPopList");
System.out.println(vEEduChasiVO.getSiteIdCd());
System.out.println(s_action);
System.out.println(vEEduChasiVO.getQustnrTmplatId());
System.out.println(vEEduChasiVO.getQestnrId());
System.out.println(vEEduChasiVO.getQustnrRespondId());
System.out.println(qustnrRespondInfoVO.getQustnrTmplatId());
System.out.println(qustnrRespondInfoVO.getQestnrId());
System.out.println(qustnrRespondInfoVO.getQustnrRespondId());
//차시 정보
try {
vEEduChasiVO.setInstrDiv(VeConstants.LCTR_DIV_CD_10); //10-청소년 강사, 20-성인강사 VE0001
VEEduChasiVO ChasiInfo = vEEduMIXService.selectChasiInfo(vEEduChasiVO);
ChasiInfo.setInstrNm(egovCryptoUtil.decrypt(ChasiInfo.getInstrNm()));
ChasiInfo.setStrtTm(ChasiInfo.getStrtTm().substring(0,2)+":"+ChasiInfo.getStrtTm().substring(2,4));
ChasiInfo.setEndTm(ChasiInfo.getEndTm().substring(0,2)+":"+ChasiInfo.getEndTm().substring(2,4));
model.addAttribute("chasiInfo", ChasiInfo);
}catch(Exception ex) {
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
}
//참석 답변 정보
try {
List<QustnrRespondInfoVO> chasiSrvyList = egovQustnrRespondInfoService.selectChasiSrvyList202312(qustnrRespondInfoVO);
model.addAttribute("qestnrRespondent", chasiSrvyList.get(0).getQestnrRespondent());
model.addAttribute("qestnrParticipant", chasiSrvyList.get(0).getQestnrParticipant());
model.addAttribute("chasiSrvyList", chasiSrvyList);
}catch(Exception ex) {
System.out.println("Exception vEEduAplctOnlnService.updateBulk");
}
//설문 참여 정보
/*
try {
model = qustnrCommonUtil._qustnrQesItm(
model
, VeConstants.LCTR_DIV_CD_10 //청소년 -10, 성인-20, ...VE0012
, "10" //10-기본설문, 20-신청자설문, 30-강사설문 VEA012
, "QTMPLA_0000000000001"
, vEALettnQestnrMIXService
, egovQustnrRespondInfoService
);
}catch(Exception ex) {
ex.printStackTrace();
}
*/
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/popup/qustnrQRPrintPopList";
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// //

View File

@ -81,7 +81,13 @@
AND AND
a.USE_AT = 'Y' a.USE_AT = 'Y'
ORDER BY a.FRST_REGIST_PNTTM ASC ORDER BY a.FRST_REGIST_PNTTM ASC
LIMIT #subRecordCountPerPage# OFFSET #subFirstIndex#
/*
LIMIT subRecordCountPerPage OFFSET subFirstIndex
*/
OFFSET #subFirstIndex# ROWS FETCH NEXT #subRecordCountPerPage# ROWS ONLY;
</select> </select>

View File

@ -72,7 +72,7 @@
if(returnData.result == 'success'){ if(returnData.result == 'success'){
alert("정상적으로 등록 되었습니다."); alert("정상적으로 등록 되었습니다.");
opener.location.reload(); opener.location.reload();
//self.close(); self.close();
}else{ }else{
alert(returnData.message); alert(returnData.message);
} }

View File

@ -158,7 +158,41 @@
}; };
commonPopLayeropen( commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/qustnrPrintPopList.do" //"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/qustnrPrintPopList.do"
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/qustnrAdultPrintPopList.do"
, 800
, 700
, paramObj
, "Y"
, "scholPrintPop"
);
}
//설문 출력 팝업 - QR 코드만
function fncQustnrQRPrintList(
id //aplctOrd
, chId //chasiOrd
, p_site_id_cd //10,20,30
, p_action //select, insert
, p_qustnrTmplatId //select, insert
, p_qestnrId //select, insert
, p_qustnrRespondId //select, insert
) {
paramObj = {
"eduAplctOrd" : id
,"eduChasiOrd" : chId
,"siteIdCd" : p_site_id_cd
,"action" : p_action
,"qustnrTmplatId" : p_qustnrTmplatId
,"qestnrId" : p_qestnrId
,"qustnrRespondId" : p_qustnrRespondId
};
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/qustnrQRPrintPopList.do"
, 800 , 800
, 700 , 700
, paramObj , paramObj
@ -1153,12 +1187,12 @@
<table> <table>
<caption>교육차시 정보 교육희망일, 시간, 구분, 대상, 배정강사, 인원 을/를 제공하는 표</caption> <caption>교육차시 정보 교육희망일, 시간, 구분, 대상, 배정강사, 인원 을/를 제공하는 표</caption>
<colgroup> <colgroup>
<col style="width: 18%;"> <col style="width: 130px;">
<col style="width: auto;"> <col style="width: auto;">
<col style="width: 14%;"> <col style="width: 14%;">
<col style="width: 12%;"> <col style="width: 120px;">
<col style="width: 8%;"> <col style="width: 8%;">
<col style="width: 12%;"> <col style="width: 360px;">
<col style="width: 12%;"> <col style="width: 12%;">
</colgroup> </colgroup>
<thead> <thead>
@ -1243,6 +1277,11 @@
onclick="fncQustnrPrintList('${list.eduAplctOrd}','${list.eduChasiOrd}','10','print' onclick="fncQustnrPrintList('${list.eduAplctOrd}','${list.eduChasiOrd}','10','print'
,'${list.qustnrTmplatId}','${list.qestnrId10}','${list.qustnrRespondId10}' ,'${list.qustnrTmplatId}','${list.qestnrId10}','${list.qustnrRespondId10}'
)" title="팝업 열림">설문출력</button> )" title="팝업 열림">설문출력</button>
<button type="button" class="btnType04" data-tooltip="sub37_pop20"
onclick="fncQustnrQRPrintList('${list.eduAplctOrd}','${list.eduChasiOrd}','10','print'
,'${list.qustnrTmplatId}','${list.qestnrId10}','${list.qustnrRespondId10}'
)" title="팝업 열림">설문QR</button>
</c:when> </c:when>

View File

@ -0,0 +1,487 @@
<%--
Class Name : qustnrAdultPrintPopList.jsp
Description : 설문출력팝업
Modification Information
1.강의 종류(청소년, 성인 ... VE0011) 및 설문 종류 (10-기본, 20-신청자, 30-강사) 및 상태(등록, 완료) 에 맞는 설문 레이어 팝업을 만든다.
수정일 수정자 수정내용
------- -------- ---------------------------
2021.12.02 조용준 내용
author : 조용준
since : 2021.12.02
--%>
<%@ 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="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
<script type="text/javaScript" language="javascript">
function fncGoScholList(){
linkPage(1);
}
function linkPage(pageNo){
var data = {
pageIndex : pageNo,
searchKeyword : $("#searchKeyword").val(),
searchCondition : $("#searchCondition").val(),
pageUnit : 5,
formId : $("#formId").val(),
}
fncScholList(data);
}
function fncScholList(paramObj) {
if(paramObj == undefined || paramObj == ''){
paramObj = {
pageIndex : 1,
searchKeyword : "",
searchCondition : "",
pageUnit : 5,
formId : $("#formId").val(),
};
}
// 학교 리스트 팝업 호출
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/scholPopList.do"
, 500
, 600
, paramObj
, "N"
, "scholPop"
);
}
function fncScholDataSlct_back(p_code, p_nm){
var fNm = "#"+$("#formId").val();
$(fNm + " #stndrdScholCd").val(p_code);
$(fNm + " #scholInsttNm").val(p_nm);
$(".btn_popup_close").click();
}
function fncScholDataSlct(thisObj){
var inObj = $(thisObj).closest("td").find("input[type=hidden]");
var rsObj = new Object();
$.each(inObj, function(idx, value){
console.log(value.value);
rsObj[value.name] = value.value;
});
callBackSchPop(rsObj);
$(".btn_popup_close").click();
}
function replyCalculation(){
var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량
var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량
if(qestnrParticipant == "" || qestnrParticipant == null){
alert("참석자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(qestnrRespondent == "" || qestnrRespondent == null){
alert("응답자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(Number(qestnrParticipant) < Number(qestnrRespondent)){
alert("응답자 수량이 참석자 수량보다 많습니다.");
$("#qestnrParticipant").focus();
return
}
var responseRateTxt = (Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100)).toFixed(1);
$("#responseRate").text(responseRateTxt + "%");
$("#noResponse").text(Number(qestnrParticipant) - Number(qestnrRespondent));
}
function popupSrvySendSubmit(){
var qestmSize = parseInt($("#qestmInfoSize").val()); //평가문항 수량
var qestnrParticipant = parseInt($("#qestnrParticipant").val()); //참석자 수량
var qestnrRespondent = parseInt($("#qestnrRespondent").val()); //응답자 수량
if(qestnrParticipant == null || qestnrParticipant == ""){
alert("참석자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(qestnrRespondent == null || qestnrRespondent == ""){
alert("응답자 수량을 넣어주세요");
$("#qestnrRespondent").focus();
return
}
if(qestnrParticipant < qestnrRespondent){
alert("응답자 수량이 참석자 수보다 많습니다 확인해 주세요");
$("#qestnrRespondent").focus();
return
}
for(var i=0; i < qestmSize; i++){
var verySatisfied = $("#verySatisfied_"+i).val();
var satisfied = $("#satisfied_"+i).val();
var neither = $("#neither_"+i).val();
var dissatisfied = $("#dissatisfied_"+i).val();
var veryDissatisfied = $("#veryDissatisfied_"+i).val();
if(verySatisfied == null || verySatisfied == ""){
alert((i+1)+"번 [매우만족] 만족도를 정확히 넣어주세요");
$("#verySatisfied_"+i).focus();
return
}
if(satisfied == null || satisfied == ""){
alert((i+1)+"번 [만족] 만족도를 정확히 넣어주세요");
$("#satisfied_"+i).focus();
return
}
if(neither == null || neither == ""){
alert((i+1)+"번 [보통] 만족도를 정확히 넣어주세요");
$("#neither_"+i).focus();
return
}
if(dissatisfied == null || dissatisfied == ""){
alert((i+1)+"번 [불만족] 만족도를 정확히 넣어주세요");
$("#dissatisfied_"+i).focus();
return
}
if(veryDissatisfied == null || veryDissatisfied == ""){
alert((i+1)+"번 [매우불만족] 만족도를 정확히 넣어주세요");
$("#veryDissatisfied_"+i).focus();
return
}
var sum = Number(verySatisfied) + Number(satisfied) + Number(neither) + Number(dissatisfied) + Number(veryDissatisfied);
if(qestnrRespondent != sum ){
alert((i+1)+"문항의 합계가 응답수량과 맞지 않습니다.");
$("#verySatisfied_"+i).focus();
return
}
}
if(confirm("설문결과를 등록 하시겠습니까?")){
// var frm = document.newSrvyPopupForm;
var data = new FormData(document.getElementById("newSrvyPopupForm"));
$.ajax({
type:"POST"
,url:"${pageContext.request.contextPath}/web/ve/aplct/tngrVisitEdu/eduEnd/insertNewSrvyInfoAjax.do"
,data: data
,dataType:'json'
,async: false
,processData: false
,contentType: false
,cache: false
,success:function(returnData){
if(returnData.result == 'success'){
alert("설문결과가 등록 되었습니다.");
window.location.reload();
}else if(returnData.result == 'fail'){
alert(returnData.msg);
location.href="/web/user/login/ssoLogin.do?test=test";
}
}
,error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
}
$(document).ready(function(){
/*
boardCaptionDetailToggle4();
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub36_pop02"]');
activeTarget.hide();
$('[data-tooltip="sub01_pop02"]').focus();
});
//레이어팝업 초정 이동 시 필요한 data 값 추가
var btnLast = $('.popup_cont').find('.page').find('button:last-child');
btnLast.attr('data-focus-next','sub36_pop02');
btnLast.attr('data-focus','sub36_pop02_close');
*/
})
function onclickPrint() {
var $container = $("#srvyPopupPrintDiv").clone();
var innerHtml = $container[0].innerHTML
var popupWindow = window.open("", "_blank", "width=800,height=800")
popupWindow.document.write(
"<!DOCTYPE html>"+
"<html>"+
"<head>"+
"<link rel='stylesheet' href='<c:url value='/visitEdu/usr/publish/css/popup.css'/>'>"+
"<script src='<c:url value='/visitEdu/usr/publish/script/jquery-3.5.0.js'/>'><\/script>"+
"<style>"+
"</style>"+
"<script>"+
"$( document ).ready( function() {" +
"$('div').removeClass('popup_wrap');"+
"$('.btn_layout01').hide();"+
"$('.pop_tb_type02').addClass('popup_print');"+
"$('.pop_tb_type02').css('overflow-y','initial');"+
"});"+
"<\/script>"+
"</head>"+
"<body>"+innerHtml+"</body>"+
"</html>")
popupWindow.document.close()
popupWindow.focus()
setTimeout(() => {
popupWindow.print()
popupWindow.close()
}, 5000)
};
</script>
<!-- 일정 상세 -->
<form id="newSrvyPopupForm" name="newSrvyPopupForm" method="post" >
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${chasiInfo.eduAplctOrd}">
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd" value="${chasiInfo.eduChasiOrd}">
<input type="hidden" name="qustnrTmplatId" id="qustnrTmplatId" value="${chasiSrvyList[0].qustnrTmplatId}">
<input type="hidden" name="qestnrId" id="qestnrId" value="${chasiSrvyList[0].qestnrId}">
<input type="hidden" name="qestmInfoSize" id="qestmInfoSize" value="${fn:length(chasiSrvyList)}">
<div class="tooltip-wrap srvyPopupPrintDiv" id="srvyPopupPrintDiv">
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="sub36_pop02" data-focus="sub36_pop02" data-focus-prev="sub36_pop02_close">
<div class="popup_tit">
<p>강의만족도 설문지 출력</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
<div class="cont_body">
<div class="pop_tb_type02">
<table>
<caption>교육일, 차시, 구분, 대상, 배정강사, 인원, 설문완료 여부 등의 정보제공</caption>
<colgroup>
<col style="width: 10%;">
<col style="width: 15%;">
<col style="width: 8%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 8%;">
<col style="width: 10%;">
</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>
<tr>
<th scope="row" id="popupEduHopeDt">
<c:out value="${chasiInfo.eduHopeDt}" />
</th>
<td id="popupTm">
<c:out value="${chasiInfo.strtTm}" />~<c:out value="${chasiInfo.endTm}" />
</td>
<td id="popupDivCd">
<c:out value="${chasiInfo.divCd}" />
</td>
<td id="popupTrgt">
<c:out value="${chasiInfo.trgt}" />
</td>
<td id="popupInstrNm">
<c:out value="${chasiInfo.instrNm}" />
</td>
<td id="popupPrsnl">
<c:out value="${chasiInfo.prsnl}" />
</td>
<td id="popupSrvyStatus">
<c:choose>
<c:when test="${qestnrParticipant eq '' or qestnrParticipant eq null}">
설문진행중
</c:when>
<c:otherwise>
설문완료
</c:otherwise>
</c:choose>
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
<table>
<caption>참석자, 응답율, 응답자, 무응답에 대한 정보를 제공/입력</caption>
<colgroup>
<col style="width: 120px;">
<col style="width: auto;">
<col style="width: 140px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>설문자 명</p>
</th>
<td>
<label for="qestnrParticipant" class="label">설문자명 입력</label>
<input type="text" numberOnly class="popupInput" style="width: 50%;"
id="qestnrParticipant" name="qestnrParticipant" value="<c:out value="${qestnrParticipant}" />">
</td>
<th scope="row">
<p>설문자 생년월일</p>
</th>
<td>
<label for="qestnrRespondent" class="label">설문자명생년월일 입력</label>
<input type="text" numberOnly class="popupInput" style="width: 50%;"
id="qestnrRespondent" name="qestnrRespondent" value="<c:out value="${qestnrRespondent}" />" onblur="replyCalculation(); return false;">
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
<table>
<caption>평가문항, 매우만족, 만족, 보통, 불만족, 매우 불만족 입력</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
</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>
</tr>
</thead>
<tbody>
<c:forEach items="${chasiSrvyList}" var="QestmInfo" varStatus="status1">
<c:set var="setQustnrRsltId" value="${QestmInfo.qustnrRsltId}"/>
<input type="hidden" name="qustnrQesitmId" value="${QestmInfo.qustnrQesitmId}">
<tr>
<th scope="row" class="t_left">
${status1.count}) <c:out value="${QestmInfo.qestnCn}" escapeXml="false" />
<c:if test="${QestmInfo.mxmmChoiseCo > 1}">
<font color="red"><b>(최대선택건수 ${QestmInfo.mxmmChoiseCo})</b></font>
</c:if>
<input type="hidden" name="resultList[${status1.index}].qestnrId" value="${QestmInfo.qestnrId}">
<input type="hidden" name="resultList[${status1.index}].qestnrQesitmId" value="${QestmInfo.qustnrQesitmId}">
</th>
<td>
<label for="verySatisfied_${status1.index}" class="label">매우만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="매우만족" id="verySatisfied_${status1.index}" name="resultList[${status1.index}].verySatisfied" value="${QestmInfo.verySatisfied}" >
</td>
<td>
<label for="satisfied_${status1.index}" class="label">만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="만족" id="satisfied_${status1.index}" name="resultList[${status1.index}].satisfied" value="${QestmInfo.satisfied}" >
</td>
<td>
<label for="neither_${status1.index}" class="label">보통</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="보통" id="neither_${status1.index}" name="resultList[${status1.index}].neither" value="${QestmInfo.neither}" >
</td>
<td>
<label for="dissatisfied_${status1.index}" class="label">불만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="불만족" id="dissatisfied_${status1.index}" name="resultList[${status1.index}].dissatisfied" value="${QestmInfo.dissatisfied}" >
</td>
<td>
<label for="veryDissatisfied_${status1.index}" class="label">매우불만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="매우불만족" id="veryDissatisfied_${status1.index}" name="resultList[${status1.index}].veryDissatisfied" value="${QestmInfo.veryDissatisfied}" >
</td>
</tr>
</c:forEach>
</tbody>
</table>
<c:choose>
<c:when test="${setQustnrRsltId eq '' or setQustnrRsltId eq null}">
<!-- 응답이 없다. -->
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<!-- <button type="button" class="btnType05" id="popupSubmin" onclick="popupSrvySendSubmit();">제출</button> -->
<button type="button" class="btnType05" id="popupSubmin" onclick="onclickPrint();" title="새창 열림">출력</button>
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">취소</button>
</div>
<div class="btn_right">
</div>
</div>
</c:when>
<c:otherwise>
<!-- 응답이 있다. -->
<script>
replyCalculation();
</script>
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" class="btnType05" id="popupSubmin" onclick="onclickPrint();" title="새창 열림">출력</button>
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">닫기</button>
</div>
<div class="btn_right">
</div>
</div>
</c:otherwise>
</c:choose>
<br/>
<br/>
</div>
</div>
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,529 @@
<%--
Class Name : qustnrQRPrintPopList.jsp
Description : 설문출력팝업(QR코드)
Modification Information
1.강의 종류(청소년, 성인 ... VE0011) 및 설문 종류 (10-기본, 20-신청자, 30-강사) 및 상태(등록, 완료) 에 맞는 설문 레이어 팝업을 만든다.
수정일 수정자 수정내용
------- -------- ---------------------------
2021.12.02 조용준 내용
author : 조용준
since : 2021.12.02
--%>
<%@ 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="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
<script type="text/javaScript" language="javascript">
function fncGoScholList(){
linkPage(1);
}
function linkPage(pageNo){
var data = {
pageIndex : pageNo,
searchKeyword : $("#searchKeyword").val(),
searchCondition : $("#searchCondition").val(),
pageUnit : 5,
formId : $("#formId").val(),
}
fncScholList(data);
}
function fncScholList(paramObj) {
if(paramObj == undefined || paramObj == ''){
paramObj = {
pageIndex : 1,
searchKeyword : "",
searchCondition : "",
pageUnit : 5,
formId : $("#formId").val(),
};
}
// 학교 리스트 팝업 호출
commonPopLayeropen(
"${pageContext.request.contextPath}/web/ve/aplct/cpyrgExprnClsrm/scholInfo/popup/scholPopList.do"
, 500
, 600
, paramObj
, "N"
, "scholPop"
);
}
function fncScholDataSlct_back(p_code, p_nm){
var fNm = "#"+$("#formId").val();
$(fNm + " #stndrdScholCd").val(p_code);
$(fNm + " #scholInsttNm").val(p_nm);
$(".btn_popup_close").click();
}
function fncScholDataSlct(thisObj){
var inObj = $(thisObj).closest("td").find("input[type=hidden]");
var rsObj = new Object();
$.each(inObj, function(idx, value){
console.log(value.value);
rsObj[value.name] = value.value;
});
callBackSchPop(rsObj);
$(".btn_popup_close").click();
}
function replyCalculation(){
var qestnrParticipant = $("#qestnrParticipant").val(); //참석자 수량
var qestnrRespondent = $("#qestnrRespondent").val(); //응답자 수량
if(qestnrParticipant == "" || qestnrParticipant == null){
alert("참석자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(qestnrRespondent == "" || qestnrRespondent == null){
alert("응답자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(Number(qestnrParticipant) < Number(qestnrRespondent)){
alert("응답자 수량이 참석자 수량보다 많습니다.");
$("#qestnrParticipant").focus();
return
}
var responseRateTxt = (Number(qestnrRespondent) / Number(qestnrParticipant)*Number(100)).toFixed(1);
$("#responseRate").text(responseRateTxt + "%");
$("#noResponse").text(Number(qestnrParticipant) - Number(qestnrRespondent));
}
function popupSrvySendSubmit(){
var qestmSize = parseInt($("#qestmInfoSize").val()); //평가문항 수량
var qestnrParticipant = parseInt($("#qestnrParticipant").val()); //참석자 수량
var qestnrRespondent = parseInt($("#qestnrRespondent").val()); //응답자 수량
if(qestnrParticipant == null || qestnrParticipant == ""){
alert("참석자 수량을 넣어주세요");
$("#qestnrParticipant").focus();
return
}
if(qestnrRespondent == null || qestnrRespondent == ""){
alert("응답자 수량을 넣어주세요");
$("#qestnrRespondent").focus();
return
}
if(qestnrParticipant < qestnrRespondent){
alert("응답자 수량이 참석자 수보다 많습니다 확인해 주세요");
$("#qestnrRespondent").focus();
return
}
for(var i=0; i < qestmSize; i++){
var verySatisfied = $("#verySatisfied_"+i).val();
var satisfied = $("#satisfied_"+i).val();
var neither = $("#neither_"+i).val();
var dissatisfied = $("#dissatisfied_"+i).val();
var veryDissatisfied = $("#veryDissatisfied_"+i).val();
if(verySatisfied == null || verySatisfied == ""){
alert((i+1)+"번 [매우만족] 만족도를 정확히 넣어주세요");
$("#verySatisfied_"+i).focus();
return
}
if(satisfied == null || satisfied == ""){
alert((i+1)+"번 [만족] 만족도를 정확히 넣어주세요");
$("#satisfied_"+i).focus();
return
}
if(neither == null || neither == ""){
alert((i+1)+"번 [보통] 만족도를 정확히 넣어주세요");
$("#neither_"+i).focus();
return
}
if(dissatisfied == null || dissatisfied == ""){
alert((i+1)+"번 [불만족] 만족도를 정확히 넣어주세요");
$("#dissatisfied_"+i).focus();
return
}
if(veryDissatisfied == null || veryDissatisfied == ""){
alert((i+1)+"번 [매우불만족] 만족도를 정확히 넣어주세요");
$("#veryDissatisfied_"+i).focus();
return
}
var sum = Number(verySatisfied) + Number(satisfied) + Number(neither) + Number(dissatisfied) + Number(veryDissatisfied);
if(qestnrRespondent != sum ){
alert((i+1)+"문항의 합계가 응답수량과 맞지 않습니다.");
$("#verySatisfied_"+i).focus();
return
}
}
if(confirm("설문결과를 등록 하시겠습니까?")){
// var frm = document.newSrvyPopupForm;
var data = new FormData(document.getElementById("newSrvyPopupForm"));
$.ajax({
type:"POST"
,url:"${pageContext.request.contextPath}/web/ve/aplct/tngrVisitEdu/eduEnd/insertNewSrvyInfoAjax.do"
,data: data
,dataType:'json'
,async: false
,processData: false
,contentType: false
,cache: false
,success:function(returnData){
if(returnData.result == 'success'){
alert("설문결과가 등록 되었습니다.");
window.location.reload();
}else if(returnData.result == 'fail'){
alert(returnData.msg);
location.href="/web/user/login/ssoLogin.do?test=test";
}
}
,error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
}
$(document).ready(function(){
/*
boardCaptionDetailToggle4();
// 레이어팝업 포커싱 이동 수정
$(".tooltip-close").click(function(){
var activeTarget = $('[data-tooltip-con="sub36_pop02"]');
activeTarget.hide();
$('[data-tooltip="sub01_pop02"]').focus();
});
//레이어팝업 초정 이동 시 필요한 data 값 추가
var btnLast = $('.popup_cont').find('.page').find('button:last-child');
btnLast.attr('data-focus-next','sub36_pop02');
btnLast.attr('data-focus','sub36_pop02_close');
*/
})
function onclickPrint() {
var $container = $("#srvyPopupPrintDiv").clone();
var innerHtml = $container[0].innerHTML
var popupWindow = window.open("", "_blank", "width=800,height=800")
popupWindow.document.write(
"<!DOCTYPE html>"+
"<html>"+
"<head>"+
"<link rel='stylesheet' href='<c:url value='/visitEdu/usr/publish/css/popup.css'/>'>"+
"<script src='<c:url value='/visitEdu/usr/publish/script/jquery-3.5.0.js'/>'><\/script>"+
"<style>"+
"</style>"+
"<script>"+
"$( document ).ready( function() {" +
"$('div').removeClass('popup_wrap');"+
"$('.btn_layout01').hide();"+
"$('.pop_tb_type02').addClass('popup_print');"+
"$('.pop_tb_type02').css('overflow-y','initial');"+
"});"+
"<\/script>"+
"</head>"+
"<body>"+innerHtml+"</body>"+
"</html>")
popupWindow.document.close()
popupWindow.focus()
setTimeout(() => {
popupWindow.print()
popupWindow.close()
}, 5000)
};
</script>
<!-- 일정 상세 -->
<form id="newSrvyPopupForm" name="newSrvyPopupForm" method="post" >
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${chasiInfo.eduAplctOrd}">
<input type="hidden" name="eduChasiOrd" id="eduChasiOrd" value="${chasiInfo.eduChasiOrd}">
<input type="hidden" name="qustnrTmplatId" id="qustnrTmplatId" value="${chasiSrvyList[0].qustnrTmplatId}">
<input type="hidden" name="qestnrId" id="qestnrId" value="${chasiSrvyList[0].qestnrId}">
<input type="hidden" name="qestmInfoSize" id="qestmInfoSize" value="${fn:length(chasiSrvyList)}">
<div class="tooltip-wrap srvyPopupPrintDiv" id="srvyPopupPrintDiv">
<div class="popup_wrap popType01" tabindex="0" data-tooltip-con="sub36_pop02" data-focus="sub36_pop02" data-focus-prev="sub36_pop02_close">
<div class="popup_tit">
<p>강의만족도 설문지 QR</p> <button class="btn_popup_close tooltip-close" data-focus="sub36_pop02_close" title="팝업 닫기"><i></i></button>
</div>
<div class="popup_cont">
<div class="cont_body">
<div class="pop_tb_type02">
<!--
<table>
<caption>교육일, 차시, 구분, 대상, 배정강사, 인원, 설문완료 여부 등의 정보제공</caption>
<colgroup>
<col style="width: 10%;">
<col style="width: 15%;">
<col style="width: 8%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 8%;">
<col style="width: 10%;">
</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>
<tr>
<th scope="row" id="popupEduHopeDt">
<c:out value="${chasiInfo.eduHopeDt}" />
</th>
<td id="popupTm">
<c:out value="${chasiInfo.strtTm}" />~<c:out value="${chasiInfo.endTm}" />
</td>
<td id="popupDivCd">
<c:out value="${chasiInfo.divCd}" />
</td>
<td id="popupTrgt">
<c:out value="${chasiInfo.trgt}" />
</td>
<td id="popupInstrNm">
<c:out value="${chasiInfo.instrNm}" />
</td>
<td id="popupPrsnl">
<c:out value="${chasiInfo.prsnl}" />
</td>
<td id="popupSrvyStatus">
<c:choose>
<c:when test="${qestnrParticipant eq '' or qestnrParticipant eq null}">
설문진행중
</c:when>
<c:otherwise>
설문완료
</c:otherwise>
</c:choose>
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
<table>
<caption>참석자, 응답율, 응답자, 무응답에 대한 정보를 제공/입력</caption>
<colgroup>
<col style="width: 120px;">
<col style="width: auto;">
<col style="width: 140px;">
<col style="width: auto;">
</colgroup>
<tbody>
<tr>
<th scope="row">
<p>설문자 명</p>
</th>
<td>
<label for="qestnrParticipant" class="label">설문자명 입력</label>
<input type="text" numberOnly class="popupInput" style="width: 50%;"
id="qestnrParticipant" name="qestnrParticipant" value="<c:out value="${qestnrParticipant}" />">
</td>
<th scope="row">
<p>설문자 생년월일</p>
</th>
<td>
<label for="qestnrRespondent" class="label">설문자명생년월일 입력</label>
<input type="text" numberOnly class="popupInput" style="width: 50%;"
id="qestnrRespondent" name="qestnrRespondent" value="<c:out value="${qestnrRespondent}" />" onblur="replyCalculation(); return false;">
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
<table>
<caption>평가문항, 매우만족, 만족, 보통, 불만족, 매우 불만족 입력</caption>
<colgroup>
<col style="width: auto;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
<col style="width: 12%;">
</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>
</tr>
</thead>
<tbody>
<c:forEach items="${chasiSrvyList}" var="QestmInfo" varStatus="status1">
<c:set var="setQustnrRsltId" value="${QestmInfo.qustnrRsltId}"/>
<input type="hidden" name="qustnrQesitmId" value="${QestmInfo.qustnrQesitmId}">
<tr>
<th scope="row" class="t_left">
${status1.count}) <c:out value="${QestmInfo.qestnCn}" escapeXml="false" />
<c:if test="${QestmInfo.mxmmChoiseCo > 1}">
<font color="red"><b>(최대선택건수 ${QestmInfo.mxmmChoiseCo})</b></font>
</c:if>
<input type="hidden" name="resultList[${status1.index}].qestnrId" value="${QestmInfo.qestnrId}">
<input type="hidden" name="resultList[${status1.index}].qestnrQesitmId" value="${QestmInfo.qustnrQesitmId}">
</th>
<td>
<label for="verySatisfied_${status1.index}" class="label">매우만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="매우만족" id="verySatisfied_${status1.index}" name="resultList[${status1.index}].verySatisfied" value="${QestmInfo.verySatisfied}" >
</td>
<td>
<label for="satisfied_${status1.index}" class="label">만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="만족" id="satisfied_${status1.index}" name="resultList[${status1.index}].satisfied" value="${QestmInfo.satisfied}" >
</td>
<td>
<label for="neither_${status1.index}" class="label">보통</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="보통" id="neither_${status1.index}" name="resultList[${status1.index}].neither" value="${QestmInfo.neither}" >
</td>
<td>
<label for="dissatisfied_${status1.index}" class="label">불만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="불만족" id="dissatisfied_${status1.index}" name="resultList[${status1.index}].dissatisfied" value="${QestmInfo.dissatisfied}" >
</td>
<td>
<label for="veryDissatisfied_${status1.index}" class="label">매우불만족</label>
<input type="text" numberOnly class="popupInput" style="width: 70%;padding:0 5px;text-align:center;"
title="매우불만족" id="veryDissatisfied_${status1.index}" name="resultList[${status1.index}].veryDissatisfied" value="${QestmInfo.veryDissatisfied}" >
</td>
</tr>
</c:forEach>
</tbody>
</table>
<br/>
-->
<script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/qrCode/qrcode.js"></script>
<script src="${pageContext.request.contextPath}/visitEdu/usr/publish/script/qrCodeCustom.js"></script>
<script type="text/javaScript" language="javascript">
$(document).ready(function (){
var url = "";
url += "${pageContext.request.scheme}";
url += "://${pageContext.request.serverName}";
if("${pageContext.request.serverPort}" != '80' || "${pageContext.request.serverPort}" != '443' ){
url += ":${pageContext.request.serverPort}";
}
url += "${pageContext.request.contextPath}";
url += "/web/ve/aplct/tngrVisitEdu/eduEnd/eduEndQustnrNoLoginDetail.do";
url += "?qustnrTmplatId=${vEEduChasiVO.qustnrTmplatId}";
url += "&qestnrId=${vEEduChasiVO.qestnrId}";
url += "&qustnrRespondId=${vEEduChasiVO.qustnrRespondId}";
url += "&siteIdCd=${vEEduChasiVO.siteIdCd}";
url += "&eduAplctOrd=${vEEduChasiVO.eduAplctOrd}";
url += "&eduChasiOrd=${vEEduChasiVO.eduChasiOrd}";
makeCode(url);
console.log("url====");
console.log("${vEEduChasiVO.qustnrTmplatId}");
console.log("${vEEduChasiVO.qestnrId}");
console.log("${vEEduChasiVO.qustnrRespondId}");
console.log(url);
console.log("${vEEduChasiVO.siteIdCd}");
console.log("${vEEduChasiVO.eduAplctOrd}");
console.log("${vEEduChasiVO.eduChasiOrd}");
console.log(url);
console.log("url====");
});
</script>
<div id="qrcode"></div>
<br/>
<c:choose>
<c:when test="${setQustnrRsltId eq '' or setQustnrRsltId eq null}">
<!-- 응답이 없다. -->
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<!-- <button type="button" class="btnType05" id="popupSubmin" onclick="popupSrvySendSubmit();">제출</button> -->
<button type="button" class="btnType05" id="popupSubmin" onclick="onclickPrint();" title="새창 열림">출력</button>
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">취소</button>
</div>
<div class="btn_right">
</div>
</div>
</c:when>
<c:otherwise>
<!-- 응답이 있다. -->
<script>
replyCalculation();
</script>
<div class="pop_btn_wrap btn_layout01">
<div class="btn_left">
</div>
<div class="btn_center">
<button type="button" class="btnType05" id="popupSubmin" onclick="onclickPrint();" title="새창 열림">출력</button>
<button type="button" class="btnType02 tooltip-close" data-focus="sub37_pop01_close" data-focus-next="sub37_pop01">닫기</button>
</div>
<div class="btn_right">
</div>
</div>
</c:otherwise>
</c:choose>
<br/>
<br/>
</div>
</div>
</div>
</div>
</div>
</form>

View File

@ -100,11 +100,20 @@
$('#target_confirm_popup-close').click(); $('#target_confirm_popup-close').click();
} }
function fn_goListForm(data){
var form = document.goListForm ;
form.searchStatus.value = data ;
form.submit();
}
</script> </script>
<!-- content --> <!-- content -->
<div class="cont_wrap" id="sub"> <div class="cont_wrap" id="sub">
<form id="goListForm" name="goListForm" action="<c:url value="/web/ve/aplct/sspnIdtmt/sspnIdtmtEduAplctList.do" />" method="post">
<input type="hidden" id="searchStatus" name="searchStatus" />
</form>
<form name="viewForm" id="viewForm"> <form name="viewForm" id="viewForm">
<input type="hidden" name="prcsAplctPrdOrd"> <input type="hidden" name="prcsAplctPrdOrd">
</form> </form>
@ -118,9 +127,9 @@
<h2>나의강의실</h2> <h2>나의강의실</h2>
</div> </div>
<ul class="edu_process"> <ul class="edu_process">
<li class="edu_apply"><i></i><div class="text_area">신청중 강의<p><span><c:out value="${empty countMap['COUNT_APRVL_CD_10'] ? '0' : countMap['COUNT_APRVL_CD_10']}" /></span>건</p></div></li> <li class="edu_apply" style="cursor: pointer;" onclick="fn_goListForm(10)"><i></i><div class="text_area">신청중 강의<p><span><c:out value="${empty countMap['COUNT_APRVL_CD_10'] ? '0' : countMap['COUNT_APRVL_CD_10']}" /></span>건</p></div></li>
<li class="edu_register"><i></i><div class="text_area">수강중 강의<p><span><c:out value="${empty countMap['COUNT_APRVL_CD_20'] ? '0' : countMap['COUNT_APRVL_CD_20']} " /></span>건</p></div></li> <li class="edu_register" style="cursor: pointer;" onclick="fn_goListForm(5)"><i></i><div class="text_area">수강중 강의<p><span><c:out value="${empty countMap['COUNT_APRVL_CD_20'] ? '0' : countMap['COUNT_APRVL_CD_20']} " /></span>건</p></div></li>
<li class="edu_close"><i></i><div class="text_area">종료된 강의<p><span><c:out value="${empty countMap['COUNT_END_CD'] ? '0' : countMap['COUNT_END_CD']}" /></span>건</p></div></li> <li class="edu_close" style="cursor: pointer;" onclick="fn_goListForm(20)"><i></i><div class="text_area">종료된 강의<p><span><c:out value="${empty countMap['COUNT_END_CD'] ? '0' : countMap['COUNT_END_CD']}" /></span>건</p></div></li>
</ul> </ul>
<div class="tb_tit02"> <div class="tb_tit02">