import request from '@/utils/request'

// 重新生成认证和签署链接
export function refreshAuthLink(params) {
  return request({
    url: '/platform/flushUrl',
    method: 'get',
    params
  })
}

// 刷新认证状态
export function platformFlush(params) {
  return request({
    url: '/platform/flush',
    method: 'get',
    params
  })
}

// 开票信息维护详情
export function editInvoice(params) {
  return request({
    url: '/platform/editInvoice',
    method: 'get',
    params
  })
}

// 开票信息维护提交
export function onSubmit(data) {
  return request({
    url: '/platform/doEditInvoice',
    method: 'post',
    data
  })
}

// 根据关键字获取企业全称
export const getCompanyNameFormKey = (params) => (
  request({
    url: '/customer/doFindEnterpriseBySop',
    method: 'get',
    params
  })
)

// 添加平台提交
export function platformAdd(data) {
  return request({
    url: '/platform/add',
    method: 'post',
    data
  })
}

// 开票信息详情
export const getAuthInfo = (data) => (
  request({
    url: '/purchContract/confirm/getAuthInfo',
    method: 'post',
    data
  })
)
