Spaces:
Running
Running
File size: 10,460 Bytes
24834c1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SalesFlow Dashboard - รายงานยอดขาย</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<custom-navbar></custom-navbar>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8 max-w-7xl">
<!-- Header Section -->
<div class="mb-8">
<h1 class="text-4xl font-bold text-gray-800 mb-2">รายงานยอดขายประจำปี</h1>
<p class="text-gray-600">ภาพรวมการขายสินค้าทั้งหมด</p>
</div>
<!-- Date Filter -->
<div class="bg-white rounded-xl shadow-sm p-4 mb-6">
<div class="flex flex-wrap gap-4 items-center">
<div class="flex items-center gap-2">
<i data-feather="calendar" class="w-5 h-5 text-gray-500"></i>
<label class="text-gray-700 font-medium">ช่วงเวลา:</label>
</div>
<select class="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500">
<option>ปี 2024</option>
<option>ไตรมาส 4/2024</option>
<option>เดือน ธันวาคม 2024</option>
</select>
<button class="ml-auto px-4 py-2 bg-emerald-500 text-white rounded-lg hover:bg-emerald-600 transition-colors flex items-center gap-2">
<i data-feather="download" class="w-4 h-4"></i>
ส่งออกรายงาน
</button>
</div>
</div>
<!-- Key Metrics Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<!-- Total Orders -->
<div class="bg-white rounded-xl shadow-sm p-6 border-l-4 border-emerald-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm mb-1">คำสั่งซื้อทั้งหมด</p>
<h3 class="text-2xl font-bold text-gray-800">13,996</h3>
<p class="text-sm text-emerald-600 mt-2 flex items-center gap-1">
<i data-feather="trending-up" class="w-4 h-4"></i>
+12.5% จากเดือนที่แล้ว
</p>
</div>
<div class="bg-emerald-100 p-3 rounded-lg">
<i data-feather="shopping-cart" class="w-6 h-6 text-emerald-600"></i>
</div>
</div>
</div>
<!-- Total Revenue -->
<div class="bg-white rounded-xl shadow-sm p-6 border-l-4 border-yellow-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm mb-1">รายได้รวม</p>
<h3 class="text-2xl font-bold text-gray-800">฿229.01M</h3>
<p class="text-sm text-yellow-600 mt-2 flex items-center gap-1">
<i data-feather="trending-up" class="w-4 h-4"></i>
+8.3% จากเดือนที่แล้ว
</p>
</div>
<div class="bg-yellow-100 p-3 rounded-lg">
<i data-feather="dollar-sign" class="w-6 h-6 text-yellow-600"></i>
</div>
</div>
</div>
<!-- Boxes Sold -->
<div class="bg-white rounded-xl shadow-sm p-6 border-l-4 border-blue-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm mb-1">จำนวนกล่องที่ขาย</p>
<h3 class="text-2xl font-bold text-gray-800">222,273</h3>
<p class="text-sm text-blue-600 mt-2 flex items-center gap-1">
<i data-feather="trending-up" class="w-4 h-4"></i>
+15.2% จากเดือนที่แล้ว
</p>
</div>
<div class="bg-blue-100 p-3 rounded-lg">
<i data-feather="package" class="w-6 h-6 text-blue-600"></i>
</div>
</div>
</div>
<!-- Average Order Value -->
<div class="bg-white rounded-xl shadow-sm p-6 border-l-4 border-purple-500">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm mb-1">มูลค่าเฉลี่ย/ออเดอร์</p>
<h3 class="text-2xl font-bold text-gray-800">฿16,363</h3>
<p class="text-sm text-purple-600 mt-2 flex items-center gap-1">
<i data-feather="trending-down" class="w-4 h-4"></i>
-3.7% จากเดือนที่แล้ว
</p>
</div>
<div class="bg-purple-100 p-3 rounded-lg">
<i data-feather="bar-chart-2" class="w-6 h-6 text-purple-600"></i>
</div>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<!-- Product Sales Chart -->
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-gray-800">ยอดขายตามสินค้า</h2>
<button class="text-sm text-emerald-600 hover:text-emerald-700">ดูทั้งหมด</button>
</div>
<canvas id="productChart" width="400" height="300"></canvas>
</div>
<!-- Product Distribution Pie Chart -->
<div class="bg-white rounded-xl shadow-sm p-6">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-gray-800">สัดส่วนการขายตามประเภท</h2>
<button class="text-sm text-emerald-600 hover:text-emerald-700">ดูทั้งหมด</button>
</div>
<canvas id="distributionChart" width="400" height="300"></canvas>
</div>
</div>
<!-- Products Table -->
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
<h2 class="text-lg font-semibold text-gray-800">รายละเอียดสินค้าทั้งหมด</h2>
<div class="flex items-center gap-2">
<input type="text" placeholder="ค้นหาสินค้า..." class="px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500">
<button class="p-2 bg-emerald-500 text-white rounded-lg hover:bg-emerald-600 transition-colors">
<i data-feather="search" class="w-4 h-4"></i>
</button>
</div>
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">รหัสสินค้า</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">จำนวนที่ขาย</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">สัดส่วน (%)</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">สถานะ</th>
</tr>
</thead>
<tbody id="productTableBody" class="bg-white divide-y divide-gray-200">
<!-- Table rows will be inserted here by JavaScript -->
</tbody>
</table>
</div>
<div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
<p class="text-sm text-gray-600">แสดง <span id="showingCount">10</span> จาก <span id="totalCount">30</span> รายการ</p>
<div class="flex gap-2">
<button class="px-3 py-1 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">ก่อนหน้า</button>
<button class="px-3 py-1 bg-emerald-500 text-white rounded-lg">1</button>
<button class="px-3 py-1 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">2</button>
<button class="px-3 py-1 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">3</button>
<button class="px-3 py-1 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">ถัดไป</button>
</div>
</div>
</div>
</main>
<!-- Footer -->
<custom-footer></custom-footer>
<script src="script.js"></script>
<script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html> |