176 lines
5.8 KiB
Plaintext
176 lines
5.8 KiB
Plaintext
<%--
|
||
대국민(사용자)
|
||
Class Name : xxxRegist.jsp
|
||
Description : xxx 등록 페이지
|
||
Modification Information
|
||
|
||
수정일 수정자 수정내용
|
||
------- -------- ---------------------------
|
||
2021.08.09 이준호 내용
|
||
|
||
author : 이준호
|
||
since : 2021.08.09
|
||
|
||
--%>
|
||
<%-- 공통 JS 함수 정의 : /jsp/web/com/webLayout.jsp --%>
|
||
<%@ 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"%>
|
||
<!DOCTYPE html>
|
||
<html lang="ko">
|
||
<head>
|
||
<title>xxx 등록</title>
|
||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||
<script type="text/javaScript" language="javascript">
|
||
$( document ).ready(function(){
|
||
});
|
||
|
||
/* 리스트로 이동 */
|
||
function goList(){
|
||
document.searchForm.action = "/kcc/adr/xxx/xxxList.do";
|
||
document.searchForm.submit();
|
||
}
|
||
|
||
/* 게시글 등록 */
|
||
function fn_xxx_insert() {
|
||
var data = new FormData(document.writeForm);
|
||
_fileForm2.forEach(function(obj, idx) {
|
||
if (obj) data.append("file"+idx, obj.fileObj);
|
||
});
|
||
$.ajax({
|
||
type: "POST",
|
||
enctype: 'multipart/form-data',
|
||
url: "/kcc/adr/xxx/insertXxxAjax.do",
|
||
data: data,
|
||
dataType:'json',
|
||
async: false,
|
||
processData: false,
|
||
contentType: false,
|
||
cache: false,
|
||
success: function (returnData, status) {
|
||
if(status == 'success'){
|
||
alert("저장 되었습니다.");
|
||
//목록으로 이동
|
||
goList();
|
||
} else if(status== 'fail'){
|
||
alert("저장에 실패하였습니다.");
|
||
}
|
||
},
|
||
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
||
});
|
||
}
|
||
|
||
</script>
|
||
|
||
</head>
|
||
<body>
|
||
<form name="writeForm" enctype="multipart/form-data" method="post">
|
||
<input type="hidden" name="limitcount" value="50" /><!-- 드래그앤드랍 파일 최대 개수 -->
|
||
|
||
<div class="contWrap">
|
||
<div class="pageCont">
|
||
<table class="tbType2">
|
||
<colgroup>
|
||
<col style="width: 20%">
|
||
<col style="width: 80%">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<th>항목 이름</th>
|
||
<td colspan="3">
|
||
<input type="text" name="xxx" title="xxx" value="<c:out value='${xxxVO.xxx}'/>" maxlength="100"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>파일 첨부</th>
|
||
<td class="upload_area">
|
||
<div class="file_upload_box no_img_box fileWrap">
|
||
<table>
|
||
<colgroup>
|
||
<col style="width: 60%">
|
||
<col style="width: 10%">
|
||
<col style="width: 20%">
|
||
<col style="width: 10%">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th scope="col">파일명</th>
|
||
<th scope="col">크기</th>
|
||
<th scope="col">등록일시</th>
|
||
<th scope="col">삭제</th>
|
||
</tr>
|
||
</thead>
|
||
</table>
|
||
</div>
|
||
<div class="fileWrap fileAfter file_list_div">
|
||
<table>
|
||
<colgroup>
|
||
<col style="width: 60%">
|
||
<col style="width: 10%">
|
||
<col style="width: 20%">
|
||
<col style="width: 10%">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th scope="col">파일명</th>
|
||
<th scope="col">크기</th>
|
||
<th scope="col">등록일시</th>
|
||
<th scope="col">삭제</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="tbody_fiielist" class="tb_file_after">
|
||
<c:forEach var="fileList" items="${fileList}" varStatus="status">
|
||
<tr class="item_<c:out value='${fileList.fmsImageFile}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
||
<input type="hidden" name="fileSize" class="item_file_size" value="<c:out value='${fileList.fileSize}' />">
|
||
<td class="file_name">
|
||
<img src="/direct/img/upload_hwp_img.png" alt="" />
|
||
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
|
||
</td>
|
||
<td>
|
||
<span class="file_size_text" value="<c:out value="${fileList.fileSize}"/>"></span>
|
||
|
||
</td>
|
||
<td>
|
||
<c:out value="${fileList.regdt}"/>
|
||
</td>
|
||
<td>
|
||
<input type="button" class="delBtn" onclick="delAtchFile('<c:out value='${fileList.fmsImageFile}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일${status.count} 삭제">
|
||
</td>
|
||
</tr>
|
||
</c:forEach>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="fileInfo file_list_div">
|
||
<ul class="inline">
|
||
<li>
|
||
<p>최대 <span class="c_e40000 fwBold limitcount_li"><c:out value='${bdMstr.posblAtchFileNumber}' /></span>개 | <span class="c_e40000 fwBold upload_number">50MB</span>제한</p>
|
||
</li>
|
||
<li>
|
||
<p><span class="c_456ded fwBold totalfileCount">1</span>개 | <span class="c_456ded fwBold totalfileSize">72.01KB</span></p>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="uploadBtm">
|
||
<input type="file" id="file_temp" name="file_temp" class="uploadFile">
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="btnWrap">
|
||
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;">
|
||
<input type="button" class="btnType1" value="저 장" onclick="fn_xxx_insert(); return false;">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<form name="searchForm" id="searchForm" method="post" action="<c:out value='url'/>">
|
||
</form>
|
||
</body>
|
||
</html>
|