import request from '@/utils/request'

// 查询物料退货列表
export function listMaterialReturns(query) {
  return request({
    url: '/business/materialReturns/list',
    method: 'get',
    params: query
  })
}

// 查询物料退货详细
export function getMaterialReturns(id) {
  return request({
    url: '/business/materialReturns/' + id,
    method: 'get'
  })
}

// 新增物料退货
export function addMaterialReturns(data) {
  return request({
    url: '/business/materialReturns',
    method: 'post',
    data: data
  })
}

// 修改物料退货
export function updateMaterialReturns(data) {
  return request({
    url: '/business/materialReturns',
    method: 'put',
    data: data
  })
}

// 删除物料退货
export function delMaterialReturns(id) {
  return request({
    url: '/business/materialReturns/' + id,
    method: 'delete'
  })
}
