272 lines
9.3 KiB
Plaintext
272 lines
9.3 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>
|
|
body, html {
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.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;
|
|
}
|
|
#search_part_no + .select2-container,
|
|
#search_part_name + .select2-container {
|
|
width: 210px !important;
|
|
}
|
|
/* 검사결과 스타일 */
|
|
.inspection-ng { color: #dc3545; font-weight: bold; }
|
|
.inspection-ok { color: #28a745; font-weight: bold; }
|
|
</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();
|
|
}
|
|
});
|
|
// 품번/품명 Select2 AJAX 초기화
|
|
initPartSelect2Ajax("#search_part_no", "#search_part_name", "#search_part_objid", {
|
|
debug: false,
|
|
partNoPlaceholder: "품번 검색...",
|
|
partNamePlaceholder: "품명 검색..."
|
|
});
|
|
// 조회
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
// 공정검사 등록
|
|
$("#btnRegist").click(function(){
|
|
fn_registPopUp();
|
|
});
|
|
|
|
// 엑셀 다운로드
|
|
$("#btnExcel").click(function(){
|
|
fn_excelDownload();
|
|
});
|
|
|
|
fn_search();
|
|
});
|
|
|
|
// 컬럼: 검사일, 프로젝트번호, 품번, 품명, 불량수량, 작업환경상태, 측정기, 검사자, 검사결과
|
|
var columns = [
|
|
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:150, widthGrow:2, title:'프로젝트번호', field:'PROJECT_NO'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'제품구분', field:'PRODUCT_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:180, widthGrow:2, title:'품번', field:'PART_NO'},
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:200, widthGrow:3, title:'품명', field:'PART_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1, title:'검사수량 합계', field:'INSPECTION_QTY',
|
|
formatter:"money", formatterParams:{thousand:",", precision:false}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1, title:'불량수량 합계', field:'DEFECT_QTY',
|
|
formatter:"money", formatterParams:{thousand:",", precision:false}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'작업환경상태', field:'WORK_ENV_STATUS'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'측정기', field:'MEASURING_DEVICE'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'검사일', field:'INSPECTION_DATE',
|
|
formatter: fnc_createGridAnchorTag,
|
|
cellClick: function(e, cell){
|
|
fn_openFormPopUp(cell.getData().OBJID);
|
|
}
|
|
},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사자', field:'INSPECTOR_NAME'},
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, 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;
|
|
}
|
|
}
|
|
];
|
|
|
|
// 수정 팝업
|
|
function fn_openFormPopUp(objId){
|
|
var popup_width = 1500;
|
|
var popup_height = 700;
|
|
var url = "/quality/processInspectionFormPopUp.do?OBJID=" + objId;
|
|
window.open(url, "processInspectionPopUp", "width=" + popup_width + ",height=" + popup_height + ",scrollbars=yes,resizable=yes");
|
|
}
|
|
|
|
// 조회
|
|
function fn_search(){
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/processInspectionGridList.do", columns, true);
|
|
}
|
|
|
|
// 검색조건 초기화
|
|
function fn_reset(){
|
|
$("#search_inspection_date_from").val("");
|
|
$("#search_inspection_date_to").val("");
|
|
$("#search_inspector").val("");
|
|
$("#search_project_no").val("");
|
|
$("#search_part_no").val("");
|
|
$("#search_part_name").val("");
|
|
$("#search_inspection_result").val("");
|
|
}
|
|
|
|
// 공정검사 등록 팝업
|
|
function fn_registPopUp(){
|
|
var popup_width = 1500;
|
|
var popup_height = 700;
|
|
var url = "/quality/processInspectionFormPopUp.do";
|
|
|
|
window.open(url, "processInspectionPopUp", "width=" + popup_width + ",height=" + popup_height + ",scrollbars=yes,resizable=yes");
|
|
}
|
|
|
|
// 엑셀 다운로드
|
|
function fn_excelDownload(){
|
|
var form = document.form1;
|
|
form.action = "/quality/processInspectionExcelDownload.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="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="">프로젝트번호</label></td>
|
|
<td>
|
|
<select name="search_project_no" id="search_project_no" style="width:215px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.project_no}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="">제품구분</label></td>
|
|
<td>
|
|
<select name="productType" id="productType" style="width:150px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.product_cd}
|
|
</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 for="">작업환경상태</label></td>
|
|
<td>
|
|
<select name="search_work_env_status" id="search_work_env_status" style="">
|
|
<option value="">전체</option>
|
|
<option value="OK">양호</option>
|
|
<option value="NG">불량</option>
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="">측정기</label></td>
|
|
<td>
|
|
<select name="search_measuring_device" id="search_measuring_device" style="">
|
|
<option value="">전체</option>
|
|
<option value="OK">양호</option>
|
|
<option value="NG">불량</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class=""><label>검사일</label></td>
|
|
<td>
|
|
<input type="text" name="search_inspection_date_from" id="search_inspection_date_from" style="width:100px;" autocomplete="off" value="${param.search_inspection_date_from}" class="date_icon">~
|
|
<input type="text" name="search_inspection_date_to" id="search_inspection_date_to" style="width:100px;" autocomplete="off" value="${param.search_inspection_date_to}" class="date_icon">
|
|
</td>
|
|
|
|
<td><label for="">검사자</label></td>
|
|
<td>
|
|
<select name="search_inspector" id="search_inspector" style="width:150px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.inspector_id}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="">검사결과</label></td>
|
|
<td>
|
|
<select name="search_inspection_result" id="search_inspection_result" style="width:210px;">
|
|
<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>
|