import request from '@/utils/request'

// 查询药品单位列表
export function listUnit(query) {
  return request({
    url: '/biosafety/unit/list',
    method: 'get',
    params: query
  })
}

// 查询药品单位详细
export function getUnit(id) {
  return request({
    url: '/biosafety/unit/' + id,
    method: 'get'
  })
}

// 新增药品单位
export function addUnit(data) {
  return request({
    url: '/biosafety/unit',
    method: 'post',
    data: data
  })
}

// 修改药品单位
export function updateUnit(data) {
  return request({
    url: '/biosafety/unit',
    method: 'put',
    data: data
  })
}

// 删除药品单位
export function delUnit(id) {
  return request({
    url: '/biosafety/unit/' + id,
    method: 'delete'
  })
}
