fix(Inventory): 修復庫存列表批號欄位與新增庫存頁面儲位欄位遺失問題,並還原批號輸入佈局

This commit is contained in:
2026-02-06 17:35:50 +08:00
parent e018b75783
commit f22df90e01
8 changed files with 48 additions and 8 deletions

View File

@@ -42,7 +42,11 @@ export default function InventoryTable({
onView,
onDelete,
onViewProduct,
}: InventoryTableProps) {
warehouse,
}: InventoryTableProps & { warehouse: any }) {
// 判斷是否為販賣機倉庫
const isVending = warehouse?.type === "vending";
// 每個商品的展開/折疊狀態
const [expandedProducts, setExpandedProducts] = useState<Set<string>>(new Set());
@@ -197,7 +201,8 @@ export default function InventoryTable({
<TableHeader>
<TableRow>
<TableHead className="w-[5%]">#</TableHead>
<TableHead className="w-[12%]"></TableHead>
<TableHead className="w-[15%]"></TableHead>
<TableHead className="w-[10%]">{isVending ? "貨道" : "儲位"}</TableHead>
<TableHead className="w-[10%]"></TableHead>
<Can permission="inventory.view_cost">
<TableHead className="w-[10%]"></TableHead>
@@ -215,6 +220,7 @@ export default function InventoryTable({
<TableRow key={batch.id}>
<TableCell className="text-grey-2">{index + 1}</TableCell>
<TableCell>{batch.batchNumber || "-"}</TableCell>
<TableCell>{batch.location || "-"}</TableCell>
<TableCell>
<span>{batch.quantity} {batch.unit}</span>
</TableCell>