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:
@@ -36,6 +36,8 @@ interface ProductionOrder {
|
||||
production_date: string;
|
||||
status: 'draft' | 'pending' | 'approved' | 'in_progress' | 'completed' | 'cancelled';
|
||||
created_at: string;
|
||||
estimated_total_cost?: number;
|
||||
estimated_unit_cost?: number;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -201,6 +203,8 @@ export default function ProductionIndex({ productionOrders, filters }: Props) {
|
||||
<TableHead>成品</TableHead>
|
||||
<TableHead>成品批號</TableHead>
|
||||
<TableHead className="text-right">數量</TableHead>
|
||||
<TableHead className="text-right">預估單位成本</TableHead>
|
||||
<TableHead className="text-right">預估總成本</TableHead>
|
||||
<TableHead>入庫倉庫</TableHead>
|
||||
<TableHead>生產日期</TableHead>
|
||||
<TableHead className="text-center w-[100px]">狀態</TableHead>
|
||||
@@ -210,7 +214,7 @@ export default function ProductionIndex({ productionOrders, filters }: Props) {
|
||||
<TableBody>
|
||||
{productionOrders.data.length === 0 ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={8} className="h-32 text-center text-gray-500">
|
||||
<TableCell colSpan={10} className="h-32 text-center text-gray-500">
|
||||
<div className="flex flex-col items-center justify-center gap-2">
|
||||
<Factory className="h-10 w-10 text-gray-300" />
|
||||
<p>尚無生產工單</p>
|
||||
@@ -239,6 +243,12 @@ export default function ProductionIndex({ productionOrders, filters }: Props) {
|
||||
<TableCell className="text-right font-medium">
|
||||
{formatQuantity(order.output_quantity)}
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-medium text-primary-main">
|
||||
{Number(order.estimated_unit_cost || 0).toLocaleString(undefined, { maximumFractionDigits: 2 })} 元
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-medium text-gray-700">
|
||||
{Number(order.estimated_total_cost || 0).toLocaleString(undefined, { maximumFractionDigits: 2 })} 元
|
||||
</TableCell>
|
||||
<TableCell className="text-gray-600">
|
||||
{order.warehouse?.name || '-'}
|
||||
</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user