import request from '@/utils/request'

// 查询物料入库列表
export function listMaterialPutaway(query) {
  return request({
    url: '/business/materialPutaway/list',
    method: 'get',
    params: query
  })
}

// 查询物料入库列表
export function listMaterialPutawayAll(query) {
  return request({
    url: '/business/materialPutaway/listAll',
    method: 'get',
    params: query
  })
}

// 查询物料入库详细
export function getMaterialPutaway(id) {
  return request({
    url: '/business/materialPutaway/' + id,
    method: 'get'
  })
}

// 新增物料入库
export function addMaterialPutaway(data) {
  return request({
    url: '/business/materialPutaway',
    method: 'post',
    data: data
  })
}

// 修改物料入库
export function updateMaterialPutaway(data) {
  return request({
    url: '/business/materialPutaway',
    method: 'put',
    data: data
  })
}

// 删除物料入库
export function delMaterialPutaway(id) {
  return request({
    url: '/business/materialPutaway/' + id,
    method: 'delete'
  })
}

// 物料入库
export function putMaterialPutaway(id) {
  return request({
    url: '/business/materialPutaway/confirm/' + id,
    method: 'put'
  })
}
