사이트 /bag/* 페이지에 관리 버튼 추가 + 중구청 시드 데이터

- 발주/입고/불출/판매 페이지에 등록/취소 버튼 추가
- 기본정보 페이지에 admin 관리 링크 추가
- 불출 뷰 컬럼명 수정 (bi2_type→bi2_issue_type, bi2_destination→bi2_dest_name)
- 발주 LOT번호 컬럼명 수정 (bo_lot_number→bo_lot_no)
- 중구청(lg_idx=1) 시드 데이터 삽입 (tester_local 계정 연동)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
javamon1174
2026-03-26 14:57:30 +09:00
parent 65d8076721
commit 0a982aae96
4 changed files with 65 additions and 22 deletions

View File

@@ -11,10 +11,13 @@
<!-- 발주 현황 -->
<section>
<h3 class="text-base font-bold text-gray-700 mb-2 border-b pb-1">발주 현황</h3>
<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('admin/bag-orders/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">번호</th><th>LOT번호</th><th>발주일</th><th>품목수</th><th>총수량(낱장)</th><th>총금액</th><th>상태</th>
<th class="w-16">번호</th><th>LOT번호</th><th>발주일</th><th>품목수</th><th>총수량(낱장)</th><th>총금액</th><th>상태</th><th>작업</th>
</tr></thead>
<tbody>
<?php if (! empty($orders)): ?>
@@ -22,7 +25,7 @@
<?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_number ?? '') ?></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>
@@ -33,10 +36,19 @@
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('admin/bag-orders/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('admin/bag-orders/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="7" class="text-center text-gray-400 py-4">등록된 발주가 없습니다.</td></tr>
<tr><td colspan="8" class="text-center text-gray-400 py-4">등록된 발주가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>
@@ -44,7 +56,10 @@
<!-- 입고 현황 -->
<section class="mt-4">
<h3 class="text-base font-bold text-gray-700 mb-2 border-b pb-1">입고 현황</h3>
<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('admin/bag-receivings/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">번호</th><th>봉투코드</th><th>봉투명</th><th>박스수</th><th>낱장수</th><th>입고일</th><th>구분</th>