258 lines
7.0 KiB
Plaintext
258 lines
7.0 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@include file="/init.jsp"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>ECR - Engineering Change Request</title>
|
|
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
|
<script src="/js/jquery-3.2.1.min.js"></script>
|
|
<script src="/js/sweetalert2.all.min.js"></script>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: 'Malgun Gothic', 'Arial', sans-serif;
|
|
background: #fff;
|
|
padding: 0;
|
|
}
|
|
.ecr_container {
|
|
width: 100%;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
border: 1px solid #333;
|
|
}
|
|
/* 헤더 영역 */
|
|
.ecr_header {
|
|
display: table;
|
|
width: 100%;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
.ecr_header_left {
|
|
display: table-cell;
|
|
width: 180px;
|
|
vertical-align: middle;
|
|
padding: 10px 15px;
|
|
border-right: 1px solid #333;
|
|
}
|
|
.ecr_logo {
|
|
display: block;
|
|
width: 150px;
|
|
height: 40px;
|
|
background: url(/images/logo.png) center center no-repeat;
|
|
background-size: contain;
|
|
}
|
|
.ecr_header_center {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
text-align: center;
|
|
background: #1565a0;
|
|
color: white;
|
|
padding: 15px;
|
|
}
|
|
.ecr_header_center h1 {
|
|
font-size: 28px;
|
|
margin-bottom: 5px;
|
|
}
|
|
.ecr_header_center p {
|
|
font-size: 14px;
|
|
}
|
|
.ecr_header_right {
|
|
display: table-cell;
|
|
width: 180px;
|
|
vertical-align: top;
|
|
border-left: 1px solid #333;
|
|
}
|
|
.ecr_header_right table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
.ecr_header_right td {
|
|
padding: 5px 8px;
|
|
font-size: 12px;
|
|
border-bottom: 1px solid #ccc;
|
|
}
|
|
.ecr_header_right td:first-child {
|
|
font-weight: bold;
|
|
width: 70px;
|
|
}
|
|
.ecr_header_right input {
|
|
border: none;
|
|
width: 80px;
|
|
font-size: 12px;
|
|
}
|
|
/* 본문 영역 */
|
|
.ecr_body {
|
|
padding: 20px;
|
|
min-height: 500px;
|
|
border-bottom: 1px dashed #999;
|
|
}
|
|
.ecr_section {
|
|
margin-bottom: 25px;
|
|
}
|
|
.ecr_section_title {
|
|
font-weight: bold;
|
|
font-size: 13px;
|
|
margin-bottom: 5px;
|
|
text-decoration: underline;
|
|
}
|
|
.ecr_section_title_kr {
|
|
font-size: 12px;
|
|
color: #333;
|
|
text-decoration: underline;
|
|
margin-bottom: 8px;
|
|
}
|
|
.ecr_textarea {
|
|
width: 100%;
|
|
min-height: 120px;
|
|
border: 1px solid #ccc;
|
|
padding: 10px;
|
|
font-size: 13px;
|
|
resize: vertical;
|
|
font-family: inherit;
|
|
}
|
|
.ecr_textarea:focus {
|
|
outline: 2px solid #1565a0;
|
|
}
|
|
/* 푸터 영역 */
|
|
.ecr_footer {
|
|
background: #fff;
|
|
color: #333;
|
|
padding: 10px 15px;
|
|
font-size: 11px;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
/* 버튼 영역 */
|
|
.btn_area {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
padding: 15px;
|
|
background: #f5f5f5;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<input type="hidden" id="OBJID" value="${resultMap.objid}">
|
|
|
|
<div class="ecr_container">
|
|
<!-- 헤더 -->
|
|
<div class="ecr_header">
|
|
<div class="ecr_header_left">
|
|
<span class="ecr_logo"></span>
|
|
</div>
|
|
<div class="ecr_header_center">
|
|
<h1>ECR</h1>
|
|
<p>(Engineering Change Request)</p>
|
|
</div>
|
|
<div class="ecr_header_right">
|
|
<table>
|
|
<tr>
|
|
<td>Form no.</td>
|
|
<td><input type="text" id="ECR_DOC_FORM_NO" value="${resultMap.ecr_doc_form_no}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Rev.no</td>
|
|
<td><input type="text" id="ECR_REV_NO" value="${resultMap.ecr_rev_no}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Rev. date</td>
|
|
<td><input type="text" id="ECR_REV_DATE" value="${resultMap.ecr_rev_date}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Author</td>
|
|
<td><input type="text" id="ECR_DOC_AUTHOR" value="${resultMap.ecr_doc_author}"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 본문 -->
|
|
<div class="ecr_body">
|
|
<div class="ecr_section">
|
|
<%-- <div class="ecr_section_title">Fill out clearly, concisely</div> --%>
|
|
<div class="ecr_section_title_kr">명확하고 간결하게 작성</div>
|
|
<textarea class="ecr_textarea" id="ECR_DOC_SUMMARY">${resultMap.ecr_doc_summary}</textarea>
|
|
</div>
|
|
|
|
<div class="ecr_section">
|
|
<%-- <div class="ecr_section_title">Description of the change (reason / background)</div> --%>
|
|
<div class="ecr_section_title_kr">변경사항 설명 (이유 / 배경)</div>
|
|
<textarea class="ecr_textarea" id="ECR_DOC_REASON" style="min-height:150px;">${resultMap.ecr_doc_reason}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 푸터 -->
|
|
<div class="ecr_footer">
|
|
<p>Confidential! © RPS reserves all rights even in the event of industrial property rights.</p>
|
|
<p>We reserve all rights of disposal such as copying and passing on to third parties!</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 버튼 영역 -->
|
|
<div class="btn_area">
|
|
<input type="button" class="plm_btns" value="저장" onclick="fn_save()">
|
|
<input type="button" class="plm_btns" value="닫기" onclick="self.close()">
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
console.log("ECR 팝업 로드됨");
|
|
console.log("OBJID:", "${resultMap.OBJID}");
|
|
console.log("ECR_NO:", "${resultMap.ECR_NO}");
|
|
console.log("REQUESTER_NAME:", "${resultMap.REQUESTER_NAME}");
|
|
console.log("resultMap 전체:", "${resultMap}");
|
|
});
|
|
|
|
function fn_save(){
|
|
var objId = $("#OBJID").val();
|
|
var formNo = $("#ECR_DOC_FORM_NO").val();
|
|
var revNo = $("#ECR_REV_NO").val();
|
|
var revDate = $("#ECR_REV_DATE").val();
|
|
var author = $("#ECR_DOC_AUTHOR").val();
|
|
var summary = $("#ECR_DOC_SUMMARY").val();
|
|
var reason = $("#ECR_DOC_REASON").val();
|
|
|
|
if(!summary && !reason){
|
|
Swal.fire({icon:'warning', title:'알림', text:'내용을 입력해주세요.'});
|
|
return;
|
|
}
|
|
|
|
$.ajax({
|
|
url: "/quality/saveEcrDoc.do",
|
|
type: "POST",
|
|
data: {
|
|
OBJID: objId,
|
|
ECR_DOC_FORM_NO: formNo,
|
|
ECR_REV_NO: revNo,
|
|
ECR_REV_DATE: revDate,
|
|
ECR_DOC_AUTHOR: author,
|
|
ECR_DOC_SUMMARY: summary,
|
|
ECR_DOC_REASON: reason
|
|
},
|
|
dataType: "json",
|
|
success: function(result){
|
|
if(result.result == "success"){
|
|
Swal.fire({icon:'success', title:'저장완료', text:'설계변경요청서가 저장되었습니다.'}).then(function(){
|
|
self.close();
|
|
});
|
|
} else {
|
|
Swal.fire({icon:'error', title:'오류', text:'저장에 실패했습니다: ' + (result.message || '')});
|
|
}
|
|
},
|
|
error: function(xhr, status, error){
|
|
console.log("AJAX 에러:", xhr.responseText);
|
|
Swal.fire({icon:'error', title:'오류', text:'저장 중 오류가 발생했습니다.'});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|