import request from '@/utils/request'

// 查询处方取药列表
export function listMedicineChest(query) {
  return request({
    url: '/yfc-admin/prescription/medicineChest/query',
    method: 'post',
    params:query
  })
}

// 处方列表--设置行列
export function modifyLayout(query) {
  return request({
    url: '/yfc-admin/prescription/medicineChest/modifyLayout',
    method: 'post',
    params:query
  })
}

// 处方列表--取药
export function listTheMedicine(query) {
  return request({
    url: '/yfc-admin/prescription/medicineChest/getTheMedicine',
    method: 'post',
    params:query
  })
}

// 处方列表--解绑
export function listMedicineUnbundle(query) {
  return request({
    url: '/yfc-admin/prescription/medicineChest/unbundle',
    method: 'post',
    params:query
  })
}


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

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

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

//更新打印状态为已打印
export function updatePrintStatus(query) {
  return request({
    url: '/yfc-admin/prescription/prescriptionCore/updatePrintStatus',
    method: 'get',
    params: query
  })
}



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

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

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

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

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

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

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

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

  })
}
