import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询收回周转列表
export function getFinishedReturnList(query) {
  return request({
    url: baseUrl + '/business/returnTurnover/getFinishedReturnList',
    method: 'get',
    params: query
  })
}

// 查询收回周转详细
export function getReceiptTurnover(id) {
  return request({
    url: baseUrl + '/business/returnTurnover/' + id,
    method: 'get'
  })
}
// 查询收回周转
export function getTurnoverDeptList(query) {
  return request({
    url: baseUrl + '/business/returnTurnover/getTurnoverDeptList',
    method: 'get',
    params: query
  })
}


// 新增收回周转
export function addReceiptTurnover(data) {
  return request({
    url: baseUrl + '/business/returnTurnover',
    method: 'post',
    data: data
  })
}
export function getProcessInspectionList(data) {
  return request({
    url: baseUrl + '/business/returnTurnover/getProcessInspectionList',
    method: 'post',
    data: data
  })
}
export function getProcessInspectionLists(data) {
  return request({
    url: baseUrl + '/business/returnTurnover/getProcessInspectionLists',
    method: 'post',
    data: data
  })
}
export function getNowBindCarriers(data) {
  return request({
    url: baseUrl + '/business/returnTurnover/getNowBindCarriers',
    method: 'post',
    data: data
  })
}

// 修改收回周转
export function updateReceiptTurnover(data) {
  return request({
    url: baseUrl + '/business/returnTurnover',
    method: 'put',
    data: data
  })
}

export function batchReceiptTurnover(data) {
  return request({
    url: baseUrl + '/business/returnTurnover/batchTurnover',
    method: 'post',
    data: data
  })
}

// 删除收回周转
export function delReceiptTurnover(id) {
  return request({
    url: baseUrl + '/business/returnTurnover/' + id,
    method: 'delete'
  })
}

export function checkCarriers(data) {
  return request({
    url: baseUrl + '/business/returnTurnover/checkCarriers',
    method: 'get',
    params: data
  })
}
