import axios from '@/utils/http'

const formHeader = {
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}

/**
 * 获取客户列表
 * @param params
 * @returns
 */
export const getCustomerPage = (params: any) => {
  return axios.get('/api/customer/page', {
    params,
    headers: formHeader
  })
}

/**
 * 获取用户负责客户列表
 * @param params
 * @returns
 */
export const getUserOrderFileConfPage = (params: any) => {
  return axios.get('/api/userOrderFileConf/page', {
    params,
    headers: formHeader
  })
}

/**
 * 批量删除用户负责客户
 * @param params
 * @returns
 */
export const deleteUserOrderFileConfByIds = (ids: string) => {
  return axios.get('/api/userOrderFileConf/batchDeleteByIds', {
    params: { ids },
    headers: formHeader
  })
}

/**
 * 添加用户负责客户
 * @param data
 * @returns
 */
export const addUserOrderFileConf = (data: any) => {
  return axios.post('/api/userOrderFileConf/add', data)
}

/**
 * 修改用户负责客户
 * @param data
 * @returns
 */
export const editUserOrderFileConf = (data: any) => {
  return axios.post('/api/userOrderFileConf/edit', data)
}

/**
 * 获取用户
 * @param data
 * @returns
 */
export const getUserList = (params: any) => {
  return axios.get('/api/sysUser/page', {
    params,
    headers: formHeader
  })
}


/**
 * 获取客户资料列表
 * @param params
 * @returns
 */
export const getInformationList = (params: any) => {
  return axios.get('/api/information/typePage', {
    params,
    headers: formHeader
  })
}