FPSMS-frontend
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

52 行
947 B

  1. "server=only";
  2. import { serverFetchJson } from "@/app/utils/fetchUtil";
  3. import { BASE_API_URL } from "@/config/api";
  4. import { cache } from "react";
  5. export interface Operator {
  6. id: number;
  7. name: string;
  8. username: string;
  9. }
  10. export interface Machine {
  11. id: number;
  12. name: string;
  13. code: string;
  14. qrCode: string;
  15. }
  16. export interface JoDetail {
  17. id: number;
  18. code: string;
  19. name: string;
  20. reqQty: number;
  21. uom: string;
  22. pickLines: JoDetailPickLine[];
  23. status: string;
  24. planStart: number[];
  25. planEnd: number[];
  26. type: string;
  27. }
  28. export interface JoDetailPickLine {
  29. id: number;
  30. code: string;
  31. name: string;
  32. lotNo: string;
  33. reqQty: number;
  34. uom: string;
  35. status: string;
  36. }
  37. export const fetchJoDetail = cache(async (id: number) => {
  38. return serverFetchJson<JoDetail>(`${BASE_API_URL}/jo/detail/${id}`,
  39. {
  40. method: "GET",
  41. headers: { "Content-Type": "application/json"},
  42. next: {
  43. tags: ["jo"]
  44. }
  45. })
  46. })