Files
wace_plm/WebContent/WEB-INF/view/partmgmt/structureDescendingList.jsp
chpark da06c4684c Initial commit: WACE PLM with database initialization features
- Add Docker Compose configurations for dev, prod, and standalone environments
- Add database initialization scripts (init-db.sh, init-db-docker.sh)
- Add enhanced start-docker-linux.sh with DB init support
- Add comprehensive database initialization guide
- Support for automatic dbexport.pgsql import on first run
- Include safety checks for production environment
2025-08-29 15:46:08 +09:00

305 lines
10 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(){
$("#product_code").change(function(){
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($("#mainGrid"),"BOM_REPORT_역전개");
});
});
//양산제품에 해당하는 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_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 == "" ){
// Swal.fire("조회조건을 설정해주시기 바랍니다.");
// return false;
//}
if(partName == "" && partNo.length < 5){
Swal.fire("Part No는 최소 5자이상 입력하시기 바랍니다.");
return false;
}
if(partNo == "" && partName.length < 3){
Swal.fire("Part Name은 최소 3자이상 입력하시기 바랍니다.");
return false;
}
return true;
}
function fn_search(){
if(fn_check()){
document.form1.actionType.value = "search";
document.form1.action = "/partmgmt/structureDescendingList.do";
document.form1.submit();
}
}
function fn_excelExport(pGridObj,pFileName){
var mya = pGridObj.getDataIDs();
var data = pGridObj.getRowData(mya[0]);
var colNames=new Array();
var ii=0;
for (var d in data){ colNames[ii++] = d; }
//컬럼 헤더 가져오기
var columnHeader = pGridObj.jqGrid('getGridParam','colNames') + '';
var arrHeader = columnHeader.split(',');
var html="<table border=1><tr>";
for ( var y = 0; y < arrHeader.length; y++ ) {
var hName = arrHeader[y];
if("PART_OBJID" == hName || "EO_OBJID" == hName){
continue;
}
html = html + "<td><b>" + arrHeader[y] + "</b></td>";
}
html = html + "</tr>";
//값 불러오기
for(var i=0;i< mya.length;i++) {
var datac= pGridObj.getRowData(mya[i]);
html = html +"<tr>";
for(var j=0; j< colNames.length;j++){
if("PART_OBJID" == colNames[j] || "EO_OBJID" == colNames[j]){
continue;
}
html=html + '<td>' + datac[colNames[j]]+"</td>";
}
html = html+"</tr>";
}
html=html+"</table>"; // end of line at the end
document.EXCEL_.csvBuffer.value = html;
document.EXCEL_.fileName.value = pFileName;
document.EXCEL_.target='_new';
document.EXCEL_.submit();
}
function fn_str_openPopup(bom_report_objid, product_code, product_mgmt_spec, upg_no, search_partNo, search_partName){
var param = "actionType=search"
+"&bom_report_objid=" + bom_report_objid
+"&product_code=" + product_code
+"&product_mgmt_spec=" + product_mgmt_spec
+"&upg_no=" + upg_no
+"&search_partNo=" + search_partNo
+"&search_partName=" + search_partName
;
window.open("/partmgmt/structureDescendingListPopup.do?"+param, "_strListPopup", "width=1200, height=800, toolbar=no, status=no, menubar=no, location=no, scrollbars=yes, resizable=yes");
}
</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}">
<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">
<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="">Part No</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="">Part Name</label>
</td>
<td>
<%-- <input type="text" name="search_partName" id="search_partName" value="${param.search_partName}" class="text_area" style="width:350px;" maxlength="20"/> --%>
<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">PartNo 혹은 Part Name을 통하여 조회 가능합니다.</div>
<div class="plm_table_wrap">
<div style="overflow-y:scroll;">
<table class="plm_table">
<colgroup>
<col width="3%" />
<col width="3%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="7%" />
</colgroup>
<tr class="plm_thead">
<td>전개</td>
<td>No</td>
<td>기종(모델)명</td>
<td>사양명</td>
<td>Version</td>
<td>담당자</td>
<td>등록일</td>
<td>배포일</td>
<td>상태</td>
</tr>
</table>
</div>
<div class="plm_scroll_table" style="width: 100%; height: 600px;">
<table class="plm_table">
<colgroup>
<col width="3%" />
<col width="3%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="7%" />
</colgroup>
<c:choose>
<c:when test="${!empty LIST}">
<c:forEach var="item" items="${LIST}" varStatus="status">
<tr>
<td style="cursor: pointer; color: blue;" onclick="fn_str_openPopup('${item.OBJID}','${item.PRODUCT_MGMT_OBJID}','${param.product_mgmt_spec}','${param.upg_no}','${param.search_partNo}','${param.search_partName}'); return false;">
<img src="/images/btnPlus.png" width="13px" height="13px" style="cursor: pointer;" title="BOM조회"/>
</td>
<td>${item.RNUM}</td>
<td>${item.PRODUCT_CODE}</td>
<td>${item.SPEC_NAME}</td>
<td>${item.REV}</td>
<td>${item.DEPT_NAME}${item.USER_NAME}</td>
<td>${item.REGDATE}</td>
<td>${item.DEPLOY_DATE}</td>
<td>${item.STATUS_TITLE}</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="9" align="center">조회된 정보가 없습니다.</td>
</tr>
</c:otherwise>
</c:choose>
</table>
</div>
</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>