E-BOM 확인/수정 완료
This commit is contained in:
@@ -462,7 +462,7 @@ function fn_openSetBomCopy(product_code){
|
||||
* 구조등록 팝업
|
||||
*/
|
||||
function fn_openSetStructure(objId){
|
||||
window.open("/partMng/setStructurePopupMainFS.do?objId="+objId, "", "width=1880, height=1100, resizable=no");
|
||||
window.open("/partMng/setStructurePopupMainFS.do?objId="+objId, "", "width=1880, height=900, resizable=yes");
|
||||
}
|
||||
/**
|
||||
* 배포사유 입력 팝업
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%
|
||||
java.util.Map map = (java.util.HashMap)request.getAttribute("info");
|
||||
%>
|
||||
<frameset rows="25%, 69%, 6%;" border="0" noresize>
|
||||
<frameset rows="100px, *, 50px" border="0" noresize>
|
||||
<frame src="/partMng/structureHeaderPopup.do">
|
||||
<frame src="/partMng/structureBottomPopupFS.do?objId=<%=com.pms.common.utils.CommonUtils.checkNull(map.get("OBJID"))%>">
|
||||
<frame src="/partMng/structureBtnAreaPopup.do">
|
||||
|
||||
@@ -404,25 +404,30 @@ function getSelectedRowData() {
|
||||
|
||||
// 필터 적용 함수
|
||||
function fn_applyFilter() {
|
||||
var partType = $("#filterPartType").val();
|
||||
var partNo = $("#filterPartNo").val().trim();
|
||||
var partName = $("#filterPartName").val().trim();
|
||||
var version = $("#filterVersion").val().trim();
|
||||
|
||||
_tabulGrid.setFilter([
|
||||
{field: "PART_TYPE_TITLE", type: "like", value: partType},
|
||||
{field: "PART_NO", type: "like", value: partNo},
|
||||
{field: "PART_NAME", type: "like", value: partName},
|
||||
{field: "REVISION", type: "like", value: version}
|
||||
]);
|
||||
// 빈 값이 아닌 필터만 추가
|
||||
var filters = [];
|
||||
if(partNo) {
|
||||
filters.push({field: "PART_NO", type: "like", value: partNo});
|
||||
}
|
||||
if(partName) {
|
||||
filters.push({field: "PART_NAME", type: "like", value: partName});
|
||||
}
|
||||
|
||||
// 필터가 있으면 적용, 없으면 전체 표시
|
||||
if(filters.length > 0) {
|
||||
_tabulGrid.setFilter(filters);
|
||||
} else {
|
||||
_tabulGrid.clearFilter();
|
||||
}
|
||||
}
|
||||
|
||||
// 필터 초기화 함수
|
||||
function fn_resetFilter() {
|
||||
$("#filterPartType").val("");
|
||||
$("#filterPartNo").val("");
|
||||
$("#filterPartName").val("");
|
||||
$("#filterVersion").val("");
|
||||
_tabulGrid.clearFilter();
|
||||
}
|
||||
</script>
|
||||
@@ -439,10 +444,8 @@ function fn_resetFilter() {
|
||||
<input type="hidden" name="objId" id="objId" value="${info.OBJID}" />
|
||||
<input type="hidden" name="actionType" value="" />
|
||||
<!-- 필터 값을 저장하기 위한 hidden 필드 (top frame에서 값 전달) -->
|
||||
<input type="hidden" id="filterPartType" />
|
||||
<input type="hidden" id="filterPartNo" />
|
||||
<input type="hidden" id="filterPartName" />
|
||||
<input type="hidden" id="filterVersion" />
|
||||
<div id="structureTableWrap1">
|
||||
<div id="structureName">
|
||||
(${info.CUSTOMER_NAME}_${info.CUSTOMER_PROJECT_NAME}_${info.UNIT_NAME})_${info.REV}
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
height: auto;
|
||||
}
|
||||
.plm_menu_name {
|
||||
margin: 5px 15px 0 15px !important;
|
||||
@@ -22,140 +21,67 @@ body, html {
|
||||
margin: 5px 0 !important;
|
||||
padding: 5px 0;
|
||||
}
|
||||
/* global CSS에서 #plmSearchZon 스타일을 가져오므로 추가 스타일만 정의 */
|
||||
#csvImportList {
|
||||
margin-top: 10px;
|
||||
#plmSearchZon {
|
||||
margin-bottom: 0 !important;
|
||||
padding-bottom: 5px !important;
|
||||
overflow: visible !important;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
#csvImportTable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
.select2-container {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
#csvImportTable thead td {
|
||||
background-color: #f0f0f0;
|
||||
padding: 8px;
|
||||
font-weight: bold;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
#csvImportTable tbody td {
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
#excelUploadPopupForm .dropzone {
|
||||
width: 99.8% !important;
|
||||
.select2-dropdown {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var objId = '<%=request.getParameter("objId")%>';
|
||||
|
||||
// CSV 파일 업로드 영역 초기화
|
||||
fnc_setFileDropZone("csvUploadDropZone", objId, "BOM_CSV_IMPORT", "BOM CSV Import", "setCsvFileArea", true, "csvFileDelete", "/partMng/csvImportFileProc.do");
|
||||
|
||||
// CSV 파일 업로드 목록 초기화
|
||||
$("#csvImportList").hide();
|
||||
|
||||
// Template Download 클릭 이벤트
|
||||
$("#templateDownload").click(function(){
|
||||
location.href="/template/BOM_REPORT_CSV_IMPORT_TEMPLATE.xlsx";
|
||||
// 엔터키 이벤트 바인딩
|
||||
$("#filterPartNo, #filterPartName, #filterVersion").on('keypress', function(e){
|
||||
if(e.keyCode == 13 || e.which == 13){
|
||||
e.preventDefault();
|
||||
fn_applyFilter();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// CSV 파일 업로드 후 처리
|
||||
function setCsvFileArea(){
|
||||
setUploadCsvFile();
|
||||
}
|
||||
|
||||
// CSV 업로드 파일 목록 표시
|
||||
function setUploadCsvFile(){
|
||||
var objId = '<%=request.getParameter("objId")%>';
|
||||
|
||||
$.ajax({
|
||||
url: "/common/getFileList.do",
|
||||
type: "POST",
|
||||
data: {"targetObjId": objId, "docType": "BOM_CSV_IMPORT"},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(data){
|
||||
if(null != data && 0 < data.length){
|
||||
$("#csvImportList").show();
|
||||
$("#csvImportArea").empty();
|
||||
|
||||
$.each(data, function(i){
|
||||
var s = "<tr>";
|
||||
s += "<td colspan='2'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
||||
s += "<td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"csvFileDelete\")'></div></td>";
|
||||
s += "</tr>";
|
||||
$("#csvImportArea").append(s);
|
||||
});
|
||||
|
||||
// CSV 파싱 처리
|
||||
parsingCsvFile();
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
Swal.fire('파일 목록을 가져오는데 실패했습니다.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// CSV 파일 삭제 후 처리
|
||||
function csvFileDelete(){
|
||||
$("#csvImportArea").empty();
|
||||
$("#csvImportList").hide();
|
||||
Swal.fire('CSV 파일이 삭제되었습니다.');
|
||||
parent.frames['leftFrame'].location.reload();
|
||||
}
|
||||
|
||||
// CSV 파싱 처리
|
||||
function parsingCsvFile(){
|
||||
var objId = '<%=request.getParameter("objId")%>';
|
||||
|
||||
$.ajax({
|
||||
url: "/partMng/parsingCsvFile.do",
|
||||
type: "POST",
|
||||
data: {"targetObjId": objId, "docType": "BOM_CSV_IMPORT"},
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
if(data && data.result === 'success'){
|
||||
Swal.fire('CSV 파일이 정상적으로 처리되었습니다.');
|
||||
parent.frames['leftFrame'].location.reload();
|
||||
} else {
|
||||
Swal.fire('CSV 파일 처리 중 오류가 발생했습니다.');
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
Swal.fire('CSV 파일 처리에 실패했습니다.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 필터 적용 함수
|
||||
function fn_applyFilter() {
|
||||
var partType = $("#filterPartType").val();
|
||||
var partNo = $("#filterPartNo").val().trim();
|
||||
var partName = $("#filterPartName").val().trim();
|
||||
var version = $("#filterVersion").val().trim();
|
||||
|
||||
// leftFrame의 필터 적용 함수 호출
|
||||
if(parent.frames['leftFrame'] && parent.frames['leftFrame'].fn_applyFilter) {
|
||||
parent.frames['leftFrame'].$("#filterPartType").val(partType);
|
||||
parent.frames['leftFrame'].$("#filterPartNo").val(partNo);
|
||||
parent.frames['leftFrame'].$("#filterPartName").val(partName);
|
||||
parent.frames['leftFrame'].$("#filterVersion").val(version);
|
||||
parent.frames['leftFrame'].fn_applyFilter();
|
||||
try {
|
||||
// 프레임 구조: parent(headerFs) -> parent(main) -> frames[1](bottomFs) -> frames[0](leftFrame)
|
||||
var leftFrame = parent.parent.frames[1].frames['leftFrame'];
|
||||
|
||||
if(leftFrame && leftFrame.fn_applyFilter) {
|
||||
leftFrame.$("#filterPartNo").val(partNo);
|
||||
leftFrame.$("#filterPartName").val(partName);
|
||||
leftFrame.fn_applyFilter();
|
||||
} else {
|
||||
console.error("leftFrame not found or fn_applyFilter not available");
|
||||
}
|
||||
} catch(e) {
|
||||
console.error("Error accessing leftFrame:", e);
|
||||
alert("필터를 적용할 수 없습니다. 프레임 구조를 확인해주세요.");
|
||||
}
|
||||
}
|
||||
|
||||
// 필터 초기화 함수
|
||||
function fn_resetFilter() {
|
||||
$("#filterPartType").val("");
|
||||
$("#filterPartNo").val("");
|
||||
$("#filterPartName").val("");
|
||||
$("#filterVersion").val("");
|
||||
|
||||
// leftFrame의 필터 초기화 함수 호출
|
||||
if(parent.frames['leftFrame'] && parent.frames['leftFrame'].fn_resetFilter) {
|
||||
parent.frames['leftFrame'].fn_resetFilter();
|
||||
try {
|
||||
// 프레임 구조: parent(headerFs) -> parent(main) -> frames[1](bottomFs) -> frames[0](leftFrame)
|
||||
var leftFrame = parent.parent.frames[1].frames['leftFrame'];
|
||||
|
||||
if(leftFrame && leftFrame.fn_resetFilter) {
|
||||
leftFrame.fn_resetFilter();
|
||||
}
|
||||
} catch(e) {
|
||||
console.error("Error accessing leftFrame:", e);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -172,17 +98,6 @@ function fn_resetFilter() {
|
||||
<div id="plmSearchZon">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="filterPartType">제품구분</label></td>
|
||||
<td>
|
||||
<select id="filterPartType" name="filterPartType" style="width:170px">
|
||||
<option value="">선택</option>
|
||||
<option value="완제품">완제품</option>
|
||||
<option value="반제품">반제품</option>
|
||||
<option value="구매품">구매품</option>
|
||||
<option value="자재">자재</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td class="label"><label for="filterPartNo">품번</label></td>
|
||||
<td>
|
||||
<input type="text" id="filterPartNo" name="filterPartNo">
|
||||
@@ -193,11 +108,6 @@ function fn_resetFilter() {
|
||||
<input type="text" id="filterPartName" name="filterPartName">
|
||||
</td>
|
||||
|
||||
<td class="label"><label for="filterVersion">Version</label></td>
|
||||
<td>
|
||||
<input type="text" id="filterVersion" name="filterVersion">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<button type="button" class="plm_btns" onclick="fn_applyFilter()">검색</button>
|
||||
<button type="button" class="plm_btns" onclick="fn_resetFilter()">초기화</button>
|
||||
@@ -205,27 +115,6 @@ function fn_resetFilter() {
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- CSV Upload Section -->
|
||||
<div style="margin: 0 8px; max-width: 800px;">
|
||||
<div id="partExcelPopupFormWrap">
|
||||
<div class="form_popup_title" style="position:relative;"> CSV upload<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span></div>
|
||||
<div id="excelUploadPopupForm">
|
||||
<div class="fileDnDWrap">
|
||||
<div id="csvUploadDropZone" class="dropzone" style="height:50px;">Drag & Drop 엑셀 템플릿</div>
|
||||
<div id="csvImportList">
|
||||
<table id="csvImportTable" class="excelUploadPopupForm">
|
||||
<thead>
|
||||
<tr><td colspan="3">CSV 첨부파일</td></tr>
|
||||
</thead>
|
||||
<tbody id="csvImportArea">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -875,6 +875,14 @@ public class PartMngController {
|
||||
|
||||
@RequestMapping("/partMng/structureHeaderPopup.do")
|
||||
public String structureHeaderPopup(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
Map code_map = new HashMap();
|
||||
try {
|
||||
// 제품구분 (PART_TYPE)
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.nullToEmpty((String)paramMap.get("product")),"common.getCodeselect"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
request.setAttribute("code_map", code_map);
|
||||
return "/partMng/structurePopupTop";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user