import request from '@/utils/request'

// 查询药品档案列表
export function listArchive(query) {
  return request({
    url: '/healthcare/archive/list',
    method: 'get',
    params: query
  })
}

// 查询药品档案详细
export function getArchive(id) {
  return request({
    url: '/healthcare/archive/' + id,
    method: 'get'
  })
}

// 新增药品档案
export function addArchive(data) {
  return request({
    url: '/healthcare/archive',
    method: 'post',
    data: data
  })
}

// 修改药品档案
export function updateArchive(data) {
  return request({
    url: '/healthcare/archive',
    method: 'put',
    data: data
  })
}

// 删除药品档案
export function delArchive(id) {
  return request({
    url: '/healthcare/archive/' + id,
    method: 'delete'
  })
}

// 导入Excel药品档案
export function archiveExcel(data) {
  return request({
    url: '/healthcare/archiveExcel',
    method: 'post',
    data: data
  })
}


//药品更新   知无涯
// 新增批次更新方法
export function updateBatch(data) {
  return request({
    url: '/healthcare/inventory/drugFiling',
    method: 'put',
    data: data
  })
}

// 新增批次删除方法  知无涯
export function deleteBatch(batchId) {
  return request({
    url: `/healthcare/inventory/drugFiling/${batchId}`,
    method: 'delete'
  })
}

