This commit is contained in:
admin
2026-01-17 23:50:22 +09:00
parent 6661c7ac89
commit 9dc7cbcb07

View File

@@ -56,7 +56,11 @@
} }
@media print { @media print {
@page { @page {
margin: 20mm; margin: 20mm 20mm 25mm 20mm;
@bottom-center {
content: "ページ " counter(page);
font-size: 0.75em;
}
} }
body * { body * {
visibility: hidden; visibility: hidden;
@@ -90,11 +94,7 @@
text-align: right; text-align: right;
} }
.page-number { .page-number {
display: block; display: none !important;
text-align: center;
margin-top: 10px;
font-size: 0.9em;
color: #666;
} }
#printArea table { #printArea table {
font-size: 0.85em; font-size: 0.85em;
@@ -1181,7 +1181,7 @@
const conditionsText = const conditionsText =
conditions.length > 0 ? conditions.join(" | ") : "検索条件: すべて"; conditions.length > 0 ? conditions.join(" | ") : "検索条件: すべて";
// 月ごとにテーブルを生成印刷用 // 月ごとにテーブルを生成(印刷用)
Object.keys(monthGroups) Object.keys(monthGroups)
.sort() .sort()
.forEach((month, index) => { .forEach((month, index) => {
@@ -1200,13 +1200,15 @@
} }
section.innerHTML = ` section.innerHTML = `
<h3 style="text-align: center; margin-bottom: 8px;">仕訳検索結果</h3>
<div class="print-header">
<div class="print-header-left">${conditionsText}</div>
<div class="print-header-right">${monthDisplay}</div>
</div>
<table style="margin-bottom: 20px;"> <table style="margin-bottom: 20px;">
<thead> <thead>
<tr>
<th colspan="6" style="text-align: center; font-size: 1.2em; padding: 8px; border: none; background: transparent;">仕訳検索結果</th>
</tr>
<tr>
<th colspan="3" style="text-align: left; font-weight: normal; font-size: 0.9em; padding: 4px; border: none; background: transparent;">${conditionsText}</th>
<th colspan="3" style="text-align: right; font-weight: normal; font-size: 0.9em; padding: 4px; border: none; background: transparent;">${monthDisplay}</th>
</tr>
<tr> <tr>
<th>日付</th> <th>日付</th>
<th>摘要</th> <th>摘要</th>
@@ -1365,13 +1367,15 @@
} }
section.innerHTML = ` section.innerHTML = `
<h3 style="text-align: center; margin-bottom: 8px;">仕訳検索結果</h3>
<div class="print-header">
<div class="print-header-left">${conditionsText}</div>
<div class="print-header-right">${monthDisplay}</div>
</div>
<table style="margin-bottom: 20px;"> <table style="margin-bottom: 20px;">
<thead> <thead>
<tr>
<th colspan="6" style="text-align: center; font-size: 1.2em; padding: 8px; border: none; background: transparent;">仕訳検索結果</th>
</tr>
<tr>
<th colspan="3" style="text-align: left; font-weight: normal; font-size: 0.9em; padding: 4px; border: none; background: transparent;">${conditionsText}</th>
<th colspan="3" style="text-align: right; font-weight: normal; font-size: 0.9em; padding: 4px; border: none; background: transparent;">${monthDisplay}</th>
</tr>
<tr> <tr>
<th>日付</th> <th>日付</th>
<th>摘要</th> <th>摘要</th>