import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取师傅列表
export function memberListPageV2(data) {
  return request({
    url: `/member/list/page2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function memberPageExport(data, name) {
  return postBlob({
    url: '/member/list/page2/export',
    data,
    name
  })
}

// 审核
export function memberAudit(data) {
  return request({
    url: '/member/worker/examine',
    method: 'post',
    data
  })
}

// 获取详情
export function getMemberDetail(params) {
  return request({
    url: '/member/worker/examine/detail',
    method: 'get',
    params
  })
}

// 设置取消分销员
export function memberInner(data) {
  return request({
    url: '/member/batch/type',
    method: 'post',
    data
  })
}

export function memberSlaveBind(params) {
  return request({
    url: '/member/slave/bind',
    method: 'post',
    params
  })
}

export function update(params) {
  return request({
    url: '/member/worker/update',
    method: 'post',
    params
  })
}

// 激活账号
export function workerManagerActivation(params) {
  return request({
    url: '/workerManager/activation',
    method: 'post',
    params
  })
}

// 重新入职
export function workerManagerAgainQuit(params) {
  return request({
    url: '/workerManager/againQuit',
    method: 'post',
    params
  })
}

// 离职
export function workerManagerQuit(params) {
  return request({
    url: '/workerManager/quit',
    method: 'post',
    params
  })
}

// 暂停接单
export function workerManagerStop(params) {
  return request({
    url: '/workerManager/stop',
    method: 'post',
    params
  })
}

export function workerManagerDetail(params) {
  return request({
    url: '/workerManager/detail',
    method: 'post',
    params
  })
}

export function workerManagerUpdate(data) {
  return request({
    url: '/workerManager/update',
    method: 'post',
    data
  })
}

export function workerManagerExamineWait(data) {
  return request({
    url: '/workerManager/examineWait',
    method: 'post',
    data
  })
}

export function workerManagerExamine(data) {
  return request({
    url: '/workerManager/examine',
    method: 'post',
    data
  })
}
