import request from '@/utils/request'
import { User,business,files } from '@/api'

//列表分页接口
export function getKhpgPage(data, page) {
    return request({
        url: `${business}khpg/getKhpgPage?pageNum=${page.pageNum}&pageSize=${page.pageSize}`,
        method: 'post',
        data: data
    })
}
//考核表新增
export function addKhpg(data) {
    return request({
        url: `${business}/khpg/addKhpg`,
        method: 'post',
        data: data
    })
}
//删除考核评估
export function deleteKhpg(data) {
    return request({
        url: `${business}/khpg/deleteKhpg`,
        method: 'post',
        data: data
    })
}
//编辑考核评估表
export function updateKhpgg(data) {
    return request({
        url: `${business}khpg/updateKhpg`,
        method: 'post',
        data: data
    })
}
//修改考核评估企业表
export function updateKhqyb(data) {
    return request({
        url: `${business}/khpg/updateKhqyb`,
        method: 'post',
        data: data
    })
}
//查询考核企业本列表
export function getKhqybList(data) {
    return request({
        url: `${business}/khpg/getKhqybList`,
        method: 'post',
        data: data
    })
}
//区评分
export function updateKhqybDetailBatch(data) {
    return request({
        url: `${business}/khpg/updateKhqybDetailBatch`,
        method: 'post',
        data: data
    })
}

//查询企业自评表
export function getKhqybDetail(data) {
    return request({
        url: `${business}khpg/getKhqybDetail`,
        method: 'post',
        params: data
    })
}
//市储备公司评分
export function updateKhqybDetailBatchForSj(data) {
    return request({
        url: `${business}khpg/updateKhqybDetailBatchForSj`,
        method: 'post',
        data: data
    })
}
//获取通知对象列表
export function listGroupOrg() {
    return request({
      url: `${User}/org/listGroupOrg`,
      method: 'get',
    })
  }
  //详情
  export function getKhpgDetail(id) {
    return request({
      url: `${business}/khpg/getKhpgDetail?id=${id}`,
      method: 'post',
    })
  }
  //生成汇总表
  export function createHzb(data) {
    return request({
      url: `${business}/khpg/createHzb`,
      method: 'post',
	  data:data
    })
  }
//汇总表列表
export function getKhhzbPage(data,page) {
    return request({
      url: `${business}/khpg/getKhhzbPage?pageNum=${page.pageNum}&pageSize=${page.pageSize}`,
      method: 'post',
	  data:data
    })
  }
  //查看考核汇总表详情
 export function getKhhzbDetail(data) {
    return request({
      url: `${business}/khpg/getKhhzbDetail`,
      method: 'post',
	  params:data
    })
  }
//编辑-保存汇总表
 export function updateKhhzb(data) {
    return request({
      url: `${business}/khpg/updateKhhzb`,
      method: 'post',
	  data:data
    })
  }

//文件回显
export function fileInfo(data) {
    return request({
      url: `${files}/file/findByIds?ids=${data}`,
      method: 'get',
    })
  }
