관리자 기반강화 select2(다중선택) 적용
This commit is contained in:
parent
084f443f5e
commit
589df904a7
@ -1,6 +1,8 @@
|
|||||||
package kcc.ve.oprtn.cndtnSspnIdtmt.trgtMng.service;
|
package kcc.ve.oprtn.cndtnSspnIdtmt.trgtMng.service;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import kcc.com.cmm.ComDefaultVO;
|
import kcc.com.cmm.ComDefaultVO;
|
||||||
|
|
||||||
@ -42,6 +44,7 @@ public class CndtnTrgtMngVO extends ComDefaultVO implements Serializable {
|
|||||||
private String atchFileId;// 첨부파일 ID
|
private String atchFileId;// 첨부파일 ID
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> searchSelStatusList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -197,8 +200,16 @@ public class CndtnTrgtMngVO extends ComDefaultVO implements Serializable {
|
|||||||
public void setAtchFileId(String atchFileId) {
|
public void setAtchFileId(String atchFileId) {
|
||||||
this.atchFileId = atchFileId;
|
this.atchFileId = atchFileId;
|
||||||
}
|
}
|
||||||
|
public List<String> getSearchSelStatusList() {
|
||||||
|
return searchSelStatusList;
|
||||||
|
}
|
||||||
|
public void setSearchSelStatusList(List<String> searchSelStatusList) {
|
||||||
|
this.searchSelStatusList = searchSelStatusList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchSelStatusToList(String searchSelStatus) {
|
||||||
|
this.searchSelStatusList = Arrays.asList(searchSelStatus.split(","));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -169,8 +169,6 @@ public class CndtnTrgtMngController {
|
|||||||
//로그인 처리====================================
|
//로그인 처리====================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String userWork = this.getUserWork(request);
|
String userWork = this.getUserWork(request);
|
||||||
cndtnTrgtInfoMngVO.setSearchCondition(userWork);
|
cndtnTrgtInfoMngVO.setSearchCondition(userWork);
|
||||||
|
|
||||||
@ -214,6 +212,9 @@ public class CndtnTrgtMngController {
|
|||||||
//대상 리스트, 페이징 정보 전달
|
//대상 리스트, 페이징 정보 전달
|
||||||
model.addAttribute("list", cndtnTrgtInfoMngVOList);
|
model.addAttribute("list", cndtnTrgtInfoMngVOList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "oprtn/cndtnSspnIdtmt/trgtList";
|
return "oprtn/cndtnSspnIdtmt/trgtList";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,19 +269,23 @@ public class CndtnTrgtMngController {
|
|||||||
cndtnTrgtInfoMngVO = this.setCndtnPagingStep2(cndtnTrgtInfoMngVO, paginationInfo);
|
cndtnTrgtInfoMngVO = this.setCndtnPagingStep2(cndtnTrgtInfoMngVO, paginationInfo);
|
||||||
|
|
||||||
//검색 조회
|
//검색 조회
|
||||||
|
String selectCondition = "";
|
||||||
if(StringUtil.isNotEmpty(cndtnTrgtInfoMngVO.getSearchKeyword())){
|
if(StringUtil.isNotEmpty(cndtnTrgtInfoMngVO.getSearchKeyword())){
|
||||||
|
|
||||||
|
|
||||||
String selectCondition = "";
|
|
||||||
String searchStatus = cndtnTrgtInfoMngVO.getSearchStatus();
|
String searchStatus = cndtnTrgtInfoMngVO.getSearchStatus();
|
||||||
|
// selectCondition = "AND a."+searchStatus+" LIKE CONCAT ('%', '" +cndtnTrgtInfoMngVO.getSearchKeyword() + "', '%')";
|
||||||
selectCondition = "AND a."+searchStatus+" LIKE CONCAT ('%', '" +cndtnTrgtInfoMngVO.getSearchKeyword() + "', '%')";
|
selectCondition = "AND a."+searchStatus+" LIKE '%" +cndtnTrgtInfoMngVO.getSearchKeyword() + "%'";
|
||||||
cndtnTrgtInfoMngVO.setSearchQuery(selectCondition);
|
cndtnTrgtInfoMngVO.setSearchQuery(selectCondition);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<CndtnTrgtInfoMngVO> cndtnTrgtInfoMngVOList = cndtnTrgtInfoMngService.selectPagingList(cndtnTrgtInfoMngVO);
|
System.out.println("cndtnTrgtInfoMngVO.getSearchSelStatus() : "+ cndtnTrgtInfoMngVO.getSearchSelStatus());
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(cndtnTrgtInfoMngVO.getSearchSelStatus()))
|
||||||
|
{
|
||||||
|
cndtnTrgtInfoMngVO.setSearchSelStatusToList(cndtnTrgtInfoMngVO.getSearchSelStatus());
|
||||||
|
}
|
||||||
|
|
||||||
List<CndtnTrgtMngVO> cndtnTrgtInfoMngVOList = null;
|
List<CndtnTrgtMngVO> cndtnTrgtInfoMngVOList = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
cndtnTrgtInfoMngVOList = cndtnTrgtInfoMngService.selectPagingList(cndtnTrgtInfoMngVO);
|
cndtnTrgtInfoMngVOList = cndtnTrgtInfoMngService.selectPagingList(cndtnTrgtInfoMngVO);
|
||||||
@ -298,6 +303,11 @@ public class CndtnTrgtMngController {
|
|||||||
//대상 리스트, 페이징 정보 전달
|
//대상 리스트, 페이징 정보 전달
|
||||||
model.addAttribute("list", cndtnTrgtInfoMngVOList);
|
model.addAttribute("list", cndtnTrgtInfoMngVOList);
|
||||||
|
|
||||||
|
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
|
||||||
|
codeParam.setCodeId("VEA008");
|
||||||
|
List<CmmnDetailCode> CmmnDetailCodeList = egovCmmUseService.selectCmmCodeDetailOrderByCode(codeParam);
|
||||||
|
model.addAttribute("CmmnDetailCodeList", CmmnDetailCodeList);
|
||||||
|
|
||||||
return "oprtn/cndtnSspnIdtmt/trgtMngList";
|
return "oprtn/cndtnSspnIdtmt/trgtMngList";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,6 +639,9 @@ public class CndtnTrgtMngController {
|
|||||||
CndtnTrgtMngVO cndtnTrgtInfoVO = cndtnTrgtInfoMngService.selectDetail(cndtnTrgtInfoMngVO);
|
CndtnTrgtMngVO cndtnTrgtInfoVO = cndtnTrgtInfoMngService.selectDetail(cndtnTrgtInfoMngVO);
|
||||||
model.addAttribute("info", cndtnTrgtInfoVO);
|
model.addAttribute("info", cndtnTrgtInfoVO);
|
||||||
|
|
||||||
|
String userWork = this.getUserWork(request);
|
||||||
|
model.addAttribute("userWork", userWork);
|
||||||
|
|
||||||
|
|
||||||
//파일 정보 가져오기
|
//파일 정보 가져오기
|
||||||
FileVO fileVO = new FileVO();
|
FileVO fileVO = new FileVO();
|
||||||
@ -639,38 +652,6 @@ public class CndtnTrgtMngController {
|
|||||||
|
|
||||||
return "oprtn/cndtnSspnIdtmt/trgtDetail";
|
return "oprtn/cndtnSspnIdtmt/trgtDetail";
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 대상자목록
|
|
||||||
*/
|
|
||||||
@RequestMapping("/kccadr/oprtn/cndtnSspnIdtmt/trgtMngDetail.do")
|
|
||||||
public String trgtMngDetail(
|
|
||||||
@ModelAttribute("cndtnTrgtInfoMngVO") CndtnTrgtMngVO cndtnTrgtInfoMngVO
|
|
||||||
, ModelMap model
|
|
||||||
, HttpServletRequest request
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
//로그인 처리====================================
|
|
||||||
//로그인 정보 가져오기
|
|
||||||
|
|
||||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
|
||||||
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
|
|
||||||
|
|
||||||
//로그인 처리====================================
|
|
||||||
|
|
||||||
//과정 조회
|
|
||||||
CndtnTrgtMngVO cndtnTrgtInfoVO = cndtnTrgtInfoMngService.selectDetail(cndtnTrgtInfoMngVO);
|
|
||||||
model.addAttribute("info", cndtnTrgtInfoVO);
|
|
||||||
|
|
||||||
|
|
||||||
//파일 정보 가져오기
|
|
||||||
FileVO fileVO = new FileVO();
|
|
||||||
fileVO.setAtchFileId(cndtnTrgtInfoVO.getAtchFileId());
|
|
||||||
List<FileVO> result = fileService.selectFileInfs(fileVO);
|
|
||||||
model.addAttribute("fileList", result);
|
|
||||||
model.addAttribute("fileListCnt", result.size());
|
|
||||||
|
|
||||||
return "oprtn/cndtnSspnIdtmt/trgtMngDetail";
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 조건부기소유예과정 수료자 상세화면
|
* 조건부기소유예과정 수료자 상세화면
|
||||||
*/
|
*/
|
||||||
@ -782,6 +763,13 @@ public class CndtnTrgtMngController {
|
|||||||
model.addAttribute("fileList", result);
|
model.addAttribute("fileList", result);
|
||||||
model.addAttribute("fileListCnt", result.size());
|
model.addAttribute("fileListCnt", result.size());
|
||||||
|
|
||||||
|
|
||||||
|
// 관할청 공통코드
|
||||||
|
ComDefaultCodeVO codeParam = new ComDefaultCodeVO();
|
||||||
|
codeParam.setCodeId("VEA008");
|
||||||
|
List<CmmnDetailCode> CmmnDetailCodeList = egovCmmUseService.selectCmmCodeDetailOrderByCode(codeParam);
|
||||||
|
model.addAttribute("CmmnDetailCodeList", CmmnDetailCodeList);
|
||||||
|
|
||||||
return "oprtn/cndtnSspnIdtmt/trgtMngMdfy";
|
return "oprtn/cndtnSspnIdtmt/trgtMngMdfy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,6 +201,12 @@
|
|||||||
<isNotEmpty property="searchSmbtEndDt">
|
<isNotEmpty property="searchSmbtEndDt">
|
||||||
AND TO_CHAR(A.FRST_REGIST_PNTTM, 'YYYYMMDD') <![CDATA[ <= ]]> REPLACE(#searchSmbtEndDt#, '.' , '')
|
AND TO_CHAR(A.FRST_REGIST_PNTTM, 'YYYYMMDD') <![CDATA[ <= ]]> REPLACE(#searchSmbtEndDt#, '.' , '')
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
<isNotEmpty property="searchSelStatus">
|
||||||
|
AND a.cmptnt_athrt IN
|
||||||
|
<iterate property="searchSelStatusList" open="(" close=")" conjunction=",">
|
||||||
|
#searchSelStatusList[]#
|
||||||
|
</iterate>
|
||||||
|
</isNotEmpty>
|
||||||
ORDER BY a.frst_regist_pnttm desc
|
ORDER BY a.frst_regist_pnttm desc
|
||||||
OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY;
|
OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY;
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,11 @@
|
|||||||
detailForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtMdfy.do'/>";
|
detailForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtMdfy.do'/>";
|
||||||
detailForm.submit();
|
detailForm.submit();
|
||||||
}
|
}
|
||||||
|
function fncMngMdfy(){
|
||||||
|
var detailForm = document.detailForm ;
|
||||||
|
detailForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtMngMdfy.do'/>";
|
||||||
|
detailForm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -193,7 +198,17 @@
|
|||||||
<div class="btn_center">
|
<div class="btn_center">
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_right">
|
<div class="btn_right">
|
||||||
<button type="button" class="btn_type02" onclick="fncMdfy(); return false;">수정</button>
|
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${empty userWork }">
|
||||||
|
<button type="button" class="btn_type02" onclick="fncMngMdfy(); return false;">수정</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button type="button" class="btn_type02" onclick="fncMdfy(); return false;">수정</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
|
|
||||||
<button type="button" class="btn_type03" onclick="fncGoList(); return false;">목록</button>
|
<button type="button" class="btn_type03" onclick="fncGoList(); return false;">목록</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -332,20 +332,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">관할청</th>
|
<th scope="row">관할청</th>
|
||||||
<td>
|
<td>
|
||||||
<c:choose>
|
<ve:code codeId="VEA008" code="${info.cmptntAthrt }"/>
|
||||||
<c:when test="${empty userWork }">
|
<input type="hidden" name="cmptntAthrt" value="${info.cmptntAthrt }">
|
||||||
<select name="cmptntAthrt" id="cmptntAthrt" class="sel_type1">
|
|
||||||
<option value="">선택</option>
|
|
||||||
<c:forEach var="list" items="${CmmnDetailCodeList}" varStatus="status">
|
|
||||||
<option value="${list.code }" <c:if test="${info.cmptntAthrt==list.code }">selected="selected"</c:if> >${list.codeNm }</option>
|
|
||||||
</c:forEach>
|
|
||||||
</select>
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<ve:code codeId="VEA008" code="${info.cmptntAthrt }"/>
|
|
||||||
<input type="hidden" name="cmptntAthrt" value="${info.cmptntAthrt }">
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -28,7 +28,11 @@
|
|||||||
*/
|
*/
|
||||||
%>
|
%>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet"/>
|
||||||
|
<script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.min.js" /></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<style>
|
<style>
|
||||||
input:read-only{
|
input:read-only{
|
||||||
@ -39,6 +43,19 @@
|
|||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$("#searchSelStatusTemp").select2({
|
||||||
|
placeholder: "관할청 선택"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var select2Val = '${cndtnTrgtInfoMngVO.searchSelStatus}';
|
||||||
|
var valuesArray = select2Val.split(',');
|
||||||
|
|
||||||
|
// Select2 위젯에 값 설정
|
||||||
|
$('#searchSelStatusTemp').val(valuesArray).trigger('change');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
searchInit();
|
searchInit();
|
||||||
|
|
||||||
// 검색 select box
|
// 검색 select box
|
||||||
@ -64,10 +81,9 @@
|
|||||||
$('#calendar').hide();
|
$('#calendar').hide();
|
||||||
$('#searchKeyword').show();
|
$('#searchKeyword').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function searchInit(){
|
function searchInit(){
|
||||||
@ -86,11 +102,27 @@
|
|||||||
linkPage(1);
|
linkPage(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dataMakeSelectVal(){
|
||||||
|
|
||||||
|
var selectedValues = $('#searchSelStatusTemp')
|
||||||
|
.find(':selected')
|
||||||
|
.map(function() {
|
||||||
|
return $(this).val();
|
||||||
|
}).get().join(',');
|
||||||
|
|
||||||
|
$('#searchSelStatus').val(selectedValues);
|
||||||
|
console.log(selectedValues );
|
||||||
|
}
|
||||||
|
|
||||||
function linkPage(pageNo){
|
function linkPage(pageNo){
|
||||||
|
// select2 데이터 정제
|
||||||
|
this.dataMakeSelectVal();
|
||||||
|
|
||||||
|
|
||||||
var listForm = document.listForm ;
|
var listForm = document.listForm ;
|
||||||
listForm.pageIndex.value = pageNo ;
|
listForm.pageIndex.value = pageNo ;
|
||||||
listForm.searchKeyword.value = $('#searchKeyword').val();
|
listForm.searchKeyword.value = $('#searchKeyword').val();
|
||||||
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtList.do'/>";
|
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtMngList.do'/>";
|
||||||
listForm.submit();
|
listForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +228,7 @@
|
|||||||
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEPrcsDetailVO.searchSortOrd}" />" />
|
<input type="hidden" name="searchSortOrd" value="<c:out value="${vEPrcsDetailVO.searchSortOrd}" />" />
|
||||||
<input type="hidden" id="prcsOrd" name="prcsOrd" value="" />
|
<input type="hidden" id="prcsOrd" name="prcsOrd" value="" />
|
||||||
<input type="hidden" id="prcsSortNo" name="prcsSortNo" value="" />
|
<input type="hidden" id="prcsSortNo" name="prcsSortNo" value="" />
|
||||||
|
<input type="hidden" id="searchSelStatus" name="searchSelStatus" value="" />
|
||||||
|
|
||||||
<div class="cont_wrap">
|
<div class="cont_wrap">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@ -217,9 +250,14 @@
|
|||||||
<div class="tb_tit01">
|
<div class="tb_tit01">
|
||||||
<p>대상자 목록</p>
|
<p>대상자 목록</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- list_top -->
|
|
||||||
<div class="list_top search-only">
|
|
||||||
|
|
||||||
|
<div class="list_top">
|
||||||
<div class="list_top_1">
|
<div class="list_top_1">
|
||||||
|
<div class="util_left">
|
||||||
|
<p>구분1</p>
|
||||||
|
</div>
|
||||||
<div class="util_right">
|
<div class="util_right">
|
||||||
<select name="searchStatus" id="searchStatus" class="sel_type1">
|
<select name="searchStatus" id="searchStatus" class="sel_type1">
|
||||||
<option value="trgt_nm" <c:if test="${cndtnTrgtInfoMngVO.searchStatus == 'trgt_nm' }">selected="selected"</c:if>>이름</option>
|
<option value="trgt_nm" <c:if test="${cndtnTrgtInfoMngVO.searchStatus == 'trgt_nm' }">selected="selected"</c:if>>이름</option>
|
||||||
@ -237,10 +275,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="searchKeyword" name="searchKeyword" placeholder="이름을 입력해주세요." title="검색어 입력" class="search_input" value="<c:out value='${cndtnTrgtInfoMngVO.searchKeyword}'/>">
|
<input type="text" id="searchKeyword" name="searchKeyword" placeholder="이름을 입력해주세요." title="검색어 입력" class="search_input" value="<c:out value='${cndtnTrgtInfoMngVO.searchKeyword}'/>">
|
||||||
<button type="button" class="btn_type08" onclick="fncGoList(); return false;">검색</button>
|
|
||||||
<!-- <button class="btn_type03" onclick="fncReset(this); return false;">초기화</button> -->
|
<!-- <button class="btn_type03" onclick="fncReset(this); return false;">초기화</button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="list_top_2">
|
||||||
|
<div class="util_left">
|
||||||
|
<p>구분2</p>
|
||||||
|
</div>
|
||||||
|
<div class="util_right">
|
||||||
|
<p>관할청 </p>
|
||||||
|
|
||||||
|
<select name="searchSelStatusTemp" id="searchSelStatusTemp" class="sel_type1" multiple="multiple" style="width: 75%">
|
||||||
|
<c:forEach var="list" items="${CmmnDetailCodeList}" varStatus="status">
|
||||||
|
<option value="${list.code }" <c:if test="${info.cmptntAthrt==list.code }">selected="selected"</c:if> >${list.codeNm }</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
<button type="button" class="btn_type08" onclick="fncGoList(); return false;">검색</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list_util">
|
<div class="list_util">
|
||||||
@ -334,7 +386,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<c:if test="${empty list}">
|
<c:if test="${empty list}">
|
||||||
<tr><td colspan="3"><spring:message code="common.nodata.msg" /></td></tr>
|
<tr><td colspan="11"><spring:message code="common.nodata.msg" /></td></tr>
|
||||||
</c:if>
|
</c:if>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -232,7 +232,7 @@
|
|||||||
|
|
||||||
function fncGoList(){
|
function fncGoList(){
|
||||||
var listForm = document.listForm ;
|
var listForm = document.listForm ;
|
||||||
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtList.do'/>";
|
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtMngList.do'/>";
|
||||||
listForm.submit();
|
listForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,10 +332,12 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">관할청</th>
|
<th scope="row">관할청</th>
|
||||||
<td>
|
<td>
|
||||||
<ve:select codeId="VEA008" name="cmptntAthrt" id="cmptntAthrt" css="class='sel_type1'"
|
<select name="cmptntAthrt" id="cmptntAthrt" class="sel_type1">
|
||||||
selectedText="${info.cmptntAthrt }" defaultValue=""
|
<option value="">선택</option>
|
||||||
defaultText='선택'
|
<c:forEach var="list" items="${CmmnDetailCodeList}" varStatus="status">
|
||||||
/>
|
<option value="${list.code }" <c:if test="${info.cmptntAthrt==list.code }">selected="selected"</c:if> >${list.codeNm }</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -1,458 +0,0 @@
|
|||||||
<!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="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
|
||||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
|
||||||
<%
|
|
||||||
/**
|
|
||||||
* @Class Name : cndtnEduPrcsMngReg.jsp
|
|
||||||
* @Description : 조건부기소유예 과정 등록
|
|
||||||
* @Modification Information
|
|
||||||
* @
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------- -------- ---------------------------
|
|
||||||
* @ 2021.12.16 조용준 최초 생성
|
|
||||||
* @author 조용주
|
|
||||||
* @since 2021.12.16
|
|
||||||
* @version 1.0
|
|
||||||
* @see
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
%>
|
|
||||||
<html lang="ko">
|
|
||||||
<head>
|
|
||||||
<title>교육과정관리</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<script type="text/javascript">
|
|
||||||
//세부과정 추가 버튼 클릭 시 세부과정 추가
|
|
||||||
$(document).ready(function() {
|
|
||||||
$(".btn_type01").on('click', function(){
|
|
||||||
$("#file_temp").click();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function fncSave(){
|
|
||||||
|
|
||||||
if(fn_valChk())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = new FormData(document.getElementById("createForm"));
|
|
||||||
|
|
||||||
//첨부파일 등록 처리-step2
|
|
||||||
_fileForm2.forEach(function(obj, idx) {
|
|
||||||
if (obj) data.append("file"+idx, obj.fileObj);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
if(confirm("저장하시겠습니까?")){
|
|
||||||
var url = "${pageContext.request.contextPath}/kccadr/oprtn/cndtnSspnIdtmt/trgtRegAjax.do";
|
|
||||||
console.log(data);
|
|
||||||
$.ajax({
|
|
||||||
type:"POST",
|
|
||||||
enctype: 'multipart/form-data',
|
|
||||||
url: url,
|
|
||||||
data: data,
|
|
||||||
dataType:'json',
|
|
||||||
async: false,
|
|
||||||
processData: false,
|
|
||||||
contentType: false,
|
|
||||||
cache: false,
|
|
||||||
success:function(returnData){
|
|
||||||
console.log('returnData :: ', returnData);
|
|
||||||
if(returnData.result == "success"){
|
|
||||||
alert("저장되었습니다.");
|
|
||||||
fncGoList();
|
|
||||||
}else if(returnData.result == "fail"){
|
|
||||||
alert(returnData.message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error:function(request , status, error){
|
|
||||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function fn_valChk(){
|
|
||||||
// 의뢰일 검사
|
|
||||||
if($("#reqPnttm").val().trim() == ""){
|
|
||||||
alert("의뢰일을 입력해주세요.");
|
|
||||||
$("#reqPnttm").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 사건번호 검사
|
|
||||||
if($("input[name='vntYear']").val().trim() == ""){
|
|
||||||
alert("사건번호를 입력해주세요.");
|
|
||||||
$("input[name='vntYear']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 사건번호 검사
|
|
||||||
if($("input[name='vntNmbr']").val().trim() == ""){
|
|
||||||
alert("사건번호를 입력해주세요.");
|
|
||||||
$("input[name='vntNmbr']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 관할청 검사
|
|
||||||
if($("input[name='cmptntAthrt']").val()){
|
|
||||||
alert("관할청을 입력해주세요.");
|
|
||||||
$("input[name='cmptntAthrt']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($("#sex").val() == "선택" || $("#sex").val().trim() == ""){
|
|
||||||
alert("성별을 선택해주세요.");
|
|
||||||
$("#sex").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 성명 검사
|
|
||||||
if($("input[name='trgtNm']").val().trim() == ""){
|
|
||||||
alert("성명을 입력해주세요.");
|
|
||||||
$("input[name='trgtNm']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 생년월일 검사
|
|
||||||
if($("#dBirth").val().trim() == ""){
|
|
||||||
alert("생년월일을 입력해주세요.");
|
|
||||||
$("#dBirth").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 의뢰번호 검사
|
|
||||||
if($("input[name='reqNmbr']").val().trim() == ""){
|
|
||||||
alert("의뢰번호를 입력해주세요.");
|
|
||||||
$("input[name='reqNmbr']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 의뢰상태 검사
|
|
||||||
/* if($("#reqStateCd").val().trim() == ""){
|
|
||||||
alert("의뢰상태를 입력해주세요.");
|
|
||||||
$("input[name='reqStateCd']").focus();
|
|
||||||
return true;
|
|
||||||
} */
|
|
||||||
|
|
||||||
// 교육상태 검사
|
|
||||||
/* if($("input[name='eduStateCd']").val().trim() == ""){
|
|
||||||
alert("교육상태를 입력해주세요.");
|
|
||||||
$("input[name='eduStateCd']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// 검사명 검사
|
|
||||||
if($("input[name='prsctrNm']").val().trim() == ""){
|
|
||||||
alert("검사명을 입력해주세요.");
|
|
||||||
$("input[name='prsctrNm']").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 주소 검사
|
|
||||||
if($("#post").val().trim() == "" || $("#addr").val().trim() == ""){
|
|
||||||
alert("주소를 입력해주세요.");
|
|
||||||
$("#post").focus();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false; // 모든 검사를 통과하면 false 반환
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function fncGoList(){
|
|
||||||
var listForm = document.listForm ;
|
|
||||||
listForm.action = "<c:url value='/kccadr/oprtn/cndtnSspnIdtmt/trgtList.do'/>";
|
|
||||||
listForm.submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 파일등록 */
|
|
||||||
var _fileIdx = 0;
|
|
||||||
var _fileForm2 = new Array();
|
|
||||||
function handleFileUpload(files,obj) //업로드 function
|
|
||||||
{
|
|
||||||
console.log('files', files);
|
|
||||||
var limitsize = 20*1024*1024; //파일 제한 체크(1개, 20MB)
|
|
||||||
for (var i = 0; i < files.length; i++){
|
|
||||||
if(files[i].size > limitsize){
|
|
||||||
alert(files[i].name+"파일 사이즈가"+getStrFileSize(files[i].size)+"로 20MB이하만 업로드 가능합니다.");
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < files.length; i++)
|
|
||||||
{
|
|
||||||
var fd = new FormData();
|
|
||||||
fd.append('file', files[i]);
|
|
||||||
var tmpObj = new Object();
|
|
||||||
tmpObj.name = "file_" + _fileIdx;
|
|
||||||
tmpObj.fileObj = files[i];
|
|
||||||
|
|
||||||
_fileForm2.push(tmpObj);
|
|
||||||
sendFileToServer(fd, obj, files[i], _fileIdx);
|
|
||||||
_fileIdx++;
|
|
||||||
|
|
||||||
var totalfileSize = 0;
|
|
||||||
$('.totalfileCount').text($('.item_file_size').length) ;
|
|
||||||
$('.item_file_size').each(function(){
|
|
||||||
totalfileSize += $(this).val()*1 ;
|
|
||||||
});
|
|
||||||
$('.totalfileSize').text(getStrFileSize(totalfileSize)) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form:form id="listForm" name="listForm" commandName="vEPrcsDetailVO" method="post">
|
|
||||||
</form:form>
|
|
||||||
<form:form id="createForm" name="createForm" commandName="adjustDeptManageVO" method="post">
|
|
||||||
<!-- cont -->
|
|
||||||
<div class="cont_wrap">
|
|
||||||
<div class="box">
|
|
||||||
|
|
||||||
<!-- cont_tit -->
|
|
||||||
<div class="cont_tit">
|
|
||||||
<h2>대상자 등록</h2>
|
|
||||||
<ul class="cont_nav">
|
|
||||||
<li class="home"><a href="/"><i></i></a></li>
|
|
||||||
<li>
|
|
||||||
<p>조건부기소유예관리</p>
|
|
||||||
</li>
|
|
||||||
<li><span class="cur_nav">대상자 목록</span></li>
|
|
||||||
<li><span class="cur_nav">대상자 등록</span></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!-- //cont_tit -->
|
|
||||||
|
|
||||||
<div class="cont">
|
|
||||||
<!-- list_상세 -->
|
|
||||||
<div class="tb_tit01">
|
|
||||||
<p>대상자 등록</p>
|
|
||||||
</div>
|
|
||||||
<div class="tb_type02">
|
|
||||||
<table>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 210px;">
|
|
||||||
<col style="width: auto;">
|
|
||||||
<col style="width: 210px;">
|
|
||||||
<col style="width: auto;">
|
|
||||||
</colgroup>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">의뢰일</th>
|
|
||||||
<td>
|
|
||||||
<div id="calendar">
|
|
||||||
<div class="calendar_wrap">
|
|
||||||
<input type="text" class="calendar" placeholder="의뢰일" title="의뢰일 선택" id="reqPnttm" name="reqPnttm" value="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">사건번호</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="vntYear" style="width: 150px;margin-right: 10px;"/>형제
|
|
||||||
<input type="text" name="vntNmbr" style="width: 150px;margin-left: 10px;" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">관할청</th>
|
|
||||||
<td>
|
|
||||||
<ve:select codeId="VEA008" name="cmptntAthrt" id="cmptntAthrt" css="class='sel_type1'"
|
|
||||||
selectedText="" defaultValue=""
|
|
||||||
defaultText='선택'
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">성별</th>
|
|
||||||
<td>
|
|
||||||
<ve:select codeId="COM014" name="sex" id="sex" css="class='sel_type1'"
|
|
||||||
selectedText="" defaultValue=""
|
|
||||||
defaultText='선택'
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
<th scope="row">연락처</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="clphone" id="clphone" placeholder="00000000000" maxlength="11"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">성명</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="trgtNm" />
|
|
||||||
</td>
|
|
||||||
<th scope="row">생년월일</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="dBirth" id="dBirth" placeholder="00000000" maxlength="8"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- <tr>
|
|
||||||
<th scope="row">연락처(핸드폰)</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="clphone" />
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr> -->
|
|
||||||
<tr>
|
|
||||||
<th scope="row">의뢰번호</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="reqNmbr" />
|
|
||||||
</td>
|
|
||||||
<th scope="row">의뢰상태</th>
|
|
||||||
<td>
|
|
||||||
<ve:select codeId="VEA005" name="reqStateCd" id="reqStateCd" css="class='sel_type1'"
|
|
||||||
selectedText="" defaultValue=""
|
|
||||||
defaultText='선택'
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">교육상태</th>
|
|
||||||
<td>
|
|
||||||
교육대기
|
|
||||||
<input type="hidden" name="eduStateCd" id="eduStateCd" value="10"/>
|
|
||||||
<%-- <ve:select codeId="VEA002" name="eduStateCd" id="eduStateCd" css="class='sel_type1'"
|
|
||||||
selectedText="" defaultValue=""
|
|
||||||
defaultText='선택'
|
|
||||||
/> --%>
|
|
||||||
</td>
|
|
||||||
<th scope="row">검사명</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="prsctrNm" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="input_adress">
|
|
||||||
<th scope="row">
|
|
||||||
<p>주소</p>
|
|
||||||
</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<label for="post" class="label">우편번호 입력</label>
|
|
||||||
<input type="text" size="20" name="post" id="post" class="adr_input" style="background-color: #eee;" value="<c:out value='${info.post}'/>" readonly>
|
|
||||||
<button class="btnType01 btn_adr_search" onclick="fn_postCode(this); return false;">우편번호 검색</button>
|
|
||||||
<div class="detail_address">
|
|
||||||
<label for="addr" class="label">주소 입력</label>
|
|
||||||
<input type="text" size="60" name="addr" id="addr" class="searchResultAddr" value="<c:out value='${info.addr}'/>" readonly>
|
|
||||||
<label for="addrDetail" class="label">나머지 주소 입력</label>
|
|
||||||
<input type="text" size="20" name="addrDetail" id="addrDetail" class="usrInsertAddr" value="<c:out value='${info.addrDetail}'/>" maxLength="100" placeholder="나머지 주소">
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th scope="row">
|
|
||||||
<p class="req_text"><span>필수입력 항목</span>*</p>
|
|
||||||
<p>첨부파일</p>
|
|
||||||
</th>
|
|
||||||
<td class="upload_area" colspan="3">
|
|
||||||
<!-- <input type="text" id="fileNm" size="30" class="file_input" readonly> --><!-- <button type="button" class="btnType01 btn_add_file">파일 첨부하기</button> -->
|
|
||||||
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
|
|
||||||
<button type="button" id="filebutton" class="btn_type01">파일 첨부하기</button>
|
|
||||||
<p style="padding-left:30px;">첨부파일 가능 용량은 20MB입니다. </p><!-- <p style="color:red;font-weight:500">업로드 순서는 1.신청서 2.안내문 입니다.</p> -->
|
|
||||||
<div class="file_wrap file_upload_box no_img_box">
|
|
||||||
<table class="tbType02">
|
|
||||||
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 60%;">
|
|
||||||
<col style="width: auto;">
|
|
||||||
<col style="width: 20%;">
|
|
||||||
<col style="width: 10%;">
|
|
||||||
</colgroup>
|
|
||||||
<thead>
|
|
||||||
<!-- <th>
|
|
||||||
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
|
||||||
</th> -->
|
|
||||||
<th scope="col">파일 명</th>
|
|
||||||
<th scope="col">종류</th>
|
|
||||||
<th scope="col">크기</th>
|
|
||||||
<th scope="col">삭제</th>
|
|
||||||
</thead>
|
|
||||||
<tbody class="tb_file_before">
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="file_wrap fileAfter file_list_div">
|
|
||||||
<table class="tbType02">
|
|
||||||
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 60%">
|
|
||||||
<col style="width: 10%">
|
|
||||||
<col style="width: 20%">
|
|
||||||
<col style="width: 10%">
|
|
||||||
</colgroup>
|
|
||||||
<thead>
|
|
||||||
<!-- <th>
|
|
||||||
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
|
||||||
</th> -->
|
|
||||||
<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_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
|
||||||
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
|
||||||
<td class="td_filename">
|
|
||||||
<!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> -->
|
|
||||||
<span class="file_name_text"><c:out value='${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('<c:out value='${fileList.atchFileId}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일삭제"><i></i></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- //list_상세 -->
|
|
||||||
|
|
||||||
<!-- btn_wrap -->
|
|
||||||
<div class="btn_wrap btn_layout01">
|
|
||||||
<div class="btn_left">
|
|
||||||
</div>
|
|
||||||
<div class="btn_center">
|
|
||||||
</div>
|
|
||||||
<div class="btn_right">
|
|
||||||
<button type="button" class="btn_type02" onclick="fncSave(); return false;">저장</button>
|
|
||||||
<button type="button" class="btn_type03" onclick="fncGoList(); return false;">목록</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form:form>
|
|
||||||
<!-- //cont -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
Reference in New Issue
Block a user