import request from '@/utils/request'

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

// 查询原材料出库记录详细
export function getRawoutstock(rawOutstockId) {
  return request({
    url: '/wms/rawoutstock/' + rawOutstockId,
    method: 'get'
  })
}

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

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

// 删除原材料出库记录
export function delRawoutstock(rawOutstockId) {
  return request({
    url: '/wms/rawoutstock/' + rawOutstockId,
    method: 'delete'
  })
}




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


// 查询原材料出库记录详细
export function getRawOutstockByTaskCode(taskCode) {
  return request({
    url: '/wms/rawoutstock/getRawOutstockByTaskCode/' + taskCode,
    method: 'get'
  })
}

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


// 查询仓库列表
export function getWarehouses() {
  return request({
    url: '/wms/rawoutstock/getWarehouses',
    method: 'get'
  })
}


// 查询仓库列表
export function getWarehouses4Audit() {
  return request({
    url: '/wms/rawoutstock/getWarehouses4Audit',
    method: 'get'
  })
}
