import request from '@/utils/request'

// 提交申请
export function handleOpenitem(data) {
  return request({
    url: '/rc/openitem/handle',
    method: 'put',
    data: data
  })
}

// 查询开项列表
export function listOpenitem(query) {
  return request({
    url: '/rc/openitem/list',
    method: 'get',
    params: query
  })
}

// 查询开项详细
export function getOpenitem(id) {
  return request({
    url: '/rc/openitem/' + id,
    method: 'get'
  })
}

// 新增开项
export function addOpenitem(data) {
  return request({
    url: '/rc/openitem',
    method: 'post',
    data: data
  })
}

// 修改开项
export function updateOpenitem(data) {
  return request({
    url: '/rc/openitem',
    method: 'put',
    data: data
  })
}

// 删除开项
export function delOpenitem(id) {
  return request({
    url: '/rc/openitem/' + id,
    method: 'delete'
  })
}
