import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CorpVO, CorpForm, CorpQuery } from '@/api/customer/corp/types';

/**
 * 查询企业客户基础信息列表
 * @param query
 * @returns {*}
 */

export const listCorp = (query) => {
  return request({
    url: '/customer/corp/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询企业客户基础信息详细
 * @param customerId
 */
export const getCorp = (customerId: string | number): AxiosPromise<CorpVO> => {
  return request({
    url: '/customer/corp/' + customerId,
    method: 'get'
  });
};

export const queryInfo = (customerId: string | number) => {
  const data = {
    customerId
  };
  return request({
    url: '/customer/corp/queryInfo',
    method: 'post',
    data: data
  });
};
