refactor: 이의신청 파일첨부 솔루션 적용

This commit is contained in:
hylee 2022-12-28 16:35:08 +09:00
parent fab465d003
commit 48b4238968
9 changed files with 853 additions and 195 deletions

View File

@ -293,6 +293,7 @@ public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements I
}
@Override
public RestResponse insertInnorixFile(AdrInnorixFileVO adrInnorixFileVO) {

View File

@ -147,20 +147,22 @@ public class OjctMgrController {
}
String atchFileId = "";
final Map<String, MultipartFile> files = multiRequest.getFileMap();
if (!files.isEmpty()) {
//조정신청_로 첨부파일 네이밍
List<FileVO> result = fileUtil.parseFileInf(files, "이의 신청_", 0, "", "", "");
atchFileId = fileMngService.insertFileInfs(result);
//첨부파일Id(atchFileId) 해당 VO atchFileId변수에 저장
ojctMgrVO.setAtchFileId(atchFileId);
}
// String atchFileId = "";
// final Map<String, MultipartFile> files = multiRequest.getFileMap();
// if (!files.isEmpty()) {
// //조정신청_로 첨부파일 네이밍
// List<FileVO> result = fileUtil.parseFileInf(files, "이의 신청_", 0, "", "", "");
// atchFileId = fileMngService.insertFileInfs(result);
// //첨부파일Id(atchFileId) 해당 VO atchFileId변수에 저장
// ojctMgrVO.setAtchFileId(atchFileId);
// }
System.out.println(" + ojctMgrVO.setAtchFileId() :: " + ojctMgrVO.getAtchFileId());
//
//사용자 유니크 아이디 받아오기
ojctMgrVO.setLastUpdusrId(userId);
ojctMgrVO.setFrstRegisterId(userId);
ojctMgrVO.setAtchFileId(atchFileId);
// ojctMgrVO.setAtchFileId(atchFileId);
if(ojctMgrVO.getAdrSeq() != null) {

View File

@ -25,9 +25,12 @@
<head>
<meta http-equiv="Content-Language" content="ko" >
<link rel="stylesheet" href="/kccadrPb/adm/css/popup.css">
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="userManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script src="/direct/js/jquery.nice-select.min.js"></script>
<script src="<c:url value='/innorix/innorix.js' />"></script>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<!-- <link rel="stylesheet" href="/direct/css/nice-select.css"> -->
<script type="text/javaScript" language="javascript" defer="defer">
$( document ).ready(function(){
@ -321,7 +324,76 @@ function wrapWindowByMask(){
// 레이어 팝업을 띄웁니다.
$('.window').show();
}
</script>
<script type="text/javaScript" language="javascript">
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl' // * 컨트롤 출력 HTML 객체 ID
, transferMode: 'both' // * 업로드, 다운로드 혼합사용
, installUrl: '/innorix/install/install.html' // * Agent 설치 페이지
, uploadUrl: '/innorix/exam/upload.jsp' // * 업로드 URL
// , height:80
// , width: 635
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
fn_callBackInnorix(p.files); // * 파일 정보 DB isnert function
});
};
/*
* 파일 정보 DB insert Ajax
* */
function fn_callBackInnorix(data){
var url = "<c:url value='/kccadr/common/insertInnorixFileAjax.do' />";
var filePath = location.pathname;
var jspFileName = filePath.substring(filePath.lastIndexOf("/")+1, filePath.lastIndexOf("."));
var sendData = {
"innorixFileListVO": data
}
/*
* 공통 : innorixCommon.js
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fnInsert();
// opener.location.reload(true);
}
}
/*
* 등록버튼 클릭 event
* */
function fncReg() {
if (validation()) {
if(confirm("사건문서를 등록 하시겠습니까?")){
if(control.getUploadFiles().length > 0){ // 등록된 파일이 있는지 확인
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control.setPostData(postObj); // * 업로드시 함께 전달될 POST Param 추가
control.upload(); // 업로드 시작
}else{
fnInsert();
}
}
}
}
</script>
</head>
<body>
@ -331,6 +403,7 @@ function wrapWindowByMask(){
<input type="hidden" name="partIdx" id="partIdx" value="" >
<input type="hidden" id="atchFileId" name="atchFileId" value=""/>
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" id="innoDirPath" value="<spring:eval expression="@globalSettings['Globals.Innorix.FilePath']"/>" />
<!-- cont -->
<div class="cont_wrap">
<div class="box">
@ -500,74 +573,10 @@ function wrapWindowByMask(){
<tr>
<th><span class="">서명이미지</span></th>
<td class="upload_area">
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
<button type="button" id="filebutton" class="btnType01 btn_add_file">파일 첨부하기</button>
<div class="file_wrap file_upload_box no_img_box">
<table>
<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>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</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>
<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>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</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;"><i></i></button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display: none" />
<button type="button" onclick="control.openFileDialog();" class="btnType01 btn_add_file">파일찾기</button> <!-- 솔루션 파일 찾기 이벤트 -->
<p style="font-size: 16px; float: right; margin-top: 16px; color: #666;">* 첨부파일을 등록해 주세요. (최대3개)</p>
<div id="fileControl"></div><br/> <!-- 파일 리스트 보여주는 div -->
</td>
</tr>
</tbody>
@ -578,7 +587,7 @@ function wrapWindowByMask(){
<!-- btn_wrap -->
<div class="btn_wrap btn_layout01">
<div class="area_left">
<button class="btnType02" onclick="fnInsert(); return false;">저 장</button>
<button class="btnType02" onclick="fncReg(); return false;">저 장</button>
</div>
<div class="area_right">
<button class="btnType03" onclick="fnListPage(); return false;">목 록</button>

View File

@ -0,0 +1,653 @@
<%--
Class Name : EgovUserInsert.jsp
Description : 사용자등록View JSP
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.03.03 JJY 최초 생성
2011.08.31 JJY 경량환경 버전 생성
author : 공통서비스 개발팀 JJY
since : 2009.03.03
--%>
<%@ page 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="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="ko" >
<script src="<c:url value='/innorix/innorix.js' />"></script>
<link rel="stylesheet" href="/kccadrPb/adm/css/popup.css">
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="userManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script src="/direct/js/jquery.nice-select.min.js"></script>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<!-- <link rel="stylesheet" href="/direct/css/nice-select.css"> -->
<script type="text/javaScript" language="javascript" defer="defer">
$( document ).ready(function(){
// showMask를 클릭시 작동하며 검은 마스크 배경과 레이어 팝업을 띄웁니다.
$('.showMask').click(function(e){
// preventDefault는 href의 링크 기본 행동을 막는 기능입니다.
e.preventDefault();
wrapWindowByMask();
});
// 닫기(close)를 눌렀을 때 작동합니다.
$('.window .close').click(function (e) {
e.preventDefault();
$('.mask, .window').hide();
$("input[name=emplyrId]").val("");
});
// 뒤 검은 마스크를 클릭시에도 모두 제거하도록 처리합니다.
$('.mask').click(function () {
$(this).hide();
$('.window').hide();
});
/* $('select').not(".displayN").niceSelect(); */
$("#orgDepth_01").on("change", function(){
setOrgDepth_01();
});
/* if(""!='${userOneDepth}'){//초기세팅값 세팅
$('#orgDepth_01').val('${userOneDepth}');
$('#orgDepth_01').niceSelect('update');
$('#orgDepth_02').html($('#span_one_'+$("#orgDepth_01").val()).html().trim()) ;
$('#orgDepth_02').niceSelect('update');
if(""!='${userTwoDepth}'){
$("#orgDepth_02").val('${userTwoDepth}');
$('#orgDepth_02').niceSelect('update');
}
$("#orgDepth_02").niceSelect(); //display show 기능
} */
//첨부파일 버튼 처리
$("#filebutton").click(function(){
$("#file_temp").trigger("click");
});
});
function authorChange(obj) {
if(obj.selectedIndex == '0'){
$("#rank1").css('display', 'block');
$("#rank2").css('display', 'none');
$("#rank1").attr('disabled', false);
$("#rank2").attr('disabled', true);
}else{
$("#rank1").css('display', 'none');
$("#rank2").css('display', 'block');
$("#rank1").attr('disabled', true);
$("#rank2").attr('disabled', false);
}
}
function setOrgDepth_01(){
if(""==$("#orgDepth_01").val()){ //빈값 선택
$("#orgDepth_02").niceSelect('destroy').hide();
$('#partIdx').val($("#orgDepth_01").val());
}else{
$('#orgDepth_02').html($('#span_one_'+$("#orgDepth_01").val()).html().trim());
$('#orgDepth_02').niceSelect('update');
$('#partIdx').val($("#orgDepth_01").val());
$("#orgDepth_02").niceSelect(); //display show 기능
}
}
function onChagneOrgDepth_02(){ //변경시 partIdx 세팅
if(""==$("#orgDepth_02").val()){
$('#partIdx').val($("#orgDepth_01").val());
}else{
$('#partIdx').val($("#orgDepth_02").val());
}
}
function nCheck(){
var numCheck = document.getElementById("offmTelno").value;
if(numCheck!=""){
if(/[^0123456789-]/g.test(numCheck)){
alert("사무실 전화번호는 숫자와 특수문자'-'만 입력이 가능합니다.");
return false;
}
}
return true;
}
function nCheck2(){
var numCheck = document.getElementById("numCheck");
if(/[^0123456789]/g.test(numCheck.value)){
alert("숫자가 아닙니다.\n\n0~9의 숫자만 허용합니다.");
}
}
function validatePassword(character) {
return /^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$/.test(character);
}
function fnListPage(){
document.searchForm.submit();
}
function fnInsert(){
if(!nCheck()){
return;
}
if(validateUserManageVO(document.userManageVO)){
if(document.userManageVO.password.value != document.userManageVO.password2.value){
alert("<spring:message code="fail.user.passwordUpdate2" />");
return;
}
if(!validatePassword(document.userManageVO.password.value)){
alert("비밀번호 최소 하나의 문자 + 하나의 숫자 + 하나의 특수 문자 포함, 최소 8자리, 최대 20자리입니다.");
return;
}
//첨부파일 처리해주기
if(confirm("등록을 하시겠습니까?")){
var form = document.userManageVO;
var data = new FormData(form);
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "/uss/umt/user/EgovUserFileInsert.do",
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
success: function (returnData, status) {
if(status == 'success'){
var resultFileId = returnData.atchFileId;
if(resultFileId == ""){
alert("등록에 실패하였습니다.");
return false;
}else{
$("#atchFileId").val(resultFileId);
form.action="<c:url value='/uss/umt/user/EgovUserInsert.do'/>";
form.submit();
}
} else if(status== 'fail'){
alert("저장에 실패하였습니다.");
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
}
}
/*********************************************************
* 아이디 체크 AJAX
******************************************************** */
function fn_id_check(){
if($("#checkIdModal").val()==''){
alert("사용할 아이디를 넣어주세요.");
return;
}
if($("#checkIdModal").val().length > 20){
alert("사용자아이디는 20자 이상 입력할수 없습니다.");
return;
}
$.ajax({
type:"POST",
url:"<c:url value='/uss/umt/user/EgovIdDplctCnfirmAjax.do' />",
data:{
"checkId": $("#checkIdModal").val()
},
dataType:'json',
timeout:(1000*30),
success:function(returnData, status){
if(status == "success") {
if(returnData.usedCnt > 0 ){
alert("사용할수 없는 아이디입니다");
}else{
alert("사용할수 있는 아이디입니다")
$("input[name=emplyrId]").val(returnData.checkId);
$('.mask, .window').hide();
}
}else{ alert("ERROR!");return;}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
//직원 상세 - 부서 선택박스 변경 시
function fn_select_emp_part(obj) {
var selectId = $(obj).children("option:selected").val();
var selectDepth = $(obj).children("option:selected").attr("depth")*1+1;
if(selectId == "" && selectDepth =="2"){
$('#partIdx').val(selectId) ;
$("#depth_2").remove();
$("#depth_3").remove();
return;
}
if(selectId == "" && selectDepth =="3"){
$('#partIdx').val($('#depth_1').val());
$("#depth_3").remove();
return;
}
if(selectDepth =="4"){
if(selectId == ""){
$('#partIdx').val($('#depth_2').val());
}else{
$('#partIdx').val(selectId) ;
}
return;
}
if(selectDepth =="2"){
$("#depth_2").remove();
$("#depth_3").remove();
}
if(selectDepth =="3"){
$("#depth_3").remove();
}
$('#partIdx').val(selectId) ;
ajaxGetChartDepth( selectId, selectDepth );
}
function ajaxGetChartDepth(upperIdx , depth){
$.ajax({
type:"POST",
url:"<c:url value='/uss/umt/user/ajaxGetChartDepth.do' />",
data:{ "depth": depth , "upperIdx": upperIdx},
dataType:'json',
success:function(returnData, status){
if(status == "success") {
var str = "<select id='depth_"+depth+"' depth='"+depth+"' onchange='fn_select_emp_part(this);'>";
str += "<option value='' depth='"+depth+"'>선택</option>";
$.each(returnData.orgChartDepth , function(idx, val){
str += "<option value='"+val.id+"' depth='"+depth+"'>"+val.text+"</option>";
});
str += "</select>";
$("#orgChartDepth").append(str);
}else{ alert("ERROR!");return;}
},
error:function(request , status, error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
}
function wrapWindowByMask(){
// 화면의 높이와 너비를 변수로 만듭니다.
var maskHeight = $(document).height();
var maskWidth = $(window).width();
// 마스크의 높이와 너비를 화면의 높이와 너비 변수로 설정합니다.
$('.mask').css({'width':maskWidth,'height':maskHeight});
// fade 애니메이션 : 1초 동안 검게 됐다가 80%의 불투명으로 변합니다.
$('.mask').fadeIn(1000);
$('.mask').fadeTo("slow",0.8);
// 레이어 팝업을 가운데로 띄우기 위해 화면의 높이와 너비의 가운데 값과 스크롤 값을 더하여 변수로 만듭니다.
var left = ( $(window).scrollLeft() + ( $(window).width() - $('.window').width()) / 2 );
var top = ( $(window).scrollTop() + ( $(window).height() - $('.window').height()) / 2 );
// css 스타일을 변경합니다.
$('.window').css({'left':left,'top':top, 'position':'absolute'});
// 레이어 팝업을 띄웁니다.
$('.window').show();
}
</script>
<script type="text/javaScript" language="javascript">
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl' // * 컨트롤 출력 HTML 객체 ID
, transferMode: 'both' // * 업로드, 다운로드 혼합사용
, installUrl: '/innorix/install/install.html' // * Agent 설치 페이지
, uploadUrl: '/innorix/exam/upload.jsp' // * 업로드 URL
// , height:80
// , width: 635
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
fn_callBackInnorix(p.files); // * 파일 정보 DB isnert function
});
};
/*
* 파일 정보 DB insert Ajax
* */
function fn_callBackInnorix(data){
var url = "<c:url value='/kccadr/common/insertInnorixFileAjax.do' />";
var filePath = location.pathname;
var jspFileName = filePath.substring(filePath.lastIndexOf("/")+1, filePath.lastIndexOf("."));
var sendData = {
"innorixFileListVO": data
}
/*
* 공통 : innorixCommon.js
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fnInsert();
// opener.location.reload(true);
}
}
/*
* 등록버튼 클릭 event
* */
function fncReg() {
if (validation()) {
if(confirm("사건문서를 등록 하시겠습니까?")){
if(control.getUploadFiles().length > 0){ // 등록된 파일이 있는지 확인
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control.setPostData(postObj); // * 업로드시 함께 전달될 POST Param 추가
control.upload(); // 업로드 시작
}else{
fnInsert();
}
}
}
}
</script>
</head>
<body>
<form:form commandName="userManageVO" action="${pageContext.request.contextPath}/uss/umt/user/EgovUserInsert.do" id="userManageVO" name="userManageVO" method="post" enctype="multipart/form-data">
<%-- <double-submit:preventer tokenKey="someKey" /> --%>
<input type="hidden" name="gnrlUser" value="N">
<input type="hidden" name="partIdx" id="partIdx" value="" >
<input type="hidden" id="atchFileId" name="atchFileId" value=""/>
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" id="innoDirPath" value="<spring:eval expression="@globalSettings['Globals.Innorix.FilePath']"/>" />
<!-- 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>
<p>관리자관리</p>
</li>
<li><span class="cur_nav">관리자등록</span></li>
</ul>
</div>
<!-- //cont_tit -->
<div class="cont">
<!-- list_상세 -->
<div class="tbType02">
<table>
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<c:if test="${siteId eq 'super'}">
<tr>
<th><span class="reqArea">사이트명</span></th>
<td>
<select name="siteId" title="사이트">
<c:forEach var="resultList" items="${siteManageList}" varStatus="status">
<option value="<c:out value="${resultList.siteId}"/>" >
<c:out value="${resultList.siteNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
</c:if>
<tr>
<th><span class="reqArea">관리자아이디</span></th>
<td colspan="3">
<form:input class="showMask" path="emplyrId" id="emplyrId" title="사용자아이디" size="50" maxlength="20" readonly="true" />
<a href="#" class="showMask">
<button type="button" class="btnType02 bg_888888">중복아이디 검색</button>
<!-- <input type="button" class="btnType1 bg_888888" value="중복아이디 검색"> -->
</a>
<form:errors path="emplyrId" cssClass="error"/>
</td>
</tr>
<tr>
<th><span class="reqArea">비밀번호</span></th>
<td colspan="3">
<form:password path="password" id="password" title="비밀번호" size="50" maxlength="20" />
<form:errors path="password" cssClass="error" />
<br/>
<span class="cfText c_ed4555">
비밀번호 문자 + 숫자 + 특수 문자 포함, 최소 8~20자리
</span>
</td>
</tr>
<tr>
<th><span class="reqArea">비밀번호확인</span></th>
<td colspan="3">
<input name="password2" id="password2" title="비밀번호확인" type="password" size="50" maxlength="20" />
</td>
</tr>
<tr>
<th><span class="reqArea">로그인 유형</span></th>
<td colspan="3">
<div class="radio_wrap">
<kc:radio codeId="CC051" name="loginTypeCd" id="loginTypeCd" selectedValue="001" css="style='margin-left: 10px;'"/>
</div>
</td>
</tr>
<tr>
<th><span class="reqArea">이름</span></th>
<td colspan="3">
<input name="emplyrNm" id="emplyrNm" title="이름" type="text" size="50" value="" maxlength="60" />
<form:errors path="emplyrNm" cssClass="error" />
</td>
</tr>
<tr>
<th>권한</th>
<td colspan="3">
<select name="authorCode" title="권한" onchange="authorChange(this)">
<c:forEach var="authorResult" items="${authorList}" varStatus="status">
<option value="<c:out value="${authorResult.authorCode}"/>" <c:if test="${authorResult.authorCode eq 'ROLE_ADR_ADMIN' }">selected</c:if>>
<c:out value="${authorResult.authorNm}"/>
</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th>직책</th>
<td colspan="3">
<select name="ofcpsNm" title="직급" id="rank1" >
<option value="10">조정조사관</option>
<option value="20">조정팀장</option>
<option value="30">부서장</option>
<option value="40">위원장</option>
</select>
<select name="ofcpsNm" title="직급" id="rank2" style="display:none;" disabled="disabled">
<option value="admin">시스템관리자</option>
</select>
</td>
<%-- <td colspan="3">
<form:input path="ofcpsNm" id="ofcpsNm" cssClass="txaIpt" size="50" maxlength="15" placeholder="" />
<form:errors path="ofcpsNm" cssClass="error" />
</td> --%>
</tr>
<%-- <th>부서</th>
<td id="select_part_hidden">
<select name="orgDepth_01" id="orgDepth_01" class="asset_sec_sort">
<option value="">선택</option>
<c:forEach var="hiddenResult_one" items="${orgHiddenList}" varStatus="status">
<c:if test="${hiddenResult_one.depths eq '1'}">
<option value="<c:out value='${hiddenResult_one.id}'/>"><c:out value='${hiddenResult_one.text}'/></option>
</c:if>
</c:forEach>
</select>
<select name="orgDepth_02" id="orgDepth_02" class="asset_sec_sort displayN" onchange="onChagneOrgDepth_02(); return false;" style="display:none;"/>
</td>
</tr> --%>
<tr>
<th>전화번호</th>
<td colspan="3">
<form:input path="offmTelno" id="offmTelno" cssClass="txaIpt" size="50" maxlength="15" placeholder="예시 : 02-123-4567" />
<form:errors path="offmTelno" cssClass="error" />
</td>
</tr>
<tr>
<th>팩스번호</th>
<td colspan="3">
<form:input path="fxnum" id="fxnum" cssClass="txaIpt" size="50" maxlength="15" placeholder="예시 : 02-123-4567" />
<form:errors path="fxnum" cssClass="error" />
</td>
</tr>
<tr>
<th>담당업무</th>
<td colspan="3">
<form:input path="userWork" id="userWork" cssClass="txaIpt" size="50" maxlength="15" placeholder="" />
<form:errors path="userWork" cssClass="error" />
</td>
</tr>
<tr>
<th>이메일주소</th>
<td colspan="3">
<form:input path="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="50" maxlength="50" />
<form:errors path="emailAdres" cssClass="error" />
</td>
</tr>
<tr>
<th><span class="">서명이미지</span></th>
<td class="upload_area">
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display: none" />
<button type="button" onclick="control.openFileDialog();" class="btnType01 btn_add_file">파일찾기</button>
<p style="font-size: 16px; float: right; margin-top: 16px; color: #666;">* 첨부파일을 등록해 주세요. (최대3개)</p>
<div id="fileControl"></div><br/>
</td>
</tr>
</tbody>
</table>
</div>
<!-- //list_상세 -->
<!-- btn_wrap -->
<div class="btn_wrap btn_layout01">
<div class="area_left">
<button class="btnType02" onclick="fncReg(); return false;">저 장</button>
</div>
<div class="area_right">
<button class="btnType03" onclick="fnListPage(); return false;">목 록</button>
</div>
</div>
<!-- //btn_wrap -->
</div>
</div>
</div>
<!-- //cont -->
</form:form>
<!-- selectbox 미리만들기 -->
<!-- 2뎁스 만들기 -->
<c:forEach var="hiddenResult_one" items="${orgHiddenList}" varStatus="status">
<c:if test="${hiddenResult_one.depths eq '1'}">
<span id="span_one_${hiddenResult_one.id}" style="display:none;">
<option value="">선택</option>
<c:forEach var="hiddenResult_two" items="${orgHiddenList}" varStatus="status"><c:if test="${hiddenResult_one.id eq hiddenResult_two.parent}"><option value="<c:out value='${hiddenResult_two.id}'/>"><c:out value='${hiddenResult_two.text}'/></option></c:if></c:forEach>
</span>
</c:if>
</c:forEach>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/umt/user/EgovUserManage.do'/>" ></form>
<div class="setDiv">
<!-- <div class="mask"></div>
<div class="window">
<div class="id_check1">
<input type="button" href="#" class="close">
<span>아이디 중복 확인</span>
</div>
<div class="id_check2">
<span>사용할 아이디</span><input type="text" id="checkIdModal">
</div>
<div class="id_check3">
<span>중복확인을 실행하십시오</span><button onclick="fn_id_check(); return false;">중복확인조회</button>
</div>
</div> -->
<div class="mask"></div>
<div class="popup_wrap window">
<div class="popup_tit">
<p>아이디 중복 확인</p>
<button class="btn_popup_close close" title="팝업 닫기"><i></i></button>
</div>
<div class="cont_popup">
<p class="info_text">
<div class="id_check2">
<span>사용할 아이디</span><input type="text" id="checkIdModal">
</div>
<br>
<div class="id_check3">
<span>중복확인을 실행하십시오</span><button class="btnType03" onclick="fn_id_check(); return false;">중복확인조회</button>
</div>
</p>
<div class="btn_wrap btn_layout04">
<button type="button" class="btnType03" onclick="layerPopToggle();">닫기</button>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -287,9 +287,9 @@
/*
* 공통 : innorixCommon.js
* fn_insertInnorixFileAndRpplAjax() 호출 후 status가 성공(OK)이면 실행
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_insertInnorixFileAndRpplAjax(sendData, url) == "OK")
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
opener.location.reload(true);
self.close();
@ -361,13 +361,8 @@
<td class="upload_area">
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display: none" />
<button type="button" onclick="control.openFileDialog();" class="btnType01 btn_add_file">파일찾기</button>
<!-- <button type="button" id="filebutton" class="btnType01 btn_add_file">파일찾기</button> -->
<p style="font-size: 16px; float: right; margin-top: 16px; color: #666;">* 첨부파일을 등록해 주세요. (최대3개)</p>
<!-- <div class="file_wrap file_upload_box no_img_box"> -->
<!-- -->
<div id="fileControl"></div><br/>
<!-- </div> -->
</td>
</tr>
<tr>

View File

@ -56,8 +56,7 @@ $(document).ready(function(){
<%-- 원자력 --%>
<script type="text/javascript">
var innoJquery = innorix._load("innoJquery");
function fncReg() {
@ -213,9 +212,9 @@ $(document).ready(function(){
/*
* 공통 : innorixCommon.js
* fn_insertInnorixFileAndRpplAjax() 호출 후 status가 성공(OK)이면 실행
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_insertInnorixFileAndRpplAjax(sendData, url) == "OK")
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fncReg();
}

View File

@ -13,6 +13,9 @@
<head>
<title>이의신청 등록</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<script src="<c:url value='/innorix/innorix.js' />"></script>
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<script src="/kccadrPb/usr/script/popup.js"></script>
<script type="text/javaScript" language="javascript">
@ -21,9 +24,11 @@ $( document ).ready(function(){
$("#filebutton").click(function(){
$("#file_temp").trigger("click");
});
});
function fncGoList(target) {
var f = document.getElementById("listForm");
@ -42,41 +47,34 @@ $( document ).ready(function(){
var data = new FormData(f);
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
if (isValid()) {
if (confirm('작성된 내용을 등록하시겠습니까?')) {
$.ajax({
type : "POST",
url : "/kccadr/adjPgrMgrOjct/insertCfrmRegAjax.do",
data : data,
dataType : 'json',
async : false,
processData : false,
contentType : false,
cache : false,
success : function(returnData, status) {
if (returnData.ojctStatus == 'success') {
alert("이의신청이 등록 되었습니다.");
fncGoList('list'); //리스트 화면으로 이동
} else {
alert("이의신청 등록이 실패하였습니다.");
}
$.ajax({
type : "POST",
url : "/kccadr/adjPgrMgrOjct/insertCfrmRegAjax.do",
data : data,
dataType : 'json',
async : false,
processData : false,
contentType : false,
cache : false,
success : function(returnData, status) {
if (returnData.ojctStatus == 'success') {
alert("이의신청이 등록 되었습니다.");
fncGoList('list'); //리스트 화면으로 이동
},
error : function(e) {
alert("이의신청 등록에 실패하였습니다.");
console.log("ERROR : ", e);
}
});
} else {
alert("이의신청 등록이 실패하였습니다.");
}
},
error : function(e) {
alert("이의신청 등록에 실패하였습니다.");
console.log("ERROR : ", e);
}
}
});
}
@ -87,14 +85,78 @@ $( document ).ready(function(){
}
return true;
}
// 파일 업로드 솔루션 init 셋팅
var control = new Object();
window.addEventListener('load', function(){
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl' // 컨트롤 출력 HTML 객체 ID
, transferMode: 'both' // 업로드, 다운로드 혼합사용
, installUrl: '/innorix/install/install.html' // Agent 설치 페이지
, uploadUrl: '/innorix/exam/upload.jsp' // 업로드 URL
, height:80
// , width: 635
, width: 1200
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
fn_callBackInnorix(p.files); // 파일 정보 DB isnert function
});
});
/*
* 파일 정보 DB insert Ajax
* */
function fn_callBackInnorix(data){
var url = "<c:url value='/kccadr/common/insertInnorixFileAjax.do' />";
var filePath = location.pathname;
var jspFileName = filePath.substring(filePath.lastIndexOf("/")+1, filePath.lastIndexOf("."));
var sendData = {
"innorixFileListVO": data
}
/*
* 공통 : innorixCommon.js
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fncReg();
}
}
/*
* 등록버튼 클릭 event
* */
function fnSave() {
if (isValid()) {
if (confirm('작성된 내용을 등록하시겠습니까?')) {
if(control.getUploadFiles().length > 0){ // 등록된 파일이 있는지 확인
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control.setPostData(postObj); // * 업로드시 함께 전달될 POST Param 추가
control.upload(); // 업로드 시작
}else{
fncReg();
}
}
}
}
</script>
</head>
<body>
<form:form id="listForm" name="listForm" method="post" enctype="multipart/form-data">
<input type="hidden" id="adrSeq" name="adrSeq" value="" />
<input type="hidden" id="adrSn" name="adrSn" value="" />
<!-- <input type="hidden" id="adrSeq" name="adrSeq" value="" /> -->
<!-- <input type="hidden" id="adrSn" name="adrSn" value="" /> -->
<input type="hidden" id="atchFileId" name="atchFileId" value="" />
<input type="hidden" name="limitcount" value="10" /><!-- 최대 업로드 파일갯수 -->
<input type="hidden" id="innoDirPath" value="<spring:eval expression="@globalSettings['Globals.Innorix.FilePath']"/>" />
<div class="cont_wrap">
<div class="box">
<!-- cont_tit -->
@ -145,72 +207,10 @@ $( document ).ready(function(){
<tr>
<th colspan="2" >첨부파일</th>
<td colspan="3" class="upload_area">
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
<button type="button" id="filebutton" class="btnType01 btn_add_file">파일 첨부하기</button>
<div class="file_wrap file_upload_box no_img_box">
<table>
<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>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</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>
<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>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</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>
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display: none" />
<button type="button" onclick="control.openFileDialog();" class="btnType01 btn_add_file">파일찾기</button>
<p style="font-size: 16px; float: right; margin-top: 16px; color: #666;">* 첨부파일을 등록해 주세요. (최대3개)</p>
<div id="fileControl"></div><br/>
</td>
</tr>
</tbody>
@ -221,7 +221,7 @@ $( document ).ready(function(){
<div class="area_left"></div>
<div class="area_right">
<!-- <button type="button" class="btnType02" onclick="fncReg('306010');">직권조정결정서 승인 요청</button> -->
<button type="button" class="btnType06" onclick="fncReg()">등록</button>
<button type="button" class="btnType06" onclick="fnSave()">등록</button>
<button type="button" class="btnType04" onclick="fncGoList('list')">취소</button>
</div>
</div>

View File

@ -130,9 +130,9 @@ function fn_callBackInnorix(data){
/*
* 공통 : innorixCommon.js
* fn_insertInnorixFileAndRpplAjax() 호출 후 status가 성공(OK)이면 실행
* fn_innorixCmmAjax() 호출 후 status가 성공(OK)이면 실행
*/
if(fn_insertInnorixFileAndRpplAjax(sendData, url) == "OK")
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fn_selectFileList(); // 파일 정보 list select function
fn_initFileRegForm();

View File

@ -14,8 +14,6 @@
*/
var innoJquery = innorix._load("innoJquery");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var control = new Object(); // 파일전송 컨트롤 객체선언
var downFileArr = new Array(); // 다운로드 목록 정보
@ -23,7 +21,7 @@ var resetFileArr = new Array(); // 다운로드 목록 초기화 정보
var delFileArr = new Array(); // 삭제된 파일 정보
var removeFlag = true; // 삭제 이벤트 조건 플래그
function fn_insertInnorixFileAndRpplAjax(sendData, url){
function fn_innorixCmmAjax(sendData, url){
var successData;
@ -39,6 +37,7 @@ function fn_insertInnorixFileAndRpplAjax(sendData, url){
success: function (returnData) {
console.log('returnData : ', returnData);
if(returnData.status == "OK"){
$('#atchFileId').val(returnData.dataSub);
if(returnData.data != "")
alert(returnData.data);
successData = returnData.status;