feat: API調整訂單與販賣機訂單同步強制使用warehouse_code,更新API對接文件,及優化生產與配方模組UI顯示
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 55s

This commit is contained in:
2026-03-03 14:28:15 +08:00
parent 58bd995cd8
commit 183583c739
19 changed files with 486 additions and 89 deletions

View File

@@ -39,6 +39,8 @@ interface Recipe {
is_active: boolean;
description: string;
updated_at: string;
estimated_total_cost?: number;
estimated_unit_cost?: number;
}
interface Props {
@@ -187,6 +189,8 @@ export default function RecipeIndex({ recipes, filters }: Props) {
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead className="text-right"></TableHead>
<TableHead className="text-center w-[100px]"></TableHead>
<TableHead className="w-[150px]"></TableHead>
<TableHead className="text-center w-[150px]"></TableHead>
@@ -195,7 +199,7 @@ export default function RecipeIndex({ recipes, filters }: Props) {
<TableBody>
{recipes.data.length === 0 ? (
<TableRow>
<TableCell colSpan={7} className="h-32 text-center text-gray-500">
<TableCell colSpan={9} className="h-32 text-center text-gray-500">
<div className="flex flex-col items-center justify-center gap-2">
<BookOpen className="h-10 w-10 text-gray-300" />
<p></p>
@@ -227,7 +231,13 @@ export default function RecipeIndex({ recipes, filters }: Props) {
) : '-'}
</TableCell>
<TableCell className="text-right font-medium">
{recipe.yield_quantity}
{Number(recipe.yield_quantity).toLocaleString(undefined, { maximumFractionDigits: 4 })}
</TableCell>
<TableCell className="text-right font-medium text-primary-main">
{Number(recipe.estimated_unit_cost || 0).toLocaleString(undefined, { maximumFractionDigits: 2 })}
</TableCell>
<TableCell className="text-right font-medium text-gray-700">
{Number(recipe.estimated_total_cost || 0).toLocaleString(undefined, { maximumFractionDigits: 2 })}
</TableCell>
<TableCell className="text-center">
{recipe.is_active ? (
@@ -338,6 +348,6 @@ export default function RecipeIndex({ recipes, filters }: Props) {
isLoading={isViewLoading}
/>
</div>
</AuthenticatedLayout>
</AuthenticatedLayout >
);
}