import axios from 'axios'
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)
}
