211 lines
6.5 KiB
Plaintext
211 lines
6.5 KiB
Plaintext
<%@ 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>
|
|
<script>
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("takingOverDropZone", "${info.HISTORY_OBJID}", "${docType}", "${docTypeName}", "fn_fileCallback",false,null,null);
|
|
|
|
$("#btnSave").click(function(){
|
|
if(confirm("저장하시겠습니까?")){
|
|
fn_saveTakingInfo();
|
|
}
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close();
|
|
});
|
|
|
|
$("#btnCancel").click(function(){
|
|
fn_cancel();
|
|
});
|
|
|
|
$("#btnUpload").click(function(){
|
|
var files = $("#file1")[0].files;
|
|
if(files.length > 0){
|
|
fnc_fileMultiUpload(files, null, "${info.HISTORY_OBJID}", "${docType}", "${docTypeName}", null, "fn_fileCallback");
|
|
//file객체 초기화
|
|
$("#file1").val("");
|
|
}else{
|
|
Swal.fire("선택된 File이 없습니다.");
|
|
}
|
|
});
|
|
|
|
fn_fileCallback();
|
|
|
|
});
|
|
</script>
|
|
<script>
|
|
function fn_fileCallback(){
|
|
//첨부파일 영역을 초기화
|
|
$("#takingOverFileArea").empty();
|
|
|
|
var appendText = "";
|
|
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${info.HISTORY_OBJID}", "docType":"${docType}"},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(0 < data.length){
|
|
$.each(data, function(i){
|
|
appendText+= "<tr>";
|
|
appendText+= " <td><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\");'>"+fnc_checkNull(data[i].REAL_FILE_NAME)+"</a></td>";
|
|
appendText+= " <td>"+fnc_checkNull(data[i].DEPT_NAME)+" "+fnc_checkNull(data[i].USER_NAME)+"</td>";
|
|
appendText+= " <td>"+fnc_checkNull(data[i].REGDATE)+"</td>";
|
|
appendText+= " <td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"fn_fileCallback\")'></div></td>";
|
|
appendText+= "</tr>";
|
|
});
|
|
}else{
|
|
appendText+= "<tr>";
|
|
appendText+= " <td colspan='4'>첨부된 파일이 없습니다.</td>";
|
|
appendText+= "</tr>";
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
$("#takingOverFileArea").append(appendText);
|
|
}
|
|
|
|
function fn_saveTakingInfo(){
|
|
$.ajax({
|
|
url:"/transfer/saveDocTransferTakingOverInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
if(fnc_checkTrue(data.result)){
|
|
Swal.fire("저장되었습니다.");
|
|
top.opener.location.reload();
|
|
|
|
fn_cancel();
|
|
}else{
|
|
Swal.fire("오류가 발생하였습니다.");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
function fn_cancel(){
|
|
document.form1.action = "/transfer/openDocTransferTakingDetailPopUp.do";
|
|
document.form1.submit();
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<!-- 개발 Master에 연결된 Part의 OBJID -->
|
|
<input type="hidden" name="objId" value="${info.HISTORY_OBJID}">
|
|
<input type="hidden" name="targetObjId" value="${param.targetObjId}">
|
|
<input type="hidden" name="docTargetObjId" value="${param.docTargetObjId}">
|
|
<input type="hidden" name="productObjId" value="${param.productObjId}">
|
|
<input type="hidden" name="status" value="${info.HAND_OVER_STATUS}">
|
|
<section class="">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>문서이관</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<div class="form_popup_title"> 인계등록</div>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="14%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" colspan="">
|
|
<label for="">문서유형</label>
|
|
</td>
|
|
<td class="tr_data_border_bottom" title="${info.DOC_TYPE_TITLE}">${info.DOC_TYPE_TITLE}</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="2" class="input_title">
|
|
<label for="">파일첨부</label>
|
|
</td>
|
|
<td colspan="">
|
|
<div id="takingOverDropZone" 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">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="">
|
|
<div style="overflow-y:scroll;">
|
|
<table class="project_form_in_table" style="width:100%;">
|
|
<colgroup>
|
|
<col width="*">
|
|
<col width="25%">
|
|
<col width="20%">
|
|
<col width="7%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<td>첨부파일명</td>
|
|
<td>등록자</td>
|
|
<td>등록일</td>
|
|
<td></td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="in_table_scroll_wrap" style="width:100%;height:130px;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="*">
|
|
<col width="25%">
|
|
<col width="20%">
|
|
<col width="7%">
|
|
</colgroup>
|
|
<tbody id="takingOverFileArea"></tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" colspan="">
|
|
<label for="">Comment</label>
|
|
</td>
|
|
<td class="" title="">
|
|
<textarea name="handOverComment" id="handOverComment" style="width:100%; border-radius:2px; border: 1px solid #ccc;">${info.HAND_OVER_COMMENT}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" colspan="">
|
|
<label for="">상태</label>
|
|
</td>
|
|
<td class="tr_data_border_bottom" title="">${info.HAND_OVER_STATUS_TITLE}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" colspan="">
|
|
<label for="">등록자</label>
|
|
</td>
|
|
<td class="tr_data_border_bottom" title="">${info.HANDOVER_DEPT_NAME} ${info.HANDOVER_USER_NAME}</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
<c:if test="param.actionType ne 'regist'">
|
|
<input type="button" value="취소" id="btnCancel" class="plm_btns">
|
|
</c:if>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |