개발 수정

This commit is contained in:
2025-10-28 13:08:26 +09:00
parent 7ae55dfa1f
commit ace0e3c35f
5 changed files with 127 additions and 18 deletions

View File

@@ -2,6 +2,23 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*"%>
<%
// URL 파라미터 가져오기 (request.getParameter는 자동으로 URL 디코딩됨)
String bomPartNo = request.getParameter("BOM_PART_NO");
String bomPartName = request.getParameter("BOM_PART_NAME");
String bomVersion = request.getParameter("BOM_VERSION");
// 디버깅: 콘솔에 출력
System.out.println("=== BOM 파라미터 디버깅 ===");
System.out.println("bomPartNo: " + bomPartNo);
System.out.println("bomPartName: " + bomPartName);
System.out.println("bomVersion: " + bomVersion);
// null 체크
if(bomPartNo == null) bomPartNo = "";
if(bomPartName == null) bomPartName = "";
if(bomVersion == null) bomVersion = "";
%>
<%@include file="/init_jqGrid.jsp"%>
<!DOCTYPE html>
<html>
@@ -302,9 +319,13 @@ $(document).ready(function(){
}
}
}
,{name:"SUPPLIER",index:"SUPPLIER", width: 120, align:"center", hidden: false, sortable:false, editable:true
,{name:"SUPPLY_CODE",index:"SUPPLY_CODE", width: 120, align:"center", hidden: false, sortable:false, editable:true
,edittype :"select"
,formatter :"select"
,editoptions:{
dataInit : function(e){
value: sup_code
,dataInit : function(e){
e.style.width = "92%";
e.style.fontSize = 13;
}
}
@@ -934,15 +955,15 @@ function fn_save(){
</td>
<td style="font-size:12px;" class="align_c"><label for="bom_part_no">품번</label></td>
<td>
<input type="text" name="bom_part_no" id="bom_part_no" required reqTitle="품번" value="${param.BOM_PART_NO}" style="width: 170px;"/>
<input type="text" name="bom_part_no" id="bom_part_no" required reqTitle="품번" value="<%= bomPartNo %>" style="width: 170px;"/>
</td>
<td style="font-size:12px;" class="align_c"><label for="bom_part_name">품명</label></td>
<td>
<input type="text" name="bom_part_name" id="bom_part_name" required reqTitle="품명" value="${param.BOM_PART_NAME}" style="width: 170px;"/>
<input type="text" name="bom_part_name" id="bom_part_name" required reqTitle="품명" value="<%= bomPartName %>" style="width: 170px;"/>
</td>
<td style="font-size:12px;" class="align_c"><label for="version">Version</label></td>
<td>
<input type="text" name="version" id="version" reqTitle="Version" value="${param.BOM_VERSION}" style="width: 140px;"/>
<input type="text" name="version" id="version" reqTitle="Version" value="<%= bomVersion %>" style="width: 140px;"/>
</td>
</tr>
<tr>

View File

@@ -21,7 +21,10 @@ $(document).ready(function(){
$("._table1").scrollLeft($("._table2").scrollLeft());
});
// 품번/품명 Select2 AJAX 초기화 (common.js의 새 함수 사용)
initPartSelect2Ajax("#search_partNo", "#search_partName", "#search_partObjId", {
debug: false // 디버깅 모드 비활성화
});
$("#mainGrid").jqGrid({
height : 630,
@@ -759,6 +762,24 @@ function fn_excelExport(pGridObj,pFileName){
<td class="align_r">
<label for="" class="">품번</label>
</td>
<td>
<select name="search_partNo" id="search_partNo" class="select2-part" style="width: 100%;">
<option value="">품번 선택</option>
</select>
<input type="hidden" name="search_partObjId" id="search_partObjId" value=""/>
</td>
<td class="align_r">
<label for="" class="">품명</label>
</td>
<td colspan="3">
<select name="search_partName" id="search_partName" class="select2-part" style="width: 100%;">
<option value="">품명 선택</option>
</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" style="width:200px;"/>
</td>
@@ -767,7 +788,7 @@ function fn_excelExport(pGridObj,pFileName){
</td>
<td>
<input type="text" name="search_partName" id="search_partName" value="${param.search_partName}" class="text_area" style="width:200px;"/>
</td>
</td> -->
<!-- <td class="align_r">
<label for="" class="">LEVEL</label>
</td>

View File

@@ -158,7 +158,7 @@ var columns = [
{headerHozAlign : 'center', hozAlign : 'center', width : '200', title : '제품구분', field : 'PRODUCT_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', title : '제품구분', field : 'PRODUCT_CD' ,hidden: true},
// {headerHozAlign : 'center', hozAlign : 'center', title : '제품구분', field : 'PRODUCT_CD' ,hidden: true},
{headerHozAlign : 'center', hozAlign : 'left', width : '300', title : '품번', field : 'PART_NO' },
{headerHozAlign : 'center', hozAlign : 'left', /* width : '300',*/ title : '품명', field : 'PART_NAME' },
@@ -530,8 +530,21 @@ function saveexcelpop() {
BOM_VERSION = fnc_checkNull(selectedStructure[i].REVISION);
}
var url = "/partMng/openBomReportExcelImportPopUp.do?PRODUCT_CD="+BOM_PRODUCT_CD+"&BOM_PART_NAME="+BOM_PART_NAME+"&BOM_PART_NO="+BOM_PART_NO+"&BOM_REPORT_OBJID="+BOM_REPORT_OBJID+"&BOM_VERSION="+BOM_VERSION;
var target = "openBomReportExcelImportPopUp";
// hiddenForm을 사용하여 POST 방식으로 팝업 열기 (한글 인코딩 문제 해결)
var hiddenForm = document.hiddenForm;
var url = "/partMng/openBomReportExcelImportPopUp.do";
var target = "openBomReportExcelImportPopUp";
hiddenForm.PRODUCT_CD.value = BOM_PRODUCT_CD;
hiddenForm.BOM_PART_NAME.value = BOM_PART_NAME;
hiddenForm.BOM_PART_NO.value = BOM_PART_NO;
hiddenForm.BOM_REPORT_OBJID.value = BOM_REPORT_OBJID;
hiddenForm.BOM_VERSION.value = BOM_VERSION;
window.open('', target, 'width=1920, height=860, menubars=no, scrollbars=yes, resizable=yes');
hiddenForm.action = url;
hiddenForm.target = target;
hiddenForm.submit();
}
}else{
if($("#customer_cd").val()==""){
@@ -549,8 +562,8 @@ function saveexcelpop() {
var url = "/partMng/openBomReportExcelImportPopUp.do?customer_cd="+$("#customer_cd").val()+"&project_name="+$("#project_name").val()+"&unit_code="+$("#unit_code").val();
var target = "openBomReportExcelImportPopUp";
window.open(url, target,"width=1920, height=860, menubars=no, scrollbars=yes, resizable=yes");
}
window.open(url, target,"width=1920, height=860, menubars=no, scrollbars=yes, resizable=yes");
}
</script>
</head>
@@ -561,6 +574,11 @@ function saveexcelpop() {
<input type="hidden" name="param_product_mgmt_spec" id="param_product_mgmt_spec">
<input type="hidden" name="param_upg_no" id="param_upg_no">
<input type="hidden" name="BOM_REPORT_OBJID" id="BOM_REPORT_OBJID">
<!-- BOM Excel Import 팝업용 파라미터 -->
<input type="hidden" name="PRODUCT_CD" id="PRODUCT_CD">
<input type="hidden" name="BOM_PART_NAME" id="BOM_PART_NAME">
<input type="hidden" name="BOM_PART_NO" id="BOM_PART_NO">
<input type="hidden" name="BOM_VERSION" id="BOM_VERSION">
</form>
<form name="form1" id="form1" action="" method="post">