From 68ecd1868a3c79dbd89a9057191a6d6a2b0cc81d Mon Sep 17 00:00:00 2001 From: "CANCERYS\\kw093" Date: Thu, 4 Dec 2025 11:17:46 +0800 Subject: [PATCH 1/3] update --- src/components/DoSearch/DoSearchWrapper.tsx | 4 ++-- .../FinishedGoodSearch/GoodPickExecutionRecord.tsx | 6 +++--- src/i18n/zh/pickOrder.json | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/DoSearch/DoSearchWrapper.tsx b/src/components/DoSearch/DoSearchWrapper.tsx index 93934b7..fd3855e 100644 --- a/src/components/DoSearch/DoSearchWrapper.tsx +++ b/src/components/DoSearch/DoSearchWrapper.tsx @@ -8,8 +8,8 @@ interface SubComponents { } const DoSearchWrapper: React.FC & SubComponents = async () => { - const [dos] = await Promise.all([fetchDoList()]); - return ; + // const [dos] = await Promise.all([fetchDoList()]); + return ; }; DoSearchWrapper.Loading = GeneralLoading; diff --git a/src/components/FinishedGoodSearch/GoodPickExecutionRecord.tsx b/src/components/FinishedGoodSearch/GoodPickExecutionRecord.tsx index bb5670b..5c774db 100644 --- a/src/components/FinishedGoodSearch/GoodPickExecutionRecord.tsx +++ b/src/components/FinishedGoodSearch/GoodPickExecutionRecord.tsx @@ -184,7 +184,7 @@ const GoodPickExecutionRecord: React.FC = ({ filterArgs, printerCombo, a4 console.error("error: ", error) } } - }, [t]); + }, [t, a4Printer]); const handleDNandLabel = useCallback(async (recordId: number) => { if (!a4Printer || !labelPrinter) { @@ -281,7 +281,7 @@ const GoodPickExecutionRecord: React.FC = ({ filterArgs, printerCombo, a4 console.error("error: ", error) } } - }, [t]); + }, [t, a4Printer, labelPrinter]); const handleLabel = useCallback(async (recordId: number) => { const askNumofCarton = await Swal.fire({ @@ -340,7 +340,7 @@ const GoodPickExecutionRecord: React.FC = ({ filterArgs, printerCombo, a4 console.error("error: ", error) } } - }, [t]); + }, [t, labelPrinter]); // 修改:使用新的 API 获取已完成的 DO Pick Orders const fetchCompletedDoPickOrdersData = useCallback(async (searchParams?: CompletedDoPickOrderSearchParams) => { diff --git a/src/i18n/zh/pickOrder.json b/src/i18n/zh/pickOrder.json index 65a0a14..51558a0 100644 --- a/src/i18n/zh/pickOrder.json +++ b/src/i18n/zh/pickOrder.json @@ -207,6 +207,8 @@ "Delivery Note Code": "送貨單編號", "A4 Printer": "A4 打印機", "Label Printer": "標籤打印機", + "Please select a printer first": "請先選擇打印機", + "Lot No": "批號", "Expiry Date": "到期日", "Location": "位置", From e07bf98a6b9a9e9f45f163a23fc514cef7bf4ae6 Mon Sep 17 00:00:00 2001 From: "CANCERYS\\kw093" Date: Thu, 4 Dec 2025 12:59:06 +0800 Subject: [PATCH 2/3] update --- src/components/DoDetail/DoDetail.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/DoDetail/DoDetail.tsx b/src/components/DoDetail/DoDetail.tsx index 49d8940..a8d3a14 100644 --- a/src/components/DoDetail/DoDetail.tsx +++ b/src/components/DoDetail/DoDetail.tsx @@ -51,16 +51,16 @@ console.log("🔍 DoSearch - currentUserId:", currentUserId); if (id) { // Get current user ID from session - const currentUserId = session?.id ? parseInt(session.id) : undefined; + //const currentUserId = session?.id ? parseInt(session.id) : undefined; - if (!currentUserId) { - setServerError("User session not found. Please login again."); - return; - } + //if (!currentUserId) { + // setServerError("User session not found. Please login again."); + // return; + //} const response = await releaseDo({ id: id, - userId: currentUserId // Pass user ID from session + //userId: currentUserId // Pass user ID from session }) if (response) { @@ -168,7 +168,7 @@ console.log("🔍 DoSearch - currentUserId:", currentUserId); )} - { + {/*{ formProps.watch("status")?.toLowerCase() === "pending" && (