import http from "@/http/http";
import { ResultInterface } from "../base/BaseDataModel";
import { MoneyDetailCompareBaseParam, MoneyDetailCompareDto, MoneyDetailCompareParam, ReCountParams } from "./moneyCompareModel";

/**
 * 费用比较
 */
enum Api {
    list = '/api/MoneyDetailCompare/list',
    download ='/api/MoneyDetailCompare/download',
    reCount = '/api/MoneyDetailCompare/reCount'
}

/**
 * 费用比较查询列表
 */
export const api_pageMoneyCompareList = async (parms: MoneyDetailCompareParam) => {
    return await http.post<ResultInterface<MoneyDetailCompareDto>>(Api.list, parms)
}

/**
 * 费用比较导出
 * @param parms 
 * @returns 
 */
export const api_moneyDetailCompareDownload = async (parms: MoneyDetailCompareBaseParam) => {
    return await http.download<Recordable>(Api.download, parms)
}

/**
 * 重算
 */
export const api_moneyDetailCompareReCount = async (parms: ReCountParams) => {
    return await http.post(Api.reCount, parms)
}