/**
 * 请求api
 * @author
 */

/**
 * 注意
 * 注意
 * 注意
 * 注意
 * 注意
 * 注意
 * 注意
 * 
 * 
 * 发布正式版时将DEV设置为false
 * 
 * 
 */
const DEV = false
// const DEV = true


//打印日志开关
const DEBUG = false;
// const DEBUG = true;

// const API_BASE_URL = 'https://www.xingyuancrm.com/redsun-api/miniapp/cloud/a/'; //生产环境
// const API_BASE_URL = 'http://192.168.2.44:8083/a/'; //冬青
// const API_BASE_URL = 'http://192.168.2.8:8080/cloud_war_exploded/a/'; //洪雪
// const API_BASE_URL = 'http://116.162.216.30:8082/cloud/a/'; //李宗平 
// const API_BASE_URL = 'http://192.168.2.185:8080/nenghui/a/'; //贺
// const API_BASE_URL = 'http://192.168.2.28:8080/nenghui/a/'; //王文军
// const API_BASE_URL = 'http://192.168.2.244:8080/nenghui/a/'; //倪
// const API_BASE_URL = 'http://192.168.2.99:7380/nenghui/a/'; //黄赵
// const API_BASE_URL = 'http://192.168.2.187:8088/nenghui/a/'; //王楠
// const API_BASE_URL = 'http://192.168.2.223:8080/cloud_war_exploded/a/'; //程礼坤

// const API_MONIT_URL = 'http://192.168.2.8:8099/'; //洪雪-监控接口
// const API_MONIT_URL = 'http://192.168.2.181:8099/'; //李宗平-监控接口




//测试环境
const API_BASE_URL = 'http://47.100.121.41:8089/nenghui_uat/a/'; //接口
const IMG_BASE_URL = 'https://nhet-test.oss-cn-shanghai.aliyuncs.com/' //测试环境和生产环境 图片前缀
// const API_MONIT_URL = 'https://www.nhhyy.com/nenghui-uat-api/'; //监控接口


//线上
// const API_BASE_URL = 'https://www.nhhyy.com/nhet/a/';
// const IMG_BASE_URL = 'https://nhet.oss-cn-shanghai.aliyuncs.com/' //线上 图片前缀
const API_MONIT_URL = 'https://www.nhhyy.com/monitor-api/'; //监控接口



// const IMG_BASE_URL = 'https://entry-imgs.oss-cn-beijing.aliyuncs.com/' //本地
const WU_TU_PIAN_URL = "https://obs-hncs2.cucloud.cn/entry-imgs/prohibit_delete/wutupian.png"; //无图片显示
const UP_MONIT_IMG = API_MONIT_URL + 'blade-resource/oss/endpoint/put-file?code=aliyun'; //监控上传图片路径,每个平台的code可能不同
const IMG_MONIT_URL = ''; //监控图片,暂时不用


/**
 * 
 * base请求
 * @param {String} host 域名
 * @param {String} url 请求路径
 * @param {String} method 请求方法 GET/POST
 * @param {Object} data 请求参数 {"key":"value"}
 * @param {String} contentType 
 * 
 */

var requestWithHost = function requestWithHost(host, url, method, data, contentType, consoleText) {
  var _url = host.length > 0 ? host : API_BASE_URL + url;

  var _header = {
    'Content-Type': contentType === '1' ? 'application/json' : 'application/x-www-form-urlencoded',
  }

  return new Promise(function (resolve, reject) {
    var result;
    var bool;
    wx.request({
      url: _url,
      method: method,
      data: data,
      header: _header,
      success: (res) => {
        if (DEBUG) {
          bool = true
          result = res.data
        }
        resolve(res.data)
      },
      fail: (res) => {
        if (DEBUG) {
          bool = false
          result = res
        }
        resolve(res)
      },

      complete: () => {
        if (DEBUG) {
          console.log('\n')
          console.log('start ---------------------------------------------------------------------- >>')
          if (method.toUpperCase() == "GET") {
            var params = ''
            if (data) {
              Object.keys(data).forEach(key => {
                params = params ? `${params}&${key}=${data[key]}` : `?${key}=${data[key]}`
              });
            }
            console.log(`请求URL: ${method.toUpperCase()} ${_url + params}`)
          } else {
            console.log(`请求URL: ${method.toUpperCase()} ${_url}  \n请求参数:\n${JSON.stringify(data,function (key,value) {
              if (value === undefined) {
                return 'undefined';
              } else if (value === null) {
                return 'null'
              }
              return value;
            },4)}`)
          }
          console.log(bool ? '回调参数:success' : '回调参数:fail', result)
          console.log('<< ---------------------------------------------------------------------- end')
          console.log('\n')
        }
      }
    })
  })
}


/**
 * host:API_BASE_URL 的请求
 * @param {String} url 请求路径
 * @param {String} method 请求方法 GET/POST
 * @param {Object} data 请求参数 {"key":"value"} 
 */

var request = function request(url, method, data, contentType, consoleText) {
  return requestWithHost('', url, method, data, contentType, consoleText)
}

module.exports = {
  API_BASE_URL,
  IMG_BASE_URL,
  WU_TU_PIAN_URL,
  DEV,
  API_MONIT_URL,
  IMG_MONIT_URL,
  UP_MONIT_IMG,
  /**
   * 
   * post请求接口示例
   * 
   * @param {*} data 
   */
  postRequest: function postRequest(data) {
    return request('/api/postRequest', 'post', data, "1");
  },

  /**
   * 
   * get请求接口示例
   * 
   * @param {*} data 
   */
  getRequest: function getRequest(data) {
    return request('/api/getRequest', 'get', data);
  },

  /**
   * 
   * 获取电站列表
   * 
   * @param {*} data 
   */
  ajaxForWaitOrder: function ajaxForWaitOrder(data) {
    return request('main/projectManage/ajaxForWaitOrder', 'get', data);
  },

  /**
   * 
   * 获取农户合同列表
   * 
   * @param {*} data 
   */
  ajaxForWaitOrder2: function ajaxForWaitOrder2(data) {
    return request('main/projectManage/contractListDate', 'get', data);
  },


  /**
   * 
   * 获取电站整改数据
   * 
   * @param {*} data 
   */
  findRetrialPage: function findRetrialPage(data) {
    return request('main/projectManage/findRetrialPage', 'get', data);
  },



  /**
   * 
   * 获取产品编号
   * 
   * @param {*} data 
   */
  projectList: function projectList(data) {
    return request('main/projectManage/projectList', 'get', data);
  },

  /**
   * 
   * 获取自定义字段
   * 
   * @param {*} data 
   */
  getFormSet: function getFormSet(data) {
    return request('main/projectManage/getFormSet', 'get', data);
  },

  /**
   * 
   * 电站安装示例图
   * 
   * @param {*} data 
   */
  findTypeReferenceList: function findTypeReferenceList(data) {
    return request('main/projectManage/findTypeReferenceList', 'get', data);
  },

  /**
     * 
     * 电站安装示例图2
     * 
     * @param {*} data 
     */
    findTypeReferenceListNew: function findTypeReferenceListNew(data) {
      return request('main/projectManage/findTypeReferenceListNew', 'get', data);
    },

  /**
   * 
   * 获取组件、逆变器、并网箱列表
   * 
   * @param {*} data 
   */
  getElectricPlanAll: function getElectricPlanAll(data) {
    return request('main/projectManage/getElectricPlanAll', 'get', data);
  },



  /**
   * 
   * 获取方案类型和名称
   * 
   * @param {*} data 
   */
  findAllPlan: function findAllPlan(data) {
    return request('main/projectManage/findAllPlan', 'get', data);
  },


  login(data) {
    return request('main/login/toLogin', 'get', data);
  },


  sendMsg(data) {
    return request('main/customer/sendMsg', 'get', data);
  },

  checkConfirmCode(data) {
    return request('main/customer/checkConfirmCode', 'get', data);
  },

  /**
   * 
   * 客户管理
   * 
   * @param {*} data 
   */
  saveOrEditCustomerEntry: function saveOrEditCustomerEntry(data) {
    return request('main/projectManage/saveOrEditCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1");
  },


  /**
   * 
   * 信息校验
   * 
   * @param {*} data 
   */
  lookCreditResult: function lookCreditResult(data) {
    return request('main/projectManage/lookCreditResult', 'get', data);
  },


  /**
   * 
   * 获取电站详细
   * 
   * @param {*} data 
   */
  entryDetail: function entryDetail(data) {
    return request('main/projectManage/entryDetail', 'get', data);
  },


  /**
   * 
   * 获取首页统计
   * 
   * @param {*} data 
   */
  getHomeStatistics: function getHomeStatistics(data) {
    return request('main/projectManage/getHomeStatistics', 'get', data);
  },


  /**
   * 
   * 提交完工
   * 
   * @param {*} data 
   */
  install: function install(data) {
    return request('main/projectManage/install?userId=' + data.userId, 'post', data.addReportReq, "1");
  },



  /**
   * 
   * 提交完工
   * 
   * @param {*} data 
   */
  installZc: function install(data) {
    return request('main/projectManage/installZc?userId=' + data.userId, 'post', data.addReportReq, "1");
  },





  /**
   * 
   * 提交并网
   * 
   * @param {*} data 
   */
  accept: function accept(data) {
    return request('main/projectManage/accept?userId=' + data.userId, 'post', data.addReportReq, "1");
  },




  /**
   * 
   * 使用物料
   * 
   * @param {*} data 
   */
  usedMaterial: function usedMaterial(data) {
    return request('main/projectManage/usedMaterial', 'get', data);
  },



  /**
   * 
   * 获取使用物料列表
   * 
   * @param {*} data 
   */
  getUsedMaterialInfo: function getUsedMaterialInfo(data) {
    return request('main/projectManage/getUsedMaterialInfo', 'get', data);
  },


  /**
   * 
   * 删除物料
   * 
   * @param {*} data 
   */
  deleteUsedRocerd: function deleteUsedRocerd(data) {
    return request('main/projectManage/deleteUsedRecord', 'get', data);
  },


  /**
   * 
   * 查询安装组件信息
   * 
   * @param {*} data 
   */
  getActualCapacity: function getActualCapacity(data) {
    return request('main/projectManage/getActualCapacity', 'get', data);
  },


  /**
   * 
   * 审核不通过
   * 
   * @param {*} data 
   */
  appletsFailed: function appletsFailed(data) {
    return request('main/projectManage/appletsFailed', 'get', data);
  },

  /**
   * 
   * 审核通过
   * 
   * @param {*} data 
   */
  appletsToExamine: function appletsToExamine(data) {
    return request('main/projectManage/appletsToExamine?userId=' + data.userId, 'post', data.CustomerEntry, "1");
  },


  /**
   * 
   * 获取变更类型
   * 
   * @param {*} data 
   */
  getRectificationList: function getRectificationList(data) {
    return request('main/projectManage/getRectificationList', 'get', data);
  },


  /**
   * 
   * 审核电站整改
   * 
   * @param {*} data 
   */
  rectificationAudit: function rectificationAudit(data) {
    return request('main/projectManage/rectificationAudit', 'get', data);
  },

  /**
   * 
   * 邀请签约
   * 
   * @param {*} data 
   */
  askToContract: function askToContract(data) {
    return request('main/projectManage/askToContract', 'get', data);
  },


  /**
   * 
   * 根据经纬度 获取 地址
   * 
   * @param {*} data 
   */
  getAddressByLonLat: function getAddressByLonLat(data) {
    return request('main/address/getAddressByLonLat', 'get', data);
  },



  /**
   * 
   * 根据地址 获取 经纬度
   * 
   * @param {*} data 
   */
  getAddressLonLat: function getAddressLonLat(data) {
    return request('main/address/getAddressLonLat', 'get', data);
  },

  /**
   * 
   * 获取仓库信息
   * 
   * @param {*} data 
   */
  getWarehouseList: function getWarehouseList(data) {
    return request('main/projectManage/getWarehouseList', 'get', data);
  },

  /**
   * 
   * 保存仓库信息
   * 
   * @param {*} data 
   */
  saveWarehouse: function saveWarehouse(data) {
    return request('main/projectManage/saveWarehouse', 'get', data);
  },


  /**
   * 
   * 获取代理商下员工人数
   * 
   * @param {*} data 
   */
  etEmpCountByRole: function etEmpCountByRole(data) {
    return request('main/projectManage/getEmpCountByRole', 'get', data);
  },



  /**
   * 
   * 开卡
   * 
   * @param {*} data 
   */
  bankCardPage: function bankCardPage(data) {
    return request('main/yueXiuBankCard/bankCardPage', 'get', data);
  },


  /**
   * 
   * 签约或重新签约
   * 
   * @param {*} data 
   */
  toContractPage: function toContractPage(data) {
    return request('main/yueXiuContract/toContractPage', 'get', data);
  },
  /**
   * 
   * 华融签约或重新签约
   * 
   * @param {*} data 
   */
  huaRongContractPage: function toContractPage(data) {
    return request('main/HuaRongContract/getContractSignUrl', 'get', data);
  },

  /** 上传合同 **/
  submitContract: function submitContract(data) {
    return request('main/HuaRongContract/submitContract', 'post', data, "1");
  },
  /** 生成合同 **/
  getSignContractUrl: function getSignContractUrl(data) {
    return request('main/GFContract/getSignContractUrl', 'get', data);
  },
  /** 合同落章 **/
  doSealContract: function doSealContract(data) {
    return request('main/GFContract/doSealContract', 'get', data);
  },
  /**
   * 
   * 授权
   * 
   * @param {*} data 
   */
  toAuthContrac: function toAuthContrac(data) {
    return request('main/EsignAuth/toAuthContract', 'get', data);
  },

  /**
   * 
   * 查看
   * 
   * @param {*} data 
   */
  getContractUrlToLook: function getContractUrlToLook(data) {
    return request('main/yueXiuContract/getContractUrlToLook', 'get', data);
  },
  /** 华融合同查看 **/
  getContractUrlToLookHr: function getContractUrlToLook(data) {
    return request('main/HuaRongContract/getContractUrl', 'get', data);
  },

  /**
   * 
   * 删除电站
   * 
   * @param {*} data 
   */
  deleteCustomerEntry: function deleteCustomerEntry(data) {
    return request('main/projectManage/deleteCustomerEntry', 'get', data);
  },



  /**
   * 
   * 获取所有省 
   * 
   * @param {*} data 
   */
  getProvinceList: function getProvinceList(data) {
    return request('main/redirect/getProvinceList', 'get', data);
  },

  /**
   * 
   * 根据省查询市
   * 
   * @param {*} data 
   */
  getCitysByProId: function getCitysByProId(data) {
    return request('main/redirect/getCitysByProId', 'get', data);
  },
  /**
   * 
   * 根据市查询区
   * 
   * @param {*} data 
   */
  getAreaByCityId: function getAreaByCityId(data) {
    return request('main/redirect/getAreaByCityId', 'get', data);
  },

  /**
   * 
   * 获取并网箱和支架列表
   * @param {*} data 
   */
  getMateriallist: function getMateriallist(data) {
    return request('main/projectManage/getMateriallist', 'get', data);
  },


  /**
   * 
   * 使用并网箱和支架
   * @param {*} data 
   */
  usedMaterialOther: function usedMaterialOther(data) {
    return request('main/projectManage/usedMaterialOther', 'post', data, "1");
  },


  
  /**
   * 
   * 获取签约状态
   * @param {*} data 
   */
  ecordClickSign: function ecordClickSign(data) {
    return request('main/yueXiuContract/ecordClickSign', 'get', data);
  },


   /**
   * 
   * 获取电力公司
   * @param {*} data 
   */
  getProviceCodeList: function getProviceCodeList(data) {
    return request('main/order/getProviceCodeList', 'get', data);
  },
  /**
   * 
   * 获取联行号列表数据
   * @param {*} data 
   */
  findLinkNumberList: function findLinkNumberList(data) {
    return request('main/projectManage/findLinkNumberList', 'get', data);
  },
  /**
   * 
   * 获取客户管理预审查询结果
   * @param {*} data 
   */
  findResult: function findResult(data) {
    // return request('/main/projectManage/findResult', 'get', data);
    return request('/main/projectManage/findPreauditStatus', 'get', data);
  },

  /**
   * 
   * 修改业主信息接口
   * @param {*} data 
   */
  editCustomerEntryBy: function editCustomerEntryBy(data) {
    return request('/main/projectManage/editCustomerEntryBy?userId=' + data.userId, 'post', data.CustomerEntry,"1");
  },
  //并网验收通过或不通过
  twoMergeAcceptRefuse: function twoMergeAcceptRefuse(data) {
    return request('/main/projectManage/twoMergeAcceptRefuse', 'get', data);
  },
  //安装验收通过或不通过
  toNetAccept: function toNetAccept(data) {
    return request('/main/projectManage/toNetAccept', 'get', data);
  },
  //二类卡信息
  bankCardDetail: function bankCardDetail(data) {
    return request('/main/yueXiuBankCard/bankCardDetail', 'get', data);
  },
  //获取信息授权签约链接
  getEsignUrl: function getEsignUrl(data) {
    return request('/main/EsignAuth/getEsignUrl', 'get', data);
  },
  //获取小程序二维码
  createQrcode: function createQrcode(data) {
    return request('/main/projectManage/createQrcode', 'get', data);
  },
  //校验代理商员工角色登录权限字段接口
  checkTraderEmpAuth: function checkTraderEmpAuth(data) {
    return request('/main/projectManage/checkTraderEmpAuth', 'get', data);
  },
  //修改手机号，并重新发起授权合同
  resetMobileVsAuthPc: function resetMobileVsAuthPc(data) {
    return request('/main/EsignAuth/resetMobileVsAuth', 'get', data);
  },
  //列表tab统计
  customerManagementStatic: function customerManagementStatic(data) {
    return request('/main/projectManage/customerManagementStatic', 'get', data);
  },
  //查看信息授权书
  lookAuthBook: function lookAuthBook(data) {
    return request('/main/projectManage/lookAuthBook', 'get', data);
  },
  //档案表单保存接口
  saveArchives: function saveArchives(data) {
    return request('/main/projectManage/saveArchives?userId=' + data.userId, 'post', data.CustomerEntry,"1");
  },
  //档案审核
  auditArchives: function auditArchives(data) {
    return request('/main/projectManage/auditArchives', 'post', data,'1');
  },
  //派工
  dispatch: function dispatch(data) {
    return request('/main/projectManage/dispatch', 'post', data,'1');
  },
  //经销商的已启用员工列表
  selectDispatchEngineer: function selectDispatchEngineer(data) {
    return request('/main/projectManage/selectDispatchEngineer', 'get', data);
  },
  //逆变器添加编码
  saveMaterialSN: function saveMaterialSN(data) {
    return request('/main/projectManage/saveMaterialSN', 'post', data, '1');
  },
  //获取客户列表
  getTenantList: function getTenantList(data) {
    return request('/main/projectManage/getTenantList', 'get', data);
  },
  //客户详情
  getTenantDetail: function getTenantDetail(data) {
    return request('/main/projectManage/getTenantDetail', 'get', data);
  },
  //近三天发电量
  getDataInThreeDays: function getDataInThreeDays(data) {
    return request('/main/projectManage/getDataInThreeDays', 'get', data);
  },
  //待办
  getNeedToDealList: function getNeedToDealList(data) {
    return request('/main/itemManagement/needToDeal/getNeedToDealList', 'get', data);
  },
  //投资方
  getCapital: function getCapital(data) {
    return request('/main/projectManage/getCapital', 'get', data);
  },
  //接入逆变器--接入
  insertInterFace: function insertInterFace(data) {
    return request('/main/projectManage/insertInterFace', 'get', data);
  },
  //开二类卡--销卡
  cancelBankCard: function cancelBankCard(data) {
    return request('/main/yueXiuBankCard/cancelBankCard', 'get', data);
  },
  //项目信息--所属项目公司
  getCompany: function getCompany(data) {
    return request('main/projectManage/getCompany', 'get',data);
  },
  //代理商列表
  getTraderList: function getTraderList(data) {
    return request('main/projectManage/getTraderList', 'get',data);
  },
  //根据身份证号判断客户是否已存在
  isByIdCode: function isByIdCode(data) {
    return request('main/projectManage/isByIdCode', 'get',data);
  },
  //国网授权--导入接口 传值powerGenerationNo（发电户号）
  addUserInfo: function addUserInfo(data) {
    return request('main/stategrid/addUserInfo', 'get',data);
  }, 
  //审批记录
  getOptList: function getOptList(data) {
    return request('main/projectManage/getOptList', 'get',data);
  },  
  //勘测-提交设计
  surveyToDesign: function surveyToDesign(data) {
    return request('main/projectManage/surveyToDesign?userId=' + data.userId, 'post', data.CustomerEntry, "1");
  },   
  //电站初勘-撤回勘测
  backToSurvey: function backToSurvey(data) {
    return request('main/projectManage/backToSurvey', 'post', data,'1');
  },  
  //电站初勘-设计暂存、设计提交接口
  designCustomerEntry: function designCustomerEntry(data) {
    return request('main/projectManage/designCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1");
  },
  //根据地址查询产品
  getProjectByArea: function getProjectByArea(data) {
    return request('main/projectManage/getProjectByArea', 'get', data);
  },  
  //根据资方获取共签人信息
  getPartnerSet: function getPartnerSet(data) {
    return request('main/yueXiuCommon/getPartnerSet', 'get', data);
  },
  //获取指定字典
  getDictionaryList: function getDictionaryList(data) {
    return request('main/projectManage/getDictionaryList', 'get', data);
  },
  //获取全部表单设置
  getAllConditionList: function getAllConditionList(data) {
    return request('main/projectManage/getAllConditionList', 'post', data);
  },
  //获取所有字典
  getAllDictionarySelect: function getAllDictionarySelect(data) {
    return request('main/projectManage/getAllDictionarySelect', 'get', data);
  },
  //电站并网--国网授权  
  mergeTmp: function mergeTmp(data) {
    return request('main/projectManage/mergeTmp?userId=' + data.userId, 'post', data.addReportReq, "1");
  },
  // 设计自审暂存/保存   
  updateCustomerEntry: function updateCustomerEntry(data) {
    return request('main/projectManage/updateCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1");
  },
  // 自审驳回   
  auditBack: function auditBack(data) {
    return request('main/projectManage/auditBack?userId=' + data.userId, 'post', data, "1");
  },
  // 安装自审驳回   
  acceptZSRefuse: function acceptZSRefuse(data) {
    return request('main/projectManage/acceptZSRefuse', 'get', data);
  },
  // 安装自审通过   
  acceptZS: function acceptZS(data) {
    return request('main/projectManage/acceptZS', 'get', data);
  },
  // 发起合同   
  createContract: function createContract(data) {
    return request('main/HuaRongContract/createContract', 'get', data);
  },
  //校验条码是否存在系统
  checkMaterialCode: function checkMaterialCode(data) {
    return request('main/projectManage/checkMaterialCode', 'get', data);
  },
  //选择整村汇流-获取数据
  choseBoxGroupData: function choseBoxGroupData(data) {
    return request('main/boxSet/choseBoxGroupData', 'get', data);
  },
  //选择汇流组保存、或者新增保存
  saveOneOwner: function saveOneOwner(data) {
    return request('main/boxSet/saveOneOwner', 'get', data);
  },
  //质量验收列表
  qualityListData: function qualityListData(data) {
    return request('main/quality/qualityListData', 'get', data);
  },

  //质量验收--派工人员
  getDispatchEmp: function getDispatchEmp(data) {
    return request('main/quality/getDispatchEmp', 'get', data);
  },
  
  //质量验收--保存派工
  saveDispatch: function saveDispatch(data) {
    return request('main/quality/saveDispatch', 'get', data);
  },
  //质量验收--详情
  qualityDetailData: function qualityDetailData(data) {
    return request('main/quality/qualityDetailData', 'get', data);
  },
  //质量验收--添加抽检
  addSample: function addSample(data) {
    return request('main/quality/addSample', 'get', data);
  },
  //质量验收--无法验收
  canNotAcceptance: function canNotAcceptance(data) {
    return request('main/quality/canNotAcceptance', 'get', data);
  },
  //质量验收--无法验收的查看
  canNotAcceptanceDetail: function canNotAcceptanceDetail(data) {
    return request('main/quality/canNotAcceptanceDetail', 'get', data);
  },
  //质量验收--撤回
  cancelAccept: function cancelAccept(data) {
    return request('main/quality/cancelAccept', 'get', data);
  },
  //质量验收--验收页面的验收项+暂存的信息
  acceptItems: function acceptItems(data) {
    return request('main/quality/acceptItems', 'get', data);
  },
  //质量验收--定位排序
  listSorting: function listSorting(data) {
    return request('main/quality/listSorting', 'get', data);
  },
  //质量验收--保存验收结果
  saveAcceptItem: function saveAcceptItem(data) {
    return request('main/quality/saveAcceptItem', 'post', data, '1');
  },
  //质量整改-列表
  getQualityRectificationList: function getQualityRectificationList(data) {
    return request('main/quality/rectification/getQualityRectificationList', 'get', data);
  },
  //质量整改-派工人员列表
  getDispatchEmpList: function getDispatchEmpList(data) {
    return request('main/quality/rectification/getDispatchEmpList', 'get', data);
  },
  //质量整改-派工
  saveDispatchEmp: function saveDispatchEmp(data) {
    return request('main/quality/rectification/saveDispatchEmp', 'post', data,'1');
  },
  //质量整改-详情
  qualityRectificationDetail: function qualityRectificationDetail(data) {
    return request('main/quality/rectification/qualityRectificationDetail', 'get', data);
  },
  //质量整改-整改保存 
  saveChangingQuality: function saveChangingQuality(data) { 
    return request('main/quality/rectification/saveChangingQuality', 'post', data,'1'); 
  }, 
  //质量整改-驳回/通过 
  saveAcceptQuality: function saveAcceptQuality(data) { 
    return request('main/quality/rectification/saveAcceptQuality', 'post', data); 
  },
  //广发--根据屋顶类型获取相关数据 
  getKcFormSet: function getKcFormSet(data) { 
    return request('main/GFCommon/getKcFormSet', 'get', data); 
  },
  //华融--提交预审
  batchAdmit: function batchAdmit(data) { 
    return request('main/projectManage/batchAdmit', 'get', data); 
  },
  //获取风雪压等级
  getPressureLevel: function getPressureLevel(data) {
    return request('main/projectManage/getPressureLevel', 'get', data); 
  },
}