XiaoRuby
2023-08-22 6665e9f2c8676b812bf7579e4201ba37b0fdb5fc
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
62
63
64
65
66
67
68
69
70
71
72
import request from '@/utils/request'
 
export function getMaterialList(params) {
  return request({
    url: '/material/list',
    method: 'get',
    params
  })
}
 
// 获取所有项目
export function getProductList(params) {
  return request({
    url: '/product/page',
    method: 'get',
    params
  })
}
 
// // 获取所有父项目对应的子项目
// export function getProductSonList(params) {
//   return request({
//     url: '/product/father',
//     method: 'get',
//     params
//   })
// }
 
// 添加物料
export function addMaterial(data) {
  return request({
    url: '/material/add',
    method: 'post',
    data
  })
}
 
// 添加标准
export function addStandards(data) {
  return request({
    url: '/standards/add',
    method: 'post',
    data
  })
}
 
// 添加规格
export function addSpecifications(data) {
  return request({
    url: '/specifications/add',
    method: 'post',
    data
  })
}
 
// 批量删除
export function deleteListApi(ids) {
  return request({
    url: '/product/deleteList',
    method: 'delete',
    params: {ids: ids.toString()}
  })
}
 
// 失去焦点更新
export function blurUpdateApi(obj) {
  return request({
    url: '/product/write',
    method: 'post',
    params: obj
  })
}