import http from "@/http/http";
import { CustomerRateParams, CustomerRateQueryParam, SubmitCustomerRateModel } from "@/api/customerrate/CustomerRateModel";
import { VersionListParam } from "../billrate/BillRateModle";
enum Api {
    getCustomerRateList = '/api/customerRate/list',
    add = '/api/customerRate/add',
    edit = '/api/customerRate/edit',
    delete = '/api/customerRate',
    getCustomerRateversionList = '/api/customerRate/versionList',
    getCustomerCurrencyRateList = '/api/base/customerCurrencyRateList'
}

//查询列表
export const getCustomerRateListApi = async (parms: CustomerRateQueryParam) => {
    return await http.get(Api.getCustomerRateList, parms)
}

//新增
export const addCustomerRateApi = async (parms: CustomerRateParams[]) => {
    return await http.post(Api.add, parms)
}
//编辑
export const editCustomerRateApi = async (parms: CustomerRateParams[]) => {
    return await http.put(Api.edit, parms)
}
//删除
export const deleteCustomerRateApi = async (parms: VersionListParam) => {
    return await http.delete(Api.delete, parms)
}
// 按版本号查询
export const getCustomerRateversionListApi = async (parms: VersionListParam) => {
    return await http.get(Api.getCustomerRateversionList, parms)
}

// 客户汇率版本下拉框
export const getcustomerCurrencyRateListApi = async () => {
    return await http.get(Api.getCustomerCurrencyRateList)
}