40 lines
1.8 KiB
PHP
40 lines
1.8 KiB
PHP
|
|
|
||
|
|
<div class="row mb-3">
|
||
|
|
<div class="d-flex align-items-center justify-content-start">
|
||
|
|
<?php
|
||
|
|
|
||
|
|
// 디코딩된 데이터를 HTML 테이블로 변환
|
||
|
|
if (is_array($etcListArray) && count($etcListArray) > 0) {
|
||
|
|
echo '<table class="table avoid-break" style="border-collapse: collapse;">';
|
||
|
|
echo '<thead>';
|
||
|
|
echo ' <tr>';
|
||
|
|
echo ' <th class="text-center align-middle lightgray">품명</th>';
|
||
|
|
echo ' <th class="text-center align-middle lightgray">규격</th>';
|
||
|
|
echo ' <th class="text-center align-middle lightgray">단위</th>';
|
||
|
|
echo ' <th class="text-center align-middle lightgray">수량</th>';
|
||
|
|
echo ' <th class="text-center align-middle lightgray">비고</th>';
|
||
|
|
echo ' </tr>';
|
||
|
|
echo '</thead>';
|
||
|
|
echo '<tbody>';
|
||
|
|
|
||
|
|
// 테이블의 각 행을 생성
|
||
|
|
foreach ($etcListArray as $index => $item) {
|
||
|
|
echo '<tr>';
|
||
|
|
echo ' <td class="text-center">' . htmlspecialchars($item['col1']) . '</td>';
|
||
|
|
echo ' <td class="text-center">' . htmlspecialchars($item['col2']) . '</td>';
|
||
|
|
echo ' <td class="text-center">' . htmlspecialchars($item['col3']) . '</td>';
|
||
|
|
echo ' <td class="text-center">' . htmlspecialchars($item['col4']) . '</td>';
|
||
|
|
echo ' <td class="text-center">' . htmlspecialchars($item['col5'] ?? '') . '</td>';
|
||
|
|
echo '</tr>';
|
||
|
|
}
|
||
|
|
|
||
|
|
echo '</tbody>';
|
||
|
|
echo '</table>';
|
||
|
|
} else {
|
||
|
|
// etcList가 비어 있거나 유효하지 않은 경우에는 아무 것도 출력하지 않음
|
||
|
|
// echo '<p class="text-muted">소모품 발주 정보가 없습니다.</p>';
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
</div>
|
||
|
|
</div>
|