- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
400 lines
13 KiB
Plaintext
400 lines
13 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);
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
fnc_setFileDropZone("ecrDropZone", "${ecrInfo.OBJID}", "ECR_ATTACH_01", "ECR이미지01", "fileAreaDraw",false,null,null);
|
|
fnc_setFileDropZone("ecr1DropZone", "${ecrInfo.OBJID}", "ECR_ATTACH_02", "ECR이미지02", "fileAreaDraw",false,null,null);
|
|
|
|
fileAreaDraw();
|
|
|
|
fn_getApprovalLine();
|
|
|
|
$('.select2').select2();
|
|
|
|
$("#product_objid").change(function(){
|
|
$("#part_objid").empty();
|
|
$("#part_name").text("");
|
|
fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
});
|
|
|
|
$("#upg_no").change(function(){
|
|
fnc_getProductUPGPARTList(this.value,"part_objid", "");
|
|
});
|
|
|
|
$("#part_objid").change(function(){
|
|
$("#part_name").text("");
|
|
$("#part_name").text($("#part_objid option:selected").attr("id"));
|
|
|
|
});
|
|
|
|
if("${ecrInfo.PRODUCT_OBJID}"!=""){
|
|
fnc_productUPGNEWList("${ecrInfo.PRODUCT_OBJID}","","upg_no", "");
|
|
|
|
$("#upg_no").val("${ecrInfo.UPG_NO}");
|
|
fnc_getProductUPGPARTList("${ecrInfo.UPG_NO}","part_objid", "");
|
|
$("#part_objid").val("${ecrInfo.PART_OBJID}");
|
|
$("#part_name").text("");
|
|
$("#part_name").text($("#part_objid option:selected").attr("id"));
|
|
}
|
|
|
|
$('input').prop('readonly', true);
|
|
$('input').prop('disabled', true);
|
|
|
|
$('select').prop('readonly', true);
|
|
$('select').prop('disabled', true);
|
|
|
|
$('textarea').prop('readonly', true);
|
|
$('textarea').prop('disabled', true);
|
|
|
|
|
|
$('#btnClose').prop('readonly', false);
|
|
$('#btnClose').prop('disabled', false);
|
|
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
//결재정보를 가져온다.
|
|
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_Img_fileCallback("ecrAttach","ECR_ATTACH_01");
|
|
fn_Img_fileCallback("ecrAttach1","ECR_ATTACH_02");
|
|
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_Img_fileCallback(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${ecrInfo.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("ecrAttach" == areaId){
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+data[i].REAL_FILE_NAME+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
appendText+= "<img src='"+srcLocation+"' style='width:98% !important; height:235px; margin:0;padding:0;' onclick=\"openImagePopUp(this.src)\" style='cursor:pointer;' />";
|
|
|
|
appendText+= " <div class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
/* <c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if> */
|
|
appendText+= "</div>";
|
|
$("#ecrDropZone").hide();
|
|
} else if("ecrAttach1" == areaId){
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+data[i].REAL_FILE_NAME+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
appendText+= "<img src='"+srcLocation+"' style='width:98% !important; height:235px; margin:0;padding:0;' onclick=\"openImagePopUp(this.src)\" style='cursor:pointer;' />";
|
|
appendText+= " <div class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
/* <c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if> */
|
|
appendText+= "</div>";
|
|
$("#ecr1DropZone").hide();
|
|
}
|
|
|
|
$("#"+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){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_save(){
|
|
if(fnc_validate('form1')){
|
|
<c:if test="${actionType eq 'regist'}">
|
|
if(confirm("저장하시겠습니까?")){
|
|
</c:if>
|
|
|
|
<c:if test="${actionType ne 'regist'}">
|
|
if(confirm("수정하시겠습니까?")){
|
|
</c:if>
|
|
|
|
var request_codeArr = new Array();
|
|
$('input:checkbox[name="request_code"]').each(function() {
|
|
if(this.checked){//checked 처리된 항목의 값
|
|
request_codeArr.push(this.value);
|
|
}
|
|
});
|
|
$("#request_codeArr").val(request_codeArr);
|
|
/* Swal.fire(request_codeArr);
|
|
return; */
|
|
$.ajax({
|
|
url:"/ecr/saveecr.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
Swal.fire(data.message);
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
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="${ecrInfo.OBJID}">
|
|
<input type="hidden" name="request_codeArr" id="request_codeArr">
|
|
<section>
|
|
<div class="plm_menu_name" style="display:flex;">
|
|
<h2 style="width:50%;text-align:center;margin-top:5px;">
|
|
<span style="font-size:25px;">설계변경요청서<BR></span>
|
|
<span style="font-size:15px;">(Engineering Change Request)</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;">
|
|
${ecrInfo.WRITER}<!-- 작성자이름 -->
|
|
</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;">
|
|
${ecrInfo.REG_DATE}<!-- 작성일자 -->
|
|
</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">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">기종(모델)</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<select name="product_objid" id="product_objid" required reqTitle="기종(모델)" type="select" class="select2">
|
|
<option value="">전체</option>
|
|
${code_map.product_code}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">UPG_NO</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<select name="upg_no" id="upg_no" class="select2">
|
|
<option value="">전체</option>
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title">
|
|
<label for="">ECR NO</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
${ecrInfo.ECR_NO}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td class="input_title">
|
|
<label for="">품번</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<select name="part_objid" id="part_objid" class="select2">
|
|
<option value="">전체</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">품명</label>
|
|
</td>
|
|
<td colspan="3" class="input_sub_title" id="part_name">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">설변요청</label>
|
|
</td>
|
|
|
|
<td class="input_sub_title" colspan="5" style="text-align: left; word-spacing: 15px; padding-left:10px;">
|
|
${code_map.request_code}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">제목</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="5">
|
|
<input type="text" name="title" id="title" value="${ecrInfo.TITLE}">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="pmsPopupForm" style="border:3px solid #000000;">
|
|
<tr>
|
|
<td colspan="2" style="border-right:1px solid #000000;text-align:center;"><span>[변경전]</span></td>
|
|
<td colspan="2" style="border-right:1px solid #000000;text-align:center;"><span>[변경후]</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<textarea placeholder="변경전" id="before_contents" name="before_contents" style="border:3px solid #ccc; width:100%; height:250px;">${ecrInfo.BEFORE_CONTENTS}</textarea>
|
|
</td>
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<div id="ecrDropZone" class="dropzone"style="width:98% !important; height:235px; margin:0;padding:0; line-height: 250px;">Drag & Drop Files Here</div>
|
|
<div id="ecrAttachFileArea"></div>
|
|
</td>
|
|
|
|
<td style="border-right:1px solid #000000;text-align:center;" >
|
|
<textarea placeholder="변경후" id="after_contents" name="after_contents" style="border:3px solid #ccc; width:100%; height:250px;">${ecrInfo.AFTER_CONTENTS}</textarea>
|
|
</td>
|
|
|
|
<td style="border-right:1px solid #000000;text-align:center;">
|
|
|
|
<div id="ecr1DropZone" class="dropzone"style="width:98% !important; height:235px; margin:0;padding:0; line-height: 250px;">Drag & Drop Files Here</div>
|
|
<div id="ecrAttach1FileArea"></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> |