feat(inquiry): 后台询价附件条目加预览(走代理)+真实下载; 报价列表供应商维度

This commit is contained in:
zou 2026-09-05 12:20:57 +08:00
parent a7eed895fd
commit dd000053a2

View File

@ -268,7 +268,18 @@ function quotationInfo(s: number) { return QUOTATION_STATUS_MAP[s] || { label: `
function inquiryInfo(s: number) { return INQUIRY_STATUS_MAP[s] || { label: `状态${s}`, type: 'info' } } function inquiryInfo(s: number) { return INQUIRY_STATUS_MAP[s] || { label: `状态${s}`, type: 'info' } }
function onBack() { router.push('/inquiry') } function onBack() { router.push('/inquiry') }
function onDownloadFile(url: string, name: string) { if (url) ElMessage.info(`下载: ${name || url}`) } function onDownloadFile(url: string, name: string) {
if (!url) return
const a = document.createElement('a')
a.href = url
a.download = name || ''
a.target = '_blank'
a.click()
}
function onPreviewFile(url: string) {
// 走预览代理(inline 输出,浏览器原生预览图片/PDF)
window.open('/other/file/preview?url=' + encodeURIComponent(url), '_blank')
}
function onExportPriceComparison() { ElMessage.info('导出功能开发中') } function onExportPriceComparison() { ElMessage.info('导出功能开发中') }
function onViewQuotation(row: Quotation) { ElMessage.info(`查看报价: ${row.quotationEnterpriseName} (请前往询价管理)`) } function onViewQuotation(row: Quotation) { ElMessage.info(`查看报价: ${row.quotationEnterpriseName} (请前往询价管理)`) }
function onQuote(row: Quotation) { ElMessage.info('请前往前台发起报价') } function onQuote(row: Quotation) { ElMessage.info('请前往前台发起报价') }
@ -352,7 +363,8 @@ watch(inquiryId, load)
<div v-for="(f, i) in detail.fileList" :key="i" class="rr-file-item"> <div v-for="(f, i) in detail.fileList" :key="i" class="rr-file-item">
<el-icon><Document /></el-icon> <el-icon><Document /></el-icon>
<span class="rr-file-name">{{ f.imagesName }}</span> <span class="rr-file-name">{{ f.imagesName }}</span>
<el-button text type="primary" size="small" @click="onDownloadFile(f.url, f.imagesName)">下载</el-button> <el-button text type="primary" size="small" @click="onPreviewFile(f.url)">预览</el-button>
<el-button text size="small" @click="onDownloadFile(f.url, f.imagesName)">下载</el-button>
</div> </div>
</div> </div>
</div> </div>