| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import { http } from "@/utils/http";
- type Result = {
- code: number;
- message: string;
- data?: any;
- };
- type ResultTable = {
- code: number;
- message: string;
- data?: {
- list: Array<any>;
- 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<ResultTable>("get", "/new-product-apply/list", { params });
- };
- export const getNewProductApplyById = (id: number) => {
- return http.request<Result>("get", `/new-product-apply/${id}`);
- };
- export const getNewProductApplyStatistics = () => {
- return http.request<Result>("get", "/new-product-apply/statistics");
- };
- export const submitNewProductApply = (data: any) => {
- return http.request<Result>("post", "/new-product-apply/submit", { data });
- };
- export const saveNewProductApplyDraft = (data: any) => {
- return http.request<Result>("post", "/new-product-apply/save-draft", { data });
- };
- export const updateNewProductApply = (id: number, data: any) => {
- return http.request<Result>("put", `/new-product-apply/${id}`, { data });
- };
- export const deleteNewProductApply = (id: number) => {
- return http.request<Result>("delete", `/new-product-apply/${id}`);
- };
- export const checkBarcode = (barcode: string) => {
- return http.request<Result>(
- "get",
- `/new-product-apply/check-barcode?barcode=${barcode}`
- );
- };
|