56 lines
3.0 KiB
PHP
56 lines
3.0 KiB
PHP
<?php
|
|
require_once 'config.php';
|
|
$id = $_GET['id'] ?? 0;
|
|
|
|
$stmt = $pdo->prepare("SELECT * FROM procurement_items WHERE id = ?");
|
|
$stmt->execute([$id]);
|
|
$item = $stmt->fetch();
|
|
|
|
if (!$item) die("ไม่พบข้อมูลรายการ");
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="th">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>สถานะจัดซื้อ - <?= htmlspecialchars($item['item_name']) ?></title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@400;600;700&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
font-family: 'Sarabun', sans-serif;
|
|
background: #f8f9fa;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="p-3">
|
|
<div class="card shadow-sm border-0 mx-auto" style="max-width: 500px;">
|
|
<div class="card-header bg-primary text-white py-3">
|
|
<small class="d-block opacity-75">การติดตามสถานะจัดซื้อครุภัณฑ์ Mobile View</small>
|
|
<h5 class="fw-bold mb-0"><?= htmlspecialchars($item['item_name']) ?></h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="mb-3 text-center">
|
|
<?= getTimelineBadge($item['due_date'], $item['status']) ?>
|
|
<h2 class="fw-bold text-primary mt-2 mb-0"><?= $item['progress'] ?>%</h2>
|
|
<small class="text-muted">ความคืบหน้าของขั้นตอนจัดซื้อ</small>
|
|
</div>
|
|
|
|
<ul class="list-group list-group-flush mb-3">
|
|
<li class="list-group-item d-flex justify-content-between"><span>รหัสรายการ:</span> <strong><?= $item['item_code'] ?? '-' ?></strong></li>
|
|
<li class="list-group-item d-flex justify-content-between"><span>หน่วยงาน:</span> <strong><?= $item['department'] ?></strong></li>
|
|
<li class="list-group-item d-flex justify-content-between"><span>ประเภท:</span> <strong><?= $item['category'] ?></strong></li>
|
|
<li class="list-group-item d-flex justify-content-between"><span>งบประมาณ:</span> <strong>฿<?= number_format($item['total_price'], 2) ?></strong></li>
|
|
<li class="list-group-item d-flex justify-content-between"><span>สถานะปัจจุบัน:</span> <span class="badge bg-info text-dark"><?= $item['status'] ?></span></li>
|
|
</ul>
|
|
|
|
<?php if ($item['gdrive_folder_id']): ?>
|
|
<a href="https://drive.google.com/drive/folders/<?= $item['gdrive_folder_id'] ?>" target="_blank" class="btn btn-outline-primary w-100"><i class="bi bi-folder-symlink"></i> เปิดเอกสารใน Google Drive</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|