import request from '@/utils/request'

// 查询供货单位列表
export function listSupplier(query) {
  return request({
    url: '/yfc-admin/pharmacy/supplier/list',
    method: 'get',
    params: query
  })
}

// 查询供货单位详细
export function getSupplier(id) {
  return request({
    url: '/yfc-admin/pharmacy/supplier/' + id,
    method: 'get'
  })
}

// 新增供货单位
export function addSupplier(data) {
  return request({
    url: '/yfc-admin/pharmacy/supplier',
    method: 'post',
    data: data
  })
}

// 修改供货单位
export function updateSupplier(data) {
  return request({
    url: '/yfc-admin/pharmacy/supplier',
    method: 'put',
    data: data
  })
}

// 删除供货单位
export function delSupplier(id) {
  return request({
    url: '/yfc-admin/pharmacy/supplier/' + id,
    method: 'delete'
  })
}

// 导出供货单位
export function exportSupplier(query) {
  return request({
    url: '/yfc-admin/pharmacy/supplier/export',
    method: 'get',
    params: query
  })
}
