97 lines
1.7 KiB
JavaScript
97 lines
1.7 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
export function listVmiMaterial(query) {
|
|
return request({
|
|
url: '/system/vmiMaterial/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
export function getVmiMaterial(id) {
|
|
return request({
|
|
url: '/system/vmiMaterial/' + id,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function addVmiMaterial(data) {
|
|
return request({
|
|
url: '/system/vmiMaterial',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function updateVmiMaterial(data) {
|
|
return request({
|
|
url: '/system/vmiMaterial',
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function delVmiMaterial(id) {
|
|
const ids = Array.isArray(id) ? id.join(',') : id
|
|
return request({
|
|
url: '/system/vmiMaterial/' + ids,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
export function scanVmiMaterial() {
|
|
return request({
|
|
url: '/system/vmiMaterial/scan',
|
|
method: 'post',
|
|
timeout: 180000,
|
|
headers: { repeatSubmit: false }
|
|
})
|
|
}
|
|
|
|
export function confirmVmiReplenish(data) {
|
|
return request({
|
|
url: '/system/vmiMaterial/confirm',
|
|
method: 'post',
|
|
timeout: 120000,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function previewVmiReplenish(data) {
|
|
return request({
|
|
url: '/system/vmiMaterial/confirm/preview',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function ignoreVmiAlert(alertId) {
|
|
return request({
|
|
url: '/system/vmiMaterial/ignore/' + alertId,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
export function notifyVmiForecast(id) {
|
|
return request({
|
|
url: '/system/vmiMaterial/forecast/notify/' + id,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
export function listVmiAlert(query) {
|
|
return request({
|
|
url: '/system/vmiMaterial/alert/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
export function listVmiReq(query) {
|
|
return request({
|
|
url: '/system/vmiMaterial/req/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|