Files
wace_plm/WebContent/WEB-INF/view/quality/incomingInspectionList.jsp
2025-12-22 09:40:10 +09:00

307 lines
12 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, "수입검사 요청");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
</head>
<style>
.select2-selection__choice {
font-size: 11px;
background-color: #fff !important;
border: none !important;
margin-right: 0px !important;
}
.select2-selection__choice__remove {
display: contents !important;
}
.select2-container .select2-selection--multiple {
min-height: 20px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
margin-top: 3.5px !important;
}
.select2-selection__rendered {
height: 18px !important;
}
.select2-container .select2-selection--multiple .select2-selection__rendered {
overflow: auto !important;
}
/* 검사결과 스타일 */
.inspection-ng { color: #dc3545; font-weight: bold; cursor: pointer; }
.inspection-ok { color: #28a745; font-weight: bold; cursor: pointer; }
.inspection-ng:hover, .inspection-ok:hover { text-decoration: underline; }
body, html {
overflow-x: hidden;
width: 100%;
margin: 0;
padding: 0;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
fnc_changePaginationAndTotalCountArea();
$('.select2').select2();
fnc_datepick();
$("input").keyup(function(e){
if(e.keyCode == 13){
$("#page").val("1");
fn_search();
}
});
// 조회
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
// 수입검사 요청
$("#btnRequest").click(function(){
fn_requestPopUp();
});
fn_search();
});
// 컬럼: 품의서 No, 발주서 No, 프로젝트번호, 품번, 품명, 공급업체, 입고결과, 요청일, 요청자
var columns = [
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'품의서 No', field:'PROPOSAL_NO'
// formatter:fnc_createGridAnchorTag,
// cellClick:function(e, cell){
// var objId = fnc_checkNull(cell.getData().PROPOSAL_OBJID);
// if(objId != '') fn_openProposalPopUp(objId);
// }
},
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'발주서 No', field:'PURCHASE_ORDER_NO'
// formatter:fnc_createGridAnchorTag,
// cellClick:function(e, cell){
// var objId = fnc_checkNull(cell.getData().OBJID);
// fn_formPopUp(objId);
// }
},
{headerHozAlign:'center', hozAlign:'center', minWidth:130, widthGrow:1, title:'프로젝트번호', field:'PROJECT_NO'},
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'제품구분', field:'PRODUCT_NAME'},
{headerHozAlign:'center', hozAlign:'left', minWidth:120, widthGrow:2, title:'품번', field:'PART_NO'},
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:3, title:'품명', field:'PART_NAME'},
{headerHozAlign:'center', hozAlign:'left', minWidth:130, widthGrow:2, title:'공급업체', field:'PARTNER_NAME'},
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'입고결과', field:'DELIVERY_STATUS',
formatter:fnc_createGridAnchorTag,
cellClick:function(e, cell){
var objId = fnc_checkNull(cell.getData().OBJID);
var DELIVERY_STATUS = fnc_checkNull(cell.getData().DELIVERY_STATUS);
fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS);
}
},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'요청일', field:'REQUEST_DATE'},
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'요청자', field:'REQUEST_USER_NAME'},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사여부', field:'INSPECTION_YN'},
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'요청현황', field:'REQUEST_STATUS'}
];
// 조회
function fn_search(){
// 프로젝트번호 multi select 처리 (배열을 콤마로 join)
var selectedProjectNos = $("#project_no").val();
$('input[name="project_nos"]').remove();
var projectNosValue = (selectedProjectNos && selectedProjectNos.length > 0) ? selectedProjectNos.join(',') : '';
$('<input>').attr({
type: 'hidden',
name: 'project_nos',
value: projectNosValue
}).appendTo('#form1');
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/incomingInspectionGridList.do", columns, true);
}
// 수입검사 요청 팝업
function fn_requestPopUp(){
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 = "incomingInspectionRequestPopUp";
var url = "/quality/incomingInspectionRequestPopUp.do";
fn_centerPopup(popup_width, popup_height, "", target);
hiddenForm.action = url;
hiddenForm.OBJID.value = selected[0].OBJID;
hiddenForm.PURCHASE_ORDER_NO.value = selected[0].PURCHASE_ORDER_NO;
hiddenForm.target = target;
hiddenForm.submit();
}
// 품의서 팝업
function fn_openProposalPopUp(objId){
var popup_width = 1200;
var popup_height = 900;
var url = "/salesMng/proposalFormPopUp.do?PROPOSAL_OBJID=" + objId;
window.open(url, "proposalFormPopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
}
// 발주서 팝업
function fn_formPopUp(objId){
var popup_width = 1460;
var popup_height = 1050;
var hiddenForm = document.hiddenForm;
var target = "purchaseOrderFormPopup_new";
var url = "/purchaseOrder/purchaseOrderFormPopup_new.do";
fn_centerPopup(popup_width, popup_height, "", target);
hiddenForm.PURCHASE_ORDER_MASTER_OBJID.value = objId;
hiddenForm.action = url;
hiddenForm.target = target;
hiddenForm.submit();
}
// 입고결과 조회 팝업 (view 전용)
function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){
var popup_width = 1560;
var popup_height = 1050;
var hiddenForm = document.hiddenForm;
var target = "deliveryAcceptancePopUp";
var url = "/purchaseOrder/deliveryAcceptanceFormPopUp_new.do";
fn_centerPopup(popup_width, popup_height, "", target);
hiddenForm.action = url;
hiddenForm.PURCHASE_ORDER_MASTER_OBJID.value = objId;
hiddenForm.DELIVERY_STATUS.value = DELIVERY_STATUS;
hiddenForm.actionType.value = 'view'; // 뷰 전용으로 설정
hiddenForm.target = target;
hiddenForm.submit();
}
</script>
<body>
<form name="hiddenForm" id="hiddenForm" method="post">
<input type="hidden" name="OBJID" id="OBJID">
<input type="hidden" name="PURCHASE_ORDER_NO" id="PURCHASE_ORDER_NO">
<input type="hidden" name="PURCHASE_ORDER_MASTER_OBJID" id="PURCHASE_ORDER_MASTER_OBJID">
<input type="hidden" name="DELIVERY_STATUS" id="DELIVERY_STATUS">
<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="btnRequest">
<input type="button" class="plm_btns" value="조회" id="btnSearch">
</div>
</div>
<div id="plmSearchZon">
<table>
<tr>
<td><label for="">품의서 No</label></td>
<td><input type="text" name="search_proposal_no" id="search_proposal_no" style="width:120px;" autocomplete="off" value="${param.search_proposal_no}"></td>
<td><label for="">발주서 No</label></td>
<td><input type="text" name="search_purchase_order_no" id="search_purchase_order_no" style="width:120px;" autocomplete="off" value="${param.search_purchase_order_no}"></td>
<td><label for="">프로젝트번호</label></td>
<td>
<select name="project_no" id="project_no" style="width:210px;" class="select2" autocomplete="off" multiple="multiple">
<option value="">선택</option>
${code_map.project_no}
</select>
</td>
<td><label for="">품번</label></td>
<td><input type="text" name="search_part_no" id="search_part_no" style="width:170px;" autocomplete="off" value="${param.search_part_no}"></td>
<td><label for="">품명</label></td>
<td><input type="text" name="search_part_name" id="search_part_name" style="width:170px;" autocomplete="off" value="${param.search_part_name}"></td>
<td><label for="">공급업체</label></td>
<td><select name="search_partner" id="search_partner" class="select2" autocomplete="off" style="width:250px;"><option value="">선택</option>${code_map.partner_objid}</select></td>
</tr>
<tr>
<td><label for="">입고결과</label></td>
<td>
<select name="search_delivery_status" id="search_delivery_status" class="select2" autocomplete="off" style="width:120px;">
<option value="">전체</option>
<option value="입고중">입고중</option>
<option value="입고완료">입고완료</option>
<option value="지연">지연</option>
</select>
</td>
<td><label for="">제품구분</label></td>
<td>
<select name="search_product_cd" id="search_product_cd" class="select2" autocomplete="off" style="width:120px;">
<option value="">전체</option>
${code_map.product_cd}
</select>
</td>
<td><label for="">검사여부</label></td>
<td>
<select name="search_inspection_yn" id="search_inspection_yn" class="select2" autocomplete="off" style="width:120px;">
<option value="">전체</option>
<option value="검사">검사</option>
<option value="스킵">스킵</option>
</select>
</td>
<td><label for="">요청현황</label></td>
<td>
<select name="search_request_status" id="search_request_status" class="select2" autocomplete="off" style="width:120px;">
<option value="">전체</option>
<option value="미요청">미요청</option>
<option value="요청중">요청중</option>
<option value="요청완료">요청완료</option>
</select>
</td>
<td><label for="">요청자</label></td>
<td><select name="request_user_id" id="request_user_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.request_user_id}</select></td>
<td class=""><label>요청일</label></td>
<td>
<input type="text" name="request_start_date" id="request_start_date" style="width:100px;" autocomplete="off" value="${param.request_start_date}" class="date_icon">~
<input type="text" name="request_end_date" id="request_end_date" style="width:100px;" autocomplete="off" value="${param.request_end_date }" class="date_icon">
</td>
</tr>
</table>
</div>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>