사이트·관리자 봉투 물류 기능(수불·통계·레포트·재고·발주)과 DB·메뉴·E2E를 운영 반영한다.

통계 분석(전년대비·월별·계절별), 수급계획·LOT 수불, 지정판매소·실사·메뉴 링크 등을 포함한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
taekyoungc
2026-06-01 16:15:15 +09:00
parent 21e7b91871
commit 0f1d414f37
129 changed files with 18068 additions and 1585 deletions

View File

@@ -1,5 +1,5 @@
<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
<span class="text-sm font-bold text-gray-700">대상 등록</span>
<span class="text-sm font-bold text-gray-700">무료용 대상 등록</span>
</section>
<div class="border border-gray-300 p-4 mt-2 bg-white max-w-3xl">
<form action="<?= mgmt_url('free-recipients/store') ?>" method="POST" class="space-y-4">
@@ -9,29 +9,19 @@
<label class="block text-sm font-bold text-gray-700 w-28">구분 <span class="text-red-500">*</span></label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_type_code" required>
<option value="">선택</option>
<?php foreach ($typeCodes as $cd): ?>
<option value="<?= esc($cd->cd_code) ?>" <?= old('fr_type_code') === $cd->cd_code ? 'selected' : '' ?>>
<?= esc($cd->cd_name) ?>
<?php foreach (($recipientTypeOptions ?? []) as $typeCode => $typeName): ?>
<option value="<?= esc((string) $typeCode) ?>" <?= old('fr_type_code') === (string) $typeCode ? 'selected' : '' ?>>
<?= esc((string) $typeName) ?>
</option>
<?php endforeach; ?>
</select>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">대상자명 <span class="text-red-500">*</span></label>
<label class="block text-sm font-bold text-gray-700 w-28">명 <span class="text-red-500">*</span></label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_name" type="text" value="<?= esc(old('fr_name')) ?>" required/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">연락처</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_phone" type="text" value="<?= esc(old('fr_phone')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">주소</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-96" name="fr_addr" type="text" value="<?= esc(old('fr_addr')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">동코드</label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_dong_code">
@@ -52,6 +42,7 @@
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">종료일</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-44" name="fr_end_date" type="date" value="<?= esc(old('fr_end_date')) ?>"/>
<span class="text-xs text-gray-500">미입력 시 계속 유효</span>
</div>
<div class="flex gap-2 pt-2">

View File

@@ -1,5 +1,5 @@
<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
<span class="text-sm font-bold text-gray-700">대상 수정</span>
<span class="text-sm font-bold text-gray-700">무료용 대상 수정</span>
</section>
<div class="border border-gray-300 p-4 mt-2 bg-white max-w-3xl">
<form action="<?= mgmt_url('free-recipients/update/' . (int) $item->fr_idx) ?>" method="POST" class="space-y-4">
@@ -9,29 +9,19 @@
<label class="block text-sm font-bold text-gray-700 w-28">구분 <span class="text-red-500">*</span></label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_type_code" required>
<option value="">선택</option>
<?php foreach ($typeCodes as $cd): ?>
<option value="<?= esc($cd->cd_code) ?>" <?= old('fr_type_code', $item->fr_type_code) === $cd->cd_code ? 'selected' : '' ?>>
<?= esc($cd->cd_name) ?>
<?php foreach (($recipientTypeOptions ?? []) as $typeCode => $typeName): ?>
<option value="<?= esc((string) $typeCode) ?>" <?= old('fr_type_code', $item->fr_type_code) === (string) $typeCode ? 'selected' : '' ?>>
<?= esc((string) $typeName) ?>
</option>
<?php endforeach; ?>
</select>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">대상자명 <span class="text-red-500">*</span></label>
<label class="block text-sm font-bold text-gray-700 w-28">명 <span class="text-red-500">*</span></label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_name" type="text" value="<?= esc(old('fr_name', $item->fr_name)) ?>" required/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">연락처</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_phone" type="text" value="<?= esc(old('fr_phone', $item->fr_phone)) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">주소</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-96" name="fr_addr" type="text" value="<?= esc(old('fr_addr', $item->fr_addr)) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">동코드</label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="fr_dong_code">
@@ -52,6 +42,7 @@
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">종료일</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-44" name="fr_end_date" type="date" value="<?= esc(old('fr_end_date', $item->fr_end_date)) ?>"/>
<span class="text-xs text-gray-500">미입력 시 계속 유효</span>
</div>
<div class="flex flex-wrap items-center gap-2">

View File

@@ -13,24 +13,36 @@
<thead>
<tr>
<th class="w-16">번호</th>
<th>대상자명</th>
<th>연락처</th>
<th>주소</th>
<th>비고</th>
<th>종료일</th>
<th class="w-28">동코드</th>
<th class="w-40">구분</th>
<th>명칭</th>
<th class="w-28">종료일자</th>
<th class="w-48">비고</th>
<th class="w-20">상태</th>
<th class="w-36">작업</th>
</tr>
</thead>
<tbody>
<?php
$total = (int) ($totalCount ?? count($list));
$page = max(1, (int) ($currentPage ?? 1));
$size = max(1, (int) ($perPage ?? max(1, count($list))));
$rowNo = $total - (($page - 1) * $size);
?>
<?php foreach ($list as $row): ?>
<?php
$typeCode = (string) ($row->fr_type_code ?? '');
$typeName = (string) (($recipientTypeOptions[$typeCode] ?? '') ?: $typeCode);
$dongCode = (string) ($row->fr_dong_code ?? '');
$dongLabel = $dongCode !== '' ? (string) (($dongNameMap[$dongCode] ?? $dongCode) . ' (' . $dongCode . ')') : '-';
?>
<tr>
<td class="text-center"><?= esc($row->fr_idx) ?></td>
<td class="text-center"><?= esc((string) $rowNo) ?></td>
<td class="text-center"><?= esc($dongLabel) ?></td>
<td class="text-center"><?= esc($typeName) ?></td>
<td class="text-left pl-2"><?= esc($row->fr_name) ?></td>
<td class="text-center"><?= esc($row->fr_phone) ?></td>
<td class="text-left pl-2"><?= esc($row->fr_addr) ?></td>
<td class="text-center"><?= esc($row->fr_end_date ?: '9999.99.99') ?></td>
<td class="text-left pl-2"><?= esc($row->fr_note) ?></td>
<td class="text-center"><?= esc($row->fr_end_date) ?></td>
<td class="text-center"><?= (int) $row->fr_state === 1 ? '사용' : '미사용' ?></td>
<td class="text-center">
<a href="<?= mgmt_url('free-recipients/edit/' . (int) $row->fr_idx) ?>" class="text-blue-600 hover:underline text-sm mr-1">수정</a>
@@ -40,6 +52,7 @@
</form>
</td>
</tr>
<?php $rowNo--; ?>
<?php endforeach; ?>
<?php if (empty($list)): ?>
<tr>