import request from '@/config/axios'

// 创建
export const createWait = (data) => {
  return request.post({
    url: '/admin-api/okr/agent-work/create',
    data,
    isSubmitForm: true
    // headers: { 'instance-id': 1016 }
  })
}

// 修改
export const updateWait = (data) => {
  return request.put({
    url: '/admin-api/okr/agent-work/update',
    data
    // headers: { 'instance-id': 1016 }
  })
}

// 分页
export const getWaitPage = (params) => {
  return request.get({
    url: '/admin-api/okr/agent-work/page',
    params
    // headers: { 'instance-id': 1016 }
  })
}

// 详情
export const getWaitDetail = (id) => {
  return request.get({
    url: '/admin-api/okr/agent-work/get',
    params: { id }
    // headers: { 'instance-id': 1016 }
  })
}

// 删除
export const deleteWait = (id) => {
  return request.delete({
    url: '/admin-api/okr/agent-work/delete',
    params: { id }
    // headers: { 'instance-id': 1016 }
  })
}

// 催办
export const urgeWait = (workId) => {
  return request.get({
    url: '/admin-api/okr/agent-work/urge',
    params: { workId }
    // headers: { 'instance-id': 1016 }
  })
}

// 跟进待办
export const followWait = (data) => {
  return request.post({
    url: '/admin-api/okr/agent-work-follow/create',
    data,
    isSubmitForm: true
    // headers: { 'instance-id': 1016 }
  })
}

// 查询跟进记录
export const getFollowWaitPage = (params) => {
  return request.get({
    url: '/admin-api/okr/agent-work-follow/list',
    params
    // headers: { 'instance-id': 1016 }
  })
}

export const getWaitCount = (params) => {
  return request.get({
    url: '/admin-api/okr/agent-work/getAgentWorkNum',
    params
    // headers: { 'instance-id': 1016 }
  })
}
