diff --git a/src/app/api/doworkbench/actions.ts b/src/app/api/doworkbench/actions.ts index 4c04edc..707208f 100644 --- a/src/app/api/doworkbench/actions.ts +++ b/src/app/api/doworkbench/actions.ts @@ -252,6 +252,7 @@ export async function assignWorkbenchByLane(data: { storeId: string; truckLanceCode: string; truckDepartureTime?: string; + loadingSequence?: number | null; requiredDate?: string; }): Promise { const res = await serverFetchJson( diff --git a/src/components/DoWorkbench/WorkbenchFloorLanePanel.tsx b/src/components/DoWorkbench/WorkbenchFloorLanePanel.tsx index 5356b20..599764b 100644 --- a/src/components/DoWorkbench/WorkbenchFloorLanePanel.tsx +++ b/src/components/DoWorkbench/WorkbenchFloorLanePanel.tsx @@ -160,7 +160,13 @@ const WorkbenchFloorLanePanel: React.FC = ({ onPickOrderAssigned, onSwitc }, []); const handleAssignByLane = useCallback( - async (storeId: string, truckDepartureTime: string, truckLanceCode: string, requiredDate: string) => { + async ( + storeId: string, + truckDepartureTime: string, + truckLanceCode: string, + loadingSequence: number | null | undefined, + requiredDate: string, + ) => { if (!currentUserId) return; let dateParam: string | undefined; if (requiredDate === "today") dateParam = dayjs().format("YYYY-MM-DD"); @@ -173,6 +179,7 @@ const WorkbenchFloorLanePanel: React.FC = ({ onPickOrderAssigned, onSwitc storeId, truckLanceCode, truckDepartureTime, + loadingSequence, requiredDate: dateParam, }); console.log("assignByLane result:", res); @@ -223,7 +230,7 @@ const WorkbenchFloorLanePanel: React.FC = ({ onPickOrderAssigned, onSwitc cancelButtonColor: "#F04438", }); if (result.isConfirmed) { - await handleAssignByLane(storeId, truckDepartureTime, truckLanceCode, requiredDate); + await handleAssignByLane(storeId, truckDepartureTime, truckLanceCode, loadingSequence, requiredDate); } }, [handleAssignByLane, t], diff --git a/src/components/DoWorkbench/WorkbenchGoodPickExecution.tsx b/src/components/DoWorkbench/WorkbenchGoodPickExecution.tsx index bed75e0..f05aaf2 100644 --- a/src/components/DoWorkbench/WorkbenchGoodPickExecution.tsx +++ b/src/components/DoWorkbench/WorkbenchGoodPickExecution.tsx @@ -35,7 +35,6 @@ import { checkAndCompletePickOrderByConsoCode, fetchDoPickOrderDetail, DoPickOrderDetail, - batchQrSubmit, } from "@/app/api/pickOrder/actions"; import { fetchNameList, NameList } from "@/app/api/user/actions"; import { diff --git a/src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx b/src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx index 15028cb..dff4545 100644 --- a/src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx +++ b/src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx @@ -44,7 +44,6 @@ import { confirmLotSubstitution, fetchDoPickOrderDetail, // 必须添加 DoPickOrderDetail, // 必须添加 - batchQrSubmit, batchScan, BatchScanRequest, BatchScanLineRequest, diff --git a/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx b/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx index f2c4292..0dabe83 100644 --- a/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx +++ b/src/components/FinishedGoodSearch/FinishedGoodSearch.tsx @@ -28,7 +28,7 @@ import { fetchPickOrderClient, autoAssignAndReleasePickOrder, autoAssignAndRelea import Jobcreatitem from "./Jobcreatitem"; import { useSession } from "next-auth/react"; import { SessionWithTokens } from "@/config/authConfig"; -import PickExecutionDetail from "./GoodPickExecutiondetail"; +//import PickExecutionDetail from "./GoodPickExecutiondetail"; import GoodPickExecutionRecord from "./GoodPickExecutionRecord"; import Swal from "sweetalert2"; import { printDN, printDNLabels } from "@/app/api/do/actions"; @@ -860,13 +860,14 @@ const handleAssignByLane = useCallback(async ( }} /> )} + {/* {tabIndex === 1 && ( - - ) } + ) */} {tabIndex === 2 && ( `fpsms-fg-issuePickedQty:${doPickOrderId}`; @@ -768,7 +768,7 @@ const PickExecution: React.FC = ({ const [lotConfirmationError, setLotConfirmationError] = useState< string | null >(null); - /** QR 静默换批失败时显示在对应行的 Lot# 列,key = stockOutLineId */ + /** QR 静默换批失败时显示在对应行的 Lot# 列,key = stockOutLineId const [lotSwitchFailByStockOutLineId, setLotSwitchFailByStockOutLineId] = useState>({}); const [expectedLotData, setExpectedLotData] = useState(null); @@ -1232,7 +1232,7 @@ const PickExecution: React.FC = ({ pickOrderLinesForDisplay.forEach((line: any) => { // 用来记录这一行已经通过 lots 出现过的 lotId const lotIdSet = new Set(); - /** 已由有批次建議分配的量(加總後與 pick_order_line.requiredQty 的差額 = 無批次列應顯示的數) */ + /** 已由有批次建議分配的量(加總後與 pick_order_line.requiredQty 的差額 = 無批次列應顯示的數) let lotsAllocatedSumForLine = 0; // ✅ lots:按 lotId 去重并合并 requiredQty @@ -4255,7 +4255,7 @@ const PickExecution: React.FC = ({ handleStopScan(); } }, [combinedLotData.length, isManualScanning, handleStopScan]); - */ + // Cleanup effect useEffect(() => { @@ -4337,9 +4337,9 @@ const PickExecution: React.FC = ({ successMessage={t("QR code verified.")} /> - {/* DO Header */} + {/* DO Header } - {/* 保留:Combined Lot Table - 包含所有 QR 扫描功能 */} + {/* 保留:Combined Lot Table - 包含所有 QR 扫描功能 } = ({ - {/* Scanner status indicator (always visible) */} + {/* Scanner status indicator (always visible) } {/* = ({ {isManualScanning ? t("Scanner Active") : t("Scanner Inactive")} - */} + } - {/* Pause/Resume button instead of Start/Stop */} + {/* Pause/Resume button instead of Start/Stop } {isManualScanning ? ( )} - {/* 保留:Submit All Scanned Button */} + {/* 保留:Submit All Scanned Button }