feat: 인쇄 A4 맞춤 + 재고현황 실사버튼 제거

- 회원관리·승인대기 표를 인쇄 시 A4 너비에 맞게(줄바꿈·관리 열 제외)
- 재고현황의 '실사 선별 조회' 버튼 제거(소메뉴로 이동 가능)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-15 13:31:56 +09:00
parent e6a49e379a
commit 71534fb198
3 changed files with 43 additions and 8 deletions

View File

@@ -5,8 +5,26 @@
<button onclick="window.print()" class="no-print border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button> <button onclick="window.print()" class="no-print border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button>
</div> </div>
</section> </section>
<div class="border border-gray-300 rounded-lg p-4 mt-2"> <style>
<form method="get" action="<?= base_url('admin/access/approvals') ?>" class="mb-4 flex flex-wrap items-center gap-2 text-sm"> /* 인쇄 시 승인 대기 표를 A4 너비에 맞춤(잘림 방지) */
@media print {
@page { size: A4 portrait; margin: 10mm; }
.approval-print-wrap { border: 0 !important; padding: 0 !important; overflow: visible !important; }
.approval-print-wrap table.data-table { width: 100% !important; table-layout: fixed; font-size: 9px; }
.approval-print-wrap .data-table th,
.approval-print-wrap .data-table td {
white-space: normal !important; /* nowrap 해제 → 줄바꿈 허용 */
word-break: break-word;
overflow-wrap: anywhere;
padding: 2px 3px !important;
vertical-align: top;
}
/* '관리'(승인/반려 버튼) 열은 인쇄에 불필요 → 제외해 가로 폭 확보 */
.approval-print-wrap .col-actions { display: none !important; }
}
</style>
<div class="approval-print-wrap border border-gray-300 rounded-lg p-4 mt-2">
<form method="get" action="<?= base_url('admin/access/approvals') ?>" class="no-print mb-4 flex flex-wrap items-center gap-2 text-sm">
<label for="status" class="font-bold text-gray-700 shrink-0">상태</label> <label for="status" class="font-bold text-gray-700 shrink-0">상태</label>
<select id="status" name="status" class="border border-gray-300 rounded px-3 py-1.5 text-sm min-w-[12rem] w-48 max-w-full"> <select id="status" name="status" class="border border-gray-300 rounded px-3 py-1.5 text-sm min-w-[12rem] w-48 max-w-full">
<option value="pending" <?= ($status ?? 'pending') === 'pending' ? 'selected' : '' ?>>승인 대기</option> <option value="pending" <?= ($status ?? 'pending') === 'pending' ? 'selected' : '' ?>>승인 대기</option>
@@ -25,7 +43,7 @@
<th class="text-center">요청 역할</th> <th class="text-center">요청 역할</th>
<th class="text-center">상태</th> <th class="text-center">상태</th>
<th class="text-center">처리일</th> <th class="text-center">처리일</th>
<th class="text-center">관리</th> <th class="text-center col-actions">관리</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -45,7 +63,7 @@
<?php if (($row->mar_status ?? '') === 'rejected'): ?>반려<?php endif; ?> <?php if (($row->mar_status ?? '') === 'rejected'): ?>반려<?php endif; ?>
</td> </td>
<td class="text-center"><?= esc($row->mar_processed_at ?? '-') ?></td> <td class="text-center"><?= esc($row->mar_processed_at ?? '-') ?></td>
<td class="text-center"> <td class="text-center col-actions">
<?php if (($row->mar_status ?? '') === 'pending'): ?> <?php if (($row->mar_status ?? '') === 'pending'): ?>
<div class="flex items-center justify-center gap-1"> <div class="flex items-center justify-center gap-1">
<form action="<?= base_url('admin/access/approve/' . $row->mar_idx) ?>" method="post" class="inline"> <form action="<?= base_url('admin/access/approve/' . $row->mar_idx) ?>" method="post" class="inline">

View File

@@ -8,7 +8,25 @@
</div> </div>
</div> </div>
</section> </section>
<div class="border border-gray-300 rounded-lg p-4 overflow-auto mt-2"> <style>
/* 인쇄 시 회원 목록 표를 A4 너비에 맞춤(잘림 방지) */
@media print {
@page { size: A4 portrait; margin: 10mm; }
.user-print-wrap { border: 0 !important; padding: 0 !important; overflow: visible !important; }
.user-print-wrap table.data-table { width: 100% !important; table-layout: fixed; font-size: 9px; }
.user-print-wrap .data-table th,
.user-print-wrap .data-table td {
white-space: normal !important; /* nowrap 해제 → 줄바꿈 허용 */
word-break: break-word;
overflow-wrap: anywhere;
padding: 2px 3px !important;
vertical-align: top;
}
/* '관리'(작업 버튼) 열은 인쇄에 불필요 → 제외해 가로 폭 확보 */
.user-print-wrap .col-actions { display: none !important; }
}
</style>
<div class="user-print-wrap border border-gray-300 rounded-lg p-4 overflow-auto mt-2">
<table class="w-full data-table"> <table class="w-full data-table">
<thead> <thead>
<tr> <tr>
@@ -20,7 +38,7 @@
<th class="text-center">상태</th> <th class="text-center">상태</th>
<th class="text-left">로그인 잠금</th> <th class="text-left">로그인 잠금</th>
<th class="text-left">가입일</th> <th class="text-left">가입일</th>
<th class="text-center">관리</th> <th class="text-center col-actions">관리</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-right"> <tbody class="text-right">
@@ -56,7 +74,7 @@
?> ?>
</td> </td>
<td class="text-left pl-2"><?= esc($row->mb_regdate ?? '') ?></td> <td class="text-left pl-2"><?= esc($row->mb_regdate ?? '') ?></td>
<td class="text-center"> <td class="text-center col-actions">
<?php if ((int) $row->mb_state !== 0): ?> <?php if ((int) $row->mb_state !== 0): ?>
<?php if ($loginLocked): ?> <?php if ($loginLocked): ?>
<form action="<?= base_url('admin/users/unlock-login/' . $row->mb_idx) ?>" method="POST" class="inline mr-1" onsubmit="return confirm('로그인 잠금을 해제할까요?');"> <form action="<?= base_url('admin/users/unlock-login/' . $row->mb_idx) ?>" method="POST" class="inline mr-1" onsubmit="return confirm('로그인 잠금을 해제할까요?');">

View File

@@ -42,7 +42,6 @@ foreach ($subtotals as $subtotal) {
<button type="submit" class="bg-btn-search text-white px-4 py-1 rounded-sm text-sm">조회</button> <button type="submit" class="bg-btn-search text-white px-4 py-1 rounded-sm text-sm">조회</button>
<a href="<?= base_url('bag/inventory/export?' . http_build_query(['base_date' => $baseDate, 'agency_idx' => $agencyIdx])) ?>" class="no-print border border-btn-excel-border text-btn-excel-text px-3 py-1 rounded-sm text-sm hover:bg-green-50 transition">엑셀저장</a> <a href="<?= base_url('bag/inventory/export?' . http_build_query(['base_date' => $baseDate, 'agency_idx' => $agencyIdx])) ?>" class="no-print border border-btn-excel-border text-btn-excel-text px-3 py-1 rounded-sm text-sm hover:bg-green-50 transition">엑셀저장</a>
<button type="button" onclick="window.print()" class="no-print border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button> <button type="button" onclick="window.print()" class="no-print border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button>
<a href="<?= base_url('bag/inventory/inspection-select') ?>" class="no-print border border-blue-300 text-blue-700 px-3 py-1 rounded-sm text-sm hover:bg-blue-50 transition">실사 선별 조회</a>
</div> </div>
</form> </form>
</section> </section>