import request from '@/utils/request'

// 所有项目机会流程列表
export function getAllInvestOppList(query) {
  return request({
    url: '/project/investmentOpportunity/listAll',
    method: 'get',
    params: query
  })
}
// 我的待办任务列表
export function getMyTaskList(query) {
  return request({
    url: '/project/investmentOpportunity/getMyTaskList',
    method: 'get',
    params: query
  })
}
//我的已办任务列表
export function getMyDoneTaskList(query) {
  return request({
    url: '/project/investmentOpportunity/getMyDoneTaskList',
    method: 'get',
    params: query
  })
}
//我的单据列表
export function getMyList(query) {
  return request({
    url: '/project/investmentOpportunity/getMyList',
    method: 'get',
    params: query
  })
}
//启动流程
export function investmentOpportunityStart(data) {
  return request({
    //url: '/invest/pool',
    url:'/project/investmentOpportunity/start',
    method: 'post',
    data: data
  })
}
//审批流程
export function investmentOpportunityComplete(data) {
  return request({
    url:'/project/investmentOpportunity/complete',
    method: 'put',
    data: data,
  })
}
// 查询项目池详细
export function getPool(id) {
  return request({
    url: '/invest/pool/' + id,
    method: 'get'
  })
}
export function getInvestInfo(pInstId) {
  return request({
    url: '/project/investmentOpportunity/' + pInstId,
    method: 'get'
  })
}

// 项目池-修改项目机会信息（不涉及流程）
export function investmentOpportunityEdit(data) {
  return request({
    url:'/project/investmentOpportunity/edit',
    method: 'put',
    data: data,
  })
}

// 修改项目池
/*export function updatePool(data) {
  return request({
    url: '/invest/pool',
    method: 'put',
    data: data
  })
}*/

// 删除项目池
/*export function delPool(id) {
  return request({
    url: '/invest/pool/' + id,
    method: 'delete'
  })
}*/
// 查询项目机会待办任务列表数量
export function getMyTaskInvestOppNumber() {
  return request({
    url: '/project/investmentOpportunity/getMyTaskList',
    method: 'get'
  })
}

