import request from '@/utils/request'

// 查询物料细分类管理列表
export function listActSuppliesDetails(query) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/list',
    method: 'get',
    params: query
  })
}

// 查询物料细分类管理详细
export function getActSuppliesDetails(id) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/' + id,
    method: 'get'
  })
}

//查询上级ID
export function saveSid() {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/savesid',
    method: 'get'
  })
}

// 新增物料细分类管理
export function addActSuppliesDetails(data) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails',
    method: 'post',
    data: data
  })
}

// 修改物料细分类管理
export function updateActSuppliesDetails(data) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails',
    method: 'put',
    data: data
  })
}

// 删除物料细分类管理
export function delActSuppliesDetails(id) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/' + id,
    method: 'delete'
  })
}

// 导出物料细分类管理
export function exportActSuppliesDetails(query) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/export',
    method: 'get',
    params: query
  })
}
//启用
export function toggleEnable(id) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/enable/' +id,
    method: 'get',

  })
}
//禁用
export function toggleDisable(id) {
  return request({
    url: '/ActSuppliesDetails/ActSuppliesDetails/disable/' + id,
    method: 'get',
  })
}
