bonus-material-app/src/services/wsMaInfo/wsMaInfo.js

72 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: {}
})
}