228 lines
6.8 KiB
Plaintext
228 lines
6.8 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>
|
|
</head>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#btnUpload").click(function(){
|
|
var files = $("#file1")[0].files;
|
|
if(files.length > 0){
|
|
fnc_fileMultiUpload(files, null, "${info.SUB_OBJID}", "${info.docType}", "${info.docTypeName}", null, "fn_fileCallback");
|
|
//file객체 초기화
|
|
$("#file1").val("");
|
|
}else{
|
|
Swal.fire("선택된 File이 없습니다.");
|
|
}
|
|
});
|
|
|
|
//버튼 권한
|
|
var connectUserId = "${connectUserId}";
|
|
var pic = "${info.PIC}";
|
|
|
|
if(connectUserId != pic){
|
|
$(".authObj").hide();
|
|
}
|
|
|
|
//첨부 파일 기능
|
|
fnc_setFileDropZone("finalDropZone", "${info.SUB_OBJID}", "${info.docType}", "${info.docTypeName}", "fn_fileCallback",false,null,null);
|
|
|
|
fn_fileCallback();
|
|
});
|
|
</script>
|
|
<script>
|
|
|
|
//저장
|
|
function fn_save(){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/productDevMng/saveMoldHistoryRelProdAttrInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
//Swal.fire(data.result);
|
|
Swal.fire(data.msg);
|
|
opener.fn_refresh();
|
|
self.close(0);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback(){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${info.SUB_OBJID}", "docType":"${info.docType}"},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var appendText = "";
|
|
if(0 < data.length){
|
|
|
|
$("#moldHistoryProdFileArea").empty();
|
|
$.each(data, function(i){
|
|
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
|
|
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>";
|
|
});
|
|
$("#moldHistoryProdFileArea").append(appendText);
|
|
}else{
|
|
appendText +="<tr>";
|
|
appendText +=" <td colspan=\"5\">첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#moldHistoryProdFileArea").append(appendText);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
</script>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="moldHistoryObjId" id="moldHistoryObjId" value="${info.MOLD_HISTORY_OBJID}" />
|
|
<input type="hidden" name="targetObjId" id="targetObjId" value="${info.MASTER_OBJID}" />
|
|
<input type="hidden" name="objId" id="objId" value="${info.SUB_OBJID}" />
|
|
<input type="hidden" name="pic" id="pic" value="${info.PIC}" />
|
|
<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="13%"/>
|
|
<col width="*"/>
|
|
<col width="*"/>
|
|
<col width="15%"/>
|
|
<col width="*"/>
|
|
<col width="*"/>
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">등록일</label>
|
|
</td>
|
|
<td colspan="2" class="tr_data_border_bottom">
|
|
<input type="text" name="regdate" id="regdate" value="${info.REGDATE}" readonly>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">담당자</label>
|
|
</td>
|
|
<td colspan="2">${info.PIC_DEPT_NAME} ${info.PIC_USER_NAME}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">개정차수</label>
|
|
</td>
|
|
<td colspan="2" class="tr_data_border_bottom">
|
|
<input type="text" name="rev" id="rev" value="${info.REV}" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">비고</label>
|
|
</td>
|
|
<td colspan="5">
|
|
<textarea name="description" id="description" maxlength="200" class="" style="width:100%; border:1px solid #ccc; border-radius:2px;" placeholder="200자까지 입력 가능합니다.">${info.DESCRIPTION}</textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="pmsPopupForm" style="margin-top:0;">
|
|
<colgroup>
|
|
<col width="13%;">
|
|
<col width="10%;">
|
|
<col width="*;">
|
|
<col width="*;">
|
|
<col width="*;">
|
|
<col width="10%;">
|
|
</colgroup>
|
|
<tr>
|
|
<td rowspan="3" class="input_title">
|
|
<label for="">파일첨부</label>
|
|
</td>
|
|
<td colspan="5">
|
|
<div id="finalDropZone" class="dropzone authObj">Drag & Drop Files Here</div>
|
|
<input type="file" name="file1" id="file1" class="authObj" multiple>
|
|
<input type="button" id="btnUpload" value="Upload" class="upload_btns authObj">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5">
|
|
<div style="overflow-y:scroll;">
|
|
<table class="project_form_in_table" style="width:100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="10%">
|
|
<col width="20%">
|
|
<col width="20%;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<td>No</td>
|
|
<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="10%">
|
|
<col width="*">
|
|
<col width="10%">
|
|
<col width="20%">
|
|
<col width="20%;">
|
|
</colgroup>
|
|
<tbody id="moldHistoryProdFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" class="plm_btns authObj" id="btnSave">
|
|
<input type="button" value="닫기" class="plm_btns" id="btnClose">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |