车间能级提升-智能设备管理系统
朱桂飞
2025-02-08 a4e9be7205274b93571c74268855b39129145328
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import type { InventoryVO } from './model';
 
import type { ID, IDS } from '#/api/common';
 
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
 
enum Api {
  inventoryExport = '/eims/inventory/export',
  inventoryList = '/eims/inventory/list',
  root = '/eims/inventory'
}
 
/**
 * 查询盘点列表
 * @param query
 * @returns {*}
 */
 
export function listInventory(params?: any) {
  return requestClient.get<InventoryVO[]>(Api.inventoryList, { params });
}
 
/**
 * 查询盘点详细
 * @param inventoryId
 */
export function getInventory(inventoryId: ID) {
  return requestClient.get<InventoryVO>(`${Api.root}/${inventoryId}`);
}
 
/**
 * 新增盘点
 * @param data
 */
export function addInventory(data: any) {
  return requestClient.postWithMsg<void>(Api.root, data);
}
 
/**
 * 修改盘点
 * @param data
 */
export function updateInventory(data: any) {
  return requestClient.putWithMsg<void>(Api.root, data);
}
 
/**
 * 删除盘点
 * @param inventoryId
 */
export function delInventory(inventoryId: IDS) {
  return requestClient.deleteWithMsg<void>(`${Api.root}/${inventoryId}`);
}
/**
 * 导出
 * @param
 */
export function inventoryExport(data: any) {
  return commonExport(Api.inventoryExport, data);
}