Files
ewoooc/MOMO Pro/data.jsx
2026-04-30 23:37:52 +08:00

74 lines
6.6 KiB
JavaScript

// data.jsx — sample Taiwan e-commerce data
const ORDERS = [
{ id: 'MO20260430-00892', customer: '陳怡君', email: 'chen.yj@gmail.com', items: 3, total: 4280, status: 'paid', payment: '信用卡', shipping: '宅配', date: '2026-04-30 14:32', region: '台北市' },
{ id: 'MO20260430-00891', customer: '林志豪', email: 'lin.zh@yahoo.com.tw', items: 1, total: 1290, status: 'shipped', payment: 'LINE Pay', shipping: '超商取貨', date: '2026-04-30 13:18', region: '新北市' },
{ id: 'MO20260430-00890', customer: '王雅婷', email: 'wang.yt@hotmail.com', items: 5, total: 8950, status: 'pending', payment: '貨到付款', shipping: '宅配', date: '2026-04-30 12:45', region: '台中市' },
{ id: 'MO20260430-00889', customer: '張家豪', email: 'chang.jh@gmail.com', items: 2, total: 2680, status: 'paid', payment: '街口支付', shipping: '超商取貨', date: '2026-04-30 11:50', region: '高雄市' },
{ id: 'MO20260430-00888', customer: '黃淑芬', email: 'huang.sf@yahoo.com.tw', items: 1, total: 590, status: 'cancelled', payment: '信用卡', shipping: '宅配', date: '2026-04-30 10:22', region: '桃園市' },
{ id: 'MO20260430-00887', customer: '李建宏', email: 'li.jh@gmail.com', items: 4, total: 6320, status: 'shipped', payment: 'Apple Pay', shipping: '宅配', date: '2026-04-30 09:15', region: '台南市' },
{ id: 'MO20260430-00886', customer: '吳佩琪', email: 'wu.pq@kimo.com', items: 2, total: 1880, status: 'completed', payment: '信用卡', shipping: '超商取貨', date: '2026-04-30 08:40', region: '台北市' },
{ id: 'MO20260429-00885', customer: '劉冠廷', email: 'liu.gt@gmail.com', items: 6, total: 12450, status: 'paid', payment: '信用卡', shipping: '宅配', date: '2026-04-29 22:18', region: '新竹市' },
{ id: 'MO20260429-00884', customer: '蔡欣穎', email: 'tsai.xy@hotmail.com', items: 1, total: 780, status: 'completed', payment: 'LINE Pay', shipping: '超商取貨', date: '2026-04-29 20:55', region: '台中市' },
{ id: 'MO20260429-00883', customer: '楊俊賢', email: 'yang.jx@gmail.com', items: 3, total: 3450, status: 'pending', payment: '貨到付款', shipping: '宅配', date: '2026-04-29 19:30', region: '彰化縣' },
{ id: 'MO20260429-00882', customer: '鄭美玲', email: 'cheng.ml@yahoo.com.tw', items: 2, total: 2190, status: 'shipped', payment: '信用卡', shipping: '超商取貨', date: '2026-04-29 18:12', region: '台北市' },
{ id: 'MO20260429-00881', customer: '許文凱', email: 'hsu.wk@gmail.com', items: 1, total: 4990, status: 'paid', payment: '街口支付', shipping: '宅配', date: '2026-04-29 17:00', region: '高雄市' },
];
const PRODUCTS = [
{ id: 'P00128', name: '無線藍牙降噪耳機 Pro Max', sku: 'AUD-BT-PRO-001', category: '3C / 耳機', price: 4990, cost: 2200, stock: 142, sold: 1284, status: 'active', image: '🎧' },
{ id: 'P00127', name: '日式陶瓷餐具六件組', sku: 'KIT-CER-006', category: '居家 / 餐具', price: 1280, cost: 480, stock: 38, sold: 562, status: 'active', image: '🍽️' },
{ id: 'P00126', name: '有機冷壓初榨橄欖油 500ml', sku: 'FOOD-OIL-500', category: '食品 / 油品', price: 680, cost: 280, stock: 8, sold: 928, status: 'low_stock', image: '🫒' },
{ id: 'P00125', name: '韓系寬鬆針織毛衣(米白)', sku: 'CLO-KNT-WH-M', category: '服飾 / 上衣', price: 1490, cost: 520, stock: 96, sold: 348, status: 'active', image: '🧥' },
{ id: 'P00124', name: '北歐簡約檯燈 LED 護眼', sku: 'HOM-LMP-LED', category: '居家 / 燈飾', price: 2380, cost: 980, stock: 0, sold: 215, status: 'out_of_stock', image: '💡' },
{ id: 'P00123', name: '保溫不鏽鋼隨行杯 500ml', sku: 'KIT-CUP-SS500', category: '居家 / 杯具', price: 890, cost: 320, stock: 256, sold: 1842, status: 'active', image: '🥤' },
{ id: 'P00122', name: '高蛋白燕麥能量棒 12 入', sku: 'FOOD-BAR-OAT', category: '食品 / 零食', price: 480, cost: 180, stock: 412, sold: 2104, status: 'active', image: '🌾' },
{ id: 'P00121', name: '皮革商務後背包 15"', sku: 'BAG-LTH-15', category: '配件 / 包款', price: 3680, cost: 1450, stock: 24, sold: 156, status: 'active', image: '🎒' },
{ id: 'P00120', name: '智慧運動手錶 第三代', sku: 'WCH-SPT-G3', category: '3C / 穿戴', price: 5890, cost: 2480, stock: 5, sold: 432, status: 'low_stock', image: '⌚' },
{ id: 'P00119', name: '純棉素色短袖 T 恤(藏青)', sku: 'CLO-TEE-NV-L', category: '服飾 / 上衣', price: 590, cost: 180, stock: 320, sold: 1568, status: 'active', image: '👕' },
];
const STATUS_LABELS = {
paid: { label: '已付款', tone: 'info' },
pending: { label: '待處理', tone: 'warning' },
shipped: { label: '已出貨', tone: 'primary' },
completed: { label: '已完成', tone: 'success' },
cancelled: { label: '已取消', tone: 'neutral' },
active: { label: '上架中', tone: 'success' },
low_stock: { label: '庫存不足', tone: 'warning' },
out_of_stock:{ label: '已售完', tone: 'danger' },
};
// 30 天營收(單位 NT$ 千)
const REVENUE_30D = [
142, 168, 195, 178, 156, 210, 245, 198, 172, 188,
220, 256, 234, 198, 215, 248, 280, 312, 285, 268,
295, 332, 358, 340, 318, 295, 348, 392, 425, 408,
];
const HOURLY_TRAFFIC = [
120, 95, 68, 42, 35, 48, 92, 168, 245, 312,
385, 428, 462, 445, 418, 392, 358, 412, 478, 525,
548, 502, 412, 285,
];
const CATEGORY_SHARE = [
{ name: '3C 數位', value: 32, color: '#667eea' },
{ name: '服飾配件', value: 24, color: '#764ba2' },
{ name: '居家生活', value: 18, color: '#5568d3' },
{ name: '食品保健', value: 14, color: '#818cf8' },
{ name: '美妝個護', value: 8, color: '#a5b4fc' },
{ name: '其他', value: 4, color: '#c7d2fe' },
];
const ACTIVITIES = [
{ type: 'order', icon: '🛒', text: '新訂單 MO20260430-00892', detail: '陳怡君 · NT$4,280', time: '剛剛', tone: 'info' },
{ type: 'stock', icon: '⚠️', text: '低庫存警示:有機橄欖油', detail: '剩餘 8 件 / 安全庫存 20', time: '5 分鐘前', tone: 'warning' },
{ type: 'review', icon: '⭐', text: '新評價 5 星', detail: '無線藍牙降噪耳機 Pro Max', time: '12 分鐘前', tone: 'success' },
{ type: 'order', icon: '🛒', text: '新訂單 MO20260430-00891', detail: '林志豪 · NT$1,290', time: '18 分鐘前', tone: 'info' },
{ type: 'refund', icon: '↩️', text: '退款申請', detail: 'MO20260430-00888 · NT$590', time: '32 分鐘前', tone: 'danger' },
{ type: 'campaign', icon: '🎯', text: '行銷活動上線', detail: '五一連假滿千折百', time: '1 小時前', tone: 'primary' },
];
Object.assign(window, { ORDERS, PRODUCTS, STATUS_LABELS, REVENUE_30D, HOURLY_TRAFFIC, CATEGORY_SHARE, ACTIVITIES });