From 56aa05513c68eba6a77c93f158dbf7c98387d6c8 Mon Sep 17 00:00:00 2001 From: leeheejin Date: Thu, 13 Nov 2025 13:44:01 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B1=B0=EB=9E=98=EB=AA=85=EC=84=B8=EC=84=9C?= =?UTF-8?q?=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salesmgmt/salesMgmt/revenueMgmtList.jsp | 22 +- .../salesmgmt/salesMgmt/salesMgmtList.jsp | 59 ++-- .../salesMgmt/transactionStatementForm.jsp | 277 +++++++++++------- WebContent/js/tabulator/tabulator_custom.js | 2 +- 4 files changed, 229 insertions(+), 131 deletions(-) diff --git a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp index 18fcaf0..d21a971 100644 --- a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp +++ b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/revenueMgmtList.jsp @@ -33,6 +33,12 @@ $(document).ready(function(){ _fnc_datepick(); + // 그리드 높이 동적 계산 (Total 합계 영역 + 여유 공간 80px) + fnc_calculateContentHeight("gridDiv", 80); + $(window).resize(function() { + fnc_calculateContentHeight("gridDiv", 80); + }); + // select2가 로드되었을 때만 초기화 if(typeof $.fn !== 'undefined' && typeof $.fn.select2 === 'function') { $('.select2').select2(); @@ -255,14 +261,14 @@ function fn_search(){ if(_tabulGrid){ _tabulGrid.setData(response.RESULTLIST || []); } else { - // 그리드 초기화 - _tabulGrid = new Tabulator("#mainGrid", { - layout: _tabul_layout_fitColumns, - height: "650px", // 그리드 고정 높이 설정 - columns: columns, - data: response.RESULTLIST || [], - selectable: "highlight" // 다중 선택 가능하도록 설정 - }); + // 그리드 초기화 + _tabulGrid = new Tabulator("#mainGrid", { + layout: _tabul_layout_fitColumns, + height: "100%", // 부모 컨테이너 높이에 맞춤 + columns: columns, + data: response.RESULTLIST || [], + selectable: "highlight" // 다중 선택 가능하도록 설정 + }); // 행 클릭으로 다중 선택 _tabulGrid.on("rowClick", function(e, row){ diff --git a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp index 9ba6457..cb81dc7 100644 --- a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp +++ b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/salesMgmtList.jsp @@ -30,6 +30,20 @@ _fnc_datepick(); // 날짜 선택기 초기화 $('.select2').select2(); // select2 초기화 + // 그리드 높이 동적 계산 (Total 합계 영역 + 여유 공간 80px) + fnc_calculateContentHeight("gridDiv", 80); + + // 디버그: 계산된 높이 확인 + console.log("=== 그리드 높이 디버그 ==="); + console.log("윈도우 높이:", $(window).height()); + console.log("#gridDiv 높이:", $('#gridDiv').height()); + console.log("#mainGrid 높이:", $('#mainGrid').height()); + + $(window).resize(function() { + fnc_calculateContentHeight("gridDiv", 80); + console.log("리사이즈 후 #gridDiv 높이:", $('#gridDiv').height()); + }); + // 품번/품명 Select2 AJAX 초기화 initPartSelect2Ajax("#search_partNo", "#search_partName", "#search_partObjId", { debug: true @@ -341,15 +355,22 @@ function fn_search(){ // 그리드 데이터 설정 if(_tabulGrid){ _tabulGrid.setData(response.RESULTLIST || []); - } else { - // 그리드 초기화 - _tabulGrid = new Tabulator("#mainGrid", { - layout: _tabul_layout_fitColumns, - columns: columns, - data: response.RESULTLIST || [], - selectable: true - }); - } + } else { + // 그리드 초기화 + _tabulGrid = new Tabulator("#mainGrid", { + height: "100%", + layout: _tabul_layout_fitColumns, + columns: columns, + data: response.RESULTLIST || [], + selectable: true + }); + + // 그리드 생성 후 높이 재계산 + setTimeout(function() { + console.log("그리드 생성 후 #mainGrid 높이:", $('#mainGrid').height()); + console.log("그리드 생성 후 .tabulator 높이:", $('.tabulator').height()); + }, 100); + } // 조회된 전체 데이터의 판매원화총액 합계 계산 var totalSalesAmountKRW = 0; @@ -377,7 +398,7 @@ function fn_search(){ // 페이징 HTML 업데이트 if(response.PAGE_HTML){ - $("#pagingArea").html(response.PAGE_HTML); + $(".table_paging_wrap").html(response.PAGE_HTML); } }, error: function(xhr, status, error) { @@ -556,16 +577,16 @@ function fn_bulkRegister(){ - -
- - 발주 금액 : 0 원 - - (출고 : 0 원, - 미출고 : 0 원) - + +
+ + 발주 금액 : 0 원 + + (출고 : 0 원, + 미출고 : 0 원) -
+
+
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %> diff --git a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/transactionStatementForm.jsp b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/transactionStatementForm.jsp index e2f63a6..ccb5bbc 100644 --- a/WebContent/WEB-INF/view/salesmgmt/salesMgmt/transactionStatementForm.jsp +++ b/WebContent/WEB-INF/view/salesmgmt/salesMgmt/transactionStatementForm.jsp @@ -30,11 +30,13 @@ body { .container { width: 210mm; - min-height: 297mm; + height: 297mm; margin: 0 auto; + padding: 0; border: 2px solid #000; background-color: white; box-shadow: 0 0 10px rgba(0,0,0,0.1); + overflow: hidden; } /* 제목 */ @@ -51,6 +53,7 @@ body { .info-table { width: 100%; border-collapse: collapse; + table-layout: fixed; } .info-table td { @@ -80,7 +83,7 @@ body { background-color: #e8e8e8; font-weight: bold; text-align: center; - width: 15%; + width: 10%; font-size: 9pt; } @@ -88,7 +91,6 @@ body { font-size: 13pt; font-weight: bold; text-align: center; - width: 40%; } .stamp-cell { @@ -111,10 +113,26 @@ body { line-height: 1.4; } -.receiver-cell { +.date-label-cell { + background-color: #e8e8e8; + font-weight: bold; + text-align: center; + width: 8%; + font-size: 9pt; + padding: 6px; +} + +.date-value-cell { text-align: left; + padding: 6px 10px; + font-size: 9pt; +} + +.receiver-cell { + text-align: center; padding: 8px 12px; width: 30%; + vertical-align: middle; } .receiver-name { @@ -134,14 +152,54 @@ body { background-color: #e8e8e8; font-weight: bold; text-align: center; - width: 30px; - line-height: 1.5; - font-size: 10pt; - padding: 4px 2px; + width: 10px; + line-height: 1.4; + font-size: 7pt; + padding: 0px; vertical-align: middle; + letter-spacing: 0; + position: relative; } -.supplier-row-1, .supplier-row-2, .supplier-row-3, .supplier-row-4 { +.supplier-field-label { + background-color: #e8e8e8; + font-weight: bold; + text-align: center; + width: 10%; + font-size: 9pt; + padding: 4px 2px; + word-break: keep-all; +} + +.supplier-field-label-small { + background-color: #e8e8e8; + font-weight: bold; + text-align: center; + width: 7%; + font-size: 9pt; + padding: 4px 2px; + word-break: keep-all; +} + +.supplier-field-value { + text-align: center; + font-size: 9pt; + padding: 4px 6px; + word-break: break-word; + overflow: visible; + white-space: normal; +} + +.supplier-field-value-small { + text-align: center; + font-size: 9pt; + padding: 4px 6px; + word-break: break-word; + overflow: visible; + white-space: normal; +} + +.supplier-row-1, .supplier-row-1-right, .supplier-row-2, .supplier-row-3, .supplier-row-4 { text-align: left; font-size: 9pt; padding: 6px 10px; @@ -154,6 +212,9 @@ body { .supplier-label-inline { font-weight: bold; margin-right: 8px; + margin-left: 15px; + padding-left: 15px; + border-left: 1px solid #666; font-size: 8pt; } @@ -168,6 +229,7 @@ body { .amount-row { display: flex; align-items: center; + justify-content: space-between; padding: 8px 15px; border-bottom: 2px solid #000; background-color: #f9f9f9; @@ -176,27 +238,28 @@ body { .amount-label { font-size: 10pt; - margin-right: 15px; + flex: 1; } .amount-text { font-size: 13pt; font-weight: bold; - margin-right: 8px; + flex: 2; + text-align: right; } .amount-won-symbol { font-size: 16pt; font-weight: bold; - margin: 0 10px; + flex: 0.5; + text-align: center; } .amount-number { font-size: 15pt; font-weight: bold; - flex: 1; + flex: 2; text-align: right; - padding-right: 15px; } /* 품목 테이블 */ @@ -220,7 +283,7 @@ body { } .items-table td { - height: 28px; + height: 38px; } .items-table td[contenteditable="true"] { @@ -272,14 +335,16 @@ body { .footer-table { width: 100%; border-collapse: collapse; + margin-top: 40px; + margin-bottom: 0; } .footer-table td { border: 1px solid #000; - padding: 12px 15px; + padding: 8px 12px; width: 50%; vertical-align: top; - height: 90px; + height: 60px; } .footer-label { @@ -346,7 +411,7 @@ function fn_loadData() { var statementData = { success: true, customerName: firstItem.CUSTOMER, - supplierName: "㈜압피에스", + supplierName: "㈜알피에스", supplierRegNo: "314-81-75146", supplierAddress: "대전광역시 유성구 국제과학10로 8", supplierBusiness: "제조", @@ -416,6 +481,7 @@ function fn_fillData(data) { var totalSupply = 0; var totalVat = 0; + var totalQuantity = 0; var tbody = $("#itemsBody"); tbody.empty(); @@ -425,23 +491,25 @@ function fn_fillData(data) { $.each(data.items, function(i, item) { console.log("품목 " + (i+1) + ":", item); + var quantity = parseInt(item.QUANTITY || item.quantity || 0); var supply = parseInt(item.SUPPLYPRICE || item.supplyPrice || 0); var vat = parseInt(item.VAT || item.vat || 0); + totalQuantity += quantity; totalSupply += supply; totalVat += vat; var row = $(""); row.append($("").text(item.PRODUCTNAME || item.productName || "")); row.append($("").text(item.SPEC || item.spec || "")); - row.append($("").text(item.QUANTITY || item.quantity || "")); + row.append($("").text(quantity)); row.append($("").text(fn_num(item.UNITPRICE || item.unitPrice || 0))); row.append($("").text(fn_num(supply))); row.append($("").text(fn_num(vat))); tbody.append(row); }); - // 빈 행 추가 (최소 7개 행 유지) - for(var i = data.items.length; i < 7; i++) { + // 빈 행 추가 (최소 9개 행 유지) + for(var i = data.items.length; i < 9; i++) { var row = $(""); for(var j = 0; j < 6; j++) { row.append($("").html(" ")); @@ -450,8 +518,8 @@ function fn_fillData(data) { } } else { console.log("품목 데이터가 없습니다."); - // 빈 행 7개 추가 - for(var i = 0; i < 7; i++) { + // 빈 행 9개 추가 + for(var i = 0; i < 9; i++) { var row = $(""); for(var j = 0; j < 6; j++) { row.append($("").html(" ")); @@ -460,14 +528,10 @@ function fn_fillData(data) { } } - // 합계 행 - var totalRow = $(""); - totalRow.append($("").text("계")); - totalRow.append($("").text(data.items ? data.items.length : 0)); - totalRow.append($("").html(" ")); - totalRow.append($("").text(fn_num(totalSupply))); - totalRow.append($("").text(fn_num(totalVat))); - tbody.append(totalRow); + // tfoot의 합계 행 업데이트 + $("#totalQuantity").text(totalQuantity); + $("#totalSupplyPrice").text(fn_num(totalSupply)); + $("#totalVat").text(fn_num(totalVat)); // 합계 금액 var total = totalSupply + totalVat; @@ -560,73 +624,71 @@ function fn_close() { - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- 납품일: - 수요일, 9월 24, 2025 - 등록 번호 - 314-81-75146 - -
-
성 명
-
이동현
-
-
납품일 + 수요일, 9월 24, 2025 + +
+
+
+
+
+
등록 번호 + 314-81-75146 +


-
- 상호(법인명) - ㈜알피에스 -
-
- ㈜OOO - 귀하 - -
- 사업장주소 - 대전광역시 유성구 국제과학10로 8 -
-
-
- 업 태 - 제조 - 종 목 - 금속절삭가공기계의 -
-
- 아래와 같이 공급합니다. - -
- 전화 번호 - TEL:042-602-3300/FAX:042-672 -
-
+ ㈜OOO + 귀하 + 상호(법인명) + ㈜알피에스 + 성 명 + 이동현 +
사업장주소 + 대전광역시 유성구 국제과학10로 8 +
업 태 + 제조 + 종 목 + 금속절삭가공기계의 +
+ 아래와 같이 공급합니다. + 전화 번호 + TEL:042-602-3300 / FAX:042-672 +
@@ -652,14 +714,23 @@ function fn_close() { + + + +
<비고>
+
Spindle S/N : 187-1062, 1096, 1099
+ + + + 계 + 0 + + 0 + 0 + + - -
-
<비고>
-
Spindle S/N : 187-1062, 1096, 1099
-
- diff --git a/WebContent/js/tabulator/tabulator_custom.js b/WebContent/js/tabulator/tabulator_custom.js index bd3736c..5e7b3a5 100644 --- a/WebContent/js/tabulator/tabulator_custom.js +++ b/WebContent/js/tabulator/tabulator_custom.js @@ -59,7 +59,7 @@ function fnc_tabul_search(layoutParam, gridObj, searchURL, columnParam, showChec if(showApp) allColumns = allColumns.concat(_columnAppStatus); gridObj = new Tabulator("#mainGrid", { - height : "auto",//"640px", + height : "100%", layout : fnc_checkNullDefaultValue(layoutParam, _tabul_layout_fitDataStretch), //fitDataFill fitDataStretch //selectable: true, placeholder : "조회된 정보가 없습니다.",