import request from '@/utils/request'

// 查询别名维护列表
export function listAlias(query) {
  return request({
    url: '/yfc-admin/drugs/alias/list',
    method: 'get',
    params: query
  })
}

// 查询别名维护详细
export function getAlias(id) {
  return request({
    url: '/yfc-admin/drugs/alias/' + id,
    method: 'get'
  })
}

// 新增别名维护
export function addAlias(data) {
  return request({
    url: '/yfc-admin/drugs/alias',
    method: 'post',
    data: data
  })
}

// 修改别名维护
export function updateAlias(data) {
  return request({
    url: '/yfc-admin/drugs/alias',
    method: 'put',
    data: data
  })
}

// 删除别名维护
export function delAlias(id) {
  return request({
    url: '/yfc-admin/drugs/alias/' + id,
    method: 'delete'
  })
}

// 导出别名维护
export function exportAlias(query) {
  return request({
    url: '/yfc-admin/drugs/alias/export',
    method: 'get',
    params: query
  })
}


//出库
export function getByName(query) {
  return request({
    url: '/yfc-admin/drugs/drugs/getByName',
    method: 'get',
    params: query
  })
}
