import request from '@/utils/request'

// 查询收货单列表
export function listRkRecevinggoods(query) {
  return request({
    url: '/system/rkRecevinggoods/list',
    method: 'get',
    params: query
  })
}

// 查询收货单详细
export function getRkRecevinggoods(id) {
  return request({
    url: '/system/rkRecevinggoods/' + id,
    method: 'get'
  })
}

// 新增收货单
export function addRkRecevinggoods(data) {
  return request({
    url: '/system/rkRecevinggoods',
    method: 'post',
    data: data
  })
}

// 修改收货单
export function updateRkRecevinggoods(data) {
  return request({
    url: '/system/rkRecevinggoods',
    method: 'put',
    data: data
  })
}

// 删除收货单
export function delRkRecevinggoods(id) {
  return request({
    url: '/system/rkRecevinggoods/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/rkRecevinggoods/enable/' + id,
    method: 'delete'
  })
}

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

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