import request from '@/utils/request'

// 确认PROGRAMME完成确认清单
export function handleConfirmProgramme(data) {
  return request({
    url: '/pssr/programme/confirmProgramme',
    method: 'put',
    data: data
  })
}

// 驳回PROGRAMME完成确认清单
export function handleTurnDownProgramme(data) {
  return request({
    url: '/pssr/programme/turnDownProgramme',
    method: 'put',
    data: data
  })
}

// 查询开工方案列表
export function listProgramme(query) {
  return request({
    url: '/pssr/programme/list',
    method: 'get',
    params: query
  })
}

// 查询开工方案详细
export function getProgramme(id) {
  return request({
    url: '/pssr/programme/' + id,
    method: 'get'
  })
}

// 新增开工方案
export function addProgramme(data) {
  return request({
    url: '/pssr/programme',
    method: 'post',
    data: data
  })
}

// 修改开工方案
export function updateProgramme(data) {
  return request({
    url: '/pssr/programme',
    method: 'put',
    data: data
  })
}

//
export function updateProgrammeBatch(data) {
  return request({
    url: '/pssr/programme/editBatch',
    method: 'put',
    data: data
  })
}


// 删除开工方案
export function delProgramme(id) {
  return request({
    url: '/pssr/programme/' + id,
    method: 'delete'
  })
}

// 导出开工方案
export function exportProgramme(query) {
  return request({
    url: '/pssr/programme/export',
    method: 'get',
    params: query
  })
}
