From a7bb9da042e990dff98a825ebd509894a6d7f904 Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Mon, 29 Sep 2025 22:05:26 +0800 Subject: [PATCH] JO update --- src/app/api/jo/index.ts | 1 + src/components/JoSave/JoRelease.tsx | 4 ++-- src/components/JoSave/JoSave.tsx | 3 --- src/components/JoSave/PickTable.tsx | 6 ++++-- src/i18n/zh/jo.json | 7 +------ src/i18n/zh/pickOrder.json | 12 +----------- 6 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/app/api/jo/index.ts b/src/app/api/jo/index.ts index 33a6802..539c4d3 100644 --- a/src/app/api/jo/index.ts +++ b/src/app/api/jo/index.ts @@ -41,6 +41,7 @@ export interface JoDetailPickLine { reqQty: number; uom: string; status: JoBomMaterialStatus; + shortUom: string; } export interface JoDetailPickedLotNo { diff --git a/src/components/JoSave/JoRelease.tsx b/src/components/JoSave/JoRelease.tsx index e613297..615589b 100644 --- a/src/components/JoSave/JoRelease.tsx +++ b/src/components/JoSave/JoRelease.tsx @@ -86,13 +86,13 @@ const JoRelease: React.FC = ({ {t("Lines with insufficient stock: ")}{stockCounts.insufficient} - + */} diff --git a/src/components/JoSave/JoSave.tsx b/src/components/JoSave/JoSave.tsx index 1c0546b..f7592b8 100644 --- a/src/components/JoSave/JoSave.tsx +++ b/src/components/JoSave/JoSave.tsx @@ -14,11 +14,8 @@ import PickTable from "./PickTable"; import ActionButtons from "./ActionButtons"; import { useQrCodeScannerContext } from "../QrCodeScannerProvider/QrCodeScannerProvider"; import { fetchStockInLineInfo } from "@/app/api/po/actions"; -<<<<<<< HEAD import JoRelease from "./JoRelease"; -======= import { submitDialog } from "../Swal/CustomAlerts"; ->>>>>>> 5ef2a717b8e76f98fdf437b56fa641e990ef106b type Props = { id?: number; diff --git a/src/components/JoSave/PickTable.tsx b/src/components/JoSave/PickTable.tsx index e226a52..6ab6f3f 100644 --- a/src/components/JoSave/PickTable.tsx +++ b/src/components/JoSave/PickTable.tsx @@ -70,6 +70,8 @@ const PickTable: React.FC = ({ inventory.itemCode === pickLine.code || inventory.itemName === pickLine.name ); + console.log("inventory", inventory) + return inventory?.uomShortDesc; // || pickLine.uom; }; @@ -179,7 +181,7 @@ const PickTable: React.FC = ({ headerAlign: "right", renderCell: (params: GridRenderCellParams) => { const uomShortDesc = getUomShortDesc(params.row); - return `${decimalFormatter.format(params.value)} ${uomShortDesc}`; + return `${decimalFormatter.format(params.value)} ${params.row.shortUom}`; }, }, { @@ -191,7 +193,7 @@ const PickTable: React.FC = ({ type: "number", renderCell: (params: GridRenderCellParams) => { const uomShortDesc = getUomShortDesc(params.row); - return `${decimalFormatter.format(params.value)} ${uomShortDesc}`; + return `${decimalFormatter.format(params.value)} ${params.row.shortUom}`; }, }, { diff --git a/src/i18n/zh/jo.json b/src/i18n/zh/jo.json index 80ecb6b..7e9c6be 100644 --- a/src/i18n/zh/jo.json +++ b/src/i18n/zh/jo.json @@ -23,7 +23,6 @@ "Cancel": "取消", "Scan Status": "掃碼狀態", "Start Job Order": "開始工單", -<<<<<<< HEAD "Target Production Date" : "預計生產日期", "Production Priority" : "生產優先度", "Sequence" : "序", @@ -33,15 +32,12 @@ "Total lines: ": "所需貨品項目數量: ", "Lines with sufficient stock: ": "可提料項目數量: ", "Lines with insufficient stock: ": "未能提料項目數量: ", - "Item Name" : "原材料/半成品名稱" -======= + "Item Name" : "原材料/半成品名稱", "Job Order Pickexcution": "工單提料", "Pick Order Detail": "提料單細節", "Finished Job Order Record": "已完成工單記錄", "Index": "編號", "Route": "路線", - "Item Code": "成品/半成品編號", - "Item Name": "成品/半成品名稱", "Qty": "數量", "Unit": "單位", "Location": "位置", @@ -85,5 +81,4 @@ "Please make sure the qty is enough": "請確保物料數量是足夠", "Please make sure all required items are picked": "請確保所有物料已被提取", "Do you want to start job order": "是否開始工單" ->>>>>>> 5ef2a717b8e76f98fdf437b56fa641e990ef106b } diff --git a/src/i18n/zh/pickOrder.json b/src/i18n/zh/pickOrder.json index d9b4905..618743e 100644 --- a/src/i18n/zh/pickOrder.json +++ b/src/i18n/zh/pickOrder.json @@ -282,25 +282,15 @@ "Delivery No.":"送貨單編號", "Total":"總數", "completed DO pick orders":"已完成送貨單提料單", - "No completed DO pick orders found":"沒有已完成送貨單提料單", "Delivery No":"送貨單編號", "View Details":"查看詳情", "COMPLETED":"已完成", "FG orders":"成品提料單", "Back to List":"返回列表", -<<<<<<< HEAD - - "Enter the number of cartons: ": "請輸入總箱數", - "Number of cartons": "箱數", "You need to enter a number": "箱數不能為空", "Number must be at least 1": "箱數最少為一", - "Printed Successfully.": "已成功列印" -======= - "No completed DO pick orders found":"沒有已完成送貨單提料單", - "Enter the number of cartons: ": "請輸入總箱數", - "Number of cartons": "箱數", + "Printed Successfully.": "已成功列印", "Total exceeds required qty":"總數超出所需數量" ->>>>>>> 5ef2a717b8e76f98fdf437b56fa641e990ef106b