import { http } from "@/utils/http"; type Result = { code: number; message: string; data?: any; }; type ResultTable = { code: number; message: string; data?: { list: Array; total: number; pageSize: number; currentPage: number; }; }; export const getNewProductApplyList = (params: { page?: number; pageSize?: number; productName?: string; barcode?: string; status?: number; applicantId?: number; }) => { return http.request("get", "/new-product-apply/list", { params }); }; export const getNewProductApplyById = (id: number) => { return http.request("get", `/new-product-apply/${id}`); }; export const getNewProductApplyStatistics = () => { return http.request("get", "/new-product-apply/statistics"); }; export const submitNewProductApply = (data: any) => { return http.request("post", "/new-product-apply/submit", { data }); }; export const saveNewProductApplyDraft = (data: any) => { return http.request("post", "/new-product-apply/save-draft", { data }); }; export const updateNewProductApply = (id: number, data: any) => { return http.request("put", `/new-product-apply/${id}`, { data }); }; export const deleteNewProductApply = (id: number) => { return http.request("delete", `/new-product-apply/${id}`); }; export const checkBarcode = (barcode: string) => { return http.request( "get", `/new-product-apply/check-barcode?barcode=${barcode}` ); };