import request from '@/utils/request'

// 查询处方药品列表
export function listPrescribeDrug(query) {
  return request({
    url: '/store/store/prescribeDrug/list',
    method: 'get',
    params: query
  })
}

// 查询处方药品详细
export function getPrescribeDrug(drugId) {
  return request({
    url: '/store/store/prescribeDrug/' + drugId,
    method: 'get'
  })
}

// 新增处方药品
export function addPrescribeDrug(data) {
  return request({
    url: '/store/store/prescribeDrug',
    method: 'post',
    data: data
  })
}

// 修改处方药品
export function updatePrescribeDrug(data) {
  return request({
    url: '/store/store/prescribeDrug',
    method: 'put',
    data: data
  })
}

// 删除处方药品
export function delPrescribeDrug(drugId) {
  return request({
    url: '/store/store/prescribeDrug/' + drugId,
    method: 'delete'
  })
}

// 导出处方药品
export function exportPrescribeDrug(query) {
  return request({
    url: '/store/store/prescribeDrug/export',
    method: 'get',
    params: query
  })
}
