import request from "@/util/oaRequest"

// 查询仓库出库列表
export function listOaOutWarehouse(query) {
  return request({
    url: '/oa/oaOutWarehouse/list',
    method: 'get',
    params: query
  })
}

// 查询仓库出库列表
export function outWareList(query) {
  return request({
    url: '/oa/project/outWare/list',
    method: 'get',
    params: query
  })
}

// 查询仓库出库详细
export function getOaOutWarehouse(id) {
  return request({
    url: '/oa/oaOutWarehouse/' + id,
    method: 'get'
  })
}


// 查询仓库出库详细
export function queryOutWarehouseByProjectId(id) {
  return request({
    url: '/oa/oaOutWarehouse/project/' + id,
    method: 'get'
  })
}

// 新增仓库出库
export function addOaOutWarehouse(data) {
  return request({
    url: '/oa/oaOutWarehouse/insertOutBatch',
    method: 'post',
    data: data
  })
}

// 修改仓库出库
export function updateOaOutWarehouse(data) {
  return request({
    url: '/oa/oaOutWarehouse',
    method: 'put',
    data: data
  })
}

// 删除仓库出库
export function delOaOutWarehouse(id) {
  return request({
    url: '/oa/oaOutWarehouse/' + id,
    method: 'delete'
  })
}

// 修改退库类型
export function updateReturnType(params) {
  return request({
    url: '/oa/oaWarehouseMaster/returnType',
    params,
    method: 'put'
  })
}

// 明细退库
export function redoDetail(rows) {
  return request({
    url: '/oa/oaWarehouseMaster/returnDetail',
    data: rows,
    method: 'post'
  })
}
