| | |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | import { downloadContractDocument } from '#/api/crm/contract'; |
| | | import { downloadSaleQuotationDocument } from '#/api/crm/saleQuotation'; |
| | | |
| | | export async function downloadContractWord(id: number, no?: string) { |
| | | const source = await downloadContractDocument(id); |
| | | const suffix = (no || String(id)).replaceAll(/[\\/:*?"<>|]/g, '_'); |
| | | downloadFileFromBlobPart({ fileName: `购销合同-${suffix}.docx`, source }); |
| | | } |
| | | |
| | | export async function downloadSaleQuotationWord(id: number, no?: string) { |
| | | const source = await downloadSaleQuotationDocument(id); |
| | | const suffix = (no || String(id)).replaceAll(/[\\/:*?"<>|]/g, '_'); |
| | | downloadFileFromBlobPart({ fileName: `报价单-${suffix}.docx`, source }); |
| | | } |