import request from '@/assets/js/utils/request'
/*
供应商信息API接口
* */
//  下载供应商基本信息（docx格式）
export function downBaseInfoSupplierDocx(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/downBaseInfoSupplierDocx?departId=' + data,
    method: 'get',
    data,
    responseType: 'blob'
  })
}
//  保存申报材料基本信息
export function saveDepartInfo(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/saveDepartInfo',
    method: 'post',
    data
  })
}
//  获取申报材料基本信息
export function getUpdateDepartInfo(params) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/getUpdateDepartInfo',
    method: 'post',
    params
  })
}
//  获取供应商信息所有字典
export function getDepartInfoDictionaries() {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/getDepartInfoDictionaries',
    method: 'post'
  })
}
/*
 * 业务经办人
 * */

//  获取最新的经办人信息（未提交或待审核）
export function getUpdateLinker(params) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/getUpdateLinker',
    method: 'post',
    params
  })
}
//  保存经办人信息
export function saveDepartLinkerInfo(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/saveDepartLinkerInfo',
    method: 'post',
    data
  })
}
//  供应完善信息
export function judgeSubmitDepartInfo(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/judgeSubmitDepartInfo?departId=' + data,
    method: 'post'
  })
}
//  提交申报材料
export function submitDepartInfo(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/submitDepartInfo',
    method: 'post',
    data
  })
}
//  判断供应商信息是否有变动
export function judgeExistChange(type) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/judgeExistChange?type=' + type,
    method: 'post'
  })
}
// 审核供应商信息
export function auditDepartInfo(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/auditDepartInfo',
    method: 'post',
    data
  })
}
// 审核信息列表
export function getAuditInfoList(params) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/getAuditInfoList',
    method: 'post',
    params
  })
}
// 审核信息列表
export function getShowStatus() {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/getShowStatus',
    method: 'post'
  })
}
// 供应商申报入库工作流处理
export function queryDeclarationInfoByDeclarationId(data) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/declaration/queryDeclarationInfoByDeclarationId?declarationId=' + data.declarationId,
    method: 'post'
  })
}
// 根据法人查询供应商信息
export function querySupplierByDepartId(departIds) {
  return request({
    url: '/bidprocurement/common-supplier/supplier/baseInfo/querySupplierByDepartId?departIds=' + departIds,
    method: 'post'
  })
}
