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

72 lines
1.3 KiB
JavaScript
Raw Normal View History

2025-06-25 18:16:48 +08:00
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: {}
})
}