import request from '@/utils/request'

// 查询审核单列表
export function listBound(query) {
  return request({
    url: '/outbound/list',
    method: 'get',
    params: query
  })
}

// 查询审核单详细
export function getBound(id) {
  return request({
    url: '/outbound/' + id,
    method: 'get'
  })
}

// 新增审核单
export function addBound(data) {
  return request({
    url: '/outbound',
    method: 'post',
    data: data
  })
}

// 修改审核单
export function updateBound(data) {
  return request({
    url: '/outbound',
    method: 'put',
    data: data
  })
}

// 删除审核单
export function delBound(id) {
  return request({
    url: '/outbound' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/outbound/enable/' + id,
    method: 'delete'
  })
}

// 禁用
export function disabled(id) {
  return request({
    url: '/outbound/disable/' + id,
    method: 'delete'
  })
}

// 状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/outbound/changeStatus',
    method: 'put',
    data: data
  })
}