372 lines
13 KiB
Plaintext
372 lines
13 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
<%
|
|
String menuObjId = request.getParameter("menuObjId");
|
|
String menuName = CommonUtils.getMenuName(menuObjId, "ECR 관리");
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
</head>
|
|
|
|
<style>
|
|
body, html {
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
/* 품번/품명 Select2 너비 강제 적용 */
|
|
#search_part_no + .select2-container,
|
|
#search_part_name + .select2-container {
|
|
width: 210px !important;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
fnc_changePaginationAndTotalCountArea();
|
|
$('.select2').select2();
|
|
fnc_datepick();
|
|
|
|
// 품번/품명 Select2 AJAX 초기화
|
|
initPartSelect2Ajax("#search_part_no", "#search_part_name", "#search_part_objid", {
|
|
debug: false,
|
|
partNoPlaceholder: "품번 검색...",
|
|
partNamePlaceholder: "품명 검색..."
|
|
});
|
|
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
// 조회
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
// ECR 등록
|
|
$("#btnRegistEcr").click(function(){
|
|
fn_registEcrPopUp();
|
|
});
|
|
|
|
// ECR 결과등록
|
|
$("#btnRegistResult").click(function(){
|
|
fn_registResultPopUp();
|
|
});
|
|
|
|
// 결재상신
|
|
$("#btnApproval").click(function(){
|
|
fn_approval();
|
|
});
|
|
|
|
fn_search();
|
|
});
|
|
|
|
// 컬럼: ECR No, 요청일, 요청자, 품번, 품명, 이슈사항, 완료요청일, 조치부서, 조치담당자, 조치자, 조치내용, 완료일, 이미지파일, 첨부파일, 설계변경요청서
|
|
var columns = [
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'ECR No', field:'ECR_NO',
|
|
formatter:fnc_createGridAnchorTag,
|
|
cellClick: function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
fn_viewEcrPopUp(objId);
|
|
}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:90, widthGrow:1, title:'요청일', field:'REQUEST_DATE'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'요청자', field:'REQUESTER_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:120, widthGrow:2, title:'품번', field:'PART_NO'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:2, title:'품명', field:'PART_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:2, title:'이슈사항', field:'ISSUE_CONTENT'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'완료요청일', field:'DUE_DATE'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'설계변경요청서', field:'ECR_DOC_CNT',
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
fn_openEcrDocPopUp(objid);
|
|
}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:90, widthGrow:1, title:'조치부서', field:'ACTION_DEPT_NAME'},
|
|
//{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'조치담당자', field:'ACTION_MANAGER_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'조치자', field:'ACTION_USER_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:2, title:'조치내용', field:'ACTION_CONTENT'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'완료일', field:'COMPLETE_DATE'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:85, widthGrow:1, title:'이미지파일', field:'IMAGE_FILE',
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
fn_openImageFilePopUp(objId);
|
|
}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'첨부파일', field:'ATTACH_FILE',
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
fn_FileRegist(objid,"ECR_RESULT","ECR결과첨부");
|
|
}
|
|
}
|
|
];
|
|
|
|
// 조회
|
|
function fn_search(){
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/ecrGridList.do", columns, true);
|
|
}
|
|
|
|
// 검색조건 초기화
|
|
function fn_reset(){
|
|
$("#search_request_date_from").val("");
|
|
$("#search_request_date_to").val("");
|
|
$("#search_requester").val("");
|
|
$("#search_part_no").val("");
|
|
$("#search_part_name").val("");
|
|
$("#search_due_date_from").val("");
|
|
$("#search_due_date_to").val("");
|
|
$("#search_action_dept").val("");
|
|
$("#search_action_manager").val("");
|
|
$("#search_action_user").val("");
|
|
$("#search_complete_date_from").val("");
|
|
$("#search_complete_date_to").val("");
|
|
}
|
|
|
|
// ECR 등록 팝업
|
|
function fn_registEcrPopUp(){
|
|
var selected = _tabulGrid.getSelectedData();
|
|
|
|
var popup_width = 900;
|
|
var popup_height = 500;
|
|
var hiddenForm = document.hiddenForm;
|
|
var target = "ecrRegistPopUp";
|
|
var url = "/quality/ecrRegistFormPopUp.do";
|
|
|
|
fn_centerPopup(popup_width, popup_height, "", target);
|
|
|
|
hiddenForm.action = url;
|
|
// 선택된 행이 있으면 수정 모드, 없으면 신규
|
|
if(selected.length == 1){
|
|
hiddenForm.OBJID.value = selected[0].OBJID;
|
|
hiddenForm.actionType.value = 'edit';
|
|
} else {
|
|
hiddenForm.OBJID.value = '';
|
|
hiddenForm.actionType.value = 'new';
|
|
}
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
// ECR 결과등록 팝업
|
|
function fn_registResultPopUp(){
|
|
var selected = _tabulGrid.getSelectedData();
|
|
if(selected.length == 0){
|
|
Swal.fire("선택된 데이터가 없습니다.");
|
|
return;
|
|
}
|
|
if(selected.length > 1){
|
|
Swal.fire("한건씩 등록 가능합니다.");
|
|
return;
|
|
}
|
|
|
|
var popup_width = 1200;
|
|
var popup_height = 600;
|
|
var hiddenForm = document.hiddenForm;
|
|
var target = "ecrResultPopUp";
|
|
var url = "/quality/ecrResultFormPopUp.do";
|
|
|
|
fn_centerPopup(popup_width, popup_height, "", target);
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.OBJID.value = selected[0].OBJID;
|
|
hiddenForm.actionType.value = 'result';
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
// ECR No 클릭 시 뷰 팝업
|
|
function fn_viewEcrPopUp(objId){
|
|
var popup_width = 1200;
|
|
var popup_height = 600;
|
|
var hiddenForm = document.hiddenForm;
|
|
var target = "ecrViewPopUp";
|
|
var url = "/quality/ecrResultFormPopUp.do";
|
|
|
|
fn_centerPopup(popup_width, popup_height, "", target);
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.OBJID.value = objId;
|
|
hiddenForm.actionType.value = 'view'; // 뷰 모드
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
// 이미지 파일 팝업
|
|
function fn_openImageFilePopUp(objId){
|
|
var popup_width = 650;
|
|
var popup_height = 550;
|
|
var url = "/common/ImageRegistPopup.do?targetObjId=" + objId + "&docType=ECR_RESULT_IMAGE&docTypeName=이미지";
|
|
window.open(url, "imageFilePopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
|
|
}
|
|
|
|
// 첨부파일 팝업
|
|
function fn_FileRegist(objId, docType, docTypeName){
|
|
var popup_width = 800;
|
|
var popup_height = 300;
|
|
|
|
var objId = objId;
|
|
var docType = docType;
|
|
var docTypeName = docTypeName;
|
|
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
|
var url = "/projectConcept/FileRegistPopup.do"+params;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
// 설계변경요청서 팝업
|
|
function fn_openEcrDocPopUp(objId){
|
|
var popup_width = 600;
|
|
var popup_height = 750;
|
|
var url = "/quality/ecrDocFormPopUp.do?OBJID=" + objId;
|
|
var popup = window.open(url, "ecrDocPopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
|
|
|
|
// 팝업 닫힘 감지 및 그리드 새로고침
|
|
var checkPopup = setInterval(function(){
|
|
if(popup.closed){
|
|
clearInterval(checkPopup);
|
|
fn_search(); // 그리드 새로고침
|
|
}
|
|
}, 500);
|
|
}
|
|
|
|
// 결재상신
|
|
function fn_approval(){
|
|
var selected = _tabulGrid.getSelectedData();
|
|
if(selected.length == 0){
|
|
Swal.fire("결재상신할 데이터를 선택해주세요.");
|
|
return;
|
|
}
|
|
if(selected.length > 1){
|
|
Swal.fire("한번에 한개의 결재만 가능합니다.");
|
|
return;
|
|
}
|
|
|
|
var title = fnc_checkNull(selected[0].ECR_NO) + " " + fnc_checkNull(selected[0].PART_NO);
|
|
var objId = fnc_checkNull(selected[0].OBJID);
|
|
|
|
Swal.fire({
|
|
title: '결재상신',
|
|
text: '결재상신 하시겠습니까?',
|
|
icon: 'question',
|
|
showCancelButton: true,
|
|
confirmButtonText: '확인',
|
|
cancelButtonText: '취소'
|
|
}).then((result) => {
|
|
if(result.isConfirmed){
|
|
window.open("/approval/registApproval.do?targetType=ECR&targetObjId="+objId+"&approvalTitle="+encodeURIComponent(title)+"&callbackFnc=fn_search","registApproval","width=700,height=700");
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<body>
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
|
<input type="hidden" name="actionType" id="actionType">
|
|
</form>
|
|
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<div class="content-box" style="height: 99.3%;">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span><%=menuName%></span>
|
|
</h2>
|
|
<div class="btnArea">
|
|
<input type="button" class="plm_btns" value="결재상신" id="btnApproval">
|
|
<input type="button" class="plm_btns" value="ECR 등록" id="btnRegistEcr">
|
|
<input type="button" class="plm_btns" value="ECR 결과등록" id="btnRegistResult">
|
|
<input type="button" class="plm_btns" value="조회" id="btnSearch">
|
|
</div>
|
|
</div>
|
|
|
|
<div id="plmSearchZon">
|
|
<table class="">
|
|
<tr>
|
|
<td><label>요청일</label></td>
|
|
<td>
|
|
<input type="text" name="search_request_date_from" id="search_request_date_from" class="date_icon" style="width:100px;" autocomplete="off">~
|
|
<input type="text" name="search_request_date_to" id="search_request_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
|
</td>
|
|
<td><label>요청자</label></td>
|
|
<td>
|
|
<select name="search_requester" id="search_requester" class="select2" style="width:150px;">
|
|
<option value="">전체</option>
|
|
${code_map.requester_id}
|
|
</select>
|
|
</td>
|
|
<td><label>품번</label></td>
|
|
<td>
|
|
<select name="search_part_no" id="search_part_no" class="select2-part" style="">
|
|
<option value="">품번 선택</option>
|
|
</select>
|
|
<input type="hidden" name="search_part_objid" id="search_part_objid" value="">
|
|
</td>
|
|
<td><label>품명</label></td>
|
|
<td>
|
|
<select name="search_part_name" id="search_part_name" class="select2-part" style="">
|
|
<option value="">품명 선택</option>
|
|
</select>
|
|
</td>
|
|
<td><label>완료요청일</label></td>
|
|
<td>
|
|
<input type="text" name="search_due_date_from" id="search_due_date_from" class="date_icon" style="width:100px;" autocomplete="off">~
|
|
<input type="text" name="search_due_date_to" id="search_due_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
|
</td>
|
|
<td><label>조치부서</label></td>
|
|
<td>
|
|
<select name="search_action_dept" id="search_action_dept" class="select2" style="width:170px;">
|
|
<option value="">전체</option>
|
|
${code_map.dept_cd}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<!-- <td><label>조치담당자</label></td>
|
|
<td>
|
|
<select name="search_action_manager" id="search_action_manager" class="select2" style="width:215px;">
|
|
<option value="">전체</option>
|
|
${code_map.action_manager_id}
|
|
</select>
|
|
</td> -->
|
|
<td><label>조치자</label></td>
|
|
<td>
|
|
<select name="search_action_user" id="search_action_user" class="select2" style="width:150px;">
|
|
<option value="">전체</option>
|
|
${code_map.action_user_id}
|
|
</select>
|
|
</td>
|
|
<td><label>완료일</label></td>
|
|
<td>
|
|
<input type="text" name="search_complete_date_from" id="search_complete_date_from" class="date_icon" style="width:100px;" autocomplete="off">~
|
|
<input type="text" name="search_complete_date_to" id="search_complete_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|