ERP-node/WebContent/WEB-INF/view/checkReportMng/checkReportMngDetailPopUp.jsp

635 lines
20 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String userId = CommonUtils.checkNull(person.getUserId());
%>
<!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);
});
$("#btnEdit").click(function(){
fn_edit();
});
fileAreaDraw();
fnc_datepick();
fn_getApprovalLine();
//검수결과
var checkResultList = fnc_getCodeList("<%=Constants.CHECK_RESULT_CD%>");
fn_getCodeListAppend("SPAN_LEFT_CHECK_RESULT","${resultMap.SPAN_LEFT_CHECK_RESULT}",checkResultList);
fn_getCodeListAppend("SPAN_RIGHT_CHECK_RESULT","${resultMap.SPAN_RIGHT_CHECK_RESULT}",checkResultList);
fn_getCodeListAppend("DIAGONAL_CHECK_RESULT","${resultMap.DIAGONAL_CHECK_RESULT}",checkResultList);
fn_getCodeListAppend("SADDLE_CHECK_RESULT","${resultMap.SADDLE_CHECK_RESULT}",checkResultList);
fn_getCodeListAppend("WELDING_PAINTING_CHECK_RESULT","${resultMap.WELDING_PAINTING_CHECK_RESULT}",checkResultList);
fnc_getProjectNoList("PARENT_OBJID","${resultMap.PARENT_OBJID}");
fnc_getDeptList("MAKEING_TEAM","${resultMap.MAKEING_TEAM}");
fnc_getUserList("SPAN_CHECK_USER","${resultMap.SPAN_CHECK_USER}");
fnc_getUserList("SADDLE_CHECK_USER","${resultMap.SADDLE_CHECK_USER}");
fnc_getUserList("WELDING_PAINTING_CHECK_USER","${resultMap.WELDING_PAINTING_CHECK_USER}");
$('.select2').select2();
});
</script>
<script>
function fn_edit(){
if(confirm("수정하시겠습니까?")){
var form1 = document.form1;
form1.action = "/checkReportMng/checkReportMngFormPopUp.do";
form1.submit();
}
}
//codeId를 부모로 사용하는 코드의 정보목록을 가져온다.
function fn_getCodeListAppend(codeId,selectboxId,selectedVal){
var resultList = fnc_getCodeList(codeId);
if(0 < resultList.length){
$("#"+selectboxId).empty();
$("#"+selectboxId).append("<option value=''>선택</option>");
for (var i = 0; i < resultList.length; i++) {
var commonCodeId = resultList[i].CODE_ID;
var commonCodeName = resultList[i].CODE_NAME;
var appendText = "";
if(commonCodeName == "결재중" || commonCodeName == "반려" || commonCodeName == "결재완료"){
appendText = "disabled";
}
$("#"+selectboxId).append("<option value='"+commonCodeId+"' "+appendText+">"+commonCodeName+"</option>");
}
$("#"+selectboxId).val(selectedVal);
}
}
function fn_getCodeListAppend(selectboxId,selectedVal,resultList){
if(0 < resultList.length){
$("#"+selectboxId).empty();
$("#"+selectboxId).append("<option value=''>선택</option>");
for (var i = 0; i < resultList.length; i++) {
var commonCodeId = resultList[i].CODE_ID;
var commonCodeName = resultList[i].CODE_NAME;
var appendText = "";
if(commonCodeName == "결재중" || commonCodeName == "반려" || commonCodeName == "결재완료"){
appendText = "disabled";
}
$("#"+selectboxId).append("<option value='"+commonCodeId+"' "+appendText+">"+commonCodeName+"</option>");
}
$("#"+selectboxId).val(selectedVal);
}
}
//결재정보를 가져온다.
function fn_getApprovalLine(){
var scheduleList = new Array();
<c:forEach items="${approvalList}" var="approvalItem">
var seq = "${approvalItem.SEQ}";
var targetUserName = "${approvalItem.TARGET_USER_NAME}";
var procDate = "${approvalItem.PROC_DATE}";
if(1 == seq){
$("#reviewerName").append(targetUserName);
$("#reviewerDate").append(procDate);
}
if(2 == seq){
$("#confirmName").append(targetUserName);
$("#confirmDate").append(procDate);
}
</c:forEach>
}
function fileAreaDraw(){
fn_fileCallback("checkReportImg","CHECK_REPORT_IMG_FILE");
fn_fileCallback2("checkReport","CHECK_REPORT_FILE");
}
//첨부파일 목록을 가져온다.
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+"DropZone").length){
$("#"+areaId+"FileArea").show();
}
$.each(data, function(i){
var appendText = "";
var path = data[i].FILE_PATH;
var fileName = data[i].SAVED_FILE_NAME;
var realFileName = data[i].REAL_FILE_NAME;
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+realFileName+"&savedFileName="+fileName+"&attDir="+path);
appendText+="<colgroup>";
appendText+=" <col width='*'>";
appendText+="</colgroup>";
appendText+= "<tr>";
appendText+= " <td>";
appendText = " <img src='"+srcLocation+"' height='210px' width='99%' onclick='openImagePopUp(this.src)' style='cursor:pointer;' />"
appendText+= " <a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>&nbsp;"+data[i].REAL_FILE_NAME+"</a>";
appendText+= " </td>";
appendText+= "</tr>";
$("#"+areaId+"FileArea").append(appendText);
});
}else{
$("#"+areaId+"DropZone").show();
$("#"+areaId+"FileArea").empty();
var appendText = "";
appendText += "<tr>";
appendText += "<td>첨부 파일이 없습니다.</td>";
appendText +="</tr>";
$("#"+areaId+"FileArea").append(appendText);
}
},
error: function(jqxhr, status, error){
}
});
}//파일 첨부 END
function fn_fileCallback2(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 = "";
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='20%'>";
appendText +=" </colgroup>";
appendText+= "<tr>";
appendText+= " <td>"+[i+1]+"</td>";
appendText+= " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>&nbsp;&nbsp;"+data[i].REAL_FILE_NAME+"</a>";
appendText+= "</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 openImagePopUp(url){
var img=new Image();
img.src=url;
var img_width=img.width;
var img_height=img.height;
var win_width=img.width+25;
var height=img.height+30;
window.open(url,"problemImgPopUp","width="+img_width+",height="+height+", menubars=no, scrollbars=yes'");
}
/*첨부 파일 삭제 */
function fileDelete(fileObjId,areaId){
var type =areaId;
if(confirm("파일을 삭제하시겠습니까?")){
$.ajax({
url:"/common/deleteFileInfo.do",
type:"POST",
data:{"objId":fileObjId},
dataType:"json",
async:true,
success:function(data){
fileAreaDraw();
},
error: function(jqxhr, status, error){
}
});
}
}
</script>
<style>
.input_title {border-left:1px solid #ccc;}
.input_sub_title {border-left:1px solid #ccc;}
.pmsPopupForm tr:last-child td{border-bottom:1px solid #ccc;}
</style>
<body>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="OBJID" id="OBJID" value="${resultMap.OBJID}">
<input type="hidden" name="objId" id="objId" value="${resultMap.OBJID}">
<section>
<div class="plm_menu_name" style="display:flex;">
<h2 style="width:50%;text-align:center;margin-top:15px;">
<span style="font-size:30px;">검수보고서 상세</span>
</h2>
<table class="pmsPopupForm" style="width:50%;background:white;">
<colgroup>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</colgroup>
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
<td class="input_title" rowspan="3" style="text-align:center;">
<label>결재</label>
</td>
<td class="input_title" style="text-align:center;">
<label>작성자</label>
</td>
<td class="input_title" style="text-align:center;">
<label>검토</label>
</td>
<td class="input_title" style="text-align:center;">
<label>승인</label>
</td>
</tr>
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;">
<td class="input_sub_title" style="text-align:center;">
${resultMap.WRITER_TITLE}<!-- 작성자이름 -->
</td>
<td class="input_sub_title" style="text-align:center;" id="reviewerName"></td>
<td class="input_sub_title" style="text-align:center;" id="confirmName"></td>
</tr>
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
<td class="input_sub_title" style="text-align:center;">
${resultMap.REGDATE_TITLE}<!-- 작성일자 -->
</td>
<td class="input_sub_title" style="text-align:center;" id="reviewerDate"></td>
<td class="input_sub_title" style="text-align:center;" id="confirmDate"></td>
</tr>
</table>
</div>
<div id="businessPopupFormWrap">
<!-- <div class="form_popup_title">&nbsp;&nbsp;&nbsp;영업활동 등록</div> -->
<table class="pmsPopupForm">
<colgroup>
<col width="8%">
<col width="8%">
<col width="15%">
<col width="8%">
<col width="15%">
<col width="8%">
<col width="15%">
<col width="8%%">
<col width="*">
</colgroup>
<tr>
<td class="input_title">
<label for="">보고서 No.</label>
</td>
<td class="input_sub_title" colspan="2">${resultMap.REPORT_MNG_NO}</td>
<td class="input_title">
<label for="">프로젝트 No</label>
</td>
<td class="input_sub_title">${resultMap.PROJECT_NO}</td>
<td class="input_title">
<label for="">고객사</label>
</td>
<td class="input_sub_title">${resultMap.CUSTOMER_NAME}</td>
<td class="input_title">
<label for="">제작팀</label>
</td>
<td class="input_sub_title">${resultMap.MAKEING_TEAM_NAME}</td>
</tr>
<tr>
<td class="input_title" rowspan="3">
<label for="">SPAN</label>
</td>
<td class="input_title">
<label for="">도면</label>
</td>
<td class="input_sub_title">${resultMap.SPAN_DRAWING}</td>
<td class="input_sub_title" colspan="6"></td>
</tr>
<tr>
<td class="input_title">
<label for="">좌측</label>
</td>
<td class="input_sub_title">${resultMap.SPAN_LEFT}</td>
<td class="input_title">
<label for="">오차</label>
</td>
<td class="input_sub_title">${resultMap.SPAN_LEFT_ERROR}</td>
<td class="input_title" rowspan="3">
<label for="">검수결과</label>
</td>
<td class="input_sub_title">
<select name="SPAN_LEFT_CHECK_RESULT" id="SPAN_LEFT_CHECK_RESULT" disabled></select>
</td>
<td class="input_title" rowspan="2">
<label for="">검수자</label>
</td>
<td class="input_sub_title" rowspan="2">
<select name="SPAN_CHECK_USER" id="SPAN_CHECK_USER" class="select2" disabled></select>
</td>
</tr>
<tr>
<td class="input_title">
<label for="">우측</label>
</td>
<td class="input_sub_title">${resultMap.SPAN_RIGHT}</td>
<td class="input_title">
<label for="">오차</label>
</td>
<td class="input_sub_title">${resultMap.SPAN_RIGHT_ERROR}</td>
<td class="input_sub_title">
<select name="SPAN_RIGHT_CHECK_RESULT" id="SPAN_RIGHT_CHECK_RESULT" disabled></select>
</td>
</tr>
<tr>
<td class="input_title" rowspan="3">
<label for="">대각</label>
</td>
<td class="input_title">
<label for="">좌측</label>
</td>
<td class="input_sub_title">${resultMap.DIAGONAL_LEFT}</td>
<td class="input_title">
<label for="">우측</label>
</td>
<td class="input_sub_title">${resultMap.DIAGONAL_RIGHT}</td>
<td class="input_sub_title">
<select name="DIAGONAL_CHECK_RESULT" id="DIAGONAL_CHECK_RESULT" disabled></select>
</td>
<td class="input_title">
<label for="">검수일자</label>
</td>
<td class="input_sub_title">${resultMap.CHECK_DATE_TITLE}</td>
</tr>
</table>
<table class="pmsPopupForm" style="margin-top:10px;border-collapse:initial;border:solid 1px #ccc;">
<colgroup>
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="*">
<col width="100px;">
<col width="100px;">
<col width="100px;">
<col width="150px;">
</colgroup>
<tr>
<td class="input_title" colspan="14">
<label for="">SADDLE</label>
</td>
</tr>
<tr>
<td colspan="10" style="border-bottom:none;">
</td>
<td class="input_title">
<label for="">Wheel</label>
</td>
<td class="input_title">
<label for="">W.B</label>
</td>
<td class="input_title">
<label for="">검수결과</label>
</td>
<td class="input_title">
<label for="">검수자</label>
</td>
</tr>
<tr>
<td colspan="10" style="border-bottom:none;">
</td>
<td class="input_sub_title">${resultMap.SADDLE_WHEEL}</td>
<td class="input_sub_title">${resultMap.SADDLE_WHEEL_BASE}</td>
<td class="input_sub_title">
<select name="SADDLE_CHECK_RESULT" id="SADDLE_CHECK_RESULT" disabled></select>
</td>
<td class="input_sub_title">
<select name="SADDLE_CHECK_USER" id="SADDLE_CHECK_USER" class="select2" disabled></select>
</td>
</tr>
<tr style="height:20px;">
<td colspan="14" style="border:none;!important;"></td>
</tr>
<tr>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_1}</td>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_2}</td>
<td colspan="3" style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_3}</td>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_4}</td>
<td colspan="4" style="border:none;"></td>
</tr>
<tr style="height:30px;">
<td colspan="2" style="border:none;"></td>
<td class="input_title2" style="background-color:#4C4C4C;"></td>
<td class="input_title2" colspan="5" style="background-color:#E5D85C;"></td>
<td class="input_title2" style="background-color:#4C4C4C;"></td>
<td colspan="4" style="border:none;"></td>
</tr>
<tr style="height:20px;">
<td colspan="14" style="border:none;"></td>
</tr>
<tr style="height:30px;">
<td colspan="2" style="border:none;"></td>
<td class="input_title2" style="background-color:#4C4C4C;"></td>
<td class="input_title2" colspan="5" style="background-color:#E5D85C;"></td>
<td class="input_title2" style="background-color:#4C4C4C;"></td>
<td colspan="5" style="border:none;"></td>
</tr>
<tr>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_5}</td>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_6}</td>
<td colspan="3" style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_7}</td>
<td style="border-bottom:none;"></td>
<td class="input_title2">${resultMap.SADDLE_8}</td>
<td colspan="4" style="border:none;"></td>
</tr>
<tr style="height:20px;">
<td colspan="14" style="border:none;"></td>
</tr>
</table>
<table class="pmsPopupForm" style="margin-top:10px;">
<colgroup>
<col width="*">
<col width="100px;">
<col width="150px;">
</colgroup>
<tr>
<td class="input_title" colspan="3">
<label for="">용접 및 도색</label>
</td>
</tr>
<tr>
<td rowspan="3">
<textarea style="width:99%;height:133px;" name="WELDING_PAINTING_CONTENTS" readonly>${resultMap.WELDING_PAINTING_CONTENTS}</textarea>
</td>
<td class="input_title">
<label for="">검수결과</label>
</td>
<td class="input_title">
<label for="">검수자</label>
</td>
</tr>
<tr>
<td class="input_sub_title">
<select name="WELDING_PAINTING_CHECK_RESULT" id="WELDING_PAINTING_CHECK_RESULT" disabled></select>
</td>
<td class="input_sub_title">
<select name="WELDING_PAINTING_CHECK_USER" id="WELDING_PAINTING_CHECK_USER" class="select2" disabled></select>
</td>
</tr>
<tr style="height:100px;"></tr>
</table>
<table class="pmsPopupForm" style="margin-top:10px;">
<colgroup>
<col width="50%">
<col width="*">
</colgroup>
<tr>
<td class="input_title">
<label for="">첨부문서</label>
</td>
<td class="input_title">
<label for="">이미지</label>
</td>
</tr>
<tr style="height:170px;">
<td>
<div class="project_form_in_table"style="width:100%;" id="checkReportFileAreaTable" >
<div style="overflow-y:scroll;">
<table class="" style="width:100%;">
<colgroup>
<col width="10%">
<col width="*">
<col width="20%">
</colgroup>
<thead>
<tr class="plm_thead">
<td>No</td>
<td>첨부파일명</td>
<td>등록일</td>
</tr>
</thead>
</table>
</div>
<div class="plm_scroll_table" style="height:140px;">
<table class="plm_table">
<colgroup>
<col width="10%">
<col width="*">
<col width="20%">
</colgroup>
</table>
<table id="checkReportFileArea" class="fileListscrollTbody">
<tr>
<td colspan="3">첨부 파일이 없습니다.</td>
</tr>
</table>
</div>
</div>
</td>
<td>
<div class="project_form_in_table"style="width:100%" id="checkReportImgFileAreaTable" >
<div class="plm_scroll_table" style="height:166px;">
<table class="plm_table">
<colgroup>
<col width="*">
</colgroup>
</table>
<table id="checkReportImgFileArea" class="fileListscrollTbody">
<tr>
<td>첨부 파일이 없습니다.</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<c:choose>
<c:when test="${(resultMap.WRITER eq connectUserId or 'plm_admin' eq connectUserId) and (resultMap.STATUS_TITLE ne '결재중' and resultMap.STATUS_TITLE ne '결재완료')}">
<input type="button" value="수정" id="btnEdit" class="plm_btns update">
</c:when>
<c:otherwise></c:otherwise>
</c:choose>
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</section>
</form>
</body>
</html>