diff --git a/WebContent/WEB-INF/view/inventoryMng/inventoryMngNewList.jsp b/WebContent/WEB-INF/view/inventoryMng/inventoryMngNewList.jsp index 804b9bc..26cbc08 100644 --- a/WebContent/WEB-INF/view/inventoryMng/inventoryMngNewList.jsp +++ b/WebContent/WEB-INF/view/inventoryMng/inventoryMngNewList.jsp @@ -48,6 +48,9 @@ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#part_no", "#part_name", "#search_part_objid"); + //엔터키로 조회 $("input").keyup(function(e){ if(e.keyCode == 13){ @@ -369,10 +372,19 @@ function fn_move(){ - + + + + - + + + diff --git a/WebContent/WEB-INF/view/inventoryMng/materialRequestList.jsp b/WebContent/WEB-INF/view/inventoryMng/materialRequestList.jsp index 749aae5..de43290 100644 --- a/WebContent/WEB-INF/view/inventoryMng/materialRequestList.jsp +++ b/WebContent/WEB-INF/view/inventoryMng/materialRequestList.jsp @@ -24,6 +24,9 @@ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#part_no", "#part_name", "#search_part_objid"); + //엔터키로 조회 $("input").keyup(function(e){ if(e.keyCode == 13){ @@ -379,10 +382,19 @@ --%> - + + + + - + + + diff --git a/WebContent/WEB-INF/view/partMng/partMngHisList.jsp b/WebContent/WEB-INF/view/partMng/partMngHisList.jsp index 770d0bf..cfa647a 100644 --- a/WebContent/WEB-INF/view/partMng/partMngHisList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngHisList.jsp @@ -20,6 +20,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#part_no", "#part_name", "#search_part_objid"); + //fnc_getCodeListAppend("CUST_CD","CUSTOMER_CD","${param.CUSTOMER_CD}"); //$("#Year").val("${sysYear}"); @@ -149,10 +152,19 @@ function fn_partMngHisDetail(objId){ - + + + + - + + + diff --git a/WebContent/WEB-INF/view/partMng/partMngList.jsp b/WebContent/WEB-INF/view/partMng/partMngList.jsp index dc5d79c..8ca08cd 100644 --- a/WebContent/WEB-INF/view/partMng/partMngList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngList.jsp @@ -101,6 +101,9 @@ String connector = person.getUserId(); } $('.select2').select2(); + + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#SEARCH_PART_NO", "#SEARCH_PART_NAME", "#SEARCH_PART_OBJID"); //첨부팝업 $(".File").click(function(){ @@ -513,14 +516,19 @@ String connector = person.getUserId(); - - - - - - - - + + + + + + + + + diff --git a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp index 6357c4f..6218ccc 100644 --- a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp @@ -91,6 +91,9 @@ ui-jqgrid tr.jqgrow td { $('.select2').select2(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#SEARCH_PART_NO", "#SEARCH_PART_NAME", "#SEARCH_PART_OBJID"); + fn_search(); @@ -610,14 +613,19 @@ ui-jqgrid tr.jqgrow td { --> - - - - - - - - + + + + + + + + +
- + +
- +
diff --git a/WebContent/WEB-INF/view/project/projectMgmtWbsList3.jsp b/WebContent/WEB-INF/view/project/projectMgmtWbsList3.jsp index 68ae4b7..db85cf9 100644 --- a/WebContent/WEB-INF/view/project/projectMgmtWbsList3.jsp +++ b/WebContent/WEB-INF/view/project/projectMgmtWbsList3.jsp @@ -53,6 +53,9 @@ String connector = person.getUserId(); $(document).ready(function(){ $('.select2').select2(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#product_item_code", "#product_item_name", "#search_part_objid"); + // 요청납기일 datepicker 적용 $('#contract_start_date, #contract_end_date').datepicker({ changeMonth: true, @@ -279,12 +282,17 @@ function openProjectFormPopUp(objId){ - + + - + diff --git a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp index 1983352..f5c0ab7 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp @@ -48,6 +48,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#SEARCH_PART_NO", "#SEARCH_PART_NAME", "#SEARCH_PART_OBJID"); + $("input").keyup(function(e){ if(e.keyCode == 13){ $("#page").val("1"); @@ -484,7 +487,9 @@ function fn_purchaseClose(){ - + @@ -516,7 +521,12 @@ function fn_purchaseClose(){ - + + + + diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp index 70bcdc1..5315041 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp @@ -42,6 +42,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#SEARCH_PART_NO", "#SEARCH_PART_NAME", "#SEARCH_PART_OBJID"); + //조회 @@ -872,12 +875,17 @@ function fn_openMailFormPopup(purchaseOrderObjId){ - + + - + <%-- 발주부품, 발주구분 주석처리 diff --git a/WebContent/WEB-INF/view/quality/customerCsList.jsp b/WebContent/WEB-INF/view/quality/customerCsList.jsp index b92221f..365eef8 100644 --- a/WebContent/WEB-INF/view/quality/customerCsList.jsp +++ b/WebContent/WEB-INF/view/quality/customerCsList.jsp @@ -36,6 +36,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#search_product_no", "#search_product_name", "#search_product_objid"); + $("input").keyup(function(e){ if(e.keyCode == 13){ $("#page").val("1"); @@ -276,9 +279,18 @@ function fn_FileRegist(objId, docType, docTypeName){ --> - + + + + - + + + diff --git a/WebContent/WEB-INF/view/quality/incomingInspectionList.jsp b/WebContent/WEB-INF/view/quality/incomingInspectionList.jsp index f2a1933..2d0aa2a 100644 --- a/WebContent/WEB-INF/view/quality/incomingInspectionList.jsp +++ b/WebContent/WEB-INF/view/quality/incomingInspectionList.jsp @@ -58,6 +58,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#search_part_no", "#search_part_name", "#search_part_objid"); + $("input").keyup(function(e){ if(e.keyCode == 13){ $("#page").val("1"); @@ -239,10 +242,19 @@ function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){ - + + + + - + + + diff --git a/WebContent/WEB-INF/view/quality/incomingInspectionProgressList.jsp b/WebContent/WEB-INF/view/quality/incomingInspectionProgressList.jsp index d754792..2c97133 100644 --- a/WebContent/WEB-INF/view/quality/incomingInspectionProgressList.jsp +++ b/WebContent/WEB-INF/view/quality/incomingInspectionProgressList.jsp @@ -58,6 +58,9 @@ $(document).ready(function(){ $('.select2').select2(); fnc_datepick(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#search_part_no", "#search_part_name", "#search_part_objid"); + $("input").keyup(function(e){ if(e.keyCode == 13){ $("#page").val("1"); @@ -300,10 +303,19 @@ function fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS){ - + + + + - + + + diff --git a/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp b/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp index bd82fb0..edf6190 100644 --- a/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp +++ b/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp @@ -45,6 +45,9 @@ String menuName = CommonUtils.getMenuName(menuObjId, "구매관리_구매요청 $(document).ready(function(){ $('.select2').select2(); + // 품번/품명 Select2 AJAX 초기화 + initPartSelect2Ajax("#SEARCH_PART_NO", "#SEARCH_PART_NAME", "#SEARCH_PART_OBJID"); + $("input[type=text]").keyup(function(e){ if(e.keyCode == 13){ $("#btnSearch").trigger("click"); @@ -710,20 +713,25 @@ function fn_executeCreateProposal(salesRequestObjid, targetParts) { --> - <%-- 품번 활성화 --%> - - - - - - - <%-- 품명 활성화 --%> - - - - - - + <%-- 품번 활성화 --%> + + + + + + + + <%-- 품명 활성화 --%> + + + + + + <%-- 상태 주석처리 diff --git a/src/com/pms/service/PurchaseOrderService.java b/src/com/pms/service/PurchaseOrderService.java index 69f4580..cf43668 100644 --- a/src/com/pms/service/PurchaseOrderService.java +++ b/src/com/pms/service/PurchaseOrderService.java @@ -2955,7 +2955,6 @@ public class PurchaseOrderService { try { String targetObjId = CommonUtils.checkNull(paramMap.get("objId")); - String pdfSessionId = CommonUtils.checkNull(paramMap.get("pdfSessionId")); // PDF 세션 ID 추가 String toEmails = CommonUtils.checkNull(paramMap.get("toEmails")); String ccEmails = CommonUtils.checkNull(paramMap.get("ccEmails")); String subject = CommonUtils.checkNull(paramMap.get("subject")); @@ -2988,7 +2987,9 @@ public class PurchaseOrderService { Calendar cal = Calendar.getInstance(); String todayKor = frm.format(cal.getTime()); String poNo = CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO")); + String excelName = "발주서_" + poNo + "_" + todayKor + ".xls"; String zipName = "도면_" + poNo + "_" + todayKor + ".zip"; + masterInfo.put("EXCELFILE_NAME", excelName); masterInfo.put("APPR_COMPLETE_DATE", frm2.format(cal.getTime())); // 발주서 테이블 내용 생성 @@ -3028,30 +3029,11 @@ public class PurchaseOrderService { // 첨부파일 목록 생성 ArrayList attachFileList = new ArrayList(); - // 1. 발주서 PDF 파일 첨부 - if(!"".equals(pdfSessionId)) { - File pdfFile = getPdfFromSession(pdfSessionId, poNo); - if(pdfFile != null && pdfFile.exists()) { - HashMap pdfFileMap = new HashMap(); - pdfFileMap.put(Constants.Db.COL_FILE_REAL_NAME, pdfFile.getName()); - pdfFileMap.put(Constants.Db.COL_FILE_SAVED_NAME, pdfFile.getName()); - pdfFileMap.put(Constants.Db.COL_FILE_PATH, pdfFile.getParent()); - attachFileList.add(pdfFileMap); - System.out.println("발주서 PDF 파일 첨부 완료: " + pdfFile.getAbsolutePath()); - } else { - System.out.println("발주서 PDF 파일을 찾을 수 없습니다: " + pdfSessionId); - } - } - - /* 엑셀 첨부 주석처리 - PDF로 대체 // 1. 발주서 엑셀 파일 첨부 - String excelName = "발주서_" + poNo + "_" + todayKor + ".xls"; - masterInfo.put("EXCELFILE_NAME", excelName); HashMap excelFile = this.makeMailAttachFileOrderSheet(masterInfo, contents_table); if(excelFile != null) { attachFileList.add(excelFile); } - */ // 2. 도면 파일 압축 첨부 if(partFileList != null && partFileList.size() > 0) { @@ -3061,7 +3043,7 @@ public class PurchaseOrderService { hm.put(Constants.Db.COL_FILE_REAL_NAME, zf.getName()); hm.put(Constants.Db.COL_FILE_SAVED_NAME, zf.getName()); // 파일 경로에서 파일명을 제거하고 디렉토리 경로만 추출 (OS 독립적) - hm.put(Constants.Db.COL_FILE_PATH, zf.getParent()); + hm.put(Constants.Db.COL_FILE_PATH, zf.getParent()); attachFileList.add(hm); } } @@ -3076,8 +3058,7 @@ public class PurchaseOrderService { fromUser = CommonUtils.checkNull((String)masterInfo.get("WRITER")); } - // 구매팀 계정(PURCHASE) 사용 - boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER", Constants.Mail.ACCOUNT_TYPE_PURCHASE); + boolean sendResult = MailUtil.sendMailWithAttachFile(fromUser, fromEmail, toUserIdList, toEmailList, ccEmailList, null, null, subject, mailContents, attachFileList, "PURCHASE_ORDER"); if(sendResult) { // 메일 발송 성공 시 DB 업데이트 @@ -3138,7 +3119,6 @@ public class PurchaseOrderService { sb.append(userContents.replace("\n", "
")); sb.append(""); - /* 발주서 테이블 본문 표시 주석처리 - PDF 첨부로 대체 // 구분선 sb.append("
"); @@ -3147,7 +3127,6 @@ public class PurchaseOrderService { sb.append("

[ 발주서 상세 ]

"); sb.append(poContentsTable); sb.append(""); - */ sb.append("
※발신전용 메일입니다.
"); sb.append(""); @@ -3198,45 +3177,4 @@ public class PurchaseOrderService { } return resultMap; } - - /** - * 세션 ID로 저장된 PDF 파일 가져오기 - * @param sessionId PDF 세션 ID - * @param poNo 발주번호 (파일명에 사용) - * @return PDF 파일 - */ - private File getPdfFromSession(String sessionId, String poNo) { - try { - String tempDir = System.getProperty("java.io.tmpdir"); - File pdfFile = new File(tempDir + File.separator + sessionId + ".pdf"); - - if(pdfFile.exists()) { - // 발주번호로 파일명 변경 - if("".equals(poNo)) poNo = "발주서"; - - java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyyMMddHHmmss"); - String timestamp = sdf.format(new java.util.Date()); - String newFileName = "발주서_" + poNo + "_" + timestamp + ".pdf"; - File renamedFile = new File(tempDir + File.separator + newFileName); - - // 파일 복사 - java.nio.file.Files.copy(pdfFile.toPath(), renamedFile.toPath(), - java.nio.file.StandardCopyOption.REPLACE_EXISTING); - - renamedFile.deleteOnExit(); - - // 원본 파일 삭제 - pdfFile.delete(); - - return renamedFile; - } - - return null; - - } catch(Exception e) { - System.out.println("PDF 파일 가져오기 중 오류: " + e.getMessage()); - e.printStackTrace(); - return null; - } - } }