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

// 查询财务列表
export const listFinance = async (data) => {
  return await get('/system/finance/list', data)
}

// 查询财务详细
export const getFinance = async (data) => {
  return await uget('/system/finance/', data)
}

// 删除财务
export const delFinance = async (data) => {
  return await post('/system/finance/delete', data)
}

// 新增财务
export const addFinance = async (data) => {
  return await post('/system/finance/add', data)
}

// 修改财务
export const updateFinance = async (data) => {
  return await post('/system/finance/edit', data)
}

// 导出财务
export const exportFinance = async (data) => {
  return await post('/system/finance/export', data)
}

// 合同关联财务记录
export const getFinanceListByContractId = async (data) => {
  return await get('/system/finance/getFinanceListByContractId', data)
}

// 下载财务数据模板
export function downLoadFileModel() {
  window.open(process.env.VUE_APP_BASE_API + '/system/finance/downLoadFile')
}

// 查看计划明细
export const queryPlanDetailByFinanceId = async (data) => {
  return await get('/finance/getFinancePlan', data)
}
