import request from '@/utils/request'

// 查询商机基础信息列表
export function listBasic(query) {
  return request({
    url: '/mk/bo/basic/list',
    method: 'get',
    params: query
  })
}



// 查询商机基础信息详细
export function getBasic(id) {
  return request({
    url: '/mk/bo/basic/' + id,
    method: 'get'
  })
}



// 新增商机基础信息
export function addBasic(data) {
  return request({
    url: '/mk/bo/basic',
    method: 'post',
    data: data
  })
}



// 修改商机基础信息
export function updateBasic(data) {
  return request({
    url: '/mk/bo/basic',
    method: 'put',
    data: data
  })
}

// 修改商机流程信息
export function updateBasicFlow(data) {
  return request({
    url: '/mk/bo/flow',
    method: 'put',
    data: data
  })
}


// 删除商机基础信息
export function delBasic(id) {
  return request({
    url: '/mk/bo/basic/' + id,
    method: 'delete'
  })
}

// 删除商机附件
export function delAccessory(boId,f,id) {
  return request({
    url: '/mk/bo/basic/accessory?boId=' + boId + '&flag=' + f + '&id=' + id,
    method: 'delete'
  })
}

//流程下一步
export function nextFlow(boId,boStage) {
  return request({
    url: '/mk/bo/basic/flow?boId=' + boId + '&boStage=' + boStage,
    method: 'put'
  })
}