업체·담당자·단가·지정판매소 관리 화면의 조회 및 표시를 개선한다.
관리 화면에서 유형별 조회와 순번 표기를 통일하고, 지정판매소 주소/구군 표시와 포장단위 이력 표현을 사용자 관점으로 정리한다. Made-with: Cursor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?= view('components/print_header', ['printTitle' => '봉투 단가 관리']) ?>
|
||||
<?= view('components/print_header', ['printTitle' => '봉투 단가 관리', 'printShowApproval' => false]) ?>
|
||||
<style>
|
||||
@media print {
|
||||
.no-print { display: none !important; }
|
||||
@@ -9,12 +9,91 @@
|
||||
<span class="text-sm font-bold text-gray-700">봉투 단가 관리</span>
|
||||
<div class="flex items-center gap-2 no-print">
|
||||
<button onclick="window.print()" class="border border-btn-print-border text-gray-600 px-3 py-1 rounded-sm text-sm hover:bg-gray-50 transition">인쇄</button>
|
||||
<a href="<?= base_url('bag/prices') ?>" class="text-blue-600 hover:underline text-sm">단가 조회·검색</a>
|
||||
<a href="<?= mgmt_url('bag-prices/create') ?>" class="bg-btn-search text-white px-4 py-1.5 rounded-sm flex items-center gap-1 text-sm shadow hover:opacity-90 transition border border-transparent">단가 등록</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<p class="text-xs text-gray-500 mt-2 no-print">목록·등록·수정·삭제는 이 화면에서, <strong>기간·봉투별 조회·인쇄</strong>는 <a href="<?= base_url('bag/prices') ?>" class="text-blue-600 hover:underline">봉투 단가(조회)</a>에서 이용하세요.</p>
|
||||
<section class="no-print border border-gray-200 rounded-lg bg-white p-3 mt-2">
|
||||
<form method="get" action="<?= mgmt_url('bag-prices') ?>" class="flex flex-wrap items-end gap-3" autocomplete="off">
|
||||
<div class="flex flex-col gap-0.5">
|
||||
<label class="text-xs text-gray-500">봉투구분</label>
|
||||
<select name="bag_kind_e" class="border border-gray-300 rounded px-2 py-1.5 text-sm min-w-[9rem]">
|
||||
<option value="">전체</option>
|
||||
<?php foreach ($bag_kind_options ?? [] as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= (string) ($cd->cd_code ?? '') === (string) ($bag_kind_e ?? '') ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_name) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col gap-0.5">
|
||||
<label class="text-xs text-gray-500">봉투코드</label>
|
||||
<select name="bag_code" class="border border-gray-300 rounded px-2 py-1.5 text-sm min-w-[11rem]">
|
||||
<option value="">전체</option>
|
||||
<?php foreach ($bag_codes ?? [] as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= (string) ($cd->cd_code ?? '') === (string) ($bag_code ?? '') ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_code) ?> — <?= esc($cd->cd_name) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col gap-0.5">
|
||||
<label class="text-xs text-gray-500">조회 기간 (적용기간 겹침)</label>
|
||||
<?php
|
||||
$sp = $startParts ?? ['y' => '', 'm' => '', 'd' => ''];
|
||||
$ep = $endParts ?? ['y' => '', 'm' => '', 'd' => ''];
|
||||
$ymin = (int) ($dateYearMin ?? ((int) date('Y') - 12));
|
||||
$ymax = (int) ($dateYearMax ?? ((int) date('Y') + 2));
|
||||
?>
|
||||
<div class="flex flex-wrap items-center gap-1">
|
||||
<span class="text-xs text-gray-500 mr-0.5">시작</span>
|
||||
<select name="start_y" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[4.5rem]">
|
||||
<option value="">연도</option>
|
||||
<?php for ($yy = $ymin; $yy <= $ymax; $yy++): ?>
|
||||
<option value="<?= $yy ?>" <?= (string) ($sp['y'] ?? '') === (string) $yy ? 'selected' : '' ?>><?= $yy ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<select name="start_m" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[3.75rem]">
|
||||
<option value="">월</option>
|
||||
<?php for ($mi = 1; $mi <= 12; $mi++): ?>
|
||||
<option value="<?= $mi ?>" <?= isset($sp['m']) && (int) $sp['m'] === $mi ? 'selected' : '' ?>><?= $mi ?>월</option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<select name="start_d" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[3.75rem]">
|
||||
<option value="">일</option>
|
||||
<?php for ($di = 1; $di <= 31; $di++): ?>
|
||||
<option value="<?= $di ?>" <?= isset($sp['d']) && (int) $sp['d'] === $di ? 'selected' : '' ?>><?= $di ?>일</option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<span class="text-sm text-gray-500 mx-0.5">~</span>
|
||||
<span class="text-xs text-gray-500 mr-0.5">종료</span>
|
||||
<select name="end_y" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[4.5rem]">
|
||||
<option value="">연도</option>
|
||||
<?php for ($yy = $ymin; $yy <= $ymax; $yy++): ?>
|
||||
<option value="<?= $yy ?>" <?= (string) ($ep['y'] ?? '') === (string) $yy ? 'selected' : '' ?>><?= $yy ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<select name="end_m" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[3.75rem]">
|
||||
<option value="">월</option>
|
||||
<?php for ($mi = 1; $mi <= 12; $mi++): ?>
|
||||
<option value="<?= $mi ?>" <?= isset($ep['m']) && (int) $ep['m'] === $mi ? 'selected' : '' ?>><?= $mi ?>월</option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<select name="end_d" class="border border-gray-300 rounded px-1.5 py-1.5 text-sm min-w-[3.75rem]">
|
||||
<option value="">일</option>
|
||||
<?php for ($di = 1; $di <= 31; $di++): ?>
|
||||
<option value="<?= $di ?>" <?= isset($ep['d']) && (int) $ep['d'] === $di ? 'selected' : '' ?>><?= $di ?>일</option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 pb-0.5">
|
||||
<button type="submit" class="bg-btn-search text-white px-4 py-1.5 rounded-sm text-sm">조회</button>
|
||||
<a href="<?= mgmt_url('bag-prices') ?>" class="text-sm text-gray-500 hover:underline">초기화</a>
|
||||
<button type="button" onclick="window.print()" class="border border-gray-300 text-gray-700 px-3 py-1.5 rounded-sm text-sm hover:bg-gray-50">인쇄</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<div class="border border-gray-300 overflow-auto mt-2">
|
||||
<table class="w-full data-table">
|
||||
<thead>
|
||||
@@ -32,9 +111,17 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-right">
|
||||
<?php foreach ($list as $row): ?>
|
||||
<?php
|
||||
$startNo = 1;
|
||||
if (isset($pager) && method_exists($pager, 'getCurrentPage') && method_exists($pager, 'getPerPage')) {
|
||||
$currentPage = (int) $pager->getCurrentPage();
|
||||
$perPage = (int) $pager->getPerPage();
|
||||
$startNo = (($currentPage > 0 ? $currentPage : 1) - 1) * ($perPage > 0 ? $perPage : 20) + 1;
|
||||
}
|
||||
?>
|
||||
<?php foreach (($list ?? []) as $idx => $row): ?>
|
||||
<tr>
|
||||
<td class="text-center"><?= esc($row->bp_idx) ?></td>
|
||||
<td class="text-center"><?= (int) $startNo + (int) $idx ?></td>
|
||||
<td class="text-center font-mono"><?= esc($row->bp_bag_code) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->bp_bag_name) ?></td>
|
||||
<td><?= number_format((float) $row->bp_order_price) ?></td>
|
||||
|
||||
Reference in New Issue
Block a user