업체·담당자·단가·지정판매소 관리 화면의 조회 및 표시를 개선한다.
관리 화면에서 유형별 조회와 순번 표기를 통일하고, 지정판매소 주소/구군 표시와 포장단위 이력 표현을 사용자 관점으로 정리한다. 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>
|
||||
|
||||
@@ -8,6 +8,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="p-2 bg-white border-b border-gray-200 no-print">
|
||||
<form method="GET" action="<?= mgmt_url('companies') ?>" class="flex flex-wrap items-center gap-2">
|
||||
<label class="text-sm text-gray-600">업체유형</label>
|
||||
<select name="cp_type" class="border border-gray-300 rounded px-2 py-1 text-sm w-44">
|
||||
<option value="">전 체</option>
|
||||
<?php foreach (($typeOptions ?? []) as $type): ?>
|
||||
<option value="<?= esc($type) ?>" <?= (string) ($cpType ?? '') === (string) $type ? 'selected' : '' ?>><?= esc($type) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="bg-btn-search text-white px-4 py-1 rounded-sm text-sm">조회</button>
|
||||
<a href="<?= mgmt_url('companies') ?>" class="text-sm text-gray-500 hover:underline">초기화</a>
|
||||
</form>
|
||||
</section>
|
||||
<div class="border border-gray-300 overflow-auto mt-2">
|
||||
<table class="w-full data-table">
|
||||
<thead>
|
||||
@@ -24,9 +37,17 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?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->cp_idx) ?></td>
|
||||
<td class="text-center"><?= (int) $startNo + (int) $idx ?></td>
|
||||
<td class="text-center"><?= esc($row->cp_type) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->cp_name) ?></td>
|
||||
<td class="text-center"><?= esc($row->cp_biz_no) ?></td>
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
<?php $readOnly = ! empty($readOnly); ?>
|
||||
<?php
|
||||
helper('admin');
|
||||
$currentPath = current_nav_request_path();
|
||||
if ($currentPath === 'bag/designated-shops') {
|
||||
$readOnly = false;
|
||||
} elseif ($currentPath === 'bag/designated-shops/browse') {
|
||||
$readOnly = true;
|
||||
} else {
|
||||
$readOnly = ! empty($readOnly);
|
||||
}
|
||||
?>
|
||||
<?= view('components/print_header', ['printTitle' => $readOnly ? '지정판매소 조회 목록' : '지정판매소 목록']) ?>
|
||||
<style>
|
||||
/* 목록 위 → 지정판매소 정보 아래 (가로 2열 없음) */
|
||||
@@ -181,11 +191,12 @@ $listBasePath = $readOnly ? 'designated-shops/browse' : 'designated-shops';
|
||||
<span class="text-sm font-semibold text-gray-700 mr-1">지정판매소 검색</span>
|
||||
<label class="text-sm text-gray-600">상호명</label>
|
||||
<input type="text" name="ds_name" value="<?= esc($dsName ?? '') ?>" placeholder="상호명" class="border border-gray-300 rounded px-2 py-1 text-sm w-36"/>
|
||||
<label class="text-sm text-gray-600">구군코드</label>
|
||||
<select name="ds_gugun_code" class="border border-gray-300 rounded px-2 py-1 text-sm">
|
||||
<label class="text-sm text-gray-600">구·군 코드</label>
|
||||
<select name="ds_gugun_code" class="border border-gray-300 rounded px-2 py-1 text-sm min-w-[14rem]">
|
||||
<option value="">전체</option>
|
||||
<?php foreach (($gugunCodes ?? []) as $gc): ?>
|
||||
<option value="<?= esc($gc->ds_gugun_code) ?>" <?= ($dsGugunCode ?? '') === $gc->ds_gugun_code ? 'selected' : '' ?>><?= esc($gc->ds_gugun_code) ?></option>
|
||||
<?php $gCode = (string) ($gc->ds_gugun_code ?? ''); ?>
|
||||
<option value="<?= esc($gCode) ?>" <?= ($dsGugunCode ?? '') === $gCode ? 'selected' : '' ?>><?= esc((string) (($gugunNameMap[$gCode] ?? '') !== '' ? $gugunNameMap[$gCode] : $gCode)) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<label class="text-sm text-gray-600">상태</label>
|
||||
@@ -223,7 +234,6 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
<th class="ds-col-tight">상호명</th>
|
||||
<th class="ds-col-zip">우편번호</th>
|
||||
<th class="text-left">주소</th>
|
||||
<th class="text-left">상세주소</th>
|
||||
<th class="w-28">사업자번호</th>
|
||||
<th class="w-28">전화</th>
|
||||
<th class="w-16">상태</th>
|
||||
@@ -242,7 +252,8 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
}
|
||||
$st = (int) ($row->ds_state ?? 1);
|
||||
$stLabel = $st === 1 ? '' : ($st === 2 ? '폐업' : '해지');
|
||||
$ggLabel = (string) ($row->ds_gugun_code ?? '');
|
||||
$ggCode = (string) ($row->ds_gugun_code ?? '');
|
||||
$ggLabel = (string) (($gugunNameMap[$ggCode] ?? '') !== '' ? $gugunNameMap[$ggCode] : $ggCode);
|
||||
$da = $row->ds_designated_at ?? null;
|
||||
$daDisp = ($da !== null && $da !== '' && (string) $da !== '0000-00-00') ? substr((string) $da, 0, 10) : '';
|
||||
$zone = (string) ($row->ds_zone_code ?? '');
|
||||
@@ -251,6 +262,10 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
$jibunL = trim((string) ($row->ds_addr_jibun ?? ''));
|
||||
$addrMainList = $roadL !== '' ? $roadL : $jibunL;
|
||||
$addrDetailList = trim((string) ($row->ds_addr_detail ?? ''));
|
||||
$addrCombinedList = trim($addrMainList . ' ' . $addrDetailList);
|
||||
if ($addrCombinedList === '') {
|
||||
$addrCombinedList = $addrMainList;
|
||||
}
|
||||
?>
|
||||
<tr class="ds-list-row cursor-pointer" data-row-index="<?= (int) $i ?>" role="button" tabindex="0">
|
||||
<td class="text-center"><?= esc($shortNo) ?></td>
|
||||
@@ -260,8 +275,7 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
<td class="text-left pl-1 text-xs ds-col-tight" title="<?= esc($row->ds_rep_name ?? '') ?>"><?= esc($row->ds_rep_name ?? '') ?></td>
|
||||
<td class="text-left pl-1 text-xs ds-col-tight" title="<?= esc($row->ds_name ?? '') ?>"><?= esc($row->ds_name ?? '') ?></td>
|
||||
<td class="text-center text-xs ds-col-zip" title="<?= esc($zipList) ?>"><?= esc($zipList) ?></td>
|
||||
<td class="text-left pl-1 text-xs ds-col-addr-list" title="<?= esc($addrMainList) ?>"><?= esc($addrMainList) ?></td>
|
||||
<td class="text-left pl-1 text-xs ds-col-detail-list" title="<?= esc($addrDetailList) ?>"><?= esc($addrDetailList) ?></td>
|
||||
<td class="text-left pl-1 text-xs ds-col-addr-list" title="<?= esc($addrCombinedList) ?>"><?= esc($addrCombinedList) ?></td>
|
||||
<td class="text-left pl-1 text-xs"><?= esc($row->ds_biz_no ?? '') ?></td>
|
||||
<td class="text-left pl-1 text-xs"><?= esc($row->ds_tel ?? '') ?></td>
|
||||
<td class="text-center <?= $st === 2 ? 'text-pink-600 font-medium' : ($st === 3 ? 'text-orange-700' : '') ?>"><?= esc($stLabel) ?></td>
|
||||
@@ -296,7 +310,7 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
<th>지번주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>개인전화</th>
|
||||
<th>구코드</th>
|
||||
<th>구·군</th>
|
||||
<th>구역</th>
|
||||
<th>가상계좌(은행)</th>
|
||||
<th>계좌번호</th>
|
||||
@@ -325,7 +339,7 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
<td class="text-left" data-ro="ds_addr_jibun">—</td>
|
||||
<td class="text-left" data-ro="ds_addr_detail">—</td>
|
||||
<td class="text-left" data-ro="ds_rep_phone">—</td>
|
||||
<td class="text-left" data-ro="ds_gugun_code">—</td>
|
||||
<td class="text-left" data-ro="gugun_name">—</td>
|
||||
<td class="text-left" data-ro="ds_zone_code">—</td>
|
||||
<td class="text-left" data-ro="ds_va_bank">—</td>
|
||||
<td class="text-left" data-ro="ds_va_account">—</td>
|
||||
@@ -492,7 +506,6 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
<th>상호명</th>
|
||||
<th>우편번호</th>
|
||||
<th>주소</th>
|
||||
<th>상세주소</th>
|
||||
<th>사업자번호</th>
|
||||
<th>전화</th>
|
||||
<th>판매소번호</th>
|
||||
@@ -521,18 +534,22 @@ $sc = $stateCounts ?? ['total' => 0, 1 => 0, 2 => 0, 3 => 0];
|
||||
$jibP = trim((string) ($row->ds_addr_jibun ?? ''));
|
||||
$addrP = $roadP !== '' ? $roadP : $jibP;
|
||||
$detP = trim((string) ($row->ds_addr_detail ?? ''));
|
||||
$addrCombinedP = trim($addrP . ' ' . $detP);
|
||||
if ($addrCombinedP === '') {
|
||||
$addrCombinedP = $addrP;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center"><?= esc($shortNoP) ?></td>
|
||||
<td class="text-left"><?= esc($lgMap[$row->ds_lg_idx] ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_gugun_code ?? '') ?></td>
|
||||
<?php $gCodeP = (string) ($row->ds_gugun_code ?? ''); ?>
|
||||
<td class="text-left"><?= esc((string) (($gugunNameMap[$gCodeP] ?? '') !== '' ? $gugunNameMap[$gCodeP] : $gCodeP)) ?></td>
|
||||
<td class="text-center"><?= esc($daDispP) ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_zone_code ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_rep_name ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_name ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($zipP) ?></td>
|
||||
<td class="text-left"><?= esc($addrP) ?></td>
|
||||
<td class="text-left"><?= esc($detP) ?></td>
|
||||
<td class="text-left"><?= esc($addrCombinedP) ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_biz_no ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_tel ?? '') ?></td>
|
||||
<td class="text-left"><?= esc($row->ds_shop_no) ?></td>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<th>대상자명</th>
|
||||
<th>연락처</th>
|
||||
<th>주소</th>
|
||||
<th>동코드</th>
|
||||
<th>비고</th>
|
||||
<th>종료일</th>
|
||||
<th class="w-20">상태</th>
|
||||
@@ -30,7 +29,6 @@
|
||||
<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_dong_code) ?></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>
|
||||
@@ -45,7 +43,7 @@
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($list)): ?>
|
||||
<tr>
|
||||
<td colspan="9" class="text-center text-gray-500 py-4 text-sm space-y-1">
|
||||
<td colspan="8" class="text-center text-gray-500 py-4 text-sm space-y-1">
|
||||
<p>등록된 데이터가 없습니다.</p>
|
||||
<p class="text-gray-400">다른 지자체를 선택 중이면 해당 지자체 기준으로만 조회됩니다. Super Admin 은 상단에서 작업 지자체를 바꿔 보세요.</p>
|
||||
</td>
|
||||
|
||||
@@ -11,28 +11,18 @@
|
||||
</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="mg_dept_code">
|
||||
<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="mg_category" required>
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($deptCodes as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= old('mg_dept_code') === $cd->cd_code ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_name) ?>
|
||||
<?php foreach (($categories ?? []) as $key => $label): ?>
|
||||
<option value="<?= esc($key) ?>" <?= old('mg_category') === $key ? 'selected' : '' ?>>
|
||||
<?= esc($label) ?>
|
||||
</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">직위</label>
|
||||
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_position_code">
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($positionCodes as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= old('mg_position_code') === $cd->cd_code ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_name) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="mg_position_code" value="<?= esc(old('mg_position_code', '')) ?>"/>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<label class="block text-sm font-bold text-gray-700 w-28">전화</label>
|
||||
|
||||
@@ -11,28 +11,18 @@
|
||||
</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="mg_dept_code">
|
||||
<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="mg_category" required>
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($deptCodes as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= old('mg_dept_code', $item->mg_dept_code) === $cd->cd_code ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_name) ?>
|
||||
<?php foreach (($categories ?? []) as $key => $label): ?>
|
||||
<option value="<?= esc($key) ?>" <?= old('mg_category', (string) ($item->mg_dept_code ?? '')) === $key ? 'selected' : '' ?>>
|
||||
<?= esc($label) ?>
|
||||
</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">직위</label>
|
||||
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_position_code">
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($positionCodes as $cd): ?>
|
||||
<option value="<?= esc($cd->cd_code) ?>" <?= old('mg_position_code', $item->mg_position_code) === $cd->cd_code ? 'selected' : '' ?>>
|
||||
<?= esc($cd->cd_name) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="mg_position_code" value="<?= esc(old('mg_position_code', $item->mg_position_code)) ?>"/>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<label class="block text-sm font-bold text-gray-700 w-28">전화</label>
|
||||
|
||||
@@ -8,14 +8,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="p-2 bg-white border-b border-gray-200 no-print">
|
||||
<form method="GET" action="<?= mgmt_url('managers') ?>" class="flex flex-wrap items-center gap-2">
|
||||
<label class="text-sm text-gray-600">카테고리</label>
|
||||
<select name="category" class="border border-gray-300 rounded px-2 py-1 text-sm w-44">
|
||||
<option value="">전 체</option>
|
||||
<?php foreach (($categories ?? []) as $key => $label): ?>
|
||||
<option value="<?= esc($key) ?>" <?= ($category ?? '') === $key ? 'selected' : '' ?>><?= esc($label) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="bg-btn-search text-white px-4 py-1 rounded-sm text-sm">조회</button>
|
||||
<a href="<?= mgmt_url('managers') ?>" class="text-sm text-gray-500 hover:underline">초기화</a>
|
||||
</form>
|
||||
</section>
|
||||
<div class="border border-gray-300 overflow-auto mt-2">
|
||||
<table class="w-full data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-16">번호</th>
|
||||
<th>담당자명</th>
|
||||
<th>소속</th>
|
||||
<th>직위</th>
|
||||
<th>카테고리</th>
|
||||
<th>전화</th>
|
||||
<th>휴대전화</th>
|
||||
<th>이메일</th>
|
||||
@@ -28,8 +40,13 @@
|
||||
<tr>
|
||||
<td class="text-center"><?= esc($row->mg_idx) ?></td>
|
||||
<td class="text-center"><?= esc($row->mg_name) ?></td>
|
||||
<td class="text-center"><?= esc($row->mg_dept_code) ?></td>
|
||||
<td class="text-center"><?= esc($row->mg_position_code) ?></td>
|
||||
<td class="text-center">
|
||||
<?php
|
||||
$cat = (string) ($row->mg_dept_code ?? '');
|
||||
$catLabel = $categories[$cat] ?? $cat;
|
||||
echo esc($catLabel);
|
||||
?>
|
||||
</td>
|
||||
<td class="text-center"><?= esc($row->mg_tel) ?></td>
|
||||
<td class="text-center"><?= esc($row->mg_phone) ?></td>
|
||||
<td class="text-center"><?= esc($row->mg_email) ?></td>
|
||||
@@ -44,7 +61,7 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($list)): ?>
|
||||
<tr><td colspan="9" 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>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<label class="block text-sm font-bold text-gray-700 w-32">적용시작일 <span class="text-red-500">*</span></label>
|
||||
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-44" name="pu_start_date" type="date" value="<?= esc(old('pu_start_date', $item->pu_start_date)) ?>" required/>
|
||||
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-44" name="pu_start_date" type="date" value="<?= esc(old('pu_start_date', date('Y-m-d'))) ?>" required/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
|
||||
@@ -6,11 +6,20 @@
|
||||
</div>
|
||||
</section>
|
||||
<div class="border border-gray-300 overflow-auto mt-2">
|
||||
<?php
|
||||
$fieldLabelMap = [
|
||||
'pu_box_per_pack' => '박스당 팩 수',
|
||||
'pu_pack_per_sheet' => '팩당 낱장 수',
|
||||
'pu_start_date' => '적용시작일',
|
||||
'pu_end_date' => '적용종료일',
|
||||
'pu_state' => '상태',
|
||||
];
|
||||
?>
|
||||
<table class="w-full data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-16">번호</th>
|
||||
<th>변경 필드</th>
|
||||
<th>변경 내용</th>
|
||||
<th>이전 값</th>
|
||||
<th>변경 값</th>
|
||||
<th>변경일시</th>
|
||||
@@ -20,7 +29,7 @@
|
||||
<?php foreach ($list as $row): ?>
|
||||
<tr>
|
||||
<td class="text-center"><?= esc($row->puh_idx) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->puh_field) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($fieldLabelMap[(string) $row->puh_field] ?? $row->puh_field) ?></td>
|
||||
<td><?= esc($row->puh_old_value) ?></td>
|
||||
<td><?= esc($row->puh_new_value) ?></td>
|
||||
<td class="text-center"><?= esc($row->puh_changed_at) ?></td>
|
||||
|
||||
@@ -35,9 +35,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->pu_idx) ?></td>
|
||||
<td class="text-center"><?= (int) $startNo + (int) $idx ?></td>
|
||||
<td class="text-center font-mono"><?= esc($row->pu_bag_code) ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->pu_bag_name) ?></td>
|
||||
<td><?= number_format((int) $row->pu_box_per_pack) ?></td>
|
||||
|
||||
@@ -44,9 +44,17 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?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->sa_idx) ?></td>
|
||||
<td class="text-center"><?= (int) $startNo + (int) $idx ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->sa_kind ?? '') ?></td>
|
||||
<td class="text-center"><?= esc($row->sa_code ?? '') ?></td>
|
||||
<td class="text-left pl-2"><?= esc($row->sa_name) ?></td>
|
||||
|
||||
Reference in New Issue
Block a user