From 6d9a9846827cff5475648999bb7affa01eb2e594 Mon Sep 17 00:00:00 2001 From: "CANCERYS\\kw093" Date: Sat, 27 Sep 2025 08:39:51 +0800 Subject: [PATCH] update --- src/app/api/pickOrder/actions.ts | 19 +++++++ .../chart/ApplicationCompletionChart.tsx | 12 ++-- .../chart/OrderCompletionChart.tsx | 12 ++-- .../FinishedGoodSearch/FinishedGoodSearch.tsx | 30 ++++++++++ .../FinishedGoodSearch/GoodPickExecution.tsx | 22 ++++++++ .../GoodPickExecutionRecord.tsx | 56 +++++++++++++------ .../GoodPickExecutiondetail.tsx | 5 +- .../NavigationContent/NavigationContent.tsx | 2 +- src/i18n/zh/common.json | 3 +- src/i18n/zh/dashboard.json | 2 +- src/i18n/zh/pickOrder.json | 7 ++- 11 files changed, 137 insertions(+), 33 deletions(-) diff --git a/src/app/api/pickOrder/actions.ts b/src/app/api/pickOrder/actions.ts index 70ede94..8c35c9b 100644 --- a/src/app/api/pickOrder/actions.ts +++ b/src/app/api/pickOrder/actions.ts @@ -681,6 +681,25 @@ export const fetchAllPickOrderLotsHierarchical = cache(async (userId: number): P }; } }); +export const fetchLotDetailsByPickOrderId = async (pickOrderId: number): Promise => { + try { + console.log("🔍 Fetching lot details for pickOrderId:", pickOrderId); + + const data = await serverFetchJson( + `${BASE_API_URL}/pickOrder/lot-details-by-pick-order/${pickOrderId}`, + { + method: 'GET', + next: { tags: ["pickorder"] }, + } + ); + + console.log("✅ Fetched lot details for pickOrderId:", data); + return data; + } catch (error) { + console.error("❌ Error fetching lot details for pickOrderId:", error); + return []; + } +}; // Update the existing function to use the non-auto-assign endpoint export const fetchALLPickOrderLineLotDetails = cache(async (userId: number): Promise => { try { diff --git a/src/components/DashboardPage/chart/ApplicationCompletionChart.tsx b/src/components/DashboardPage/chart/ApplicationCompletionChart.tsx index 13d9204..f00e3b6 100644 --- a/src/components/DashboardPage/chart/ApplicationCompletionChart.tsx +++ b/src/components/DashboardPage/chart/ApplicationCompletionChart.tsx @@ -5,7 +5,7 @@ const ApexCharts = dynamic(() => import("react-apexcharts"), { ssr: false }); import { useTranslation } from "react-i18next"; const ApplicationCompletionChart: React.FC = () => { const { t } = useTranslation(); - const [tab, setTab] = useState(t("Raw material")); + const [tab, setTab] = useState(t("Store Management")); const percent = 0; const options = { chart: { type: "donut" as const }, @@ -68,19 +68,19 @@ const ApplicationCompletionChart: React.FC = () => {