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

398 lines
13 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>
<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%>" />
<script type="text/javascript">
$(function() {
$(document).ready(function() {
fnc_datepick();
$("input[type=text]").keyup(function(e) {
if (e.keyCode == 13)
search();
});
$("#btnAddPart").click(function(){
fn_addPartMng();
});
//image src encoding
$("img").each(function(i) {
var imgSrc = $(this).attr("data-SRC");
$(this).attr("src", encodeURI(imgSrc));
});
//체크박스 전체선택/전체해제
$("#allCheck").click(function() {
if ($("#allCheck").prop("checked")) {
$("input[type=checkbox]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
});
$("#btnSearch").click(function() {
fn_search();
});
$('.select2').select2();
$("#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", "");
//fn_productSpecList(this.value, "product_mgmt_spec", "${param.product_mgmt_spec}");
fnc_productUPGNEWList("",this.value,"upg_no", "${param.upg_no}");
});
$("#product_mgmt_spec").change(function(){
fnc_productUPGNEWList("",this.value,"upg_no", "${param.upg_no}");
});
if("${param.product_code}"!=""){
fn_productSpecList("${param.product_code}", "product_mgmt_spec", "${param.product_mgmt_spec}");
}
if("${param.product_mgmt_spec}"!=""){
fnc_productUPGNEWList("","${param.product_mgmt_spec}","upg_no", "${param.upg_no}");
}
});
});
//양산제품에 해당하는 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_addPartMng(){
var selectedPart = $("input[name=P_OBJID]:checked");
if(0 < selectedPart.length){
var partArr = new Array();
var priceArr = new Array();
$("input[name=P_OBJID]:checked").each(function(){
var OBJID = fnc_checkNull($(this).attr("data-objId").replace(" ",""));
var RIPRICE = fnc_checkNullDefaultValue($(this).attr("data-RIPRICE"),"-");
//var PART_NO = fnc_checkNull($(this).attr("data-PART_NO").replace(" ",""));
//var PART_NAME = fnc_checkNull($(this).attr("data-PART_NAME").replace(" ",""));
//var MATERIAL = fnc_checkNull($(this).attr("data-MATERIAL").replace(" ",""));
partArr.push(OBJID);
priceArr.push(RIPRICE);
});
$("#PART_OBJID").val(partArr);
$("#PRICE").val(priceArr);
/* Swal.fire($("#PART_OBJID").val());
Swal.fire(priceArr); */
if(confirm("선택된 Part를 연결하시겠습니까?")){
$.ajax({
url:"/as/addPartMng.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
async:false,
success:function(data){
Swal.fire(data.msg);
opener.gridFn.search();
self.close();
},
error: function(jqxhr, status, error){
}
});
}
}else{
Swal.fire("선택된 Part가 없습니다.");
return false;
}
}
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();
}
function fn_search() {
document.form1.action = "/as/partMngListPopUp.do";
document.form1.submit();
}
function fn_excel() {
document.form1.actionType.value = "excel";
fn_search();
}
</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" method="post">
<input type="hidden" name="TARGETOBJID" id="TARGETOBJID" value="${param.TARGETOBJID}">
<input type="hidden" name="PART_OBJID" id="PART_OBJID">
<input type="hidden" name="PRICE" id="PRICE">
<section>
<div class="min_part_enroll">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name">
<h2>
<span>설계관리_Part 조회</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><label for="">품번</label></td>
<td>
<input type="text" name="search_part_no" id="search_part_no" style="width:130px;" autocomplete="off" value="${param.search_part_no}">
</td>
<td><label for="">품명</label></td>
<td>
<input type="text" name="search_part_name" id="search_part_name" style="width:130px;" autocomplete="off" value="${param.search_part_name}">
</td>
</tr>
</tbody>
</table>
</div>
<div class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="등록" class="plm_btns" id="btnAddPart">
</div>
</div>
<div class="ascendig_text">
<font size="3px">총 ${fn:length(LIST)}건</font>
</div>
<div class="plm_table_wrap">
<div style="overflow-y:scroll;">
<table class="plm_table">
<colgroup>
<col width="2%" />
<col width="13%" /> <!-- 품번 -->
<col width="13%" /> <!-- 품명 -->
<col width="9%" /> <!-- 형상 -->
<col width="5%" /> <!-- Revision -->
<col width="5%" /> <!-- 수량 -->
<col width="5%" /> <!-- 재고량 -->
<col width="9%" /> <!-- 재질 -->
<col width="9%" /> <!-- 중량 -->
<!-- <col width="7%" /> -->
<col width="7%" /> <!-- SIZE -->
</colgroup>
<thead>
<tr class="plm_thead">
<td><input type="checkbox" id="allCheck" class="checkBox"></td>
<td >품번</td>
<td >품명</td>
<td >형상</td>
<td >Revision</td>
<td >수량</td>
<td >재고량</td>
<td >재질</td>
<td >중량</td>
<!-- <td >발주수량</td> -->
<td >단가</td>
</tr>
</thead>
</table>
</div>
<div>
<div class="plm_scroll_table" style="height:500px;">
<table class="plm_table">
<colgroup>
<col width="2%" />
<col width="13%" /> <!-- 품번 -->
<col width="13%" /> <!-- 품명 -->
<col width="9%" /> <!-- 형상 -->
<col width="5%" /> <!-- Revision -->
<col width="5%" /> <!-- 수량 -->
<col width="5%" /> <!-- 재고량 -->
<col width="9%" /> <!-- 재질 -->
<col width="9%" /> <!-- 중량 -->
<!-- <col width="7%" /> -->
<col width="7%" /> <!-- SIZE -->
</colgroup>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align: center;">
<td align="center" colspan="16">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<td>
<input type="checkbox" name="P_OBJID" value="${item.OBJID}" data-objId="${item.OBJID}" data-PART_NO="${item.PART_NO_TITLE}"
data-PART_NAME="${item.PART_NAME}" data-MATERIAL="${item.MATERIAL}" data-RIPRICE="${item.RIPRICE}">
</td>
<td title="${item.PART_NO_TITLE}"><a href="#" onclick="openPartMngPopup('${item.OBJID}');">${item.PART_NO_TITLE}</a></td><!-- 품번 -->
<td title="${item.PART_NAME}">${item.PART_NAME}</td><!-- 품명 -->
<td title="">
<c:if test="${!empty item.SAVED_FILE_NAME and !empty item.REAL_FILE_NAME and !empty item.FILE_PATH}">
<img src="#" height='85px' width='85px' 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 title="${item.REVISION}">${item.REVISION}</td><!-- Revision -->
<td title="${item.QTY}">${item.QTY}</td><!-- 수량 -->
<td title="${item.OHONHANDQTY}">${item.OHONHANDQTY}</td><!-- 수량 -->
<td title="${item.MATERIAL}">${item.MATERIAL}</td><!-- 재질 -->
<td title="${item.WEIGHT}">${item.WEIGHT}</td><!-- 중량 -->
<%-- <td title="${item.RIRCPTQTY}">${item.RIRCPTQTY}</td> --%>
<td title="${item.RIPRICE}">${item.RIPRICE}</td><!-- SIZE -->
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</div>
</div>
</section>
</form>
</body>
</html>