import request, { postBlob, getBlob, handleImport } from '@/utils/request'

export function settleRelaConfigList(data) {
  return request({
    url: `/settle/rela/config/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function settleRelaConfigListExport(data, name) {
  return postBlob({
    url: '/settle/rela/config/list/export',
    data,
    name
  })
}

export function settleRelaConfigImport(data) {
  return handleImport('/settle/rela/config/import', data.formdata, data.id || '')
}

export function settleRelaConfigAdd(data) {
  return request({
    url: '/settle/rela/config/add',
    method: 'post',
    data: data
  })
}

export function settleRelaConfigEdit(data) {
  return request({
    url: '/settle/rela/config/edit',
    method: 'post',
    data: data
  })
}

export function settleRelaConfigDetail(params) {
  return request({
    url: '/settle/rela/config/detail',
    method: 'post',
    params: params
  })
}

export function settleRelaConfigQuerySubWebsit(params) {
  return request({
    url: '/settle/rela/config/query/sub/websit',
    method: 'post',
    params: params
  })
}
