feat(inquiry): 后台询价附件条目加预览(走代理)+真实下载; 报价列表供应商维度
This commit is contained in:
parent
a7eed895fd
commit
dd000053a2
@ -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 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 onViewQuotation(row: Quotation) { ElMessage.info(`查看报价: ${row.quotationEnterpriseName} (请前往询价管理)`) }
|
||||
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">
|
||||
<el-icon><Document /></el-icon>
|
||||
<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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user