ERP-node/WebContent/WEB-INF/view/partMng/partMngHisDetailPopUp.jsp

688 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>
<style type="text/css">
::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, #f5d78e, #f5d78e);
}
</style>
</head>
<script>
$(document).ready(function(){
if("${resultMap.IS_LAST}"==0){
$("#btnChangeDesign").hide();
$("#btnEdit").hide();
}
$("#btnClose").click(function(){
self.close(0);
});
$("#btnEdit").click(function(){
fn_edit();
});
//설계변경
$("#btnChangeDesign").click(function(){
if(confirm("설계변경 하시겠습니까?")){
$("#ACTION_TYPE").val("changeDesign");
fn_edit();
}
});
fnc_setFileDropZone("shapeDropZone", "${resultMap.OBJID}", "PART_SHAPE_IMG", "Part 형상", "fileAreaDraw",true,null,null,null);
fnc_setFileDropZone("ecdDropZone", "${resultMap.OBJID}", "ECD_DOC", "ECD 첨부파일", "fileAreaDraw",true,null,null,null);
fnc_setFileDropZone("3dCadDropZone", "${resultMap.OBJID}", "3D_CAD", "3D CAD 첨부파일", "fileAreaDraw",true,null,null,null);
fnc_setFileDropZone("2dDrawingCadDropZone", "${resultMap.OBJID}", "2D_DRAWING_CAD", "2D(Drawing) CAD 첨부파일", "fileAreaDraw",true,null,null,null);
fnc_setFileDropZone("2dPDFCadDropZone", "${resultMap.OBJID}", "2D_PDF_CAD", "2D(PDF) CAD 첨부파일", "fileAreaDraw",true,null,null,null);
fileAreaDraw();
fnc_datepick();
fnc_getCodeListAppend("<%=Constants.UNIT_CODE%>","UNIT","${resultMap.UNIT}");
fnc_getCodeListAppend("<%=Constants.PART_TYPE_CODE%>","PART_TYPE","${resultMap.PART_TYPE}");
fnc_getCodeListAppend("<%=Constants.MATERIAL_CODE%>","MATERIAL","${resultMap.MATERIAL}");
fnc_getCodeListAppend("<%=Constants.SPEC_NO_CODE%>","SPEC_NO","${resultMap.SPEC_NO}");
fnc_getCodeListAppend("<%=Constants.DESIGN_APPLY_POINT_CODE%>","DESIGN_APPLY_POINT","${resultMap.DESIGN_APPLY_POINT}");
fnc_getProductMgmtList("PRODUCT_MGMT_OBJID", "${resultMap.PRODUCT_MGMT_OBJID}");
fnc_productUPGList("${resultMap.PRODUCT_MGMT_OBJID}","","UPG_OBJID", "${resultMap.UPG_OBJID}");
// $("input:radio[name='CHANGE_OPTION']:radio[value='${resultMap.CHANGE_OPTION}']").prop('checked', true);
$("input:radio[name='MANAGEMENT_FLAG']:radio[value='${resultMap.MANAGEMENT_FLAG}']").prop('checked', true);
$("input:radio[name='CHANGE_OPTION']").prop('disabled', true);
$("input:radio[name='MANAGEMENT_FLAG']").prop('disabled', true);
$("select").attr("disabled",true);
$('input').prop('readonly', true);
$('input').prop('disabled', true);
$('#btnEdit').prop('readonly', false);
$('#btnEdit').prop('disabled', false);
$('#btnChangeDesign').prop('readonly', false);
$('#btnChangeDesign').prop('disabled', false);
$('#btnClose').prop('readonly', false);
$('#btnClose').prop('disabled', false);
$('#OBJID').prop('readonly', false);
$('#STATUS').prop('readonly', false);
$('#IS_LAST').prop('readonly', false);
$('#ACTION_TYPE').prop('readonly', false);
$('#REVISION').prop('readonly', false);
$('#OBJID').prop('disabled', false);
$('#STATUS').prop('disabled', false);
$('#IS_LAST').prop('disabled', false);
$('#ACTION_TYPE').prop('disabled', false);
$('#REVISION').prop('disabled', false);
window.resizeTo(800,695);
});
</script>
<script>
function fn_getProductMgmtList(selectboxId,selectedVal){
$("#"+selectboxId).empty();
$("#"+selectboxId).append("<option value=''>선택</option>");
$.ajax({
url:"/common/getProductMgmtList.do",
type:"POST",
data:{"isJson":true},
dataType:"json",
async:false,
success:function(data){
resultList = data
if(0 < resultList.length){
for (var i = 0; i < resultList.length; i++) {
var commonCodeId = resultList[i].CODE_CD;
var commonCodeName = resultList[i].NAME;
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
}
$("#"+selectboxId).val(selectedVal);
}
},
error: function(jqxhr, status, error){
}
});
}
function fn_getProductUPGList(selectboxId,selectedVal){
$("#"+selectboxId).empty();
$("#"+selectboxId).append("<option value=''>선택</option>");
$.ajax({
url:"/common/getProductUPGList.do",
type:"POST",
data:{"isJson":true},
dataType:"json",
async:false,
success:function(data){
resultList = data
if(0 < resultList.length){
for (var i = 0; i < resultList.length; i++) {
var commonCodeId = resultList[i].CODE_CD;
var commonCodeName = resultList[i].NAME;
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
}
$("#"+selectboxId).val(selectedVal);
}
},
error: function(jqxhr, status, error){
}
});
}
//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 fileAreaDraw(){
fn_fileCallback("shape","PART_SHAPE_IMG");
fn_fileCallback2("ecd","ECD_DOC");
fn_fileCallback2("3dCad","3D_CAD");
fn_fileCallback2("2dDrawingCad","2D_DRAWING_CAD");
fn_fileCallback2("2dPDFCad","2D_PDF_CAD");
$("#shapeDropZone").hide();
$("#ecdDropZone").hide();
$("#3dCadDropZone").hide();
$("#2dDrawingCadDropZone").hide();
$("#2dPDFCadDropZone").hide();
}
//첨부파일 목록을 가져온다.
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+"DropZone").hide();
$("#"+areaId+"FileArea").show();
}
$.each(data, function(i){
var realFileName = data[i].REAL_FILE_NAME;
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+realFileName+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
var appendText = "";
var appendImgText = ""
appendText+= "<a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>&nbsp;"+data[i].REAL_FILE_NAME+"</a>";
appendImgText = "<img src='"+srcLocation+"' height='85px' width='99%' onclick='openImagePopUp(this.src)' style='cursor:pointer;' />"
$("#"+areaId+"FileArea").append(appendImgText+appendText);
});
}else{
$("#"+areaId+"DropZone").show();
$("#"+areaId+"FileArea").empty();
$("#"+areaId+"FileArea").hide();
}
},
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){
if(0 < $("#"+areaId+"DropZone").length){
$("#"+areaId+"DropZone").hide();
$("#"+areaId+"FileArea").show();
}
//첨부파일 목록 영역 show
$("#"+areaId+"FileArea").empty();
$.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+= "<div style='float:left;width:90%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>";
appendText+= " <a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")' title='"+data[i].REAL_FILE_NAME+"'>"+data[i].REAL_FILE_NAME+"</a>";
appendText+= "</div>";
$("#"+areaId+"FileArea").append(appendText);
});
}else{
$("#"+areaId+"DropZone").show();
$("#"+areaId+"FileArea").empty();
$("#"+areaId+"FileArea").hide();
}
},
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 fn_edit(){
if($("#ACTION_TYPE").val() == "changeDesign"){
var form1 = document.form1;
form1.action = "/partMng/partMngFormPopUp.do";
form1.submit();
}else{
if(confirm("수정하시겠습니까?")){
$("#ACTION_TYPE").val("Edit");
var form1 = document.form1;
form1.action = "/partMng/partMngFormPopUp.do";
form1.submit();
}
}
}
</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="STATUS" id="STATUS" value="${resultMap.STATUS}">
<input type="hidden" name="IS_LAST" id="IS_LAST" value="${resultMap.IS_LAST}">
<input type="hidden" name="ACTION_TYPE" id="ACTION_TYPE" value="">
<input type="hidden" name="REVISION" id="REVISION" value="${resultMap.REVISION}">
<input type="hidden" name="CONTRACT_OBJID" id="CONTRACT_OBJID" value="${resultMap.CONTRACT_OBJID}">
<section>
<div class="plm_menu_name" style="display:flex;">
<h2>
<span>품목 상세</span>
</h2>
</div>
<div id="businessPopupFormWrap">
<!-- <div class="form_popup_title">&nbsp;&nbsp;&nbsp;영업활동 등록</div> -->
<table class="pmsPopupForm">
<colgroup>
<col width="12%">
<col width="12%">
<col width="25%">
<col width="12%">
<col width="*">
</colgroup>
<tr>
<td class="input_title">
<label for="">품번</label>
</td>
<td class="input_sub_title" colspan="4">
<input type="text" name="PART_NO" id="PART_NO" value="${resultMap.PART_NO}">
</td>
<%-- <td class="input_title">
<label for="">Revision</label>
</td>
<td class="input_sub_title" >
<input type="text" name="REVISION" id="REVISION" value="${resultMap.REVISION}" readonly>
</td> --%>
</tr>
<%--
<tr>
<!-- <td class="input_title"> -->
<!-- <label for="">품명</label> -->
<!-- </td> -->
<!-- <td class="input_sub_title" colspan=""> -->
<input type="text" name="PART_NAME" id="PART_NAME" value="${resultMap.PART_NAME}">
<!-- </td> -->
</tr>
--%>
<tr>
<td class="input_title">
<label for="">품명</label>
</td>
<td class="input_sub_title" colspan="4">
<input type="text" name="PART_NAME" id="PART_NAME" value="${resultMap.PART_NAME}">
</td>
</tr>
<tr>
<td class="input_title">
<label for="">QTY</label>
</td>
<td class="input_sub_title" colspan="2">
<input type="text" name="QTY" id="QTY" value="${resultMap.QTY}">
</td>
<td class="input_title">
<label for="">재질</label>
</td>
<td class="input_sub_title" colspan="">
<input type="text" name="MATERIAL" id="MATERIAL" value="${resultMap.MATERIAL}">
</td>
</tr>
<tr>
<td class="input_title">
<label for="">사양(규격)</label>
</td>
<td class="input_sub_title" colspan="4" title="${resultMap.SPEC}">
<input type="text" name="SPEC" id="SPEC" value="${resultMap.SPEC}">
</td>
</tr>
<tr>
<td class="input_title">
<label for="">후처리</label>
</td>
<td class="input_sub_title" colspan="2">
<input type="text" name="POST_PROCESSING" id="POST_PROCESSING" value="${resultMap.POST_PROCESSING}">
</td>
<td class="input_title">
<label for="">MAKER</label>
</td>
<td class="input_sub_title" colspan="">
<input type="text" name="MAKER" id="MAKER" value="${resultMap.MAKER}">
</td>
</tr>
<tr>
<td class="input_title">
<label for="">대분류</label>
</td>
<td class="input_sub_title" colspan="2">
<input type="text" name="MAJOR_CATEGORY" id="MAJOR_CATEGORY" value="${resultMap.MAJOR_CATEGORY}">
</td>
<td class="input_title">
<label for="">중분류</label>
</td>
<td class="input_sub_title" colspan="">
<input type="text" name="SUB_CATEGORY" id="SUB_CATEGORY" value="${resultMap.SUB_CATEGORY}">
</td>
</tr>
<tr>
<td class="input_title">
<label for="">PART구분</label>
</td>
<td class="input_sub_title" colspan="2">
<select name="PART_TYPE" id="PART_TYPE" class=""></select>
</td>
<td class="input_title">
<label for="">Revision</label>
</td>
<td class="input_sub_title" colspan="">
<input type="text" name="REVISION" id="REVISION" value="${resultMap.REVISION}" readonly>
</td>
</tr>
<%-- <tr>
<td class="input_title">
<label for="">단위</label>
</td>
<td class="input_sub_title" >
<select name="UNIT" id="UNIT" class="select2"></select>
</td>
<td class="input_title">
<label for="">수량</label>
</td>
<td class="input_sub_title">
<input type="text" name="QTY" id="QTY" value="${resultMap.QTY}">
</td>
</tr> --%>
<%-- <tr>
<td class="input_title">
<label for="">공급처</label>
</td>
<td class="input_sub_title">
${resultMap.SUPPLY_NAME}
</td>
</tr> --%>
<%-- <tr>
<td class="input_title">
<label for="">두께</label>
</td>
<td class="input_sub_title" >
${resultMap.THICKNESS}
</td>
<td class="input_title">
<label for="">가로</label>
</td>
<td class="input_sub_title">
${resultMap.WIDTH}
</td>
</tr>
<tr>
<td class="input_title">
<label for="">세로</label>
</td>
<td class="input_sub_title" >
${resultMap.HEIGHT}
</td>
<td class="input_title">
<label for="">외경</label>
</td>
<td class="input_sub_title">
${resultMap.OUT_DIAMETER}
</td>
</tr>
<tr>
<td class="input_title">
<label for="">내경</label>
</td>
<td class="input_sub_title" >
${resultMap.IN_DIAMETER}
</td>
<td class="input_title">
<label for="">길이</label>
</td>
<td class="input_sub_title">
${resultMap.LENGTH}
</td>
</tr> --%>
<tr>
<%-- <td class="input_title">
<label for="">최초설계일</label>
</td>
<td class="input_sub_title" >
<input type="text" class="date_icon" name="DESIGN_DATE" id="DESIGN_DATE" value="${resultMap.DESIGN_DATE}" />
</td> --%>
<td class="input_title">
<label for="">EO No</label>
</td>
<td class="input_sub_title" colspan="2">
<input type="text" name="EO_NO" id="EO_NO" value="${resultMap.EO_NO}" readonly/>
</td>
<td class="input_title">
<label for="">EO Date</label>
</td>
<td class="input_sub_title" >
<input type="text" name="EO_DATE" id="EO_DATE" value="${resultMap.EO_DATE}" />
</td>
</tr>
<%-- <tr>
<td class="input_title">
<label for="">비고</label>
</td>
<td class="input_sub_title" colspan="3">
<input type="text" name="REMARK" id="REMARK" value="${resultMap.REMARK}">
</td>
</tr> --%>
<!-- <tr> -->
<!-- <td class="input_title" rowspan="2"> -->
<!-- <label for="">사양 번호</label> -->
<!-- </td> -->
<!-- <td class="input_sub_title" >ES</td> -->
<!-- <td colspan="2"> -->
<!-- <select name="ES_SPEC" id="ES_SPEC"></select> -->
<!-- </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td class="input_sub_title" >MS</td> -->
<!-- <td colspan="2"> -->
<!-- <select name="MS_SPEC" id="MS_SPEC"></select> -->
<!-- </td> -->
<!-- </tr> -->
<%--
<tr>
<td class="input_title">
<label for="">설변항목</label>
</td>
<td class="input_sub_title" colspan="3">
${code_map.CHANGE_OPTION}
</td>
<input type="hidden" name="CHANGE_OPTION_Arr" id="CHANGE_OPTION_Arr">
</tr>
--%>
<tr>
<td class="input_title">
<label for="">EO구분</label>
</td>
<td class="input_sub_title" colspan="2">
<select name="CHANGE_TYPE" id="CHANGE_TYPE" class=""><option value="">선택</option>${code_map.CHANGE_TYPE}</select>
</td>
<td class="input_title">
<label for="">EO사유</label>
</td>
<td class="input_sub_title" >
<select name="CHANGE_OPTION" id="CHANGE_OPTION" class=""><option value="">선택</option>${code_map.CHANGE_OPTION}</select>
</td>
</tr>
<tr>
<td class="input_title">
<label for="">비고</label>
</td>
<td class="input_sub_title" colspan="4">
<input type="text" name="REMARK" id="REMARK" value="${resultMap.REMARK}">
</td>
</tr>
<!-- <tr> -->
<!-- <td class="input_title"> -->
<!-- <label for="">ECD</label> -->
<!-- </td> -->
<!-- <td class="input_sub_title" colspan="3"> -->
<!-- <div id="ecdDropZone" class="dropzone" style="width:99%;height:90%;border: 2px dotted rgb(130, 150, 194);">Drag & Drop Files Here</div> -->
<!-- <div id="ecdFileArea" style="display:none;"></div> -->
<!-- </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td class="input_title"> -->
<!-- <label for="">관리항목</label> -->
<!-- </td> -->
<!-- <td class="input_sub_title" colspan="3"> -->
<!-- <input type="radio" name="MANAGEMENT_FLAG" value="Y">유 -->
<!-- <input type="radio" name="MANAGEMENT_FLAG" value="N">무 -->
<!-- </td> -->
<!-- </tr> -->
<!--
</table>
<table class="pmsPopupForm" style="margin-top:0px;">
<colgroup>
<col width="13%;">
<col width="13%;">
<col width="*">
</colgroup>
-->
<tr>
<td class="input_title" rowspan="3">
<label for="">CAD Data</label>
</td>
<td class="input_title" >
3D
</td>
<td colspan="3" class="border1">
<div id="3dCadDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div>
<div class="plm_scroll_table" style="height:85px;">
<div id="3dCadFileArea" style="display:none;"></div>
</div>
</td>
</tr>
<tr>
<td class="input_title" >
2D
</td>
<td colspan="3" class="border1">
<div id="2dDrawingCadDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div>
<div class="plm_scroll_table" style="height:85px;" >
<div id="2dDrawingCadFileArea" style="display:none;"></div>
</div>
</td>
</tr>
<tr>
<td class="input_title" >
PDF
</td>
<td colspan="3" class="border1">
<div id="2dPDFCadDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div>
<div class="plm_scroll_table" style="height:85px;">
<div id="2dPDFCadFileArea" style="display:none;"></div>
</div>
</td>
</tr>
</table>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</section>
</form>
</body>
</html>