import request from '@/utils/request'

// 查询出库单历史表列表
export function listTckOrdersbak(query) {
  return request({
    url: '/system/tckOrdersbak/list',
    method: 'get',
    params: query
  })
}

// 查询出库单历史表列表(历史出库通知单查询)
export function listSelectTckOrdersbak(query) {
  return request({
    url: '/system/tckOrdersbak/selectList',
    method: 'get',
    params: query
  })
}

// 查询出库单历史表详细
export function getTckOrdersbak(id) {
  return request({
    url: '/system/tckOrdersbak/' + id,
    method: 'get'
  })
}

// 新增出库单历史表
export function addTckOrdersbak(data) {
  return request({
    url: '/system/tckOrdersbak',
    method: 'post',
    data: data
  })
}

// 修改出库单历史表
export function updateTckOrdersbak(data) {
  return request({
    url: '/system/tckOrdersbak',
    method: 'put',
    data: data
  })
}

// 删除出库单历史表
export function delTckOrdersbak(id) {
  return request({
    url: '/system/tckOrdersbak/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/tckOrdersbak/enable/' + id,
    method: 'delete'
  })
}

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

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