72 lines
1.3 KiB
JavaScript
72 lines
1.3 KiB
JavaScript
|
|
import {
|
|||
|
|
http
|
|||
|
|
} from '@/utils/http' // 你的 axios 封装,支持 Promise
|
|||
|
|
|
|||
|
|
// 查询单个机具信息,传 id
|
|||
|
|
export function getWsMaInfoById(id) {
|
|||
|
|
return http({
|
|||
|
|
url: `/material/wsMaInfo/${id}`,
|
|||
|
|
method: 'get',
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 查询所有机具信息列表
|
|||
|
|
export function getWsMaInfoList() {
|
|||
|
|
return http({
|
|||
|
|
url: '/material/wsMaInfo/list',
|
|||
|
|
method: 'get',
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 新增机具信息,传对象 info
|
|||
|
|
export function addWsMaInfo(info) {
|
|||
|
|
return http({
|
|||
|
|
url: '/material/wsMaInfo/addWsMaInfo',
|
|||
|
|
method: 'post',
|
|||
|
|
data: info,
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 更新机具信息,传对象 info(必须带 id)
|
|||
|
|
export function updateWsMaInfo(info) {
|
|||
|
|
return http({
|
|||
|
|
url: '/material/wsMaInfo/updateWsMaInfo',
|
|||
|
|
method: 'post',
|
|||
|
|
data: info,
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 删除机具信息,传 id
|
|||
|
|
export function deleteWsMaInfo(id) {
|
|||
|
|
return http({
|
|||
|
|
url: `/material/wsMaInfo/${id}`,
|
|||
|
|
method: 'post',
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
export const getMaTypeData = () => {
|
|||
|
|
return http({
|
|||
|
|
method: 'POST',
|
|||
|
|
url: '/material/wsMaInfo/getMaTypeData',
|
|||
|
|
data: {}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
export const getMaModeData = (parentId) => {
|
|||
|
|
return http({
|
|||
|
|
method: 'POST',
|
|||
|
|
url: '/material/wsMaInfo/getMaModeData',
|
|||
|
|
data: {parentId}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
export const getSupplier = () => {
|
|||
|
|
return http({
|
|||
|
|
method: 'POST',
|
|||
|
|
url: '/material/wsMaInfo/getSupplier',
|
|||
|
|
data: {}
|
|||
|
|
})
|
|||
|
|
}
|