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" && (
)}
-
+ */}
{/* ADD STORE-BASED ASSIGNMENT BUTTONS */}
{
formProps.watch("status")?.toLowerCase() === "released" && (
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/FinishedGoodSearch.tsx b/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx
index eed600e..bb44739 100644
--- a/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx
+++ b/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx
@@ -71,12 +71,8 @@ const PickOrderSearch: React.FC = ({ pickOrders, printerCombo }) => {
// const [summary4F, setSummary4F] = useState(null);
const [isLoadingSummary, setIsLoadingSummary] = useState(false);
- const [selectedPrinterForAllDraft, setSelectedPrinterForAllDraft] = useState(
- printerCombo.find(p => p.id === 13) ?? null // 默认 A4 打印机 id = 13
- );
- const [selectedPrinterForDraft, setSelectedPrinterForDraft] = useState(
- printerCombo.find(p => p.id === 9) ?? null // 默认 Label 打印机 id = 9
- );
+ const [selectedPrinterForAllDraft, setSelectedPrinterForAllDraft] = useState(null);
+const [selectedPrinterForDraft, setSelectedPrinterForDraft] = useState(null);
const [selectedPrinterForRecord, setSelectedPrinterForRecord] = useState(null);
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": "位置",