사이트 /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

@@ -1,7 +1,10 @@
<div class="space-y-6"> <div class="space-y-6">
<!-- 기본코드 종류 --> <!-- 기본코드 종류 -->
<section> <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/code-kinds') ?>" class="text-blue-600 hover:underline text-sm">관리 &rarr;</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>코드</th><th>코드명</th><th>상태</th> <th class="w-16">번호</th><th>코드</th><th>코드명</th><th>상태</th>
@@ -25,7 +28,10 @@
<!-- 봉투 단가 --> <!-- 봉투 단가 -->
<section> <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-prices') ?>" class="text-blue-600 hover:underline text-sm">관리 &rarr;</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>발주단가</th><th>도매가</th><th>소비자가</th><th>적용시작</th><th>적용종료</th><th>상태</th> <th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>발주단가</th><th>도매가</th><th>소비자가</th><th>적용시작</th><th>적용종료</th><th>상태</th>
@@ -54,7 +60,10 @@
<!-- 포장 단위 --> <!-- 포장 단위 -->
<section> <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/packaging-units') ?>" class="text-blue-600 hover:underline text-sm">관리 &rarr;</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>박스당 팩 수</th><th>팩당 낱장 수</th><th>1박스 총 낱장</th><th>적용시작</th><th>적용종료</th><th>상태</th> <th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>박스당 팩 수</th><th>팩당 낱장 수</th><th>1박스 총 낱장</th><th>적용시작</th><th>적용종료</th><th>상태</th>

View File

@@ -1,16 +1,19 @@
<div class="space-y-1"> <div class="space-y-1">
<form method="get" class="flex items-center gap-3 text-sm mb-3"> <div class="flex items-center justify-between mb-1">
<label class="font-bold text-gray-700">불출일</label> <form method="get" class="flex items-center gap-3 text-sm">
<input type="date" name="start_date" value="<?= esc($startDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/> <label class="font-bold text-gray-700">불출일</label>
<span>~</span> <input type="date" name="start_date" value="<?= esc($startDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/>
<input type="date" name="end_date" value="<?= esc($endDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/> <span>~</span>
<button type="submit" class="bg-btn-search text-white px-4 py-1.5 rounded-sm text-sm">조회</button> <input type="date" name="end_date" value="<?= esc($endDate ?? '') ?>" class="border border-gray-300 rounded px-2 py-1 text-sm"/>
<a href="<?= base_url('bag/issue') ?>" class="text-sm text-gray-500 hover:text-gray-700">초기화</a> <button type="submit" class="bg-btn-search text-white px-4 py-1.5 rounded-sm text-sm">조회</button>
</form> <a href="<?= base_url('bag/issue') ?>" class="text-sm text-gray-500 hover:text-gray-700">초기화</a>
</form>
<a href="<?= base_url('admin/bag-issues/create') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">불출 처리</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>연도</th><th>분기</th><th>구분</th><th>불출일</th><th>불출처</th><th>봉투코드</th><th>봉투명</th><th>수량</th><th>상태</th> <th class="w-16">번호</th><th>연도</th><th>분기</th><th>구분</th><th>불출일</th><th>불출처</th><th>봉투코드</th><th>봉투명</th><th>수량</th><th>상태</th><th>작업</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
<?php if (! empty($list)): ?> <?php if (! empty($list)): ?>
@@ -19,9 +22,9 @@
<td class="text-center"><?= $i + 1 ?></td> <td class="text-center"><?= $i + 1 ?></td>
<td class="text-center"><?= esc($row->bi2_year ?? '') ?></td> <td class="text-center"><?= esc($row->bi2_year ?? '') ?></td>
<td class="text-center"><?= esc($row->bi2_quarter ?? '') ?></td> <td class="text-center"><?= esc($row->bi2_quarter ?? '') ?></td>
<td class="text-center"><?= esc($row->bi2_type ?? '') ?></td> <td class="text-center"><?= esc($row->bi2_issue_type ?? '') ?></td>
<td class="text-center"><?= esc($row->bi2_issue_date ?? '') ?></td> <td class="text-center"><?= esc($row->bi2_issue_date ?? '') ?></td>
<td><?= esc($row->bi2_destination ?? '') ?></td> <td><?= esc($row->bi2_dest_name ?? '') ?></td>
<td class="text-center"><?= esc($row->bi2_bag_code ?? '') ?></td> <td class="text-center"><?= esc($row->bi2_bag_code ?? '') ?></td>
<td><?= esc($row->bi2_bag_name ?? '') ?></td> <td><?= esc($row->bi2_bag_name ?? '') ?></td>
<td class="text-right"><?= number_format((int)($row->bi2_qty ?? 0)) ?></td> <td class="text-right"><?= number_format((int)($row->bi2_qty ?? 0)) ?></td>
@@ -31,10 +34,20 @@
echo match($st) { 'normal' => '정상', 'cancelled' => '<span class="text-orange-600">취소</span>', default => esc($st) }; echo match($st) { 'normal' => '정상', 'cancelled' => '<span class="text-orange-600">취소</span>', default => esc($st) };
?> ?>
</td> </td>
<td class="text-center">
<?php if (($row->bi2_status ?? '') === 'normal'): ?>
<form method="post" action="<?= base_url('admin/bag-issues/cancel/' . $row->bi2_idx) ?>" class="inline" onsubmit="return confirm('취소하시겠습니까?')">
<?= csrf_field() ?>
<button class="text-orange-600 hover:underline text-xs">취소</button>
</form>
<?php else: ?>
-
<?php endif; ?>
</td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php else: ?> <?php else: ?>
<tr><td colspan="10" class="text-center text-gray-400 py-4">등록된 불출이 없습니다.</td></tr> <tr><td colspan="11" class="text-center text-gray-400 py-4">등록된 불출이 없습니다.</td></tr>
<?php endif; ?> <?php endif; ?>
</tbody> </tbody>
</table> </table>

View File

@@ -11,10 +11,13 @@
<!-- 발주 현황 --> <!-- 발주 현황 -->
<section> <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"> <table class="data-table">
<thead><tr> <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> </tr></thead>
<tbody> <tbody>
<?php if (! empty($orders)): ?> <?php if (! empty($orders)): ?>
@@ -22,7 +25,7 @@
<?php $summary = $itemSummary[$row->bo_idx] ?? ['qty' => 0, 'amount' => 0, 'count' => 0]; ?> <?php $summary = $itemSummary[$row->bo_idx] ?? ['qty' => 0, 'amount' => 0, 'count' => 0]; ?>
<tr> <tr>
<td class="text-center"><?= $i + 1 ?></td> <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-center"><?= esc($row->bo_order_date ?? '') ?></td>
<td class="text-right"><?= number_format($summary['count']) ?></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['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) }; echo match($st) { 'normal' => '정상', 'cancelled' => '<span class="text-orange-600">취소</span>', 'deleted' => '<span class="text-red-600">삭제</span>', default => esc($st) };
?> ?>
</td> </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> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php else: ?> <?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; ?> <?php endif; ?>
</tbody> </tbody>
</table> </table>
@@ -44,7 +56,10 @@
<!-- 입고 현황 --> <!-- 입고 현황 -->
<section class="mt-4"> <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"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>박스수</th><th>낱장수</th><th>입고일</th><th>구분</th> <th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>박스수</th><th>낱장수</th><th>입고일</th><th>구분</th>

View File

@@ -10,7 +10,10 @@
<!-- 주문 접수 --> <!-- 주문 접수 -->
<section> <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/shop-orders/create') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">주문 등록</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>판매소</th><th>접수일</th><th>배달일</th><th>수량</th><th>금액</th><th>상태</th> <th class="w-16">번호</th><th>판매소</th><th>접수일</th><th>배달일</th><th>수량</th><th>금액</th><th>상태</th>
@@ -42,7 +45,10 @@
<!-- 판매/반품 --> <!-- 판매/반품 -->
<section class="mt-4"> <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-sales/create') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">판매 등록</a>
</div>
<table class="data-table"> <table class="data-table">
<thead><tr> <thead><tr>
<th class="w-16">번호</th><th>판매소</th><th>판매일</th><th>봉투코드</th><th>봉투명</th><th>수량</th><th>단가</th><th>금액</th><th>구분</th> <th class="w-16">번호</th><th>판매소</th><th>판매일</th><th>봉투코드</th><th>봉투명</th><th>수량</th><th>단가</th><th>금액</th><th>구분</th>