生產工單BOM以及批號完善
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 57s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-22 15:39:35 +08:00
parent 1ae21febb5
commit 1d134c9ad8
31 changed files with 2684 additions and 694 deletions

View File

@@ -86,6 +86,15 @@ const fieldLabels: Record<string, string> = {
quantity: '數量',
safety_stock: '安全庫存',
location: '儲位',
// Inventory fields
batch_number: '批號',
box_number: '箱號',
origin_country: '來源國家',
arrival_date: '入庫日期',
expiry_date: '有效期限',
source_purchase_order_id: '來源採購單',
quality_status: '品質狀態',
quality_remark: '品質備註',
// Purchase Order fields
po_number: '採購單號',
vendor_id: '廠商',
@@ -118,6 +127,13 @@ const statusMap: Record<string, string> = {
completed: '已完成',
};
// Inventory Quality Status Map
const qualityStatusMap: Record<string, string> = {
normal: '正常',
frozen: '凍結',
rejected: '瑕疵/拒收',
};
export default function ActivityDetailDialog({ open, onOpenChange, activity }: Props) {
if (!activity) return null;
@@ -193,8 +209,13 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
return statusMap[value];
}
// Handle Inventory Quality Status
if (key === 'quality_status' && typeof value === 'string' && qualityStatusMap[value]) {
return qualityStatusMap[value];
}
// Handle Date Fields (YYYY-MM-DD)
if ((key === 'expected_delivery_date' || key === 'invoice_date') && typeof value === 'string') {
if ((key === 'expected_delivery_date' || key === 'invoice_date' || key === 'arrival_date' || key === 'expiry_date') && typeof value === 'string') {
// Take only the date part (YYYY-MM-DD)
return value.split('T')[0].split(' ')[0];
}