fairnet/src/main/webapp/WEB-INF/jsp/web/kccadr/xxx/xxxModify.jsp
2024-07-08 15:37:51 +09:00

187 lines
6.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%--
대국민(사용자)
Class Name : xxxModify.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();
}
/* 글 수정 Ajax */
function fn_xxx_updt() {
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/updateXxx.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); }
});
}
/* 첨부파일 다운로드 */
function fn_egov_downFile(atchFileId, fileSn){//atchFileId -> 파일 Id, fileSn -> 파일 순번
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
}
</script>
</head>
<body>
<form name="writeForm" enctype="multipart/form-data" method="post">
<input type="hidden" id="xxxId" name="xxxId" value="<c:out value='${xxxVO.xxxId}'/>">
<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.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="<c:out value='${fileList.fileMg}' />">
<td class="file_name">
<a href="javascript:fn_egov_downFile('<c:out value='${fileList.atchFileId}' />','<c:out value='${fileList.fileSn}' />')">
<img src="/direct/img/upload_hwp_img.png" alt="" />
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
</a>
</td>
<td>
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"></span>
</td>
<td>
<c:out value="${fileList.creatDt}"/>
</td>
<td>
<input type="button" class="delBtn" onclick="delAtchFile('<c:out value='${fileList.atchFileId}' />', '<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">50</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" value="목 록" onclick="goList(); return false;">
<input type="button" class="btnType1" value="수 정" onclick="fn_xxx_updt(); return false;">
</div>
</div>
</div>
</form>
<form name="searchForm" id="searchForm" method="post" action="<c:url value='url'/>">
<input name="xxxId" type="hidden" value=""/>
</form>
</body>
</html>