2026-03-26 14:30:45 +09:00
|
|
|
<div class="space-y-1">
|
2026-03-26 14:57:30 +09:00
|
|
|
<div class="flex items-center justify-between mb-1">
|
|
|
|
|
<form method="get" class="flex items-center gap-3 text-sm">
|
|
|
|
|
<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/issue') ?>" class="text-sm text-gray-500 hover:text-gray-700">초기화</a>
|
|
|
|
|
</form>
|
2026-03-26 16:13:07 +09:00
|
|
|
<a href="<?= base_url('bag/issue/create') ?>" class="bg-btn-search text-white px-3 py-1.5 rounded-sm text-sm">불출 처리</a>
|
2026-03-26 14:57:30 +09:00
|
|
|
</div>
|
2026-03-26 14:30:45 +09:00
|
|
|
|
|
|
|
|
<table class="data-table">
|
|
|
|
|
<thead><tr>
|
2026-03-26 14:57:30 +09:00
|
|
|
<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>
|
2026-03-26 14:30:45 +09:00
|
|
|
</tr></thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php if (! empty($list)): ?>
|
|
|
|
|
<?php foreach ($list as $i => $row): ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="text-center"><?= $i + 1 ?></td>
|
|
|
|
|
<td class="text-center"><?= esc($row->bi2_year ?? '') ?></td>
|
|
|
|
|
<td class="text-center"><?= esc($row->bi2_quarter ?? '') ?></td>
|
2026-03-26 14:57:30 +09:00
|
|
|
<td class="text-center"><?= esc($row->bi2_issue_type ?? '') ?></td>
|
2026-03-26 14:30:45 +09:00
|
|
|
<td class="text-center"><?= esc($row->bi2_issue_date ?? '') ?></td>
|
2026-03-26 14:57:30 +09:00
|
|
|
<td><?= esc($row->bi2_dest_name ?? '') ?></td>
|
2026-03-26 14:30:45 +09:00
|
|
|
<td class="text-center"><?= esc($row->bi2_bag_code ?? '') ?></td>
|
|
|
|
|
<td><?= esc($row->bi2_bag_name ?? '') ?></td>
|
|
|
|
|
<td class="text-right"><?= number_format((int)($row->bi2_qty ?? 0)) ?></td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<?php
|
|
|
|
|
$st = $row->bi2_status ?? 'normal';
|
|
|
|
|
echo match($st) { 'normal' => '정상', 'cancelled' => '<span class="text-orange-600">취소</span>', default => esc($st) };
|
|
|
|
|
?>
|
|
|
|
|
</td>
|
2026-03-26 14:57:30 +09:00
|
|
|
<td class="text-center">
|
|
|
|
|
<?php if (($row->bi2_status ?? '') === 'normal'): ?>
|
2026-03-26 16:13:07 +09:00
|
|
|
<form method="post" action="<?= base_url('bag/issue/cancel/' . $row->bi2_idx) ?>" class="inline" onsubmit="return confirm('취소하시겠습니까?')">
|
2026-03-26 14:57:30 +09:00
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
<button class="text-orange-600 hover:underline text-xs">취소</button>
|
|
|
|
|
</form>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
-
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</td>
|
2026-03-26 14:30:45 +09:00
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
<?php else: ?>
|
2026-03-26 14:57:30 +09:00
|
|
|
<tr><td colspan="11" class="text-center text-gray-400 py-4">등록된 불출이 없습니다.</td></tr>
|
2026-03-26 14:30:45 +09:00
|
|
|
<?php endif; ?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|