
import http from "@/http/http";
import { ResultInterface } from "../base/BaseDataModel";
import { CustomerFeeApprovalRecordDto, CustomerFeeApprovalRecordListDto, CustomerFeeApprovalRecordParam, CustomerFeeApprovalStatusDto, CustomerFeeApprovalStatusParam } from './customerFeeApprovalModel';

enum Api {
    add = '/api/customerFeeApprovalRecord/add',
    customerFeeApprovalRecordList = '/api/customerFeeApprovalRecord/list',
    approval = '/api/customerFeeApprovalRecord/approval',
    statusList = '/api/customerFeeApprovalRecord/statusList',
    allApproval = '/api/customerFeeApprovalRecord/allApproval'
}

/**
 * 添加客户费用审批接口
 * @param parms 
 * @returns 
 */
export const api_customerFeeAddApproval = async (parms: CustomerFeeApprovalRecordDto) => {
    return await http.post(Api.add, parms)
}

/**
 * 审批记录查询列表
 * @param parms 
 * @returns 
 */
export const api_customerFeeApprovalRecordList = async (parms: CustomerFeeApprovalRecordParam) => {
    return await http.post<ResultInterface<CustomerFeeApprovalRecordListDto>>(Api.customerFeeApprovalRecordList, parms)
}

/**
 * 提交审批
 * @param parms 
 * @returns 
 */
export const api_customerFeeApproval = async (parms: CustomerFeeApprovalStatusDto) => {
    return await http.post(Api.approval, parms)
}

/**
 * 客户费用界面查看审批结果
 * @param parms 
 * @returns 
 */
export const api_customerFeeApprovalRecord = async (parms: CustomerFeeApprovalStatusParam) => {
    return await http.post(Api.statusList, parms)
}

/**
 * 客户费用界面查看多次审批结果
 * @param parms 
 * @returns 
 */
export const api_customerFeeAllApproval = async (parms: CustomerFeeApprovalStatusParam) => {
    return await http.post(Api.allApproval, parms)
}