feat(生產/庫存): 實作生產管理模組與批號追溯功能
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 53s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-21 17:19:36 +08:00
parent fc20c6d813
commit 1ae21febb5
17 changed files with 1753 additions and 33 deletions

View File

@@ -148,7 +148,9 @@ export default function AddInventoryPage({ warehouse, products }: Props) {
return {
productId: item.productId,
quantity: finalQuantity
quantity: finalQuantity,
batchNumber: item.batchNumber,
expiryDate: item.expiryDate
};
})
}, {
@@ -307,8 +309,8 @@ export default function AddInventoryPage({ warehouse, products }: Props) {
</TableHead>
<TableHead className="w-[100px]"></TableHead>
<TableHead className="w-[150px]"></TableHead>
{/* <TableHead className="w-[180px]">效期</TableHead>
<TableHead className="w-[220px]">進貨編號</TableHead> */}
<TableHead className="w-[180px]"></TableHead>
<TableHead className="w-[220px]"></TableHead>
<TableHead className="w-[60px]"></TableHead>
</TableRow>
</TableHeader>
@@ -395,37 +397,40 @@ export default function AddInventoryPage({ warehouse, products }: Props) {
</TableCell>
{/* 效期 */}
{/* <TableCell>
<div className="relative">
<TableCell>
<div className="relative">
<Calendar className="absolute left-2.5 top-2.5 h-4 w-4 text-gray-400 pointer-events-none" />
<Input
type="date"
value={item.expiryDate || ""}
onChange={(e) =>
handleUpdateItem(item.tempId, {
expiryDate: e.target.value,
})
}
className="border-gray-300 pl-9"
/>
</div>
</TableCell>
{/* 批號 */}
<TableCell>
<Input
type="date"
value={item.expiryDate}
value={item.batchNumber || ""}
onChange={(e) =>
handleUpdateItem(item.tempId, {
expiryDate: e.target.value,
batchNumber: e.target.value,
})
}
className="border-gray-300"
placeholder="系統自動生成"
/>
</div>
</TableCell> */}
{/* 批號 */}
{/* <TableCell>
<Input
value={item.batchNumber}
onChange={(e) =>
handleBatchNumberChange(item.tempId, e.target.value)
}
className="border-gray-300"
placeholder="系統自動生成"
/>
{errors[`item-${index}-batch`] && (
<p className="text-xs text-red-500 mt-1">
{errors[`item-${index}-batch`]}
</p>
)}
</TableCell> */}
{errors[`item-${index}-batch`] && (
<p className="text-xs text-red-500 mt-1">
{errors[`item-${index}-batch`]}
</p>
)}
</TableCell>
{/* 刪除按鈕 */}
<TableCell>