import request from "@/util/oaRequest"

// 查询项目进度列表
export function listProjectSchedule (query) {
  return request({
    url: '/oa/projectSchedule/list',
    method: 'get',
    params: query
  })
}

// 查询项目进度详细
export function getProjectSchedule (scheduleId) {
  return request({
    url: '/oa/projectSchedule/' + scheduleId,
    method: 'get'
  })
}

// 新增项目进度
export function addProjectSchedule (data) {
  return request({
    url: '/oa/projectSchedule',
    method: 'post',
    data: data
  })
}

// 修改项目进度
export function updateProjectSchedule (data) {
  return request({
    url: '/oa/projectSchedule',
    method: 'put',
    data: data
  })
}

// 修改项目进度
export function completeSchedule (data) {
  return request({
    url: '/oa/projectSchedule/complete',
    method: 'put',
    data: data
  })
}

// 删除项目进度
export function delProjectSchedule (scheduleId) {
  return request({
    url: '/oa/projectSchedule/' + scheduleId,
    method: 'delete'
  })
}

export function addByProjectId (data) {
  return request({
    url: '/oa/projectSchedule/addByProjectId',
    method: 'post',
    data
  })
}
