import { get, uget, post, upost, parmasPost, put, deletes } from '@/http/index'

// 查询装备价格详细
export const getEquipmentPrice = async (data) => {
  return await uget('/system/equipmentPrice/', data)
}

// 新增装备价格
export const addEquipmentPrice = async (data) => {
  return await post('/system/equipmentPrice/', data)
}

// 修改装备价格
export const updateEquipmentPrice = async (data) => {
  return await put('/system/equipmentPrice', data)
}

// 删除装备价格
export const delEquipmentPrice = async (data) => {
  return await deletes('/system/equipmentPrice/', data)
}

// 导出装备价格
export const exportEquipmentPrice = async (data) => {
  return await get('/system/equipmentPrice/export', data)
}

// 根据装备型号ID查询装备价格列表
export const queryEquipmentPricesByEquipmentModelId = async (data) => {
  return await parmasPost('/system/equipmentPrice/queryEquipmentPricesByEquipmentModelId', data)
}

// 查询器材价格详细
export const getMaterialtPrice = async (data) => {
  return await uget('/system/materialPrice/', data)
}

// 新增器材价格
export const addMaterialtPrice = async (data) => {
  return await post('/system/materialPrice', data)
}

// 修改器材价格
export const updateMaterialtPrice = async (data) => {
  return await put('/system/materialPrice', data)
}

// 删除器材价格
export const delMaterialtPrice = async (data) => {
  return await deletes('/system/materialPrice/', data)
}

// 导出器材价格
export const exporMaterialtPrice = async (data) => {
  return await get('/system/materialPrice/export', data)
}

// 根据器材型号ID查询器材价格列表
export const queryMaterialPricesByMaterialModelId = async (data) => {
  return await parmasPost('/system/materialPrice/queryMaterialPricesByMaterialModelId/', data)
}

// 查询设备价格详细
export const getDevicePrice = async (data) => {
  return await uget('/system/devicePrice/', data)
}

// 新增设备价格
export const addDevicePrice = async (data) => {
  return await post('/system/devicePrice', data)
}

// 修改设备价格
export const updateDevicePrice = async (data) => {
  return await put('/system/devicePrice', data)
}

// 删除设备价格
export const delDevicePrice = async (data) => {
  return await deletes('/system/devicePrice/', data)
}

// 导出设备价格
export const exportDevicePrice = async (data) => {
  return await get('/system/devicePrice/export', data)
}

// 根据设备型号ID查询设备价格列表
export const queryDevicePricesByDeviceModelId = async (data) => {
  return await parmasPost('/system/devicePrice/queryDevicePricesByDeviceModelId/', data)
}

// 下载装备价格数据模板
export function downLoadEquipmentFile() {
  window.open(process.env.VUE_APP_BASE_API + '/system/equipmentPrice/downLoadFile')
}
// 下载器材价格数据模板
export function downLoadMaterialFile() {
  window.open(process.env.VUE_APP_BASE_API + '/system/materialPrice/downLoadFile')
}
// 下载设备价格数据模板
export function downLoadDeviceFile() {
  window.open(process.env.VUE_APP_BASE_API + '/system/devicePrice/downLoadFile')
}
