| @@ -927,11 +927,12 @@ export const resuggestPickOrder = async (pickOrderId: number) => { | |||||
| * Current backend route is shared with legacy resuggest, but we expose a dedicated | * Current backend route is shared with legacy resuggest, but we expose a dedicated | ||||
| * API name so PickOrder workbench pages can migrate independently. | * API name so PickOrder workbench pages can migrate independently. | ||||
| */ | */ | ||||
| export const suggestPickOrderWorkbenchV2 = async (pickOrderId: number) => { | |||||
| export const suggestPickOrderWorkbenchV2 = async (pickOrderId: number, userId: number) => { | |||||
| const result = await serverFetchJson<PostPickOrderResponse>( | const result = await serverFetchJson<PostPickOrderResponse>( | ||||
| `${BASE_API_URL}/suggestedPickLot/resuggest/${pickOrderId}`, | |||||
| `${BASE_API_URL}/pickOrder/workbench/suggest-v2/${pickOrderId}`, | |||||
| { | { | ||||
| method: "POST", | method: "POST", | ||||
| body: JSON.stringify({ userId }), | |||||
| headers: { "Content-Type": "application/json" }, | headers: { "Content-Type": "application/json" }, | ||||
| }, | }, | ||||
| ); | ); | ||||
| @@ -1105,6 +1106,7 @@ export interface PickOrderLotDetailResponse { | |||||
| lotNo: string | null; // ✅ 改为可空 | lotNo: string | null; // ✅ 改为可空 | ||||
| expiryDate: string | null; // ✅ 改为可空 | expiryDate: string | null; // ✅ 改为可空 | ||||
| location: string | null; // ✅ 改为可空 | location: string | null; // ✅ 改为可空 | ||||
| itemId: number | null; | |||||
| stockUnit: string | null; | stockUnit: string | null; | ||||
| inQty: number | null; | inQty: number | null; | ||||
| availableQty: number | null; // ✅ 改为可空 | availableQty: number | null; // ✅ 改为可空 | ||||
| @@ -15,6 +15,7 @@ import { | |||||
| import { | import { | ||||
| arrayToDayjs, | arrayToDayjs, | ||||
| } from "@/app/utils/formatUtil"; | } from "@/app/utils/formatUtil"; | ||||
| import JoPickOrderList from "@/components/JoWorkbench/JoPickOrderList"; | |||||
| import { Button, Grid, Stack, Tab, Tabs, TabsProps, Typography, Box, TextField, Autocomplete } from "@mui/material"; | import { Button, Grid, Stack, Tab, Tabs, TabsProps, Typography, Box, TextField, Autocomplete } from "@mui/material"; | ||||
| import Jodetail from "./Jodetail" | import Jodetail from "./Jodetail" | ||||
| import PickExecution from "./JobPickExecution"; | import PickExecution from "./JobPickExecution"; | ||||
| @@ -26,7 +27,7 @@ import JobPickExecutionsecondscan from "./JobPickExecutionsecondscan"; | |||||
| import FInishedJobOrderRecord from "./FInishedJobOrderRecord"; | import FInishedJobOrderRecord from "./FInishedJobOrderRecord"; | ||||
| import JobPickExecution from "./JobPickExecution"; | import JobPickExecution from "./JobPickExecution"; | ||||
| import CompleteJobOrderRecord from "./completeJobOrderRecord"; | import CompleteJobOrderRecord from "./completeJobOrderRecord"; | ||||
| import JoPickOrderList from "./JoPickOrderList"; | |||||
| //import JoPickOrderList from "./JoPickOrderList"; | |||||
| import { | import { | ||||
| fetchUnassignedJobOrderPickOrders, | fetchUnassignedJobOrderPickOrders, | ||||
| assignJobOrderPickOrder, | assignJobOrderPickOrder, | ||||
| @@ -175,7 +175,7 @@ const NavigationContent: React.FC = () => { | |||||
| icon: <Inventory />, | icon: <Inventory />, | ||||
| label: "Job Order Pickexcution", | label: "Job Order Pickexcution", | ||||
| requiredAbility: [AUTH.JOB_PICK, AUTH.JOB_MAT, AUTH.ADMIN], | requiredAbility: [AUTH.JOB_PICK, AUTH.JOB_MAT, AUTH.ADMIN], | ||||
| path: "/jo/workbench", | |||||
| path: "/jodetail", | |||||
| }, | }, | ||||
| { | { | ||||
| icon: <Kitchen />, | icon: <Kitchen />, | ||||
| @@ -398,7 +398,12 @@ const NavigationContent: React.FC = () => { | |||||
| if (pathname === "/productionProcess" || pathname.startsWith("/productionProcess/")) { | if (pathname === "/productionProcess" || pathname.startsWith("/productionProcess/")) { | ||||
| ensureOpen.push("Management Job Order"); | ensureOpen.push("Management Job Order"); | ||||
| } | } | ||||
| if (pathname === "/jo/workbench" || pathname.startsWith("/jo/workbench/")) { | |||||
| if ( | |||||
| pathname === "/jo/workbench" || | |||||
| pathname.startsWith("/jo/workbench/") || | |||||
| pathname === "/jodetail" || | |||||
| pathname.startsWith("/jodetail/") | |||||
| ) { | |||||
| ensureOpen.push("Management Job Order"); | ensureOpen.push("Management Job Order"); | ||||
| } | } | ||||
| if ( | if ( | ||||