import request from '@/utils/request'

// 查询原材料退库记录列表
export function listRawreturn(query) {
  return request({
    url: '/wms/rawreturn/list',
    method: 'get',
    params: query
  })
}

// 查询原材料退库记录详细
export function getRawreturn(rawReturnId) {
  return request({
    url: '/wms/rawreturn/' + rawReturnId,
    method: 'get'
  })
}

// 新增原材料退库记录
export function addRawreturn(data) {
  return request({
    url: '/wms/rawreturn',
    method: 'post',
    data: data
  })
}

// 修改原材料退库记录
export function updateRawreturn(data) {
  return request({
    url: '/wms/rawreturn',
    method: 'put',
    data: data
  })
}

// 删除原材料退库记录
export function delRawreturn(rawReturnId) {
  return request({
    url: '/wms/rawreturn/' + rawReturnId,
    method: 'delete'
  })
}









// 查询原材料退库记录列表,提供给审核使用
export function auditListRawreturn(query) {
  return request({
    url: '/wms/rawreturn/auditList',
    method: 'get',
    params: query
  })
}

// 查询原材料退库记录详细
export function getRawreturn4Audit(rawReturnId) {
  return request({
    url: '/wms/rawreturn/getRawreturn4Audit/' + rawReturnId,
    method: 'get'
  })
}

// 审核原材料退库记录
export function auditRawReturn(data) {
  return request({
    url: '/wms/rawreturn/auditRawReturn',
    method: 'post',
    data: data
  })
}


// 查询仓库列表，提供审核使用
export function getWarehouses4Audit() {
  return request({
    url: '/wms/rawreturn/getWarehouses4Audit',
    method: 'get'
  })
}


// 查询仓库列表，提供记录查询使用
export function getWarehouses() {
  return request({
    url: '/wms/rawreturn/getWarehouses',
    method: 'get'
  })
}
