/** 产品信息卡片 */ import { Package } from "lucide-react"; import type { ProductScanResponse } from "../../types/api"; const STATUS_LABELS: Record = { pending: "待处理", in_progress: "进行中", completed: "已完成", cancelled: "已取消", }; function statusColor(status: string): string { switch (status) { case "pending": return "bg-yellow-100 text-yellow-700"; case "in_progress": return "bg-blue-100 text-blue-700"; case "completed": return "bg-green-100 text-green-700"; default: return "bg-gray-100 text-gray-600"; } } interface ProductCardProps { product: ProductScanResponse; } export default function ProductCard({ product }: ProductCardProps) { return (

产品信息

{STATUS_LABELS[product.status] ?? product.status}
序列号

{product.serial_number}

订单编号

{product.order_no}

{product.material_id && (
物料 ID

{product.material_id}

)}
); }