diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp
index d11038c..21a8a16 100644
--- a/WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp
+++ b/WebContent/WEB-INF/view/contractMgmt/estimateRegistFormPopup.jsp
@@ -971,14 +971,14 @@
- |
-
-
- |
+ |
+
+
+ |
|
diff --git a/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp b/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp
index d5f639f..d40aa65 100644
--- a/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp
+++ b/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp
@@ -130,44 +130,31 @@ var columns = [
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '수량', field : 'QUANTITY' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '요청납기', field : 'DUE_DATE' },
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '고객요청사항', field : 'CUSTOMER_REQUEST' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '견적현황', field : 'EST_STATUS',
+ {headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '수주상태', field : 'CONTRACT_RESULT_NAME' },
+
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주번호', field : 'PO_NO' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주일', field : 'ORDER_DATE' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '주문서첨부', field : 'CU01_CNT' ,
formatter:fnc_subInfoValueFormatter,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().OBJID);
- fn_showEstimateList(objid);
- }
+ fn_FileRegist(objid,"ORDER_DOC","ORDER_DOC");
+ }
},
- {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '결재상태', field : 'APPR_STATUS',
- formatter:fnc_createGridAnchorTag,
- cellClick:function(e, cell){
- var APPROVAL_OBJID = fnc_checkNull(cell.getData().APPROVAL_OBJID);
- var ROUTE_OBJID = fnc_checkNull(cell.getData().ROUTE_OBJID);
- approval_form(APPROVAL_OBJID,ROUTE_OBJID);
- }
- },
- {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '메일발송', field : 'MAIL_SEND_STATUS',
- formatter: function(cell, formatterParams, onRendered){
- var status = fnc_checkNull(cell.getValue());
- var sendDate = fnc_checkNull(cell.getData().MAIL_SEND_DATE);
- if(status === 'Y'){
- return '발송완료';
- } else if(status === 'N'){
- return '발송실패';
- } else {
- return '미발송';
- }
-// if(status === 'Y'){
-// return '발송완료 ' + sendDate + '';
-// } else if(status === 'N'){
-// return '발송실패 ' + sendDate + '';
-// } else {
-// return '미발송';
-// }
- }
- },
- {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '견적단가', field : 'EST_PRICE' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '견적공급가액', field : 'EST_SUPPLY_PRICE' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '단가', field : 'ORDER_UNIT_PRICE',
+ formatter:"money", formatterParams:{thousand:",", symbolAfter:"", precision:false,},
+ },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '공급가액', field : 'ORDER_SUPPLY_PRICE',
+ formatter:"money", formatterParams:{thousand:",", symbolAfter:"", precision:false,},
+ },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '부가세', field : 'ORDER_VAT',
+ formatter:"money", formatterParams:{thousand:",", symbolAfter:"", precision:false,},
+ },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '총액', field : 'ORDER_TOTAL_AMOUNT',
+ formatter:"money", formatterParams:{thousand:",", symbolAfter:"", precision:false,},
+ },
+
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환종', field : 'CONTRACT_CURRENCY_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환율', field : 'EXCHANGE_RATE' },
];
@@ -241,13 +228,13 @@ function approval_form(APPROVAL_OBJID,ROUTE_OBJID){
function fn_FileRegist(objId, docType, docTypeName){
var popup_width = 800;
- var popup_height = 300;
+ var popup_height = 350;
var objId = objId;
var docType = docType;
var docTypeName = docTypeName;
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
- var url = "/projectConcept/FileRegistPopup.do"+params;
+ var url = "/common/FileRegistPopup.do"+params;
fn_centerPopup(popup_width, popup_height, url);
}
@@ -613,9 +600,9 @@ function openProjectFormPopUp(objId){
|
- |
+ |
- |
- ~
-
+ ~
+
|
diff --git a/database/add_order_columns.sql b/database/add_order_columns.sql
new file mode 100644
index 0000000..f6f8af3
--- /dev/null
+++ b/database/add_order_columns.sql
@@ -0,0 +1,34 @@
+-- CONTRACT_MGMT 테이블에 수주 관련 컬럼 추가
+-- 기존 컬럼 활용:
+-- - 수주상태: contract_result (기존 컬럼 사용)
+-- - 환종: contract_currency (기존 컬럼 사용)
+-- - 환율: exchange_rate (기존 컬럼 사용)
+-- - 발주번호: po_no (기존 컬럼 사용)
+
+-- 수주 관련 신규 컬럼들
+ALTER TABLE public.contract_mgmt ADD COLUMN IF NOT EXISTS order_date VARCHAR(50);
+ALTER TABLE public.contract_mgmt ADD COLUMN IF NOT EXISTS order_unit_price NUMERIC(15,2);
+ALTER TABLE public.contract_mgmt ADD COLUMN IF NOT EXISTS order_supply_price NUMERIC(15,2);
+ALTER TABLE public.contract_mgmt ADD COLUMN IF NOT EXISTS order_vat NUMERIC(15,2);
+ALTER TABLE public.contract_mgmt ADD COLUMN IF NOT EXISTS order_total_amount NUMERIC(15,2);
+
+-- 컬럼 코멘트 추가
+COMMENT ON COLUMN public.contract_mgmt.contract_result IS '영업진행상태 / 수주상태';
+COMMENT ON COLUMN public.contract_mgmt.po_no IS '발주번호';
+COMMENT ON COLUMN public.contract_mgmt.order_date IS '발주일';
+COMMENT ON COLUMN public.contract_mgmt.order_unit_price IS '수주 단가';
+COMMENT ON COLUMN public.contract_mgmt.order_supply_price IS '수주 공급가액';
+COMMENT ON COLUMN public.contract_mgmt.order_vat IS '수주 부가세';
+COMMENT ON COLUMN public.contract_mgmt.order_total_amount IS '수주 총액';
+COMMENT ON COLUMN public.contract_mgmt.contract_currency IS '견적/수주 환종';
+COMMENT ON COLUMN public.contract_mgmt.exchange_rate IS '견적/수주 환율';
+
+-- 인덱스 추가 (선택사항)
+CREATE INDEX IF NOT EXISTS idx_contract_result ON public.contract_mgmt(contract_result);
+CREATE INDEX IF NOT EXISTS idx_contract_order_date ON public.contract_mgmt(order_date);
+
+-- 조회 예시
+-- SELECT objid, contract_no, contract_result, po_no, order_date, order_total_amount, contract_currency, exchange_rate
+-- FROM public.contract_mgmt
+-- WHERE contract_result IS NOT NULL;
+
diff --git a/database/estimate_template_tables.sql b/database/estimate_template_tables.sql
index 140f6df..50c88e5 100644
--- a/database/estimate_template_tables.sql
+++ b/database/estimate_template_tables.sql
@@ -2,8 +2,8 @@
-- 1. 견적서 템플릿 메인 테이블
CREATE TABLE IF NOT EXISTS ESTIMATE_TEMPLATE (
- OBJID SERIAL PRIMARY KEY,
- CONTRACT_OBJID NUMERIC NOT NULL, -- CONTRACT_MGMT 테이블의 OBJID 참조
+ OBJID VARCHAR(50) PRIMARY KEY,
+ CONTRACT_OBJID VARCHAR(50) NOT NULL, -- CONTRACT_MGMT 테이블의 OBJID 참조
TEMPLATE_TYPE VARCHAR(10) NOT NULL, -- '1': 일반 견적서, '2': 장비 견적서
-- 일반 견적서 필드 (Template 1)
@@ -17,6 +17,8 @@ CREATE TABLE IF NOT EXISTS ESTIMATE_TEMPLATE (
MODEL_NAME VARCHAR(200), -- 설비 Model 품명
MODEL_CODE VARCHAR(100), -- 설비 Model 코드
EXECUTOR_DATE VARCHAR(50), -- 시행일자
+ NOTES_CONTENT TEXT, -- 비고 내용 (전체)
+ VALIDITY_PERIOD VARCHAR(50), -- 견적 유효기간
-- 비고 필드 (공통)
NOTE1 VARCHAR(500),
@@ -50,7 +52,7 @@ COMMENT ON COLUMN ESTIMATE_TEMPLATE.TEMPLATE_TYPE IS '템플릿 타입 (1:일반
-- 2. 견적서 템플릿 품목 테이블
CREATE TABLE IF NOT EXISTS ESTIMATE_TEMPLATE_ITEM (
OBJID SERIAL PRIMARY KEY,
- TEMPLATE_OBJID NUMERIC NOT NULL, -- ESTIMATE_TEMPLATE 테이블의 OBJID 참조
+ TEMPLATE_OBJID VARCHAR(50) NOT NULL, -- ESTIMATE_TEMPLATE 테이블의 OBJID 참조
SEQ INTEGER NOT NULL, -- 순번
CATEGORY VARCHAR(100), -- 카테고리 (장비 견적서용)
DESCRIPTION VARCHAR(500), -- 품명
diff --git a/src/com/pms/salesmgmt/mapper/contractMgmt.xml b/src/com/pms/salesmgmt/mapper/contractMgmt.xml
index 209f229..08e3dfb 100644
--- a/src/com/pms/salesmgmt/mapper/contractMgmt.xml
+++ b/src/com/pms/salesmgmt/mapper/contractMgmt.xml
@@ -500,6 +500,11 @@
,EXCHANGE_RATE
,EST_PRICE
,EST_SUPPLY_PRICE
+ ,ORDER_DATE
+ ,ORDER_UNIT_PRICE
+ ,ORDER_SUPPLY_PRICE
+ ,ORDER_VAT
+ ,ORDER_TOTAL_AMOUNT
,(SELECT COUNT(1) FROM ESTIMATE_TEMPLATE WHERE CONTRACT_OBJID = T.OBJID) AS EST_STATUS
,(
SELECT IS_SEND
@@ -718,6 +723,13 @@