|
|
@@ -8,6 +8,8 @@ import { QcItemResult } from "../settings/qcItem"; |
|
|
import { RecordsRes } from "../utils"; |
|
|
import { RecordsRes } from "../utils"; |
|
|
import { DoResult } from "."; |
|
|
import { DoResult } from "."; |
|
|
import { GridRowId, GridRowSelectionModel } from "@mui/x-data-grid"; |
|
|
import { GridRowId, GridRowSelectionModel } from "@mui/x-data-grid"; |
|
|
|
|
|
import { GET } from "../auth/[...nextauth]/route"; |
|
|
|
|
|
import { stringify } from "querystring"; |
|
|
|
|
|
|
|
|
export interface CreateConsoDoInput { |
|
|
export interface CreateConsoDoInput { |
|
|
ids: GridRowSelectionModel; |
|
|
ids: GridRowSelectionModel; |
|
|
@@ -70,6 +72,21 @@ export interface AssignByStoreResponse { |
|
|
errorPosition: string; |
|
|
errorPosition: string; |
|
|
entity: any; |
|
|
entity: any; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface PrintDeliveryNoteRequest{ |
|
|
|
|
|
deliveryOrderId: number; |
|
|
|
|
|
printerId: number; |
|
|
|
|
|
printQty: number; |
|
|
|
|
|
numOfCarton: number; |
|
|
|
|
|
isDraft: boolean; |
|
|
|
|
|
pickOrderId: number; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface PrintDeliveryNoteResponse{ |
|
|
|
|
|
success: boolean; |
|
|
|
|
|
message?: string |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export const assignPickOrderByStore = cache(async (data: AssignByStoreRequest) => { |
|
|
export const assignPickOrderByStore = cache(async (data: AssignByStoreRequest) => { |
|
|
return await serverFetchJson<AssignByStoreResponse>(`${BASE_API_URL}/doPickOrder/assign-by-store`, |
|
|
return await serverFetchJson<AssignByStoreResponse>(`${BASE_API_URL}/doPickOrder/assign-by-store`, |
|
|
{ |
|
|
{ |
|
|
@@ -128,3 +145,15 @@ export const fetchDoSearch = cache(async (code: string, shopName: string, status |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
export async function printDN(request: PrintDeliveryNoteRequest){ |
|
|
|
|
|
const response = await serverFetchJson<PrintDeliveryNoteResponse>(`${BASE_API_URL}/do/print-DN`,{ |
|
|
|
|
|
method: "GET", |
|
|
|
|
|
body: JSON.stringify(request), |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Content-type': 'application/json', |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
return response; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|