Files
shanxia2.0/web-admin/src/api/crm/pool.ts
T
2026-08-22 09:08:05 +08:00

84 lines
2.4 KiB
TypeScript

import request from '@/utils/http'
// ── 公海池客户 ──
/** 公海池客户分页列表 */
export function fetchPoolCustomerList(data?: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/list', data })
}
/** 领取公海客户 */
export function fetchClaimCustomer(data: { ids: string[]; remark?: string }) {
return request.post({ url: '/web/crm/customer/claim', data })
}
/** 分配公海客户 */
export function fetchAssignPoolCustomers(data: {
ids: string[]
ownerUserId: string
remark?: string
}) {
return request.post({ url: '/web/crm/customer/pool/assign', data })
}
/** 公海池操作记录列表 */
export function fetchPoolRecordList(data?: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/record/list', data })
}
/** 导出公海客户 */
export function fetchExportPoolCustomers(data: Record<string, any> = {}) {
return request.post({
url: '/web/crm/customer/pool/export',
data,
responseType: 'blob'
})
}
// ── 公海池规则 ──
/** 公海池规则列表 */
export function fetchPoolRuleList(data?: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/rule/list', data })
}
/** 公海池规则详情 */
export function fetchPoolRuleDetail(data: { id: string }) {
return request.post({ url: '/web/crm/customer/pool/rule/detail', data })
}
/** 新增公海池规则 */
export function fetchCreatePoolRule(data: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/rule/add', data })
}
/** 更新公海池规则 */
export function fetchUpdatePoolRule(data: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/rule/update', data })
}
/** 删除公海池规则 */
export function fetchDeletePoolRule(data: { id: string }) {
return request.post({ url: '/web/crm/customer/pool/rule/delete', data })
}
/** 启用/禁用公海池规则 */
export function fetchTogglePoolRule(data: { id: string; status: string }) {
return request.post({ url: '/web/crm/customer/pool/rule/updateStatus', data })
}
/** 手动执行公海池规则 */
export function fetchExecutePoolRules(data?: Record<string, any>) {
return request.post({ url: '/web/crm/customer/pool/rule/execute', data })
}
/** 导出公海规则 */
export function fetchExportPoolRules(data: Record<string, any> = {}) {
return request.post({
url: '/web/crm/customer/pool/rule/export',
data,
responseType: 'blob'
})
}