import request from '@/utils/request'

// 查询套餐包列表
export function listPackage(query) {
  return request({
    url: '/his/package/list',
    method: 'get',
    params: query
  })
}

export function allPackage() {
  return request({
    url: '/his/package/allList',
    method: 'get'
  })
}
// 查询套餐包详细
export function getPackage(packageId) {
  return request({
    url: '/his/package/' + packageId,
    method: 'get'
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/his/package/importTemplate',
    method: 'get'
  })
}
// 新增套餐包
export function addPackage(data) {
  return request({
    url: '/his/package',
    method: 'post',
    data: data
  })
}

// 修改套餐包
export function updatePackage(data) {
  return request({
    url: '/his/package',
    method: 'put',
    data: data
  })
}

// 删除套餐包
export function delPackage(packageId) {
  return request({
    url: '/his/package/' + packageId,
    method: 'delete'
  })
}

//批量复制套餐包
export function bulkCopy(packageId) {
  return request({
    url: '/his/package/bulkCopy/' + packageId,
    method: 'get'
  })
}

// 导出套餐包
export function exportPackage(query) {
  return request({
    url: '/his/package/export',
    method: 'get',
    params: query
  })
}


export function packageBySearch(query) {
  return request({
    url: '/his/package/listBySearch',
    method: 'get',
    params: query
  })
}

// 批量修改套餐状态
export function modifyPackages(data) {
  return request({
    url: '/his/package/modifyMore',
    method: 'post',
    data: data
  })
}

// 获取可选套餐包列表
export function getChoosePackageList(query) {
  return request({
    url: '/his/package/getChoosePackageList',
    method: 'get',
    params: query
  })
}
