250 lines
7.8 KiB
Plaintext
250 lines
7.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>
|
|
<script>
|
|
//닫기
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
//첨부 파일 기능
|
|
fnc_setFileDropZone("finalDropZone", "${resultMap.OBJID}", "${docType}", "${docTypeName}", "finalAreaDraw",true,null,null);
|
|
});
|
|
|
|
finalAreaDraw();
|
|
|
|
$("#btnUpload").click(function(){
|
|
var files = $("#file1")[0].files;
|
|
if(files.length > 0){
|
|
fnc_fileMultiUpload(files, null, "${resultMap.OBJID}", "${docType}", "${docTypeName}", null, "finalAreaDraw");
|
|
//file객체 초기화
|
|
$("#file1").val("");
|
|
}else{
|
|
Swal.fire("선택된 File이 없습니다.");
|
|
}
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_saveTestResult();
|
|
});
|
|
|
|
//취소
|
|
$("#btnCancel").click(function(){
|
|
var objId = $(this).attr("data-OBJID");
|
|
var params = "?objId="+objId;
|
|
document.form1.action ="/protoDevMng/protoTestResultDetailPopUp.do"+params;
|
|
document.form1.submit();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
<script>
|
|
|
|
//형상 영역을 display 한다.
|
|
function finalAreaDraw(){
|
|
fn_fileCallback("final","${docType}");
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${resultMap.OBJID}", "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>";
|
|
}
|
|
//Swal.fire(appendText);
|
|
$("#"+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 fn_saveTestResult(){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("저장하시겠습니까?")){
|
|
var form = $("#form1").serialize();
|
|
$.ajax({
|
|
url:"/protoDevMng/saveTestResult.do",
|
|
type:"POST",
|
|
data:form,
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result == "true" || data.result == true || data.result){
|
|
Swal.fire("저장되었습니다.");
|
|
// opener.fn_search();
|
|
self.close();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${resultMap.OBJID}">
|
|
<input type="hidden" name="targetObjId" id="targetObjId" value="${resultMap.TARGET_OBJID}">
|
|
<input type="hidden" name="partNo" id="partNo" value="${resultMap.PART_NO}">
|
|
<div>
|
|
<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="100px"/>
|
|
<col width="*"/>
|
|
<col width="*"/>
|
|
<col width="100px"/>
|
|
<col width="*"/>
|
|
<col width="*"/>
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" >
|
|
<label for="">구분</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="resultType" id="resultType">
|
|
<option value="">선택</option>
|
|
<option value="weld" ${'weld' eq resultMap.RESULT_TYPE?'selected':''}>용접검사</option>
|
|
<option value="frame" ${'frame' eq resultMap.RESULT_TYPE?'selected':''}>골격검사</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title" >
|
|
<label for="">차수</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<input type="number" name="round" id="round" value="${resultMap.TEST_ROUND}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" >
|
|
<label for="">결과</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="result" id="result">
|
|
<option value="">선택</option>
|
|
<option value="0" ${'0' eq resultMap.TEST_RESULT?'selected':''}>OK</option>
|
|
<option value="1" ${'1' eq resultMap.TEST_RESULT?'selected':''}>NG</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title" >
|
|
<label for="">점수</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<input type="text" name="score" id="score" value="${resultMap.SCORE}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="2" class="input_title align_c">파일첨부</td>
|
|
<td colspan="5">
|
|
<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">
|
|
<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="height: 90px; overflow-y: scroll; border-bottom: 2px solid #cacaca;">
|
|
<table id="finalFileArea" class="fileListscrollTbody">
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns" >
|
|
<c:choose>
|
|
<c:when test="${param.actionType eq 'regist'}">
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input type="button" id="btnCancel" value="취소" class="plm_btns" data-OBJID="${resultMap.OBJID}">
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |