import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SettlementVO, SettlementForm, SettlementQuery } from '@/api/msg/settlement/types';
import { SmscountQuery, SmscountVO } from '@/api/msg/smscount/types';

/**
 * 查询费用结算列表
 * @param query
 * @returns {*}
 */
export const listSettlement = (query?: SmscountQuery): AxiosPromise<SmscountVO[]> => {
  return request({
    url: '/msg/settlement/list',
    method: 'post',
    data: query
  });
};

/**
 * 查询费用结算详细
 * @param id
 */
export const getSettlement = (id: string | number): AxiosPromise<SettlementVO> => {
  return request({
    url: '/msg/settlement/' + id,
    method: 'get'
  });
};

/**
 * 导出费用结算
 * @param params
 */
export const exportSettlement = (params?: SettlementQuery) => {
  return request({
    url: '/msg/settlement/export',
    method: 'post',
    data: params
  });
};

/**
 * 导出费用结算明细
 * @param params
 */
export const exportSettlementDetail = (params?: SettlementQuery) => {
  return request({
    url: '/msg/settlement/exportdetail',
    method: 'post',
    data: params
  });
};
