From a2b1405d2bceaf25a06c02fad30d5e16dfdcc57c Mon Sep 17 00:00:00 2001 From: hjjeong Date: Thu, 26 Mar 2026 11:18:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=81=EC=97=85=EA=B4=80=EB=A6=AC=5F?= =?UTF-8?q?=EA=B2=AC=EC=A0=81=EA=B4=80=EB=A6=AC=20pdf=20=EC=B2=A8=EB=B6=80?= =?UTF-8?q?=20=EA=B0=80=EB=8A=A5=ED=95=9C=20=EC=B6=94=EA=B0=80=EA=B2=AC?= =?UTF-8?q?=EC=A0=81=20=EC=BB=AC=EB=9F=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/contractMgmt/addEstimatePdfPopup.jsp | 150 ++++++++++++ .../view/contractMgmt/estimateList_new.jsp | 27 ++- .../controller/ContractMgmtController.java | 8 + src/com/pms/salesmgmt/mapper/contractMgmt.xml | 226 ++++++++++++++---- 4 files changed, 356 insertions(+), 55 deletions(-) create mode 100644 WebContent/WEB-INF/view/contractMgmt/addEstimatePdfPopup.jsp diff --git a/WebContent/WEB-INF/view/contractMgmt/addEstimatePdfPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/addEstimatePdfPopup.jsp new file mode 100644 index 0000000..8661349 --- /dev/null +++ b/WebContent/WEB-INF/view/contractMgmt/addEstimatePdfPopup.jsp @@ -0,0 +1,150 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.pms.common.utils.*"%> +<%@ page import="java.util.*" %> +<%@include file= "/init.jsp" %> + + + + +<%=Constants.SYSTEM_NAME%> + + + + +
+
+
+

추가견적 PDF 첨부

+
+
+ + + + + +
PDF 파일 +
+

* PDF 파일만 첨부 가능합니다. (추후 메일 발송 시 견적서 PDF와 합쳐 발송될 예정입니다)

+
+ Drag & Drop PDF Files Here +
+
+ + +
+
+
+ + + + + + + + + + + + + + + + +
No파일명등록일Size
+
+
+
+
+
+
+ +
+
+
+
+
+ + diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp index a7a0369..8ac36df 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp @@ -414,7 +414,22 @@ var columns = [ var objid = fnc_checkNull(cell.getData().OBJID); fn_showEstimateList(objid); } - }, + }, + // 11-1. 추가견적 PDF 첨부 + {headerHozAlign : 'center', hozAlign : 'center', minWidth: 55, widthGrow: 0.7, title : '추가견적', field : 'ADD_EST_CNT', + formatter: function(cell, formatterParams, onRendered){ + var cnt = fnc_checkNull(cell.getValue()); + var icon = '📎'; + if(cnt !== '' && parseInt(cnt) > 0){ + return icon + ' ' + cnt + ''; + } + return icon; + }, + cellClick:function(e, cell){ + var objid = fnc_checkNull(cell.getData().OBJID); + fn_openAddEstimatePdf(objid); + } + }, // 12. 아마란스 결재상태 (hidden) {title:'AMARANTH_STATUS', field:'AMARANTH_STATUS', visible: false}, // 13. 결재상태 (아마란스 전자결재) @@ -556,7 +571,7 @@ function fn_search(){ console.log("품목 검색 조건 설정됨:", partObjId); } - _tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/contractMgmt/contractGridList.do", columns, true); + _tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/contractMgmt/estimateGridList.do", columns, true); } function _fnc_datepick(){ @@ -635,6 +650,14 @@ function fn_delete(){ } +// 추가견적 PDF 첨부 팝업 +function fn_openAddEstimatePdf(objId){ + var popup_width = 700; + var popup_height = 400; + var url = '/contractMgmt/addEstimatePdfPopup.do?targetObjId=' + objId; + fn_centerPopup(popup_width, popup_height, url); +} + function fn_FileRegist(objId, docType, docTypeName){ var popup_width = 800; var popup_height = 300; diff --git a/src/com/pms/salesmgmt/controller/ContractMgmtController.java b/src/com/pms/salesmgmt/controller/ContractMgmtController.java index 2854520..bcfc7e5 100644 --- a/src/com/pms/salesmgmt/controller/ContractMgmtController.java +++ b/src/com/pms/salesmgmt/controller/ContractMgmtController.java @@ -2899,6 +2899,14 @@ public class ContractMgmtController { request.setAttribute("docTypeName", CommonUtils.checkNull(paramMap.get("docTypeName"))); return "/contractMgmt/FileRegistPopup"; } + + /** + * 추가견적 PDF 첨부 팝업 + */ + @RequestMapping("/contractMgmt/addEstimatePdfPopup.do") + public String addEstimatePdfPopup(HttpServletRequest request, @RequestParam Map paramMap){ + return "/contractMgmt/addEstimatePdfPopup"; + } /** * 영업정보의 품목 목록 조회 (견적서 작성 시 사용) diff --git a/src/com/pms/salesmgmt/mapper/contractMgmt.xml b/src/com/pms/salesmgmt/mapper/contractMgmt.xml index d680e10..a57a65f 100644 --- a/src/com/pms/salesmgmt/mapper/contractMgmt.xml +++ b/src/com/pms/salesmgmt/mapper/contractMgmt.xml @@ -739,6 +739,8 @@ AND CANCEL_QTY != '' AND CANCEL_QTY != '0' ) AS CANCEL_QTY_SUM + -- 추가견적 PDF 첨부 건수 + ,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.OBJID AND DOC_TYPE = 'estimate02' AND UPPER(STATUS) = 'ACTIVE') AS ADD_EST_CNT FROM CONTRACT_MGMT AS T LEFT OUTER JOIN @@ -1014,9 +1016,134 @@ AND COALESCE(IS_DIRECT_ORDER, 'N') != 'Y' - ORDER BY REGDATE DESC + ORDER BY REGDATE DESC + + + @@ -3302,13 +3422,13 @@ SELECT , #{qty } , #{warranty } - , #{product_price }::NUMERIC + , #{product_price }::NUMERIC - , #{other_price }::NUMERIC + , #{other_price }::NUMERIC - , #{total_price }::NUMERIC + , #{total_price }::NUMERIC , #{contract_user_id } , #{contract_date } @@ -3317,20 +3437,20 @@ SELECT , #{contract_office_no} , #{contract_fax_no } - ,#{est_release_date} + ,#{est_release_date} , NOW() , #{userId} ,(SELECT TO_CHAR(NOW(),'yy')::VARCHAR ||'E-'||LPAD((SELECT NEXTVAL('estimate_mgmt_seq'))::VARCHAR ,4,'0')) - ,#{contract_product_price}::NUMERIC + ,#{contract_product_price}::NUMERIC ,#{sale} ,#{final_total_price}::NUMERIC ,#{contract_type} ,#{note} - ,#{cus_request_date} + ,#{cus_request_date} ,#{delivery_place} ,#{product_code}