import request from '@/utils/request'

// 查询规则详情列表
export function listSuppliesroledetail(query) {
  return request({
    url: '/system/suppliesroledetail/list',
    method: 'get',
    params: query
  })
}

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

export function saveOperation(){
  return request({
    url: '/system/suppliesroledetail/saveOperation',
    method: 'get'
  })
}

// 查询规则详情详细
export function getSuppliesroledetail(id) {
  return request({
    url: '/system/suppliesroledetail/' + id,
    method: 'get'
  })
}

// 新增规则详情
export function addSuppliesroledetail(data) {
  return request({
    url: '/system/suppliesroledetail',
    method: 'post',
    data: data
  })
}

// 修改规则详情
export function updateSuppliesroledetail(data) {
  return request({
    url: '/system/suppliesroledetail',
    method: 'put',
    data: data
  })
}

// 删除规则详情
export function delSuppliesroledetail(id) {
  return request({
    url: '/system/suppliesroledetail/' + id,
    method: 'delete'
  })
}

// 导出规则详情
export function exportSuppliesroledetail(query) {
  return request({
    url: '/system/suppliesroledetail/export',
    method: 'get',
    params: query
  })
}
//启用
export function toggleEnable(id) {
  return request({
    url: '/system/suppliesroledetail/enable/' +id,
    method: 'get',

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

  })
}
