import request from '@/utils/request'

// 查询生产BOM列表
export function listBaseBomInfo(query) {
  return request({
    url: '/production/baseBomInfo/list',
    method: 'get',
    params: query
  })
}

// 查询生产BOM列表
export function listTreeBaseBomInfo(query) {
  return request({
    url: '/production/baseBomInfo/treeList',
    method: 'get',
    params: query
  })
}

// 查询生产BOM详细
export function getBaseBomInfo(objId) {
  return request({
    url: '/production/baseBomInfo/' + objId,
    method: 'get'
  })
}

// 新增生产BOM
export function addBaseBomInfo(data) {
  return request({
    url: '/production/baseBomInfo',
    method: 'post',
    data: data
  })
}

// 修改生产BOM
export function updateBaseBomInfo(data) {
  return request({
    url: '/production/baseBomInfo',
    method: 'put',
    data: data
  })
}

// 删除生产BOM
export function delBaseBomInfo(objId) {
  return request({
    url: '/production/baseBomInfo/' + objId,
    method: 'delete'
  })
}
