ERP-node/WebContent/WEB-INF/view/partMng/structurePopupRight.jsp

233 lines
7.5 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>
<style>
::-webkit-scrollbar {
width: 10px;
}
#structureTableWrap2 .structure_btn {
top: 25px;
}
</style>
<script>
$(function(){
//저장
$("#btnSave").click(function(){
Swal.fire("save");
});
//end of 저장
//닫기
$("#btnClose").click(function(){
top.opener.window.location.reload();
top.self.close(0);
});
//end of 닫기
//고객사 변경시 차종 조회
$("#search_product_mgmt_objid").change(function(){
fnc_productUPGNEWList(this.value,"","search_product_mgmt_upg", "");
});
//파트넘버 엔터키 event
$("#search_part_no").keyup(function(e){
if(e.keyCode == 13){
$("#btnSearch").trigger("click");
}
});
//end of 파트넘버 엔터키 event
//파트명 엔터키 event
$("#search_part_name").keyup(function(e){
if(e.keyCode == 13){
$("#btnSearch").trigger("click");
}
});
//end of 파트명 엔터키 event
//파트조회
$("#btnSearch").click(function(){
fn_searchPart();
});
//end of 파트조회
//전체선택
$("#allChk").click(function(){
var isChecked = $(this).prop("checked");
if(isChecked){
$(".partChks").prop("checked", true);
}else{
$(".partChks").prop("checked", false);
}
});
fnc_getProductMgmtList("search_product_mgmt_objid","");
fnc_productUPGNEWList("","${resultMap.PRODUCT_MGMT_SPEC}","search_product_mgmt_upg", "");
$('.select2').select2();
});
function fn_searchPart(){
$("#structurePopupTable2").empty();
$.ajax({
url: "/partMng/getPartMngList_ajax.do",
method: 'post',
data: $("#form1").serialize(),
dataType: 'json',
success: function(data) {
var trHtml = "";
trHtml += " <colgroup>";
trHtml += " <col width='5%' />";
trHtml += " <col width='30%' />";
trHtml += " <col width='30%' />";
trHtml += " <col width='45%' />";
trHtml += " <col width='15%' />";
trHtml += " </colgroup>";
if(data.length > 0){
$.each(data, function(i){
trHtml += " <tr>";
//trHtml += " <input type=\"checkbox\" name=\"partChks\" class=\"partChks\" value=\""+data[i].OBJID+"\" data-PART_TYPE='"+data[i].PART_TYPE+"' data-PART_NO='"+data[i].PART_NO+"' ></td>";
trHtml += " <td><input type=\"checkbox\" name=\"partChks\" class=\"partChks\" value=\""+data[i].OBJID+"\" data-PART_TYPE='"+data[i].PART_TYPE+"' data-PART_NO='"+data[i].PART_NO+"' data-PART_REV='"+data[i].REVISION+"'></td>";
trHtml += " <td class='align_l' title='"+data[i].PART_NO+"'><a href='#' onclick=\"openPartMngPopup('"+data[i].OBJID+"');\">"+data[i].PART_NO+"</a></td>";
trHtml += " <td class='align_l' title='"+data[i].PART_NAME+"'>"+data[i].PART_NAME+"</td>";
trHtml += " <td class='align_l' title='"+data[i].SPEC+"'>"+data[i].SPEC+"</td>";
trHtml += " <td class='align_l' title='"+data[i].MAKER+"'>"+data[i].MAKER+"</td>";
trHtml += " </tr>";
});
}else{
trHtml += " <tr>";
trHtml += " <td colspan=\"5\" align=\"center\">조회된 Part가 없습니다.</td>";
trHtml += " </tr>";
}
$("#structurePopupTable2").append(trHtml);
},
error: function(jqxhr, status, error){
}
});
}
/**
* 파트 상세 공용(View 전용)
*/
function openPartMngPopup(objId){
var hiddenForm = document.hiddenForm;
var url = "/partMng/partMngDetailPopUp.do";
if("" == objId){
Swal.fire("올바르지 않은 접근입니다.");
}
var target = "partMngPopUp";
window.open(url,target,"width=600, height=730, menubars=no, scrollbars=yes, resizable=yes");
hiddenForm.action = url;
hiddenForm.OBJID.value = objId;
hiddenForm.ACTION_TYPE.value = "view";
hiddenForm.target = target;
hiddenForm.submit();
}
</script>
</head>
<body class="backcolor">
<form name="hiddenForm" id="hiddenForm" method="post">
<input type="hidden" name="OBJID" id="OBJID">
<input type="hidden" name="ACTION_TYPE" id="ACTION_TYPE">
</form>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="bomReportObjId" id="bomReportObjId" value="${param.OBJID}">
<input type="hidden" name="is_last" id="is_last" value="1">
<input type="hidden" name="searchTargetStatus" id="searchTargetStatus" value="${info.STATUS}">
<div id="structureName2"></div>
<div id="structureTableWrap2" style="">
<div class="searchIdName">
<table>
<!-- <tr>
<td class="input_title"><label for="">기종명</label></td>
<td class="input_sub_title" >
<select name="search_product_mgmt_objid" id="search_product_mgmt_objid" class="select2"></select>
</td>
<td class="input_title"><label for="">UPG No</label></td>
<td>
<select name="search_product_mgmt_upg" id="search_product_mgmt_upg" title="UPG" required type="select" class="select2"></select>
</td>
</tr> -->
<tr>
<td class="input_title"><label for="">품번</label></td>
<td class="input_sub_title" style="width:150px;">
<input type="text" name="search_part_no" id="search_part_no" value="" style="width:90%">
</td>
<td class="input_title"><label for="">품명</label></td>
<td>
<input type="text" name="search_part_name" id="search_part_name" value="" style="width:80%">
</td>
<td class="input_sub_title" style="float:right">
</td>
</tr>
<tr>
<td class="input_title"><label for="">규격</label></td>
<td class="input_sub_title" style="width:150px;">
<input type="text" name="search_spec" id="search_spec" value="" style="width:90%">
</td>
<td class="input_title"><label for="">MAKER</label></td>
<td>
<input type="text" name="search_maker" id="search_maker" value="" style="width:80%">
</td>
<td class="input_sub_title" style="float:right">
<input type="button" value="조회" class="plm_btns structure_btn" id="btnSearch" >
</td>
</tr>
</table>
</div>
<div class="plm_table_wrap">
<div style="overflow-y:scroll;">
<table id="structurePopupTableHead" class="plm_table">
<colgroup>
<col width="5%" />
<col width="30%" />
<col width="30%" />
<col width="45%" />
<col width="15%" />
</colgroup>
<tr class="plm_thead">
<td><input type="checkbox" name="" value="" id="allChk" class="checkBox"></td>
<td>품번</td>
<td>품명</td>
<td>규격</td>
<td>MAKER</td>
</tr>
</table>
</div>
<div class="plm_scroll_table" style="height:100%;">
<table id="structurePopupTable2" class="plm_table">
<colgroup>
<col width="5%" />
<col width="30%" />
<col width="30%" />
<col width="40%" />
<col width="20%" />
</colgroup>
<tr class="partListTr">
<td colspan="5" align="center">조회된 부품이 없습니다.</td>
</tr>
</table>
</div>
</div>
</div>
</form>
</body>
</html>