import http from "@/http/http";
import { UserMoneySumParam, UserMoneyDetailParam, DetailListFeeItemParam, BalanceParams, RechargeParams, ExchangeParams, CustomerNetPrintFeeParam, ReturnMoneyParam } from "./apiUserMoneySumModel";

enum Api {
    userMoneySumList = '/api/UserMoneySum/list',//客户总账查询
    userMoneyDetailList = '/api/UserMoneyDetail/list',//费用明细查询
    listFeeItem = '/api/UserMoneyDetail/listFeeItem',//费用费项明细查询
    balance = '/api/UserMoneyDetail/balance',//平账
    recharge = '/api/UserMoneyDetail/recharge',//充值
    xiKeMoneyReportdownload = '/api/userMoneyReport/xiKeMoneyReportdownload',//细刻模板
    yingChiMoneyReportdownload = '/api/userMoneyReport/yingChiMoneyReportdownload',//英驰模板
    fangCangMoneyReportdownload = '/api/userMoneyReport/fangCangMoneyReportdownload',//方仓模板
    downloadCompanyProfit = '/api/userMoneyReport/downloadCompanyProfit',//分公司利润报表
    jianAiMoneyReportdownload = '/api/userMoneyReport/jianAiMoneyReportdownload',//简爱模板
    xbAndKpReportdownload = '/api/userMoneyReport/xbAndKpReportdownload',//小包账单模版
    deOverseasReportdownload = '/api/userMoneyReport/deOverseasReportdownload',
    exchangeConvert = '/api/UserMoneyDetail/exchangeConvert',//汇兑
    queryCustomerNetPrintFee = '/api/apiData/queryCustomerNetPrintFee',//获取已打单末交货金额
    downloadRecharge = '/api/userMoneyReport/downloadRecharge',//充值记录导出
    refundMoney ='/api/UserMoneyDetail/refundMoney',//退款
    sumMoneytDownload = '/api/userMoneySumReport/sumMoneytDownload', //客户总账导出
}

/**
 * 客户总账查询
 */
export const api_UserMoneySumList = async (parms: UserMoneySumParam) => {
    return await http.post(Api.userMoneySumList, parms)
}

/**
 * 费用明细查询
 */
export const api_UserMoneyDetail = async (parms: UserMoneyDetailParam) => {
    return await http.post(Api.userMoneyDetailList, parms)
}

/**
 * 费用费项明细查询
 */
export const api_UserDetailListFeeItem = async (parms: DetailListFeeItemParam) => {
    return await http.post(Api.listFeeItem, parms)
}

/**
 * 平账
 */
export const api_UserBalance = async (parms: BalanceParams) => {
    return await http.post(Api.balance, parms)
}

/**
 * 充值
 */
export const api_UserRecharge = async (parms: RechargeParams) => {
    return await http.post(Api.recharge, parms)
}

/**
 * 退款
 */
export const api_refundMoney = async (parms: ReturnMoneyParam) => {
    return await http.post(Api.refundMoney, parms)
}

/**
 * 细刻模板
 */
export const api_XiKeMoneyReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.xiKeMoneyReportdownload, parms)
}

/**
 * 英驰模板
 */
export const api_YingChiMoneyReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.yingChiMoneyReportdownload, parms)
}

/**
 * 方仓模板
 */
export const api_FangCangMoneyReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.fangCangMoneyReportdownload, parms)
}

/**
 * 分公司利润报表
 */
export const api_DownloadCompanyProfit = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.downloadCompanyProfit, parms)
}

/**
 * 
 * @param parms 简爱模板
 * @returns 
 */
export const api_jianAiMoneyReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.jianAiMoneyReportdownload, parms)
}

/**
 * 小包账单模版
 * @param parms 
 * @returns 
 */
export const api_xbAndKpReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.xbAndKpReportdownload, parms)
}

/**
 * 德国海外仓模版
 * @param parms 
 * @returns 
 */
export const api_deOverseasReportdownload = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.deOverseasReportdownload, parms)
}

/**
 * exchange 汇兑 
 */
export const api_Exchange = async (parms: ExchangeParams) => {
    return await http.post(Api.exchangeConvert, parms)
}

/**
 * 已打单末交货金额
 * @param parms 
 * @returns 
 */
export const api_queryCustomerNetPrintFee = async (parms: CustomerNetPrintFeeParam) => {
    return await http.post(Api.queryCustomerNetPrintFee, parms)
}

/**
 * 充值记录导出
 */
export const api_downloadMoneyRecharge = async (parms: UserMoneyDetailParam) => {
    return await http.download(Api.downloadRecharge, parms)
}

/**
 * 客户总账导出
 */
export const api_sumMoneytDownload = async (parms: UserMoneySumParam) => {
    return await http.download(Api.sumMoneytDownload, parms)
}