material.js
2.46 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import http from './interface'
// 查看物料列表
export const listMaterial = (data) => {
return http.request({
url: '/config/material/list',
method: 'GET',
data
})
}
// 根据id查询物料
export const getCurrMaterial = (id) => {
return http.request({
url: '/config/material/' + id,
method: 'GET'
})
}
// 获取物料类型
export const getMaterialType = () => {
return http.request({
url: '/config/mobile/getMaterialType',
method: 'POST'
})
}
// 创建物料编码
export const createMaterialCode = () => {
return http.request({
url: '/config/mobile/createMaterialCode',
method: 'POST'
})
}
// 增加物料
export const addMaterial = (data) => {
return http.request({
url: '/config/material',
method: 'POST',
data
})
}
// 修改物料
export const updateMaterial = (data) => {
return http.request({
url: '/config/material',
method: 'PUT',
data
})
}
// 删除物料信息
export const delMaterial = (id) => {
return http.request({
url: '/config/material?ids=' + id,
method: 'DELETE',
})
}
// 根据容器号获取库位号
export const getLocationFromContainer = (containerCode) => {
const data = {
containerCode
}
return http.request({
url: '/config/mobile/getLocationFromContainer',
method: 'POST',
data
})
}
// 查询物料预警配置
export const listMaterialWarning = (data) => {
return http.request({
url: '/config/materialWarning/list',
method: 'GET',
data
})
}
// 新增物料预警
export const addMaterialWarning = (data) => {
return http.request({
url: '/config/materialWarning',
method: 'POST',
data
})
}
// 修改物料预警
export const updateMaterialWarning = (data) => {
return http.request({
url: '/config/materialWarning',
method: 'PUT',
data
})
}
// 根据id查询物料预警
export const getMaterialWarning = (id) => {
return http.request({
url: '/config/materialWarning/' + id,
method: 'GET'
})
}
// 删除物料预警
export const delMaterialWarning = (id) => {
return http.request({
url: '/config/materialWarning?ids=' + id,
method: 'DELETE'
})
}
// 查询预警类型列表
export const listAlarmtype = () => {
return http.request({
url: '/config/alarmtype/list',
method: 'GET'
})
}
export default {
listMaterial,
getMaterialType,
getCurrMaterial,
createMaterialCode,
addMaterial,
updateMaterial,
delMaterial,
getLocationFromContainer,
listMaterialWarning,
getMaterialWarning,
delMaterialWarning,
listAlarmtype,
addMaterialWarning,
updateMaterialWarning
}