import request from '@/utils/request'

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

// 查询处方详细
export function getPrescribe(prescribeId) {
  return request({
    url: '/store/store/prescribe/' + prescribeId,
    method: 'get'
  })
}

// 新增处方
export function addPrescribe(data) {
  return request({
    url: '/store/store/prescribe',
    method: 'post',
    data: data
  })
}

// 修改处方
export function updatePrescribe(data) {
  return request({
    url: '/store/store/prescribe',
    method: 'put',
    data: data
  })
}

// 删除处方
export function delPrescribe(prescribeId) {
  return request({
    url: '/store/store/prescribe/' + prescribeId,
    method: 'delete'
  })
}

// 导出处方
export function exportPrescribe(query) {
  return request({
    url: '/store/store/prescribe/export',
    method: 'get',
    params: query
  })
}
