|
|
|
@@ -52,7 +52,7 @@ const ProductProcessList: React.FC<ProductProcessListProps> = ({ onSelectProcess |
|
|
|
|
|
|
|
const handleAssignPickOrder = useCallback(async (pickOrderId: number, jobOrderId?: number, productProcessId?: number) => { |
|
|
|
if (!currentUserId) { |
|
|
|
alert(t("无法获取用户ID")); |
|
|
|
alert(t("Unable to get user ID")); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -74,16 +74,16 @@ const ProductProcessList: React.FC<ProductProcessListProps> = ({ onSelectProcess |
|
|
|
if (onSelectMatchingStock && jobOrderId) { |
|
|
|
onSelectMatchingStock(jobOrderId, productProcessId); |
|
|
|
} else { |
|
|
|
alert(t("分配成功")); |
|
|
|
alert(t("Assignment successful")); |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 分配失败 |
|
|
|
console.error("❌ Assignment failed:", assignResult.message); |
|
|
|
alert(t(`分配失败: ${assignResult.message || "未知错误"}`)); |
|
|
|
console.error("Assignment failed:", assignResult.message); |
|
|
|
alert(t(`Assignment failed: ${assignResult.message || "Unknown error"}`)); |
|
|
|
} |
|
|
|
} catch (error: any) { |
|
|
|
console.error("❌ Error assigning pick order:", error); |
|
|
|
alert(t(`分配时出错: ${error?.message || "未知错误"}。请稍后重试。`)); |
|
|
|
console.error(" Error assigning pick order:", error); |
|
|
|
alert(t(`Unknown error: ${error?.message || "Unknown error"}。Please try again later.`)); |
|
|
|
} |
|
|
|
}, [currentUserId, t, onSelectMatchingStock]); |
|
|
|
const handleViewStockIn = useCallback((process: AllJoborderProductProcessInfoResponse) => { |
|
|
|
|