import request from '@/utils/request'

// 查询库存备份列表
export function listTMiStockbak(query) {
  return request({
    url: '/system/tMiStockbak/list',
    method: 'get',
    params: query
  })
}

// 查询库存备份详细
export function getTMiStockbak(id) {
  return request({
    url: '/system/tMiStockbak/' + id,
    method: 'get'
  })
}

// 新增库存备份
export function addTMiStockbak(data) {
  return request({
    url: '/system/tMiStockbak',
    method: 'post',
    data: data
  })
}

// 修改库存备份
export function updateTMiStockbak(data) {
  return request({
    url: '/system/tMiStockbak',
    method: 'put',
    data: data
  })
}

// 删除库存备份
export function delTMiStockbak(id) {
  return request({
    url: '/system/tMiStockbak/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/tMiStockbak/enable/' + id,
    method: 'delete'
  })
}

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

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