sop.js 2.18 KB
import { http } from '@/main'

// 标签获取客户列表
const getCustomerByTagListApi = params => {
  params.method = 'entmicro.api.customer.getCustomerPageByTag'
  params.source = 'scrm-home'
  return http({
    url: 'rop-scrm-entmicro/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

const getSopInfoListApi = params => {
  params.method = 'scrm.api.sop.sopInfo.listWithPage'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// sop分析-触达率列表
const getSopCustomerStatisticsListApi = params => {
  params.method = 'scrm.api.sop.sopCustomer.listStatisticsWithPage'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// sop分析-员工完成率列表
const getSopStaffTaskListApi = params => {
  params.method = 'scrm.api.sop.staffTaskStatistics.listWithPage'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// sop营销事件次数分析
const parseEventCountApi = params => {
  params.method = 'scrm.api.sop.sopEvent.parseEventCount'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

// 事件进行中,修改sop事件列表
const insertOrUpdateSopEventApi = params => {
  params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

// 新增或者事件未开始,新增/修改sop
const insertOrUpdateSopApi = params => {
  params.method = 'scrm.api.sop.sopInfo.insertOrUpdate'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true,
    returnAll: true
  })
}

const getSopInfoDetailApi = params => {
  params.method = 'scrm.api.sop.sopInfo.getDetailBySopId'
  return http({
    url: 'rop-scrm-sop/router',
    method: 'POST',
    data: params,
    sign: true
  })
}

export default { getCustomerByTagListApi, getSopInfoListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, parseEventCountApi, insertOrUpdateSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi }