295 lines
11 KiB
Plaintext
295 lines
11 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; }
|
|
</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();
|
|
});
|
|
|
|
// 수입검사 등록
|
|
$("#btnRegist").click(function(){
|
|
fn_registPopUp();
|
|
});
|
|
|
|
// 엑셀 다운로드
|
|
$("#btnExcel").click(function(){
|
|
fn_excelDownload();
|
|
});
|
|
|
|
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:'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'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'검사자', field:'INSPECTOR_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사일', field:'INSPECTION_DATE'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'검사결과', field:'INSPECTION_RESULT',
|
|
formatter: function(cell, formatterParams, onRendered){
|
|
var val = fnc_checkNull(cell.getValue());
|
|
if(val === 'NG') return '<span class="inspection-ng">NG</span>';
|
|
if(val === 'OK') return '<span class="inspection-ok">OK</span>';
|
|
return val;
|
|
},
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
var result = fnc_checkNull(cell.getData().INSPECTION_RESULT);
|
|
if(result != '') fn_resultPopUp(objId);
|
|
}
|
|
}
|
|
];
|
|
|
|
// 조회
|
|
function fn_search(){
|
|
// 프로젝트번호 multi select 처리
|
|
var selectedProjectNos = $("#project_no").val();
|
|
$('input[name="project_nos"]').remove();
|
|
$('<input>').attr({
|
|
type: 'hidden',
|
|
name: 'project_nos',
|
|
value: selectedProjectNos
|
|
}).appendTo('#form1');
|
|
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/incomingInspectionGridList.do", columns, true);
|
|
}
|
|
|
|
// 수입검사 등록 팝업
|
|
function fn_registPopUp(){
|
|
var selected = _tabulGrid.getSelectedData();
|
|
if(selected.length == 0){
|
|
Swal.fire("선택된 데이터가 없습니다.");
|
|
return;
|
|
}
|
|
if(selected.length > 1){
|
|
Swal.fire("한건씩 등록 가능합니다.");
|
|
return;
|
|
}
|
|
|
|
var popup_width = 1700;
|
|
var popup_height = 700;
|
|
var hiddenForm = document.hiddenForm;
|
|
var target = "incomingInspectionPopUp";
|
|
var url = "/quality/incomingInspectionFormPopUp.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_resultPopUp(objId){
|
|
var popup_width = 1700;
|
|
var popup_height = 700;
|
|
var hiddenForm = document.hiddenForm;
|
|
var target = "inspectionResultPopUp";
|
|
var url = "/quality/incomingInspectionFormPopUp.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_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();
|
|
}
|
|
|
|
// 엑셀 다운로드
|
|
function fn_excelDownload(){
|
|
var form = document.form1;
|
|
form.action = "/quality/incomingInspectionExcelDownload.do";
|
|
form.submit();
|
|
form.action = "";
|
|
}
|
|
</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="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="btnRegist">
|
|
<input type="button" class="plm_btns" value="조회" id="btnSearch">
|
|
<input type="button" class="plm_btns excel" value="Excel Download" id="btnExcel">
|
|
</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>
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="">검사자</label></td>
|
|
<td><select name="inspector_id" id="inspector_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.inspector_id}</select></td>
|
|
|
|
<td class=""><label>검사일</label></td>
|
|
<td>
|
|
<input type="text" name="inspection_start_date" id="inspection_start_date" style="width:100px;" autocomplete="off" value="${param.inspection_start_date}" class="date_icon">~
|
|
<input type="text" name="inspection_end_date" id="inspection_end_date" style="width:100px;" autocomplete="off" value="${param.inspection_end_date }" class="date_icon">
|
|
</td>
|
|
|
|
<td><label for="">검사결과</label></td>
|
|
<td>
|
|
<select name="search_inspection_result" id="search_inspection_result" class="select2" autocomplete="off" style="width:120px;">
|
|
<option value="">전체</option>
|
|
<option value="OK">OK</option>
|
|
<option value="NG">NG</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|