feat: API調整訂單與販賣機訂單同步強制使用warehouse_code,更新API對接文件,及優化生產與配方模組UI顯示
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 55s
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 55s
This commit is contained in:
@@ -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 >
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user