import request from '@/utils/request'

// 查询处方审核列表
export function listPrescriptionCore(query) {
  return request({
    url: '/prescription/prescriptionCore/list',
    method: 'get',
    params: query
  })
}

// 查询处方审核列表
export function listPrescriptionCoreNew(query) {
  return request({
    url: '/prescription/prescriptionCore/getPrescriptionCoreList',
    method: 'get',
    params: query
  })
}

//窗口发药
export function listPrescriptionCoreFy(query) {
  return request({
    url: '/prescription/prescriptionCore/fy',
    method: 'get',
    params: query
  })
}


//更改发药状态
export function fyState(data) {
  return request({
    url: '/prescription/prescriptionCore/fyState',
    method: 'put',
    data: data
  })
}

// 查询处方审核详细
export function getPrescriptionCore(id) {
  return request({
    url: '/prescription/prescriptionCore/' + id,
    method: 'get'
  })
}

// 新增处方审核
export function addPrescriptionCore(data) {
  return request({
    url: '/prescription/prescriptionCore',
    method: 'post',
    data: data
  })
}

// 修改处方审核
export function updatePrescriptionCore(data) {
  return request({
    url: '/prescription/prescriptionCore',
    method: 'put',
    data: data
  })
}

// 删除处方审核
export function delPrescriptionCore(id) {
  return request({
    url: '/prescription/prescriptionCore/' + id,
    method: 'delete'
  })
}

// 导出处方审核
export function exportPrescriptionCore(query) {
  return request({
    url: '/prescription/prescriptionCore/export',
    method: 'get',
    params: query
  })
}

//审核状态
export function check(data) {
  return request({
    url: '/prescription/prescriptionCore/check',
    method: 'put',
    data: data
  })
}

//打印次数
export function addNum(id) {
  return request({
    url: `/prescription/prescriptionCore/addNum?id=${id}`,
    method: 'get',

  })
}
