Files
jongryangje/app/Views/bag/purchase_inbound.php
taekyoungc a8afaf4af2 style: 표/패널 UI 전면 통일 + 화면설명 드로어·글씨크기·탭 개선
표 디자인
- 모든 표를 가벼운 스타일로 통일(.data-table 경량화: 작은 회색 헤더·연한 구분선·hover)
- 표/패널 바깥 테두리 둥글게(rounded-lg) 일괄 적용, 표 래퍼에 패딩 카드(p-4) 통일
- 표 헤더·데이터 정렬을 전 화면 좌측 기준으로 통일
  - .data-table th/td text-align:left (전역), 흩어진 center/right 정렬 정리
  - 재디자인 Tailwind 표(포장단위·단가·기본코드·담당자·업체·판매대행소·무료대상자·지정판매소)도 셀 좌측화
- 기본정보관리 등 나머지 소메뉴 표를 기본 코드 관리 스타일(가벼운 표·상태 pill)로 재디자인

워크스페이스/공통
- "이 화면 설명" → 새 탭 대신 우측 드로어 팝업(현재 화면과 동시에 보기, Esc·드래그 폭조절)
- 상단바 글씨 크기 조절(A−/A+), 작업 내용에 zoom 적용
- 탭 최대치 도달 시 자동 삭제 대신 안내 토스트, "모두 닫기"(업무 현황 탭은 보존)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 17:26:36 +09:00

91 lines
5.1 KiB
PHP

<div class="space-y-1">
<!-- 필터 -->
<form method="get" class="flex items-center gap-3 text-sm mb-3">
<label class="font-bold text-gray-700">조회기간</label>
<input type="date" name="start_date" value="<?= esc($startDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/>
<span>~</span>
<input type="date" name="end_date" value="<?= esc($endDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/>
<button type="submit" class="bg-btn-search text-white px-4 py-1.5 rounded-sm text-sm">조회</button>
<a href="<?= base_url('bag/purchase-inbound') ?>" class="text-sm text-gray-500 hover:text-gray-700">초기화</a>
</form>
<!-- 발주 현황 -->
<section>
<div class="flex items-center justify-between mb-2 border-b pb-1">
<h3 class="text-base font-bold text-gray-700">발주 현황</h3>
<a href="<?= base_url('bag/order/create') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">발주 등록</a>
</div>
<table class="data-table">
<thead><tr>
<th class="w-16 text-center">번호</th><th class="text-center">LOT번호</th><th class="text-center">발주일</th><th class="text-right">품목수</th><th class="text-right">총수량(낱장)</th><th class="text-right">총금액</th><th class="text-center">상태</th><th class="text-center">작업</th>
</tr></thead>
<tbody>
<?php if (! empty($orders)): ?>
<?php foreach ($orders as $i => $row): ?>
<?php $summary = $itemSummary[$row->bo_idx] ?? ['qty' => 0, 'amount' => 0, 'count' => 0]; ?>
<tr>
<td class="text-center"><?= $i + 1 ?></td>
<td class="text-center"><?= esc($row->bo_lot_no ?? '') ?></td>
<td class="text-center"><?= esc($row->bo_order_date ?? '') ?></td>
<td class="text-right"><?= number_format($summary['count']) ?></td>
<td class="text-right"><?= number_format($summary['qty']) ?></td>
<td class="text-right"><?= number_format($summary['amount']) ?></td>
<td class="text-center">
<?php
$st = $row->bo_status ?? 'normal';
echo match($st) { 'normal' => '정상', 'cancelled' => '<span class="text-orange-600">취소</span>', 'deleted' => '<span class="text-red-600">삭제</span>', default => esc($st) };
?>
</td>
<td class="text-center">
<a href="<?= base_url('bag/purchase-inbound?detail=' . $row->bo_idx) ?>" class="text-blue-600 hover:underline text-xs">상세</a>
<?php if (($row->bo_status ?? '') === 'normal'): ?>
<form method="post" action="<?= base_url('bag/order/cancel/' . $row->bo_idx) ?>" class="inline" onsubmit="return confirm('취소하시겠습니까?')">
<?= csrf_field() ?>
<button class="text-orange-600 hover:underline text-xs ml-1">취소</button>
</form>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr><td colspan="8" class="text-center text-gray-400 py-4">등록된 발주가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>
</section>
<!-- 입고 현황 -->
<section class="mt-4">
<div class="flex items-center justify-between mb-2 border-b pb-1">
<h3 class="text-base font-bold text-gray-700">입고 현황</h3>
<div class="flex items-center gap-2">
<a href="<?= base_url('bag/receiving/scanner') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">입고 처리</a>
<a href="<?= base_url('bag/receiving/batch') ?>" class="border border-gray-300 text-gray-700 px-3 py-1.5 rounded-sm text-sm hover:bg-gray-50">일괄 입고</a>
<a href="<?= base_url('bag/receiving/status') ?>" class="border border-gray-300 text-gray-700 px-3 py-1.5 rounded-sm text-sm hover:bg-gray-50">입고 현황 리포트</a>
</div>
</div>
<table class="data-table">
<thead><tr>
<th class="w-16 text-center">번호</th><th class="text-center">봉투코드</th><th>봉투명</th><th class="text-right">박스수</th><th class="text-right">낱장수</th><th class="text-center">입고일</th><th class="text-center">구분</th>
</tr></thead>
<tbody>
<?php if (! empty($receivings)): ?>
<?php foreach ($receivings as $i => $row): ?>
<tr>
<td class="text-center"><?= $i + 1 ?></td>
<td class="text-center"><?= esc($row->br_bag_code ?? '') ?></td>
<td><?= esc($row->br_bag_name ?? '') ?></td>
<td class="text-right"><?= number_format((int)($row->br_qty_box ?? 0)) ?></td>
<td class="text-right"><?= number_format((int)($row->br_qty_sheet ?? 0)) ?></td>
<td class="text-center"><?= esc($row->br_receive_date ?? '') ?></td>
<td class="text-center"><?= esc($row->br_type ?? '정상입고') ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr><td colspan="7" class="text-center text-gray-400 py-4">등록된 입고가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>
</section>
</div>