diff --git a/WebContent/WEB-INF/classes/com/pms/mapper/approval.xml b/WebContent/WEB-INF/classes/com/pms/mapper/approval.xml index 1bd8665..55bafb9 100644 --- a/WebContent/WEB-INF/classes/com/pms/mapper/approval.xml +++ b/WebContent/WEB-INF/classes/com/pms/mapper/approval.xml @@ -587,4 +587,23 @@ T2.SEQ ASC + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/classes/com/pms/mapper/project.xml b/WebContent/WEB-INF/classes/com/pms/mapper/project.xml index 5e3d0a9..fc258ed 100644 --- a/WebContent/WEB-INF/classes/com/pms/mapper/project.xml +++ b/WebContent/WEB-INF/classes/com/pms/mapper/project.xml @@ -7484,6 +7484,7 @@ SELECT WHEN 'C/T' THEN 'CT' WHEN 'A/C' THEN 'AC' WHEN 'W/M' THEN 'WM' + WHEN '기타' THEN '기타' ELSE REPLACE(CODE_NAME(PRODUCT), '/', '') END || '-' || -- 날짜 (YYMMDD) @@ -7512,6 +7513,7 @@ SELECT WHEN 'C/T' THEN 'CT' WHEN 'A/C' THEN 'AC' WHEN 'W/M' THEN 'WM' + WHEN '기타' THEN '기타' ELSE REPLACE(CODE_NAME(PRODUCT), '/', '') END || '-' || TO_CHAR(CURRENT_DATE, 'YYMMDD') || '-%' diff --git a/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/contractMgmt.xml b/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/contractMgmt.xml index da75f8e..5c75f42 100644 --- a/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/contractMgmt.xml +++ b/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/contractMgmt.xml @@ -901,6 +901,10 @@ AND UPPER(PO_NO) LIKE UPPER('%${search_poNo}%') + + AND CONTRACT_CURRENCY = #{contract_currency} + + AND RECEIPT_DATE IS NOT NULL AND RECEIPT_DATE != '' @@ -1027,6 +1031,10 @@ AND UPPER(PO_NO) LIKE UPPER('%${search_poNo}%') + + AND CONTRACT_CURRENCY = #{contract_currency} + + AND TO_DATE(ORDER_DATE,'YYYY-MM-DD') = ]]> TO_DATE(#{order_start_date}, 'YYYY-MM-DD') @@ -4923,6 +4931,13 @@ WHERE WHERE OBJID = #{objId} + + + UPDATE CONTRACT_MGMT + SET CONTRACT_RESULT = #{contract_result} + WHERE OBJID = #{objId} + + UPDATE CONTRACT_MGMT @@ -5300,6 +5315,187 @@ WHERE SEQ + + + + + + INSERT INTO CONTRACT_ITEM ( diff --git a/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/salesNcollectMgmt.xml b/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/salesNcollectMgmt.xml index 27cd7b0..75c2847 100644 --- a/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/salesNcollectMgmt.xml +++ b/WebContent/WEB-INF/classes/com/pms/salesmgmt/mapper/salesNcollectMgmt.xml @@ -867,12 +867,7 @@ CODE_NAME(T.CONTRACT_RESULT) AS ORDER_STATUS, (SELECT CM.PO_NO FROM CONTRACT_MGMT CM WHERE CM.OBJID = T.CONTRACT_OBJID) AS PO_NO, COALESCE(T.CONTRACT_DATE, (SELECT CM.order_date FROM CONTRACT_MGMT CM WHERE CM.OBJID = T.CONTRACT_OBJID)) AS ORDER_DATE, - CASE WHEN EXISTS( - SELECT 1 FROM ATTACH_FILE_INFO - WHERE TARGET_OBJID = T.CONTRACT_OBJID - AND DOC_TYPE='ORDER_DOC' - AND UPPER(STATUS) = 'ACTIVE' - ) THEN 'Y' ELSE 'N' END AS ORDER_ATTACH, + (SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.CONTRACT_OBJID AND DOC_TYPE IN ('FTC_ORDER', 'ORDER', 'ORDER_DOC') AND UPPER(STATUS) = 'ACTIVE') AS CU01_CNT, (SELECT CM.PRODUCTION_STATUS FROM CONTRACT_MGMT CM WHERE CM.OBJID = T.CONTRACT_OBJID) AS PRODUCTION_STATUS, -- 판매 관련 필드들 (sales_registration 테이블에서 한 번에 가져오기) COALESCE(SR.shipping_order_status, '') AS SHIPPING_ORDER_STATUS, @@ -940,6 +935,8 @@ WHERE 1 = 1 AND T.PROJECT_NO IS NOT NULL AND T.PROJECT_NO != '' + /* 수주상태가 수주(FCST) 또는 수주일 때만 표시 - CODE_NAME으로 체크 */ + AND CODE_NAME(T.CONTRACT_RESULT) IN ('수주(FCST)', '수주') AND T.CATEGORY_CD = #{orderType} @@ -1063,6 +1060,10 @@ AND T.SALES_DEADLINE_DATE IS NOT NULL AND TO_DATE(T.SALES_DEADLINE_DATE, 'YYYY-MM-DD') TO_DATE(#{salesDeadlineTo}, 'YYYY-MM-DD') + + + AND SR.shipping_date IS NOT NULL + -- 등록일 기준 최신순 정렬 (프로젝트 번호는 보조 정렬) ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC @@ -1077,6 +1078,8 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC WHERE 1 = 1 AND T.PROJECT_NO IS NOT NULL AND T.PROJECT_NO != '' + /* 수주상태가 수주(FCST) 또는 수주일 때만 표시 */ + AND CODE_NAME(T.CONTRACT_RESULT) IN ('수주(FCST)', '수주') AND T.CATEGORY_CD = #{orderType} @@ -1212,77 +1215,75 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC AND T.SALES_DEADLINE_DATE IS NOT NULL AND TO_DATE(T.SALES_DEADLINE_DATE, 'YYYY-MM-DD') TO_DATE(#{salesDeadlineTo}, 'YYYY-MM-DD') + + + AND EXISTS ( + SELECT 1 FROM sales_registration SR + WHERE T.PROJECT_NO = SR.project_no + AND SR.shipping_date IS NOT NULL + ) + - + @@ -1821,7 +1822,8 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC SELECT COALESCE(SUM(sales_total_amount), 0) FROM shipment_log WHERE target_objid = #{projectNo} - ) + ), + shipping_order_status = '출하지시' WHERE sale_no = #{saleNo} @@ -1973,5 +1975,35 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC ORDER BY IsNo + + + diff --git a/WebContent/WEB-INF/view/approval/approvalDetailResultPopup.jsp b/WebContent/WEB-INF/view/approval/approvalDetailResultPopup.jsp index a1b2f3e..7794add 100644 --- a/WebContent/WEB-INF/view/approval/approvalDetailResultPopup.jsp +++ b/WebContent/WEB-INF/view/approval/approvalDetailResultPopup.jsp @@ -76,21 +76,28 @@ $(function(){ data: $("#form1").serialize(), dataType: 'json', beforeSend:function(){ - _startLoading("Loading"); - }, - complete:function(){ - _endLoading(); - }, + _startLoading("Loading"); + }, + complete:function(){ + _endLoading(); + }, success: function(result) { alert(result.msg); - /* - var refreshUrl = "/approval/approvalDetail.do?approvalObjId="+$("#approvalObjId").val()+"&routeObjId="+$("#routeObjId").val(); - //Swal.fire("refreshUrl : "+refreshUrl); - opener.document.location.href = refreshUrl; - */ - opener.openerReload(); - //top.opener.window.location.reload(); - self.close(0); + + // 결재 승인 완료 시 견적서 메일 팝업 자동 열기 + var resultVal = $("#result").val(); + var targetType = $("#targetType").val(); + + if(resultVal == "Y" && targetType == "CONTRACT_ESTIMATE") { + // 결재완료 여부 확인 후 메일 팝업 열기 + checkAndOpenMailPopup(function() { + opener.openerReload(); + self.close(0); + }); + } else { + opener.openerReload(); + self.close(0); + } }, error: function(jqxhr, status, error){ } @@ -272,6 +279,46 @@ function fn_check(){ } return true; } + +// 결재완료 확인 후 메일 팝업 열기 +function checkAndOpenMailPopup(callback) { + var approvalObjId = $("#approvalObjId").val(); + + // 결재완료 여부 확인 + $.ajax({ + url: "/approval/checkApprovalComplete.do", + method: 'post', + data: { approvalObjId: approvalObjId }, + dataType: 'json', + success: function(data) { + console.log("결재완료 확인 결과:", data); + + if(data.isComplete == "Y") { + // 결재완료 상태이면 메일 발송 여부 확인 + var contractObjId = data.contractObjId; + + if(contractObjId && confirm("결재가 완료되었습니다. 견적서 메일을 발송하시겠습니까?")) { + // 메일 팝업 열기 + var popup_width = 950; + var popup_height = 800; + var url = "/contractMgmt/estimateMailFormPopup.do?contractObjId=" + contractObjId; + window.open(url, "estimateMailForm", "width="+popup_width+",height="+popup_height+",menubar=no,scrollbars=yes,resizable=yes"); + } + } + + // 콜백 실행 (창 닫기 등) + if(typeof callback === 'function') { + callback(); + } + }, + error: function() { + console.log("결재완료 확인 실패"); + if(typeof callback === 'function') { + callback(); + } + } + }); +} diff --git a/WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp index f42b197..4a0a344 100644 --- a/WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp @@ -233,15 +233,15 @@ function fileDelete(fileObjId, areaId, fileType){ - - - No - 파일명 - 등록일 - Size - - - + + + No + 파일명 + 등록일 + Size + + + @@ -269,15 +269,15 @@ function fileDelete(fileObjId, areaId, fileType){ - - - No - 파일명 - 등록일 - Size - - - + + + No + 파일명 + 등록일 + Size + + + diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp index c4db9ca..76301f2 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateAndOrderRegistFormPopup.jsp @@ -324,19 +324,19 @@ html += ''; html += ''; - // 수주공급가액 (자동계산) + // 수주공급가액 (자동계산 + 수정가능) html += ''; - html += ''; + html += ''; html += ''; - // 수주부가세 (입력가능) + // 수주부가세 (자동계산 + 수정가능) html += ''; html += ''; html += ''; - // 수주총액 (자동계산) + // 수주총액 (자동계산 + 수정가능) html += ''; - html += ''; + html += ''; html += ''; // 삭제 버튼 @@ -367,16 +367,19 @@ this.style.height = (this.scrollHeight) + 'px'; }); - // 숫자만 입력 처리 - $("#" + itemId + " .item-order-quantity, #" + itemId + " .item-order-unit-price, #" + itemId + " .item-order-vat").on("keyup", function() { + // 숫자만 입력 처리 및 금액 계산 + $("#" + itemId + " .item-order-quantity, #" + itemId + " .item-order-unit-price, #" + itemId + " .item-order-supply-price, #" + itemId + " .item-order-vat, #" + itemId + " .item-order-total-amount").on("keyup", function() { $(this).val(addComma($(this).val().replace(/[^0-9]/g, ""))); // 수주 금액 계산 if($(this).hasClass("item-order-quantity") || $(this).hasClass("item-order-unit-price")) { fn_calculateItemAmount(itemId); + } else if($(this).hasClass("item-order-supply-price")) { + fn_calculateFromSupplyPrice(itemId); } else if($(this).hasClass("item-order-vat")) { fn_calculateTotalFromVat(itemId); } + // 총액 직접 수정시에는 재계산 안함 }); // 품목 정보 저장 @@ -527,13 +530,13 @@ html += ''; html += ''; html += ''; - html += ''; + html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; - html += ''; + html += ''; html += ''; html += ''; @@ -584,12 +587,14 @@ } }, 50); - // 숫자만 입력 처리 - $("#" + itemId + " .item-order-quantity, #" + itemId + " .item-order-unit-price, #" + itemId + " .item-order-vat").on("keyup", function() { + // 숫자만 입력 처리 및 금액 계산 + $("#" + itemId + " .item-order-quantity, #" + itemId + " .item-order-unit-price, #" + itemId + " .item-order-supply-price, #" + itemId + " .item-order-vat, #" + itemId + " .item-order-total-amount").on("keyup", function() { $(this).val(addComma($(this).val().replace(/[^0-9]/g, ""))); if($(this).hasClass("item-order-quantity") || $(this).hasClass("item-order-unit-price")) { fn_calculateItemAmount(itemId); + } else if($(this).hasClass("item-order-supply-price")) { + fn_calculateFromSupplyPrice(itemId); } else if($(this).hasClass("item-order-vat")) { fn_calculateTotalFromVat(itemId); } @@ -635,6 +640,19 @@ $("#" + itemId + " .item-order-total-amount").val(addComma(totalAmount)); } + // 공급가액 직접 입력 시 부가세와 총액 재계산 + function fn_calculateFromSupplyPrice(itemId) { + var supplyPrice = parseInt(removeComma($("#" + itemId + " .item-order-supply-price").val())) || 0; + + // 부가세 자동 계산 (공급가액의 10%) + var vat = Math.round(supplyPrice * 0.1); + $("#" + itemId + " .item-order-vat").val(addComma(vat)); + + // 총액 계산 + var totalAmount = supplyPrice + vat; + $("#" + itemId + " .item-order-total-amount").val(addComma(totalAmount)); + } + // 품번/품명 셀렉트박스 옵션 채우기 (Select2 AJAX) function fn_fillPartOptions(itemId, selectedObjId, savedPartNo, savedPartName) { var $partNoSelect = $("#PART_NO_" + itemId); diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp index 4445c88..318ec52 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateList_new.jsp @@ -196,7 +196,7 @@ $(document).ready(function(){ // 재오더 + 가격동일/인상 → 결재불필요 Swal.fire({ title: '결재 불필요', - text: '재오더(가격동일/인상)로 결재가 필요하지 않습니다. 결재불필요로 처리하시겠습니까?', + html: '재오더(가격동일/인상)로 결재가 필요하지 않습니다.
결재불필요로 처리하시겠습니까?

* 결재불필요 처리 후 메일발송이 가능합니다.', icon: 'info', showCancelButton: true, confirmButtonColor: '#3085d6', @@ -215,8 +215,19 @@ $(document).ready(function(){ dataType: "json", success: function(res) { if(res.result == "success") { - Swal.fire("결재불필요로 처리되었습니다."); - fn_search(); // 목록 새로고침 + Swal.fire({ + title: "결재불필요로 처리되었습니다.", + text: "메일발송을 진행하시겠습니까?", + icon: "success", + showCancelButton: true, + confirmButtonText: "메일발송", + cancelButtonText: "나중에" + }).then((mailResult) => { + fn_search(); // 목록 새로고침 + if(mailResult.isConfirmed) { + fn_openMailFormPopup(contractObjId); + } + }); } else { Swal.fire("오류: " + res.message); } @@ -229,35 +240,39 @@ $(document).ready(function(){ }); } else { // 신규수주 또는 가격인하 → 결재필요 - var confirmMsg = "결재상신 하시겠습니까?"; + var reasonText = ""; if(reason == "신규수주") { - confirmMsg = "신규수주입니다. 결재상신 하시겠습니까?"; + reasonText = "신규수주입니다."; } else if(reason == "가격인하") { - confirmMsg = "가격인하 건입니다. 결재상신 하시겠습니까?"; + reasonText = "가격인하 건입니다."; } - if(confirm(confirmMsg)){ - var objId = estObjId; - var title = encodeURIComponent(fnc_checkNull(selectedData[0].CONTRACT_NO)); - window.open("/approval/registApproval.do?targetType=CONTRACT_ESTIMATE&targetObjId="+objId+"&approvalTitle="+title,"registApproval","width=700,height=700"); - } + Swal.fire({ + title: '결재상신', + html: (reasonText ? reasonText + '
' : '') + '결재상신 하시겠습니까?

* 결재완료 후 메일발송이 가능합니다.', + icon: 'question', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: '결재상신', + cancelButtonText: '취소' + }).then((result) => { + if(result.isConfirmed) { + var objId = estObjId; + var title = encodeURIComponent(fnc_checkNull(selectedData[0].CONTRACT_NO)); + var approvalUrl = "/approval/registApproval.do?targetType=CONTRACT_ESTIMATE&targetObjId="+objId+"&approvalTitle="+title; + window.open(approvalUrl, "registApproval", "width=700,height=700"); + } + }); } } else { // API 오류 시 기존 방식으로 진행 - if(confirm("결재상신 하시겠습니까?")){ - var objId = estObjId; - var title = encodeURIComponent(fnc_checkNull(selectedData[0].CONTRACT_NO)); - window.open("/approval/registApproval.do?targetType=CONTRACT_ESTIMATE&targetObjId="+objId+"&approvalTitle="+title,"registApproval","width=700,height=700"); - } + fn_showApprovalConfirmSimple(estObjId, selectedData[0].CONTRACT_NO); } }, error: function() { // AJAX 오류 시 기존 방식으로 진행 - if(confirm("결재상신 하시겠습니까?")){ - var objId = estObjId; - var title = encodeURIComponent(fnc_checkNull(selectedData[0].CONTRACT_NO)); - window.open("/approval/registApproval.do?targetType=CONTRACT_ESTIMATE&targetObjId="+objId+"&approvalTitle="+title,"registApproval","width=700,height=700"); - } + fn_showApprovalConfirmSimple(estObjId, selectedData[0].CONTRACT_NO); } }); } @@ -295,6 +310,32 @@ $(document).ready(function(){ } }); + /* 품목별 가격비교 - 별도 메뉴로 이동 (주석처리) + $("#btnPriceCompare").click(function(){ + var selectedData = _tabulGrid.getSelectedData(); + if(selectedData.length < 1){ + Swal.fire("가격비교할 행을 선택해주십시오."); + return false; + } else if(selectedData.length > 1){ + Swal.fire("한번에 한개의 건만 조회 가능합니다."); + return false; + } else { + var objId = fnc_checkNull(selectedData[0].OBJID); + + if(objId == ""){ + Swal.fire("선택된 데이터가 올바르지 않습니다."); + return false; + } + + // 품목별 가격비교 팝업 열기 + var popup_width = 1200; + var popup_height = 600; + var url = "/contractMgmt/itemPriceComparePopup.do?objId=" + objId; + window.open(url, "itemPriceCompare", "width="+popup_width+",height="+popup_height+",menubar=no,scrollbars=yes,resizable=yes"); + } + }); + */ + fn_search(); }); @@ -327,8 +368,8 @@ var columns = [ {headerHozAlign : 'center', hozAlign : 'left', minWidth: 90, widthGrow: 1.5, title : '고객사', field : 'CUSTOMER_NAME' }, // 7. 유/무상 {headerHozAlign : 'center', hozAlign : 'center', minWidth: 45, widthGrow: 0.6, title : '유/무상', field : 'PAID_TYPE' }, - // 8. 품명 (품번으로 표시) - {headerHozAlign : 'center', hozAlign : 'left', minWidth: 90, widthGrow: 1.5, title : '품명', field : 'PART_NO' }, + // 8. 품명 (품명 외 N건 형식) + {headerHozAlign : 'center', hozAlign : 'left', minWidth: 120, widthGrow: 1.5, title : '품명', field : 'ITEM_SUMMARY' }, // 9. 요청납기 {headerHozAlign : 'center', hozAlign : 'center', minWidth: 75, widthGrow: 0.9, title : '요청납기', field : 'EARLIEST_DUE_DATE', formatter: function(cell, formatterParams, onRendered){ @@ -777,6 +818,26 @@ function fn_showSerialNoPopup(serialNoString){ }); } +// 결재상신 확인 다이얼로그 (단순 버전) +function fn_showApprovalConfirmSimple(estObjId, contractNo) { + Swal.fire({ + title: '결재상신', + html: '결재상신 하시겠습니까?

* 결재완료 후 메일발송이 가능합니다.', + icon: 'question', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: '결재상신', + cancelButtonText: '취소' + }).then((result) => { + if(result.isConfirmed) { + var title = encodeURIComponent(fnc_checkNull(contractNo)); + var approvalUrl = "/approval/registApproval.do?targetType=CONTRACT_ESTIMATE&targetObjId="+estObjId+"&approvalTitle="+title; + window.open(approvalUrl, "registApproval", "width=700,height=700"); + } + }); +} + // 메일 작성 팝업 열기 function fn_openMailFormPopup(contractObjId){ if(!contractObjId || contractObjId === ''){ @@ -952,12 +1013,13 @@ function openProjectFormPopUp(objId){
- - - - - + + + + + +
diff --git a/WebContent/WEB-INF/view/contractMgmt/itemPriceCompareList.jsp b/WebContent/WEB-INF/view/contractMgmt/itemPriceCompareList.jsp new file mode 100644 index 0000000..ad4e741 --- /dev/null +++ b/WebContent/WEB-INF/view/contractMgmt/itemPriceCompareList.jsp @@ -0,0 +1,349 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.pms.common.utils.*"%> +<%@ page import="java.util.*"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@include file="/init.jsp"%> + + + + +<%=Constants.SYSTEM_NAME%> + + + + + + + + +
+
+
+
+
+

+ 영업관리_품목별 가격비교 +

+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + ~ + +
+
+
+ + +
+
+

📋 견적 합계

+
-
+
0건
+
+
+

📝 수주 합계

+
-
+
0건
+
+
+

💰 판매 합계

+
-
+
0건
+
+
+ + +
+
+
+ +
+
+
+
+ + + diff --git a/WebContent/WEB-INF/view/contractMgmt/itemPriceComparePopup.jsp b/WebContent/WEB-INF/view/contractMgmt/itemPriceComparePopup.jsp new file mode 100644 index 0000000..b897421 --- /dev/null +++ b/WebContent/WEB-INF/view/contractMgmt/itemPriceComparePopup.jsp @@ -0,0 +1,373 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="com.pms.common.utils.*"%> +<%@ page import="java.util.*"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@include file="/init_new.jsp"%> +<% + PersonBean person = (PersonBean) session.getAttribute(Constants.PERSON_BEAN); + String userId = CommonUtils.checkNull(person.getUserId()); +%> + + + + +<%=Constants.SYSTEM_NAME%> - 품목별 가격 비교 + + + + + + + + diff --git a/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp b/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp index 9b88ad9..6b5be02 100644 --- a/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/orderMgmtList.jsp @@ -138,149 +138,111 @@ $(document).ready(function(){ var columns = [ // rowSelection 제거 - fnc_tabul_search의 showCheck 파라미터로 자동 추가됨 - {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '영업번호', field : 'CONTRACT_NO', frozen:true, + // 컬럼 순서: 영업번호, 주문유형, 제품구분, 국내/해외, 접수일, 고객사, 유/무상, 품명, 요청납기, 수주상태, 발주번호, 발주일, 주문서첨부, 수주공급가액, 수주부가세, 수주총액, 수주원화총액, 견적환종, 견적환율 + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 75, widthGrow: 1, title : '영업번호', field : 'CONTRACT_NO', frozen:true, formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objid = fnc_checkNull(cell.getData().OBJID); fn_projectConceptDetail(objid); } }, - {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '주문유형', field : 'CATEGORY_NAME' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주일', field : 'ORDER_DATE' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주번호', field : 'PO_NO' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '요청납기', field : 'EARLIEST_DUE_DATE', - formatter: function(cell, formatterParams, onRendered){ - var dueDate = fnc_checkNull(cell.getValue()); - var otherCount = fnc_checkNull(cell.getData().OTHER_DUE_DATE_COUNT); - - if(dueDate === '') return ''; - - // 다른 납기가 있으면 "날짜 외 N건" 형식으로 표시 - if(otherCount && parseInt(otherCount) > 0){ - return dueDate + ' 외 ' + otherCount + '건'; - } - - return dueDate; + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 55, widthGrow: 0.6, title : '주문유형', field : 'CATEGORY_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 55, widthGrow: 0.6, title : '제품구분', field : 'PRODUCT_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 55, widthGrow: 0.6, title : '국내/해외', field : 'AREA_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 70, widthGrow: 0.7, title : '접수일', field : 'RECEIPT_DATE' }, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 80, widthGrow: 1, title : '고객사', field : 'CUSTOMER_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 45, widthGrow: 0.5, title : '유/무상', field : 'PAID_TYPE' }, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 100, widthGrow: 1.2, title : '품명', field : 'ITEM_SUMMARY', + formatter: function(cell) { + var value = cell.getValue(); + if(!value || value === '') return ''; + return value; + } + }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 70, widthGrow: 0.7, title : '요청납기', field : 'EARLIEST_DUE_DATE', + formatter: function(cell, formatterParams, onRendered){ + var dueDate = fnc_checkNull(cell.getValue()); + var otherCount = fnc_checkNull(cell.getData().OTHER_DUE_DATE_COUNT); + + if(dueDate === '') return ''; + + if(otherCount && parseInt(otherCount) > 0){ + return dueDate + ' 외 ' + otherCount + '건'; } - }, - {headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '고객사', field : 'CUSTOMER_NAME' }, - {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'ITEM_SUMMARY' }, - /* 견적수량 컬럼 주석처리 - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '견적수량', field : 'ESTIMATE_QUANTITY', - formatter: function(cell) { - var value = cell.getValue(); - if(!value || value === '' || value === '0') return ''; - return Number(value).toLocaleString(); - } - }, - */ - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '수주수량', field : 'ORDER_QUANTITY', + + return dueDate; + } + }, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 60, widthGrow: 0.7, title : '수주상태', field : 'CONTRACT_RESULT_NAME' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 70, widthGrow: 0.8, title : '발주번호', field : 'PO_NO' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 70, widthGrow: 0.7, title : '발주일', field : 'ORDER_DATE' }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 50, widthGrow: 0.5, title : '주문서첨부', field : 'CU01_CNT' , + formatter:fnc_subInfoValueFormatter, + cellClick:function(e, cell){ + var objid = fnc_checkNull(cell.getData().OBJID); + fn_FileRegist(objid,"ORDER_DOC","ORDER_DOC"); + } + }, + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 75, widthGrow: 0.8, title : '수주공급가액', field : 'ORDER_SUPPLY_PRICE_SUM', formatter: function(cell) { var value = cell.getValue(); if(!value || value === '' || value === '0') return ''; - return Number(value).toLocaleString(); + var rowData = cell.getRow().getData(); + var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; + var currencySymbol = ''; + if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; + else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; + else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; + else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; + else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; + return currencySymbol + Number(value).toLocaleString(); + } + }, + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 65, widthGrow: 0.7, title : '수주부가세', field : 'ORDER_VAT_SUM', + formatter: function(cell) { + var value = cell.getValue(); + if(!value || value === '' || value === '0') return ''; + var rowData = cell.getRow().getData(); + var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; + var currencySymbol = ''; + if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; + else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; + else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; + else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; + else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; + return currencySymbol + Number(value).toLocaleString(); + } + }, + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 70, widthGrow: 0.8, title : '수주총액', field : 'ORDER_TOTAL_AMOUNT_SUM', + formatter: function(cell) { + var value = cell.getValue(); + if(!value || value === '' || value === '0') return ''; + var rowData = cell.getRow().getData(); + var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; + var currencySymbol = ''; + if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; + else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; + else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; + else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; + else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; + return currencySymbol + Number(value).toLocaleString(); } }, - {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '유/무상', field : 'PAID_TYPE' }, - {headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '수주상태', field : 'CONTRACT_RESULT_NAME' }, - {headerHozAlign : 'center', hozAlign : 'right', width : '120', title : '공급가액', field : 'ORDER_SUPPLY_PRICE_SUM', - formatter: function(cell) { - var value = cell.getValue(); - if(!value || value === '' || value === '0') return ''; - var rowData = cell.getRow().getData(); - var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; - var currencySymbol = ''; - if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; - else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; - else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; - else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; - else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; - return currencySymbol + Number(value).toLocaleString(); - } - }, - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '부가세', field : 'ORDER_VAT_SUM', - formatter: function(cell) { - var value = cell.getValue(); - if(!value || value === '' || value === '0') return ''; - var rowData = cell.getRow().getData(); - var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; - var currencySymbol = ''; - if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; - else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; - else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; - else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; - else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; - return currencySymbol + Number(value).toLocaleString(); - } - }, - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '총액', field : 'ORDER_TOTAL_AMOUNT_SUM', - formatter: function(cell) { - var value = cell.getValue(); - if(!value || value === '' || value === '0') return ''; - var rowData = cell.getRow().getData(); - var currencyName = rowData.CONTRACT_CURRENCY_NAME || ''; - var currencySymbol = ''; - if(currencyName.includes('원') || currencyName === 'KRW') currencySymbol = '₩'; - else if(currencyName.includes('달러') || currencyName === 'USD') currencySymbol = '$'; - else if(currencyName.includes('유로') || currencyName === 'EUR') currencySymbol = '€'; - else if(currencyName.includes('엔') || currencyName === 'JPY') currencySymbol = '¥'; - else if(currencyName.includes('위안') || currencyName === 'CNY') currencySymbol = '¥'; - return currencySymbol + Number(value).toLocaleString(); - } - }, - {headerHozAlign : 'center', hozAlign : 'right', width : '120', title : '원화총액', field : 'ORDER_TOTAL_AMOUNT_KRW', + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 80, widthGrow: 0.9, title : '수주원화총액', field : 'ORDER_TOTAL_AMOUNT_KRW', formatter: function(cell) { var value = cell.getValue(); if(!value || value === '' || value === '0') return ''; return '₩' + Number(value).toLocaleString(); } }, - {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_FileRegist(objid,"ORDER_DOC","ORDER_DOC"); - } - }, - {headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '고객사요청사항', field : 'CUSTOMER_REQUEST' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '결재상태', field : 'APPR_STATUS' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환종', field : 'CONTRACT_CURRENCY_NAME' }, - {headerHozAlign : 'center', hozAlign : 'right', width : '80', title : '환율', field : 'EXCHANGE_RATE', + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 50, widthGrow: 0.5, title : '견적환종', field : 'CONTRACT_CURRENCY_NAME' }, + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 55, widthGrow: 0.6, title : '견적환율', field : 'EXCHANGE_RATE', formatter: function(cell) { var value = cell.getValue(); if(!value || value === '' || value === '0') return ''; return Number(value).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); } - }, - {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'S/N', field : 'SERIAL_NO', - formatter: function(cell, formatterParams, onRendered){ - var value = fnc_checkNull(cell.getValue()); - if(value === '') return ''; - - // 쉼표로 구분된 S/N 개수 계산 - var serialNumbers = value.split(',').map(function(s){ return s.trim(); }).filter(function(s){ return s !== ''; }); - var count = serialNumbers.length; - - if(count === 0) return ''; - if(count === 1) return '' + serialNumbers[0] + ''; - - // 2개 이상이면 "첫번째 외 N개" 형식 - var displayText = serialNumbers[0] + ' 외 ' + (count - 1) + '개'; - return '' + displayText + ''; - }, - cellClick:function(e, cell){ - var serialNo = fnc_checkNull(cell.getData().SERIAL_NO); - fn_showSerialNoPopup(serialNo); - } - }, - {headerHozAlign : 'center', hozAlign : 'left', width : '100', title : '품번', field : 'PART_NO' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '제품구분', field : 'PRODUCT_NAME' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '85', title : '국내/해외', field : 'AREA_NAME' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '접수일', field : 'RECEIPT_DATE' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '수량', field : 'QUANTITY' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '단가', field : 'ORDER_UNIT_PRICE', -// formatter:"money", formatterParams:{thousand:",", symbolAfter:"", precision:false,}, -// }, + } ]; //var grid; @@ -707,110 +669,118 @@ function openProjectFormPopUp(objId){
-
- - - - - - - - - - - - <%-- - - - - - - - - - --%> - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - ~ - - - - - ~ - -
-
+
+ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + ~ + +
+ + +
+ + ~ + +
+
+
diff --git a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp index bd2171a..ddbe92d 100644 --- a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp +++ b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp @@ -16,6 +16,12 @@ #plmSearchZon { width: auto !important; } + #plmSearchZon table { + table-layout: auto !important; + } + body { + overflow-x: hidden !important; + } @@ -536,6 +390,7 @@ function fn_calculateTotalKRW() {
+
@@ -545,122 +400,134 @@ function fn_calculateTotalKRW() {
- +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ${codeMap.orderTypeList} + + +
+ + +
+ +
+ + +
+ +
+ + -
- - - + + + + + + +
+ + -
- - - - - + + +
+ + +
+ +
+ + +
+ +
+ + ~ + +
+ +
+ + ~ + +
+ +
+ + +
+ +
+ + ~ + +
+ +
+ + -
~ ~ ~
+
+ +
+ + +
+ +
+ + +
+
- Total 총액: 0 원 + Total 공급가액: 0 원   |   + Total 부가세: 0 원   |   + Total 총액: 0
diff --git a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp index 3d346a1..f86963c 100644 --- a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp +++ b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp @@ -71,9 +71,14 @@ fn_bulkRegister(); }); - // 거래명세서 출력 버튼 - $("#btnTransactionStatement").click(function(){ - fn_printTransactionStatement(); + // 거래명세서 출력 버튼 (주석처리됨) + // $("#btnTransactionStatement").click(function(){ + // fn_printTransactionStatement(); + // }); + + // 분할출하 버튼 + $("#btnSplitShipment").click(function(){ + fn_splitShipment(); }); }); @@ -232,7 +237,7 @@