import request from '@/utils/request' // 查询客群列表 export function listCustGroup(query) { return request({ url: '/group/cust/list', method: 'get', params: query }) } // 获取客群详情 export function getCustGroup(id) { return request({ url: '/group/cust/' + id, method: 'get' }) } // 异步创建客群(网格导入) export function createCustGroupByGrid(data) { return request({ url: '/group/cust/createByGrid', method: 'post', data: data }) } // 异步创建客群(模板导入) export function createCustGroupByTemplate(data) { return request({ url: '/group/cust/createByTemplate', method: 'post', data: data, headers: { 'Content-Type': 'multipart/form-data' } }) } // 更新客群 export function updateCustGroup(data) { return request({ url: '/group/cust/update', method: 'post', data: data }) } // 更新客群(网格导入) export function updateCustGroupByGrid(data) { return request({ url: '/group/cust/updateByGrid', method: 'post', data: data }) } // 更新客群(模板导入) export function updateCustGroupByTemplate(data) { return request({ url: '/group/cust/updateByTemplate', method: 'post', data: data, headers: { 'Content-Type': 'multipart/form-data' } }) } // 轮询客群创建状态 export function getCreateStatus(id) { return request({ url: '/group/cust/createStatus/' + id, method: 'get' }) } // 客户信息模板下载 export function downloadTemplate() { return request({ url: '/group/cust/download', method: 'post', responseType: 'blob' }) } // 删除客群 export function deleteCustGroup(idList) { return request({ url: '/group/cust/delete', method: 'post', data: idList }) } // 手动移除客群客户 export function removeMembers(groupId, memberIds) { return request({ url: '/group/cust/removeMembers', method: 'post', params: { groupId: groupId }, data: memberIds }) } // 检查客群名称是否存在 export function checkGroupNameExist(groupName) { return request({ url: '/group/cust/checkName', method: 'get', params: { groupName: groupName } }) } // 根据网格类型获取客户经理列表 export function getManagerList(gridType) { return request({ url: '/grid/cmpm/managerList', method: 'get', params: { gridType: gridType } }) } // 分页查询客群成员列表 export function listCustGroupMembers(groupId, query) { return request({ url: '/group/member/list/' + groupId, method: 'get', params: query }) } // 查询地理网格列表(专用于客群创建) export function getRegionGridListForGroup(query) { return request({ url: '/grid/region/groupList', method: 'get', params: query }) }