385 lines
12 KiB
Plaintext
385 lines
12 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<c:set var="actionType" value="${param.actionType}" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
partSearch();
|
|
|
|
fnc_datepick();
|
|
|
|
getCarList("${search_oem}","${search_car}");
|
|
getChangeProductList("search_product","${param.search_productFamily}","${param.search_product}");
|
|
|
|
//엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
partSearch();
|
|
}
|
|
});
|
|
|
|
});
|
|
});
|
|
|
|
function getCarList(oemObjid,carObjid){
|
|
var carSelectObj = $("#search_car");
|
|
$(carSelectObj).find("option").remove();
|
|
$(carSelectObj).append("<option value=''>선택</option>");
|
|
|
|
if("" == oemObjid || null == oemObjid){
|
|
return false;
|
|
}else{
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/admin/getOEMsCarList.do",
|
|
data:{ "status" : "active" , "oemObjId" : oemObjid},
|
|
dataType:"json",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
},
|
|
success: function(result){
|
|
if(null != result){
|
|
for(var i=0;i<result.length;i++){
|
|
var objid = result[i].OBJID;
|
|
var carName = result[i].CAR_NAME;
|
|
var carCode = result[i].CAR_CODE;
|
|
$(carSelectObj).append("<option value='"+objid+"'>"+carName+"("+carCode+")</option>");
|
|
}
|
|
if("" != carObjid){
|
|
$(carSelectObj).val(carObjid);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function btn_close(){
|
|
self.close();
|
|
}
|
|
|
|
//제품군에 따른 제품의 목록을 가져온다.
|
|
function getChangeProductList(areaObjId,productGroupObjId,targetProductObjId){
|
|
$("#"+areaObjId).find("option").remove();
|
|
$("#"+areaObjId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productGroupObjId && null != productGroupObjId){
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/common/getProductList_combo.do",
|
|
data:{"search_productGroupObjId" : productGroupObjId, "isJson":true},
|
|
dataType:"json",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
},
|
|
success: function(result){
|
|
if(null != result){
|
|
for(var i=0;i<result.length;i++){
|
|
var resultAppendText = "";
|
|
var productName = result[i].PRODUCT_NAME;
|
|
var selectedFlag = "";
|
|
if(targetProductObjId == result[i].OBJID){
|
|
selectedFlag = "selected";
|
|
}
|
|
resultAppendText="<option value='"+result[i].OBJID+"' "+selectedFlag+">"+productName+"</option>";
|
|
$("#"+areaObjId).append(resultAppendText);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function partSearch(){
|
|
var param = $("#form1").serialize();
|
|
|
|
$("#partRevisionCnt").empty();
|
|
|
|
$.ajax({
|
|
type : "POST",
|
|
url:"/part/partRevisionList.do",
|
|
data:param,
|
|
dataType:"json",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
},
|
|
success: function(result){
|
|
if(null != result){
|
|
$("#partBody").empty();
|
|
if(0 < result.length){
|
|
$("#partBodyDefault").hide();
|
|
}else{
|
|
$("#partBodyDefault").show();
|
|
}
|
|
for(var i=0;i<result.length;i++){
|
|
var appendText = "";
|
|
appendText+= "<tr>";
|
|
appendText+= " <td><input type='checkbox' name='partObjId' value='"+result[i].OBJID+"'></td>";
|
|
appendText+= " <td>"+fnc_checkNull(result[i].CAR_CODE)+"</td>";
|
|
appendText+= " <td><a href='#' onclick=\"openPartFormPopup('','"+result[i].OBJID+"')\">"+fnc_checkNull(result[i].PART_NO)+"</a></td>";
|
|
appendText+= " <td><a href='#' onclick=\"openEOPopup('"+fnc_checkNull(result[i].EO_OBJID)+"','')\">"+fnc_checkNullDefaultValue(result[i].EO_NO,'-')+"</a></td>";
|
|
appendText+= " <td>"+fnc_checkNullDefaultValue(result[i].EO_ISSUE_DATE_TITLE,'-')+"</td>";
|
|
appendText+= " <td>"+fnc_checkNull(result[i].REV)+"</td>";
|
|
appendText+= " <td>"+fnc_checkNull(result[i].DRAWING_RELEASE_TYPE_TITLE)+"</td>";
|
|
appendText+= " <td>"+fnc_checkNull(result[i].MATERIAL_NAME)+"</td>";
|
|
appendText+= " <td>"+fnc_checkNull(result[i].THICKNESS)+"</td>";
|
|
appendText+= " <td title='"+fnc_checkNullDefaultValue(result[i].CHANGE_ITEM_TITLE,'-')+"'>"+fnc_checkNullDefaultValue(result[i].CHANGE_ITEM_TITLE,'-')+"</td>";
|
|
if(fnc_checkNull(result[i].ECD_OBJID) == ""){
|
|
appendText+= " <td>N</td>";
|
|
}else{
|
|
appendText+= " <td><a href=\"javascript:fnc_downloadFile('"+fnc_checkNull(result[i].ECD_OBJID)+"')\">Y</a></td>";
|
|
}
|
|
|
|
if(fnc_checkNull(result[i].MNG_ITEM_FILE_OBJID) == ""){
|
|
appendText+= " <td>N</td>";
|
|
}else{
|
|
appendText+= " <td><a href=\"javascript:fnc_downloadFile('"+fnc_checkNull(result[i].MNG_ITEM_FILE_OBJID)+"')\">Y</a></td>";
|
|
}
|
|
appendText+= "</tr>";
|
|
$("#partBody").append(appendText);
|
|
}
|
|
|
|
$("#partRevisionCnt").append(fnc_checkNullDefaultValue(result.length,'0'));
|
|
|
|
}else{
|
|
$("#partBodyDefault").show();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
//모든 Revision 목록에서 Part의 상세 화면을 호출한다.
|
|
function openPartFormPopup(actionType,objid){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/part/partFormPopup.do";
|
|
var target = "revHistoryTempPartListPopup";
|
|
if("" != objid){
|
|
url = "/part/partDetailViewPopup.do";
|
|
}
|
|
|
|
window.open(url,target,"width=700, height=930");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.actionType.value = actionType;
|
|
hiddenForm.objid.value = objid;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function openEOPopup(objId,actionType){
|
|
var hiddenForm = document.hiddenForm;
|
|
|
|
var target = "tempEoListPopup";
|
|
var url = "/eo/eoDetailViewPopup.do";
|
|
|
|
window.open("",target,"width=1500,height=700");
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.actionType.value = actionType;
|
|
hiddenForm.action = url;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="hiddenForm" id="hiddenForm" action="" method="post">
|
|
<input type="hidden" name="actionType" id="actionType">
|
|
<input type="hidden" name="objId" id="objId">
|
|
<input type="hidden" name="objid" id="objid">
|
|
</form>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="status" value="all">
|
|
<section style="min-width:1320px;">
|
|
<div class="pLm_menu_name">
|
|
<h2>
|
|
<span>Part Revision 이력</span>
|
|
</h2>
|
|
</div>
|
|
<table id="plmSearchZon">
|
|
<tbody class="">
|
|
<tr>
|
|
<td class="">
|
|
<label for="" class="">고객사</label>
|
|
</td>
|
|
<td>
|
|
<select name="search_oem" id="search_oem" onchange="getCarList(this.value,'${param.search_car}')">
|
|
<c:choose>
|
|
<c:when test="${empty oemList}">
|
|
<option value="">선택</option>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<option value="">선택</option>
|
|
<c:forEach var="item" items="${oemList}" varStatus="varStatus">
|
|
<option value="${item.OBJID}" ${item.OBJID eq param.search_oem ? 'selected':''}>${item.OEM_NAME}(${item.OEM_CODE})</option>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</select>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">차종</label>
|
|
</td>
|
|
<td>
|
|
<select name="search_car" id="search_car"></select>
|
|
</td>
|
|
<td class="">
|
|
<label for="" class="">제품군</label>
|
|
</td>
|
|
<td>
|
|
<select id="search_productGroup" name="search_productGroup" onchange="getChangeProductList('search_product',this.value,'')">
|
|
<c:choose>
|
|
<c:when test="${empty productGroupList}">
|
|
<option value="">선택</option>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<option value="">선택</option>
|
|
<c:forEach var="item" items="${productGroupList}" varStatus="varStatus">
|
|
<option value="${item.OBJID}" ${item.OBJID eq param.search_productGroup ? 'selected':''}>${item.PRODUCT_GROUP_NAME}</option>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</select>
|
|
</td>
|
|
<td class="">
|
|
<label for="" class="">제품</label>
|
|
</td>
|
|
<td>
|
|
<select id="search_product" name="search_product">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<label for="" class="">품번</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" class="text_area" name="search_partNo" id="search_partNo" value="${empty param.partNo ? param.search_partNo:param.partNo}">
|
|
</td>
|
|
<td>
|
|
<label for="" class="">품명</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" class="" name="search_partName" id="search_partName" style="width:200px;">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="" class="">도면번호</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_drawingNo" id="search_drawingNo" value="${param.search_drawingNo}"/>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">EO No</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_eoNo" id="search_eoNo" value="${param.search_eoNo}"/>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">EO Date</label>
|
|
</td>
|
|
<td colspan="3">
|
|
<input type="text" id="search_fromDate" name="search_fromDate" class="date_margin" value="${param.search_fromDate}" readonly>
|
|
~ <input type="text" id="search_toDate" name="search_toDate" value="${param.search_toDate}" readonly>
|
|
<input type="button" class="date_delete" value="x" onclick="javascript:fnc_date_empty()"></td>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="contents_page_basic_margin">
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap">
|
|
<input type="button" value="조회" class="plm_btns" id="btnDistributionPopup" onclick="partSearch();">
|
|
</div>
|
|
</div>
|
|
<div class="plm_table_wrap" style="border-bottom:1px solid #eee;">
|
|
<div style="overflow-y:scroll;">
|
|
<table class="plm_table no_img_table_td_height" style="width:100%; text-align:center";>
|
|
<colgroup>
|
|
<col width="2%">
|
|
<col width="80px;" />
|
|
<col width="120px;" />
|
|
<col width="100px;" />
|
|
<col width="100px;" />
|
|
<col width="100px;" />
|
|
<col width="80px;" />
|
|
<col width="100px;" />
|
|
<col width="80px;" />
|
|
<col width="*" />
|
|
<col width="70px;" />
|
|
<col width="70px;" />
|
|
</colgroup>
|
|
<tr class="plm_thead">
|
|
<td>
|
|
<input type="checkbox" name="" value="" id="" class="checkBox" onclick="fn_allChk(this);">
|
|
</td>
|
|
<td>차종</td>
|
|
<td>품번</td>
|
|
<td>EO No</td>
|
|
<td>EO Date</td>
|
|
<td>Revision</td>
|
|
<td>출도구분</td>
|
|
<td>재질</td>
|
|
<td>두께</td>
|
|
<td>기변항목</td>
|
|
<td>ECD</td>
|
|
<td>관리항목</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<div style="overflow-y:scroll; height:300px;">
|
|
<table class="plm_table no_img_table_td_height" style="width:100%; text-align:center">
|
|
<colgroup>
|
|
<col width="2%">
|
|
<col width="80px;" />
|
|
<col width="120px;" />
|
|
<col width="100px;" />
|
|
<col width="100px;" />
|
|
<col width="100px;" />
|
|
<col width="80px;" />
|
|
<col width="100px;" />
|
|
<col width="80px;" />
|
|
<col width="*" />
|
|
<col width="70px;" />
|
|
<col width="70px;" />
|
|
</colgroup>
|
|
<tr id="partBodyDefault">
|
|
<td colspan="12">조회된 내용이 없습니다.</td>
|
|
</tr>
|
|
<tbody id="partBody">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div style="float:right;">총<div id="partRevisionCnt" style="display:inline-block; padding:0px 5px;">0</div>건</div>
|
|
<div class="btnCenterWrap">
|
|
<center class="center_btns_wrap">
|
|
<input type="button" value="닫기" class="plm_btns" id="btnDistributionPopup" onclick="javascript:btn_close()">
|
|
</center>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html>
|