import request from '@/utils/request'

// 查询bom变量列表
export function listVariable(query) {
  return request({
    url: '/system/variable/list',
    method: 'get',
    params: query
  })
}

// 查询bom变量详细
export function getVariable(id) {
  return request({
    url: '/system/variable/' + id,
    method: 'get'
  })
}

// 新增bom变量
export function addVariable(data) {
  return request({
    url: '/system/variable',
    method: 'post',
    data: data
  })
}

// 修改bom变量
export function updateVariable(data) {
  return request({
    url: '/system/variable',
    method: 'put',
    data: data
  })
}

// 删除bom变量
export function delVariable(id) {
  return request({
    url: '/system/variable/' + id,
    method: 'delete'
  })
}
