import request from '@/utils/request'

// 查询外委外包工程列表
export function listPost(query) {
  return request({
    url: '/project/outsourcingPro/list',
    method: 'get',
    params: query
  })
}
// 查询外委外包工程列表
export function listPosts(query) {
  return request({
    url: '/project/outsourcingPro/lists',
    method: 'get',
    params: query
  })
}
/*--------------------------------监理单位信息接口--------------------------------------*/
// 查询监理单位信息
export function listSupervisor(data) {
  return request({
    url: '/project/outsourcingPro/listSupervisor',
    method: 'get',
    params: data
  })
}
// 查询监理单位信息
export function listSupervisorPerson(data) {
  return request({
    url: '/project/outsourcingPro/listSupervisorPerson',
    method: 'get',
    params: data
  })
}
// 根据id查询人员详细信息
export function listSupervisorPersonById(data) {
  return request({
    url: '/project/outsourcingPro/listSupervisorPersonById',
    method: 'post',
    data: data
  })
}
/*--------------------------------承包商信息接口--------------------------------------*/
// 根据工程ID获取承包商名称
export function selectConArr(data) {
  return request({
    url: '/project/outsourcingPro/selectConArr',
    method: 'post',
    data: data
  })
}
// 根据ID获取承包商信息
export function getConsDetailsInfo(data) {
  return request({
    url: '/project/outsourcingPro/getConsDetailsInfo',
    method: 'post',
    data: data
  })
}
// 根据ID获取分包商信息
export function getSubList(data) {
  return request({
    url: '/project/outsourcingPro/getSubList',
    method: 'get',
    params: data
  })
}
// 根据ID获取施工人员信息
export function getConsPersonList(data) {
  return request({
    url: '/project/outsourcingPro/getConsPersonList',
    method: 'get',
    params: data
  })
}
// 根据ID获取工程材料
export function getProProfile(data) {
  return request({
    url: '/project/outsourcingPro/getProProfile',
    method: 'get',
    params: data
  })
}
// 根据ID获取工器具信息
export function getConsEquipList(data) {
  return request({
    url: '/project/outsourcingPro/getConsEquipList',
    method: 'get',
    params: data
  })
}
// 根据ID获取施工材料信息
export function getConsMaterialsList(data) {
  return request({
    url: '/project/outsourcingPro/getConsMaterialsList',
    method: 'get',
    params: data
  })
}
// 根据ID获取人员详情
export function getConstructionPersonnelDetails(data) {
  return request({
    url: '/project/outsourcingPro/getConstructionPersonnelDetails',
    method: 'post',
    data: data
  })
}
// 根据ID获取工器具详情
export function getEquipDetails(data) {
  return request({
    url: '/project/outsourcingPro/getEquipDetails',
    method: 'post',
    data: data
  })
}
// 根据ID获取分包商详情
export function getSubDetailsInfo(data) {
  return request({
    url: '/project/outsourcingPro/getSubDetailsInfo',
    method: 'post',
    data: data
  })
}
// 根据ID获取分包商施工人员
export function getSubPersonList(data) {
  return request({
    url: '/project/outsourcingPro/getSubPersonList',
    method: 'get',
    params: data
  })
}
// 根据ID获取分包商施工人员详情信息
export function getSubPersonnelDetails(data) {
  return request({
    url: '/project/outsourcingPro/getSubPersonnelDetails',
    method: 'post',
    data: data
  })
}
export function getNum(data) {
  return request({
    url: '/project/outsourcingPro/getNum',
    method: 'post',
    data: data
  })
}
// 依据供应商id 和工程id 查询 必填资料
export function getProRequest(data) {
  return request({
    url: '/project/pro/getProRequest',
    method: 'post',
    data: data
  })
}
/**
 * 获取业主首页表格数据
 * @param data
 * @returns {*}
 */
export function getNumList(data) {
  return request({
    url: '/project/outsourcingPro/getNumList',
    method: 'get',
    params: data
  })
}

/**
 * 批阅
 * @param data
 * @returns {AxiosPromise}
 */
export function addAnnotations(data) {
  return request({
    url: '/project/outsourcingPro/addAnnotations',
    method: 'post',
    data: data
  })
}
/**
 * 删除监理人员
 * @param data
 * @returns {AxiosPromise}
 */
export function delPersonByIdCardAndPhone(data) {
  return request({
    url: '/project/SupervisionUnit/delSupervisoryPersonApply',
    method: 'post',
    data: data
  })
}
