import request from '@/utils/request'

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

export function myList(query) {
  return request({
    url: '/store/prescribe/myList',
    method: 'get',
    params: query
  })
}
export function getImg() {
  return request({
    url: '/store/prescribe/getImg',
    method: 'get',
  })
}
// 查询处方详细
export function getPrescribe(prescribeId) {
  return request({
    url: '/store/prescribe/' + prescribeId,
    method: 'get'
  })
}
export function getDrugInfo(prescribeId) {
  return request({
    url: '/store/prescribe/Drug/' + prescribeId,
    method: 'get'
  })
}
// 新增处方
export function addPrescribe(data) {
  return request({
    url: '/store/prescribe',
    method: 'post',
    data: data
  })
}

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

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

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

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

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