Blame view

泰额版/Food Labeling Management Code/Yi.Vben5.Vue3/apps/web-antd/src/api/food-labeling/lookups.ts 849 Bytes
91821909   杨鑫   最新
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  import type { FlPagedResult, FlPageQuery, GroupDto, LocationDto, ProductDto } from './types';
  
  import { requestClient } from '#/api/request';
  
  function listParams(max = 500): FlPageQuery {
    return { SkipCount: 1, MaxResultCount: max };
  }
  
  export function locationList(params?: FlPageQuery) {
    return requestClient.get<FlPagedResult<LocationDto>>('/location', {
      params: { ...listParams(), ...params },
      errorMessageMode: 'none',
    });
  }
  
  export function groupList(params?: FlPageQuery) {
    return requestClient.get<FlPagedResult<GroupDto>>('/group', {
      params: { ...listParams(), ...params },
      errorMessageMode: 'none',
    });
  }
  
  export function productList(params?: FlPageQuery) {
    return requestClient.get<FlPagedResult<ProductDto>>('/product', {
      params: { ...listParams(1000), ...params },
      errorMessageMode: 'none',
    });
  }