import request from '@/utils/request'

// 查询物料信息列表
export function listMaterialinfo(query) {
  return request({
    url: '/mes/materialinfo/list',
    method: 'get',
    params: query
  })
}

// 查询物料信息详细
export function getMaterialinfo(materialId) {
  return request({
    url: '/mes/materialinfo/' + materialId,
    method: 'get'
  })
}

// 新增物料信息
export function addMaterialinfo(data) {
  return request({
    url: '/mes/materialinfo',
    method: 'post',
    data: data
  })
}

// 修改物料信息
export function updateMaterialinfo(data) {
  return request({
    url: '/mes/materialinfo',
    method: 'put',
    data: data
  })
}

// 删除物料信息
export function delMaterialinfo(materialId) {
  return request({
    url: '/mes/materialinfo/' + materialId,
    method: 'delete'
  })
}
