Files
wace_plm/WebContent/WEB-INF/view/salesMng/partBomList.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

372 lines
12 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String connector = person.getUserId();
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<!-- //JSTL 페이징 변수선언 -->
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
<c:set var="nPage" value="${empty param.page?1:param.page}" />
<c:set var="pageIndex" value="${(nPage-1)/10}" />
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<c:set var="connector" value="<%=connector %>" />
<style>
a:link {
color : white;
text-decoration: none;
}
a:visited {
color : black;
text-decoration: none;
}
a:hover {
color : red;
text-decoration: underline;
}
a:active {
color : green;
text-decoration: none;
}
</style>
<script type="text/javascript">
$(function(){
$(document).ready(function(){
$('.select2').select2();
fnc_datepick();
$("input[type=text]").keyup(function(e){
if(e.keyCode == 13) search();
});
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
$("#btnBomSearch").click(function(){
var objId = $('input[name=detail_objid]:checked').val();
var UPG_NAME = $('input[name=detail_objid]:checked').attr("data-UPG_NAME");
// Swal.fire(UPG_NAME);
if(objId!=undefined && objId!=""){
fnc_BomMultiView(objId,UPG_NAME);
}else{
Swal.fire('선택된 UPG가 없습니다.');
}
});
//등록팝업
$("#btnReg").click(function(){
if($("#product_code").val()==""){
Swal.fire('양산제품코드를 선택해 주세요');
$("#product_code").focus();
}else{
window.open("/productmgmt/productMgmtUpgInsertFormPopup.do?product_code="+$("#product_code").val(), "", "width=750, height=600","menubars=no, scrollbars=yes, resizable=yes");
}
});
});
});
//검색
function fn_search(){
document.form1.action = "/partMng/getPartBomList.do";
document.form1.submit();
}
function fnc_BomView(master_objid,SPEC_NAME){
product_code_name = $("#product_code option:selected").text();
window.open("/partMng/structureAscendingList.do?product_code="+master_objid+"&SPEC_NAME="+encodeURI(SPEC_NAME,"UTF-8")+"&product_code_name="+product_code_name, "", "width=1530, height=850","menubars=no, scrollbars=yes, resizable=yes");
}
function fnc_BomMultiView(code_id,UPG_NAME){
UPG_NAME = encodeURIComponent(UPG_NAME);
product_code = $("#product_code option:selected").text();
window.open("/partMng/structureAscendingMultiList.do?code_id="+code_id+"&root_code=${param.product_code}&UPG_NAME="+UPG_NAME+"&product_code="+product_code, "", "width=1530, height=850","menubars=no, scrollbars=yes, resizable=yes");
}
</script>
</head>
<body class="backcolor">
<form name="hiddenForm" id="hiddenForm" method="post">
<input type="hidden" name="actionType" id="actionType">
<input type="hidden" name="objId" id="objId">
<input type="hidden" name="productobjid" id="productobjid">
</form>
<form name="form1" id="form1" method="post">
<input type="hidden" name="actionType">
<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 class="align_r"><label for="" class="">년도</label></td>
<td>
<select name="Year" id="Year" style="width:80px;" class="select2" autocomplete="off">
<option value="">선택</option>
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
<option value="${req_year}"${param.Year eq req_year ? 'selected':'' }>${req_year}</option>
</c:forEach>
</select>
</td> --%>
<td class="align_r"><label for="" class="">양산제품코드</label></td>
<td>
<select name="product_code" id="product_code" style="width: 150px;" class="select2" autocomplete="off">
<option value="">전체</option>
${code_map.product_code}
</select>
</td>
</tr>
</tbody>
</table>
</div>
<section class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<!-- <input type="button" value="등록" class="plm_btns" id="btnReg"> -->
<input type="button" value="사양조회" class="plm_btns" id="btnSearch">
<input type="button" value="BOM조회" class="plm_btns" id="btnBomSearch">
</div>
</div>
<div class="plm_table_wrap">
<div>
<table class="plm_table">
<colgroup>
<col width="3%" />
<col width="10%" />
<col width="10%" />
<c:choose>
<c:when test="${empty productList}">
</c:when>
<c:otherwise>
<c:forEach var="item" items="${productList}" varStatus="varStatus">
<col width="100px" />
</c:forEach>
</c:otherwise>
</c:choose>
</colgroup>
<thead>
<tr class="plm_thead">
<td colspan="3">UPG</td>
<td colspan="${productListCnt}">사양명</td>
<!-- <td rowspan="2">
비고
</td> -->
</tr>
<tr class="plm_thead">
<td></td>
<td>NAME</td>
<td>CODE</td>
<c:choose>
<c:when test="${empty productList}">
<td>데이터가 없습니다.</td>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${productList}" varStatus="varStatus">
<td><a href="javascript:fnc_BomView('${item.MASTER_OBJID}','${item.SPEC_NAME}');">${item.SPEC_NAME}</a></td>
</c:forEach>
</c:otherwise>
</c:choose>
</tr>
</thead>
<c:choose>
<c:when test="${empty LIST}">
<%-- <tr style="text-align:center;">
<td align="center" colspan="${productListCnt}">조회된 데이터가 없습니다.</td>
</tr> --%>
</c:when>
<c:otherwise>
<c:set var="upgSize" value="${fn:length(LIST)/productListCnt}" />
<c:set var="Cnt" value="1" />
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<td><input type="radio" name="detail_objid" value="${item.CODE_ID}" data-UPG_NAME="${item.UPG_NAME}" style="cursor:pointer;"></td>
<td style="text-align: left; padding-left: 5px;">${item.UPG_NAME}</td>
<td>${item.UPG_CODE}</td>
<c:if test="${productListCnt == 1}">
<td>${item.UPG_NO0}</td>
</c:if>
<c:if test="${productListCnt == 2}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
</c:if>
<c:if test="${productListCnt == 3}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
</c:if>
<c:if test="${productListCnt == 4}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
</c:if>
<c:if test="${productListCnt == 5}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
</c:if>
<c:if test="${productListCnt == 6}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
<td>${item.UPG_NO5}</td>
</c:if>
<c:if test="${productListCnt == 7}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
<td>${item.UPG_NO5}</td>
<td>${item.UPG_NO6}</td>
</c:if>
<c:if test="${productListCnt == 8}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
<td>${item.UPG_NO5}</td>
<td>${item.UPG_NO6}</td>
<td>${item.UPG_NO7}</td>
</c:if>
<c:if test="${productListCnt == 9}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
<td>${item.UPG_NO5}</td>
<td>${item.UPG_NO6}</td>
<td>${item.UPG_NO7}</td>
<td>${item.UPG_NO8}</td>
</c:if>
<c:if test="${productListCnt == 10}">
<td>${item.UPG_NO0}</td>
<td>${item.UPG_NO1}</td>
<td>${item.UPG_NO2}</td>
<td>${item.UPG_NO3}</td>
<td>${item.UPG_NO4}</td>
<td>${item.UPG_NO5}</td>
<td>${item.UPG_NO6}</td>
<td>${item.UPG_NO7}</td>
<td>${item.UPG_NO8}</td>
<td>${item.UPG_NO9}</td>
</c:if>
<%-- <c:forEach var="item1" items="${productList}" varStatus="varStatus">
<c:set var="UPG_NO" value="UPG_NO${varStatus.count}" />
<td>${requestScope[UPG_NO]}</td>
</c:forEach> --%>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
</div>
<%-- <div class="pdm_page">
<input type="hidden" name="page" id="page" value="${nPage}">
<c:if test="${!empty LIST}">
<div class="page_pro">
<table align="center">
<tr>
<c:choose>
<c:when test="${nPage > 1}">
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:otherwise>
</c:choose>
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
<c:if test="${status.index -1 < maxPage}">
<c:choose>
<c:when test="${status.index eq nPage}">
<td><a href="#" class="now_page">${nPage}</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
<c:choose>
<c:when test="${nPage < maxPage}">
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
</c:when>
<c:otherwise>
<td class="no_more_page">next</td>
</c:otherwise>
</c:choose>
</tr>
</table>
<c:if test="${!empty LIST}">
<p id="adminPageCount">총 ${totalCount}건</p>
</c:if>
</div>
</c:if>
</div> --%>
</section>
</div>
</div>
</form>
</body>
</html>