최초커밋
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@include file= "/init.jsp" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#btn_close").click(function(){
|
||||
opener.fn_search();
|
||||
self.close(0);
|
||||
});
|
||||
//첨부 파일 기능
|
||||
fnc_setFileDropZone("finalDropZone", "${param.targetObjId}", "${docType}", "${docTypeName}", "finalAreaDraw",false,null,null);
|
||||
|
||||
finalAreaDraw();
|
||||
|
||||
$("#btnUpload").click(function(){
|
||||
var files = $("#file1")[0].files;
|
||||
if(files.length > 0){
|
||||
fnc_fileMultiUpload(files, null, "${param.targetObjId}", "${docType}", "${docTypeName}", null, "refeshAttachFileArea");
|
||||
//file객체 초기화
|
||||
$("#file1").val("");
|
||||
}else{
|
||||
Swal.fire("선택된 File이 없습니다.");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function refeshAttachFileArea(){
|
||||
finalAreaDraw();
|
||||
}
|
||||
|
||||
//형상 영역을 display 한다.
|
||||
function finalAreaDraw(){
|
||||
fn_fileCallback("final","${docType}");
|
||||
}
|
||||
|
||||
//첨부파일 목록을 가져온다.
|
||||
function fn_fileCallback(areaId,fileType){
|
||||
$.ajax({
|
||||
url:"/common/getFileList.do",
|
||||
type:"POST",
|
||||
data:{"targetObjId":"${param.targetObjId}", "docType":fileType},
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
if(0 < data.length){
|
||||
//첨부파일 목록 영역 show
|
||||
$("#"+areaId+"FileArea").empty();
|
||||
|
||||
if(0 < $("#"+areaId+"DefaultRow").length){
|
||||
$("#"+areaId+"DefaultRow").hide();
|
||||
}
|
||||
|
||||
$.each(data, function(i){
|
||||
|
||||
var appendText = "";
|
||||
if("final" == areaId){
|
||||
var path = data[i].FILE_PATH;
|
||||
var fileName = data[i].SAVED_FILE_NAME;
|
||||
var fileExt = data[i].UPPER_FILE_EXT;
|
||||
|
||||
appendText += "<colgroup>";
|
||||
appendText +=" <col width='10%''>";
|
||||
appendText +=" <col width='*'>";
|
||||
appendText +=" <col width='15%'>";
|
||||
appendText +=" <col width='15%'>";
|
||||
appendText +=" <col width='15%''>";
|
||||
appendText +=" </colgroup>";
|
||||
appendText+= "<tr>";
|
||||
appendText+= " <td>"+[i+1]+"</td>";
|
||||
appendText+= " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a></td>";
|
||||
appendText+= " <td>"+data[i].DEPT_NAME+"</td>"
|
||||
appendText+= " <td>"+data[i].USER_NAME+"</td>"
|
||||
appendText+= " <td>"+data[i].REGDATE+"</td>"
|
||||
appendText+= "</tr>";
|
||||
}
|
||||
$("#"+areaId+"FileArea").append(appendText);
|
||||
});
|
||||
}else{
|
||||
$("#"+areaId+"DropZone").show();
|
||||
$("#"+areaId+"AttachFileList").hide();
|
||||
$("#"+areaId+"FileArea").empty();
|
||||
var appendText = "";
|
||||
appendText += "<tr>";
|
||||
appendText += "<td>첨부 파일이 없습니다.</td>";
|
||||
appendText +="</tr>";
|
||||
$("#"+areaId+"FileArea").append(appendText);
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}//파일 첨부 END
|
||||
/*첨부 파일 삭제 */
|
||||
function fileDelete(fileObjId, callbackFnc, confirmFlag){
|
||||
if(confirmFlag){
|
||||
fnc_deleteFile(fileObjId, callbackFnc);
|
||||
}else{
|
||||
$.ajax({
|
||||
url:"/common/deleteFileInfo.do",
|
||||
type:"POST",
|
||||
data:{"objId":fileObjId},
|
||||
dataType:"json",
|
||||
async:true,
|
||||
success:function(data){
|
||||
eval(callbackFnc+"();");
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<form name="form1" action="" method="post">
|
||||
<section class="business_staff_popup_min_width">
|
||||
<div class="plm_menu_name">
|
||||
<h2>
|
||||
<span>수주활동</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="businessPopupFormWrap">
|
||||
<div class="form_popup_title"> 최종산출물</div>
|
||||
<table class="pmsPopupForm">
|
||||
<tr>
|
||||
<td rowspan="2" class="input_title align_c">파일첨부</td>
|
||||
<td colspan="5">
|
||||
<c:choose>
|
||||
<c:when test="${'complete' eq param.status}">
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div id="finalDropZone" class="dropzone">Drag & Drop Files Here</div>
|
||||
<input type="file" name="file1" id="file1" multiple>
|
||||
<input type="button" id="btnUpload" value="Upload" class="upload_btns">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div id="finalAreaTable" class="spec_data_in_table">
|
||||
<div style="overflow-y:scroll;">
|
||||
<table id="" class="fileListscrollThead" style="width:100% !important;">
|
||||
<colgroup>
|
||||
<col width="10%">
|
||||
<col width="*">
|
||||
<col width="15%">
|
||||
<col width="15%">
|
||||
<col width="15%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>파일명</td>
|
||||
<td>팀명</td>
|
||||
<td>등록자</td>
|
||||
<td>등록일</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width:100%; height: 90px; overflow-y: scroll; border-bottom: 1px solid #cacaca;">
|
||||
<table id="finalFileArea" class="fileListscrollTbody">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="btn_wrap">
|
||||
<div class="plm_btn_wrap_center">
|
||||
<input type="button" value="닫기" id="btn_close" class="plm_btns">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user