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

export function policyOrderListEm(data) {
  return request({
    url: `/policyOrder/listEm?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function policyOrderListEmExport(data, name) {
  return postBlob({
    url: '/policyOrder/listEm/export',
    data,
    name
  })
}

export function policyOrderImportEm(data) {
  return handleImport('/policyOrder/importEm', data.formdata, data.id || '')
}

export function policyOrderDetail(params) {
  return request({
    url: '/policyOrder/detail',
    method: 'post',
    params
  })
}

export function policyOrderUpdate(data) {
  return request({
    url: '/policyOrder/update',
    method: 'post',
    data
  })
}
