480 lines
18 KiB
Plaintext
480 lines
18 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_jqGrid.jsp"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$("._table1").scroll(function () {
|
|
$("._table2").scrollLeft($("._table1").scrollLeft());
|
|
});
|
|
$("._table2").scroll(function () {
|
|
$("._table1").scrollLeft($("._table2").scrollLeft());
|
|
});
|
|
|
|
//체크박스 전체선택/전체해제
|
|
$("#allCheck").click(function() {
|
|
if ($("#allCheck").prop("checked")) {
|
|
$("input[type=checkbox]").prop("checked", true);
|
|
} else {
|
|
$("input[type=checkbox]").prop("checked", false);
|
|
}
|
|
});
|
|
|
|
$("#product_code").change(function(){
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
fn_productSpecList(this.value, "product_mgmt_spec", "${param.product_mgmt_spec}");
|
|
});
|
|
$("#product_mgmt_spec").change(function(){
|
|
fnc_productUPGNEWList("",this.value,"upg_no", "${param.upg_no}");
|
|
});
|
|
|
|
fn_productSpecList("${param.product_code}", "product_mgmt_spec", "${param.product_mgmt_spec}");
|
|
|
|
fnc_productUPGNEWList("","${param.product_mgmt_spec}","upg_no", "${param.upg_no}");
|
|
|
|
$("input[type=text]").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#btnSearch").trigger("click");
|
|
}
|
|
});
|
|
$("#btnSearch").click(function(){
|
|
$("#search_partNo").val($.trim($("#search_partNo").val()));
|
|
$("#search_partName").val($.trim($("#search_partName").val()));
|
|
|
|
fn_search();
|
|
});
|
|
|
|
$("#btnExcel").click(function(){
|
|
|
|
$("#search_partNo").val($.trim($("#search_partNo").val()));
|
|
$("#search_partName").val($.trim($("#search_partName").val()));
|
|
|
|
fn_excelExport();
|
|
});
|
|
|
|
//1level만 활성화 시킨다.
|
|
//$(".dataTr").each(function(i){
|
|
// var lev = $(this).attr("data-LEVEL");
|
|
// if(lev == 1){
|
|
// $(this).show();
|
|
// }else{
|
|
// $(this).hide();
|
|
// }
|
|
//});
|
|
$(".btnToggle").click(function(){
|
|
var src = $(this).attr("src");
|
|
if(src.indexOf("Plus")>-1){
|
|
$(this).attr("src", "/images/btnMinus.png");
|
|
}else if(src.indexOf("Minus")>-1){
|
|
$(this).attr("src", "/images/btnPlus.png");
|
|
}
|
|
|
|
var choosedTr = $(this).parents(".dataTr:first");
|
|
var choosedBRObjId = $(choosedTr).attr("data-BOM_REPORT_OBJID");
|
|
var choosedPath = $(choosedTr).attr("data-PATH").replaceAll("{","").replaceAll("}","");
|
|
|
|
$(".dataTr").each(function(i){
|
|
var _lev = $(this).attr("data-LEVEL");
|
|
var _BRObjId = $(this).attr("data-BOM_REPORT_OBJID");
|
|
var _Path = $(this).attr("data-PATH").replaceAll("{","").replaceAll("}","");
|
|
|
|
if(_lev == 1 || _BRObjId != choosedBRObjId){
|
|
return true;
|
|
}
|
|
|
|
if(_Path.indexOf(choosedPath)>-1){
|
|
$(this).toggle();
|
|
}
|
|
});
|
|
});
|
|
|
|
//level별 색상
|
|
$(".dataTr").each(function(i){
|
|
var lev = $(this).attr("data-LEVEL");
|
|
if(lev == 1){
|
|
$(this).css("background-color", "#fde9d9");
|
|
}else if(lev == 2){
|
|
$(this).css("background-color", "#daeef3");
|
|
}else if(lev == 3){
|
|
$(this).css("background-color", "#e4dfec");
|
|
}else if(lev == 4){
|
|
$(this).css("background-color", "#ebf1de");
|
|
}else if(lev == 5){
|
|
$(this).css("background-color", "#f2f2f2");
|
|
}else if(lev == 6){
|
|
$(this).css("background-color", "#f2dcdb");
|
|
}else if(lev == 7){
|
|
$(this).css("background-color", "#eeece1");
|
|
}else if(lev == 8){
|
|
$(this).css("background-color", "#dce6f1");
|
|
}else if(lev == 9){
|
|
$(this).css("background-color", "#FFFFEB");
|
|
}else if(lev == 10){
|
|
$(this).css("background-color", "#ffffff");
|
|
}
|
|
});
|
|
|
|
//$(".btnPartDetail").click(function(){
|
|
// var objId = $(this).attr("data-PART_OBJID");
|
|
// fn_openPartPopup(objId);
|
|
//});
|
|
});
|
|
|
|
//양산제품에 해당하는 SPEC 정보 목록을 가져온다.
|
|
function fn_productSpecList(productObjId,selectboxId,selectedVal){
|
|
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productObjId){
|
|
$.ajax({
|
|
url:"/common/getProductSPECList.do",
|
|
type:"POST",
|
|
data:{"isJson":true,"TARGET_OBJID":productObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
resultList = data
|
|
|
|
if(0 < resultList.length){
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].OBJID;
|
|
var commonCodeName = resultList[i].SPEC_NAME;
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_productUPGList(productMgmtObjId,selectboxId,selectedVal){
|
|
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productMgmtObjId){
|
|
$.ajax({
|
|
url:"/common/getProductUPGList.do",
|
|
type:"POST",
|
|
data:{"isJson":true,"PRODUCT_MGMT_OBJID":productMgmtObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
resultList = data
|
|
|
|
if(0 < resultList.length){
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].CODE;
|
|
var commonCodeName = resultList[i].UPG_NAME+"("+resultList[i].SPEC_NAME+")";
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_check(){
|
|
var product_code = fnc_checkNull($("#product_code").val());
|
|
var product_mgmt_spec = fnc_checkNull($("#product_mgmt_spec").val());
|
|
var upg_no = fnc_checkNull($("#upg_no").val());
|
|
var partNo = fnc_checkNull($("#search_partNo").val());
|
|
var partName = fnc_checkNull($("#search_partName").val());
|
|
|
|
if(product_code == "" && product_mgmt_spec == "" && upg_no == ""){
|
|
Swal.fire("조회조건을 설정해주시기 바랍니다.");
|
|
return false;
|
|
}
|
|
|
|
if(partName == "" && partNo.length < 5){
|
|
Swal.fire("Part No는 최소 5자이상 입력하시기 바랍니다.");
|
|
return false;
|
|
}
|
|
|
|
if(partNo == "" && partName.length < 5){
|
|
Swal.fire("Part Name은 최소 5자이상 입력하시기 바랍니다.");
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function fn_openPartPopup(objId){
|
|
window.open("/partMng/partMngDetailPopUp.do?OBJID="+objId, "tempPartListPopup", "width=600, height=700, toolbar=no, status=no, menubar=no, location=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
|
|
function fn_search(){
|
|
if(fn_check()){
|
|
document.form1.actionType.value = "search";
|
|
document.form1.action = "/partmgmt/structureDescendingList.do";
|
|
document.form1.submit();
|
|
}
|
|
}
|
|
|
|
function fn_excelExport(){
|
|
document.form1.actionType.value = "excel";
|
|
document.form1.action = "/partmgmt/structureAscendingListPopup.do";
|
|
document.form1.submit();
|
|
}
|
|
|
|
function openPartMngPopup(objId){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/partMng/partMngFormPopUp.do";
|
|
|
|
if("" != objId){
|
|
url = "/partMng/partMngDetailPopUp.do";
|
|
}
|
|
|
|
var target = "partMngPopUp";
|
|
|
|
window.open(url,target,"width=600, height=700, menubars=no, scrollbars=yes, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.OBJID.value = objId;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
|
</form>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="actionType" id="actionType" value="" />
|
|
<input type="hidden" name="OBJID" id="OBJID" value="${param.OBJID}">
|
|
|
|
<input type="hidden" name="bom_report_objid" value="${param.bom_report_objid}" />
|
|
<input type="hidden" name="product_code" value="${param.product_code}" />
|
|
<input type="hidden" name="product_mgmt_spec" value="${param.product_mgmt_spec}" />
|
|
<input type="hidden" name="upg_no" value="${param.upg_no}" />
|
|
<input type="hidden" name="search_partNo" value="${param.search_partNo}" />
|
|
<input type="hidden" name="search_partName" value="${param.search_partName}" />
|
|
|
|
<div class="min_part_enroll">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>BOM 정전개</span>
|
|
</h2>
|
|
</div>
|
|
<div id="plmSearchZon" style="display:none;">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td><label for="product_code">기종(모델)명</label></td>
|
|
<td>
|
|
<select name="product_code" id="product_code" style="" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.product_code}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="product_mgmt_spec">규격</label></td>
|
|
<td>
|
|
<select name="product_mgmt_spec" id="product_mgmt_spec" style="" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">UPG_NO</label></td>
|
|
<td>
|
|
<select name="upg_no" id="upg_no" class="select2" style="width:250px;" autocomplete="off"></select>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">품번</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_partNo" id="search_partNo" value="${param.search_partNo}" class="text_area" maxlength="15"/>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">품명</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_partName" id="search_partName" value="${param.search_partName}" class="text_area" style="width:350px;" maxlength="20" placeholder="ex) HEX. BOLT"/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="contents_page_basic_margin">
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap">
|
|
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
|
<!-- <input type="button" value="조회" class="plm_btns" id="btnSearch"> -->
|
|
</div>
|
|
</div>
|
|
<div class="ascendig_text" style="display:none;">PartNo 혹은 Part Name을 통하여 조회 가능합니다.</div>
|
|
<div class="in_table_scroll_wrap _table1" style="height:52px;width:99.4%;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
|
|
<col width="40px" />
|
|
|
|
<c:forEach var="item" items="${COL_NAME_LIST}" varStatus="status">
|
|
<col width="40px" />
|
|
</c:forEach>
|
|
|
|
<col width="250px" /> <!-- 품번 -->
|
|
<col width="250px" /> <!-- 품명 -->
|
|
<col width="30px" /> <!-- 형상 -->
|
|
<!-- <col width="70px" /> 3D -->
|
|
<!-- <col width="70px" /> 2D -->
|
|
<!-- <col width="70px" /> 2D PDF -->
|
|
<col width="30px" /> <!-- Qty -->
|
|
<col width="75px" /> <!-- 최초설계일 -->
|
|
<col width="75px" /> <!-- 설변일자 -->
|
|
<col width="150px" /> <!-- 설변항목 -->
|
|
<col width="250px" /> <!-- SPEC. -->
|
|
<col width="80px" /> <!-- Material -->
|
|
<col width="80px" /> <!-- SUB_Material -->
|
|
<col width="60px" /> <!-- Weight -->
|
|
<col width="60px" /> <!-- Part Type -->
|
|
<col width="250px" /> <!-- 비고 -->
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td rowspan="2"></td>
|
|
<td colspan="${fn:length(COL_NAME_LIST)}">Level</td>
|
|
<td rowspan="2">품번 </td>
|
|
<td rowspan="2">품명 </td>
|
|
<td rowspan="2">형상 </td>
|
|
<!-- <td rowspan="2">3D </td> -->
|
|
<!-- <td rowspan="2">2D </td> -->
|
|
<!-- <td rowspan="2">PDF </td> -->
|
|
<td rowspan="2">수량 </td>
|
|
<td rowspan="2">최초설계일</td>
|
|
<td rowspan="2">설변일자</td>
|
|
<td rowspan="2">설변항목</td>
|
|
<td rowspan="2">규격 </td>
|
|
<td rowspan="2">재질 </td>
|
|
<td rowspan="2">대체 재질 </td>
|
|
<td rowspan="2">중량 </td>
|
|
<td rowspan="2">부품 유형 </td>
|
|
<td rowspan="2">비고 </td>
|
|
</tr>
|
|
<tr class="plm_thead">
|
|
<c:forEach var="item" items="${COL_NAME_LIST}" varStatus="status">
|
|
<td>${item.COL_HEADER_VAL}</td>
|
|
</c:forEach>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="in_table_scroll_wrap _table2" style="height:560px;width:100%;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
|
|
<col width="40px" />
|
|
|
|
<c:forEach var="item" items="${COL_NAME_LIST}" varStatus="status">
|
|
<col width="40px" />
|
|
</c:forEach>
|
|
|
|
<col width="250px" /> <!-- 품번 -->
|
|
<col width="250px" /> <!-- 품명 -->
|
|
<col width="30px" /> <!-- 형상 -->
|
|
<!-- <col width="70px" /> 3D -->
|
|
<!-- <col width="70px" /> 2D -->
|
|
<!-- <col width="70px" /> 2D PDF -->
|
|
<col width="30px" /> <!-- Qty -->
|
|
<col width="75px" /> <!-- 최초설계일 -->
|
|
<col width="75px" /> <!-- 설변일자 -->
|
|
<col width="150px" /> <!-- 설변항목 -->
|
|
<col width="250px" /> <!-- SPEC. -->
|
|
<col width="80px" /> <!-- Material -->
|
|
<col width="80px" /> <!-- SUB_Material -->
|
|
<col width="60px" /> <!-- Weight -->
|
|
<col width="60px" /> <!-- Part Type -->
|
|
<col width="250px" /> <!-- 비고 -->
|
|
</colgroup>
|
|
|
|
|
|
|
|
<c:choose>
|
|
<c:when test="${empty LIST}">
|
|
<tr>
|
|
<td colspan="${fn:length(COL_NAME_LIST)+14}" align="center">조회된 정보가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${LIST}" varStatus="status">
|
|
<tr class="dataTr" data-LEVEL="${item.LEV}" data-BOM_REPORT_OBJID="${item.BOM_REPORT_OBJID}" data-PATH="${item.PATH}">
|
|
<td>
|
|
<c:if test="${item.LEV eq '1' and item.LEAF eq '0'}">
|
|
<img src="/images/btnMinus.png" width="13px" height="13px" class="btnToggle" style="${item.LEV eq '1' and item.LEAF eq '0'?'cursor:pointer;':''}">
|
|
</c:if>
|
|
</td>
|
|
|
|
<c:forEach var="colListItem" items="${COL_NAME_LIST}" varStatus="status">
|
|
<c:set var="colName" value="${colListItem.COL_NAME}" />
|
|
<c:set var="colVal" value="${colListItem.COL_VAL}" />
|
|
|
|
<td title="${item[colName]}">${item[colVal]}</td>
|
|
</c:forEach>
|
|
|
|
<td title="${item.PART_NO}" class="align_l"><a href="#" onclick="openPartMngPopup('${item.PART_OBJID}');">${item.PART_NO}${item.REVISION}</a></td>
|
|
|
|
|
|
<td title="${item.PART_NAME}" class="align_l" style="text-align: left; padding-left: 5px;">${item.PART_NAME}</td><!-- 품명 -->
|
|
<td title="" class="align_c">
|
|
<c:if test="${!empty item.SAVED_FILE_NAME and !empty item.REAL_FILE_NAME and !empty item.FILE_PATH}">
|
|
<img src="#" height='85px' width='100%' onclick="fnc_openImagePopUp(this.src)" data-SRC="/common/viewImage.do?realFileName=${item.REAL_FILE_NAME}&savedFileName=${item.SAVED_FILE_NAME}&attDir=${item.FILE_PATH}"/>
|
|
</c:if>
|
|
</td><!-- 형상 -->
|
|
<%-- <td><a href="#" class="File file_${item.CU01_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="3D_CAD" data-docTypeName="3D CAD 첨부파일"></a></td> --%>
|
|
<%-- <td><a href="#" class="File file_${item.CU02_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="2D_DRAWING_CAD" data-docTypeName="2D(Drawing) CAD 첨부파일"></a></td> --%>
|
|
<%-- <td><a href="#" class="File file_${item.CU03_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="2D_PDF_CAD" data-docTypeName="2D(PDF) CAD 첨부파일"></a></td> --%>
|
|
|
|
<%-- <td title="${item.UNIT_TITLE}" class="align_c">${item.UNIT_TITLE}</td> --%><!-- EO No -->
|
|
<td title="${item.QTY}" class="align_c">${item.QTY}</td><!-- 수량 -->
|
|
<%-- <td title="${item.REVISION}" class="align_c">${item.REVISION}</td><!-- Revision --> --%>
|
|
<%-- <td title="${item.EO_NO}" class="align_c">${item.EO_NO}</td><!-- EO No -->
|
|
<td title="${item.EO_DATE_TITLE}" class="align_c">${item.EO_DATE_TITLE}</td><!-- EO Date --> --%>
|
|
<td title="${item.DESIGN_DATE}" class="align_c">${item.DESIGN_DATE}</td><!-- 최초설계일 -->
|
|
<td title="${item.EO_DATE}" class="align_c">${item.EO_DATE}</td><!-- 설변일자 -->
|
|
<td title="${item.CHANGE_OPTION_NAME}" class="align_c">${item.CHANGE_OPTION_NAME}</td><!-- 설변항목 -->
|
|
|
|
<td title="${item.SPEC}" class="align_l" style="text-align: left; padding-left: 5px;">${item.SPEC}</td><!-- SPEC -->
|
|
<td title="${item.MATERIAL}" class="align_c">${item.MATERIAL}</td><!-- 재질 -->
|
|
<td title="${item.SUB_MATERIAL}" class="align_c">${item.SUB_MATERIAL}</td><!-- 대체 재질 -->
|
|
<td title="${item.WEIGHT}" class="align_c">${item.WEIGHT}</td><!-- 중량 -->
|
|
<td title="${item.PART_TYPE_TITLE}" class="align_l">${item.PART_TYPE_TITLE}</td><!-- SIZE -->
|
|
<td title="${item.REMARK}" class="align_l">${item.REMARK}</td><!-- 표면처리 -->
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
<style>
|
|
.container::-webkit-scrollbar-thumb {background: linear-gradient(to bottom, #f5d78e, #f5d78e) !important;}
|
|
.container::-webkit-scrollbar-track {background-color: white !important;}
|
|
.container::-webkit-scrollbar-button { display: none !important;}
|
|
</style>
|
|
</html> |