import request from '@/utils/request'

//拜访计划列表
export function getPlanList(data) {
    return request({
        url: '/mk/bo/plan/list',
        method: 'get',
        params: data
    })
}
//拜访计划新增
export function addPlan(data) {
    return request({
        url: '/mk/bo/plan/',
        method: 'post',
        data: data
    })
}
//拜访计划编辑
export function editPlan(data) {
    return request({
        url: '/mk/bo/plan/edit',
        method: 'put',
        data: data
    })
}
//拜访计划提交
export function submitPlan(data) {
    return request({
      url: `/mk/bo/plan/submit`,
      method: 'POST',
      data: data
    })
}
//拜访计划基本信息详情
export function getPlanDetail(id) {
    return request({
      url: '/mk/bo/plan/' + id,
      method: 'get',
    })
}
//拜访计划基本子表详情
export function getPlanSonDetail(planId) {
    return request({
      url: `/mk/bo/item/` + planId,
      method: 'get',
    })
}
//拜访计划删除
export function delPlan(id) {
    return request({
        url: '/mk/bo/plan/' + id,
        method: 'delete'
    })
}
//拜访计划明细删除
export function delPlanItem(id) {
    return request({
        url: '/mk/bo/item/' + id,
        method: 'delete'
    })
}
//拜访计划导出
export function exportPlan(data) {
    return request({
      url: `/mk/bo/plan/export`,
      method: 'post',
      data: data,
      responseType: 'blob'
    })
}