import request from '@/utils/request'

// 查询出库物料明细列表
export function listTckOrderDetailbak(query) {
  return request({
    url: '/system/tckXnOrderDetailbak/list',
    method: 'get',
    params: query
  })
}

export function listTotal(query) {
  return request({
    url: "/system/tckXnOrderDetailbak/lists",
    method: "get",
    params: query,
  });
}

// 查询出库物料明细详细
export function getTckOrderDetailbak(id) {
  return request({
    url: '/system/tckXnOrderDetailbak/' + id,
    method: 'get'
  })
}

// 新增出库物料明细
export function addTckOrderDetailbak(data) {
  return request({
    url: '/system/tckXnOrderDetailbak',
    method: 'post',
    data: data
  })
}

// 修改出库物料明细
export function updateTckOrderDetailbak(data) {
  return request({
    url: '/system/tckXnOrderDetailbak',
    method: 'put',
    data: data
  })
}

// 删除出库物料明细
export function delTckOrderDetailbak(id) {
  return request({
    url: '/system/tckXnOrderDetailbak/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/tckXnOrderDetailbak/enable/' + id,
    method: 'delete'
  })
}

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

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