표 디자인 - 모든 표를 가벼운 스타일로 통일(.data-table 경량화: 작은 회색 헤더·연한 구분선·hover) - 표/패널 바깥 테두리 둥글게(rounded-lg) 일괄 적용, 표 래퍼에 패딩 카드(p-4) 통일 - 표 헤더·데이터 정렬을 전 화면 좌측 기준으로 통일 - .data-table th/td text-align:left (전역), 흩어진 center/right 정렬 정리 - 재디자인 Tailwind 표(포장단위·단가·기본코드·담당자·업체·판매대행소·무료대상자·지정판매소)도 셀 좌측화 - 기본정보관리 등 나머지 소메뉴 표를 기본 코드 관리 스타일(가벼운 표·상태 pill)로 재디자인 워크스페이스/공통 - "이 화면 설명" → 새 탭 대신 우측 드로어 팝업(현재 화면과 동시에 보기, Esc·드래그 폭조절) - 상단바 글씨 크기 조절(A−/A+), 작업 내용에 zoom 적용 - 탭 최대치 도달 시 자동 삭제 대신 안내 토스트, "모두 닫기"(업무 현황 탭은 보존) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
91 lines
4.3 KiB
PHP
91 lines
4.3 KiB
PHP
<?php
|
|
$inspection = is_array($inspection ?? null) ? $inspection : [];
|
|
$items = is_array($items ?? null) ? $items : [];
|
|
$status = (string) ($inspection['bis_status'] ?? '');
|
|
?>
|
|
<div class="space-y-3">
|
|
<section class="border border-gray-300 rounded-lg bg-white p-3">
|
|
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
<div class="text-sm text-gray-700">
|
|
<span class="font-bold">실사번호:</span> <?= esc((string) ($inspection['bis_idx'] ?? '')) ?>
|
|
<span class="mx-2">|</span>
|
|
<span class="font-bold">작업일자:</span> <?= esc((string) ($inspection['bis_work_date'] ?? '')) ?>
|
|
<span class="mx-2">|</span>
|
|
<span class="font-bold">상태:</span> <?= esc($status) ?>
|
|
</div>
|
|
<a href="<?= base_url('bag/inventory/inspection-select') ?>" class="text-sm text-blue-700 hover:underline">실사 선별 조회로 돌아가기</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="border border-gray-300 rounded-lg bg-white p-3">
|
|
<form method="post" action="<?= base_url('bag/inventory/inspection/' . (int) ($inspection['bis_idx'] ?? 0) . '/save') ?>" class="space-y-3">
|
|
<?= csrf_field() ?>
|
|
<div class="overflow-auto">
|
|
<table class="w-full data-table text-sm">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-14 text-center">번호</th>
|
|
<th class="text-left">품목명</th>
|
|
<th class="w-24 text-right">전산수량</th>
|
|
<th class="w-24 text-right">실사수량</th>
|
|
<th class="w-24 text-right">차이수량</th>
|
|
<th class="w-20 text-center">반영여부</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if ($items !== []): ?>
|
|
<?php foreach ($items as $i => $row): ?>
|
|
<?php
|
|
$itemId = (int) ($row['bisi_idx'] ?? 0);
|
|
$systemQty = (int) ($row['bisi_system_qty'] ?? 0);
|
|
$actualQty = $row['bisi_actual_qty'];
|
|
$actualQty = $actualQty === null ? '' : (string) ((int) $actualQty);
|
|
$diffQty = (int) ($row['bisi_diff_qty'] ?? 0);
|
|
?>
|
|
<tr>
|
|
<td class="text-center"><?= $i + 1 ?></td>
|
|
<td class="pl-2"><?= esc((string) ($row['bisi_bag_name'] ?? '')) ?> <span class="text-xs text-gray-400">(<?= esc((string) ($row['bisi_bag_code'] ?? '')) ?>)</span></td>
|
|
<td class="text-right pr-2"><?= number_format($systemQty) ?></td>
|
|
<td class="text-right pr-2">
|
|
<input type="number" min="0" name="actual_qty[<?= esc((string) $itemId, 'attr') ?>]" value="<?= esc($actualQty) ?>" class="border border-gray-300 rounded px-1 py-0.5 w-24 text-right">
|
|
</td>
|
|
<td class="text-right pr-2 <?= $diffQty === 0 ? '' : ($diffQty > 0 ? 'text-blue-700' : 'text-red-700') ?>"><?= number_format($diffQty) ?></td>
|
|
<td class="text-center"><?= ((string) ($row['bisi_apply_yn'] ?? 'N')) === 'Y' ? 'Y' : 'N' ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<tr><td colspan="6" class="text-center text-gray-400 py-4">실사 품목이 없습니다.</td></tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="flex justify-end gap-2">
|
|
<button type="submit" class="bg-btn-search text-white px-5 py-1.5 rounded-sm text-sm">실사 저장</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="border border-gray-300 rounded-lg bg-white p-3">
|
|
<form method="post" action="<?= base_url('bag/inventory/inspection/' . (int) ($inspection['bis_idx'] ?? 0) . '/apply') ?>" id="inspection-apply-form">
|
|
<?= csrf_field() ?>
|
|
<div class="flex items-center justify-between">
|
|
<p class="text-sm text-gray-600">실사 저장 후 확정 시 차이수량이 현재 재고에 반영됩니다.</p>
|
|
<button type="submit" class="bg-green-600 text-white px-5 py-1.5 rounded-sm text-sm">실사 확정(재고 반영)</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
|
|
<script>
|
|
(() => {
|
|
const form = document.getElementById('inspection-apply-form');
|
|
if (!form) return;
|
|
form.addEventListener('submit', (event) => {
|
|
const ok = window.confirm('실사 결과를 재고에 반영하시겠습니까?');
|
|
if (!ok) {
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
})();
|
|
</script>
|