+ 发票号 {{ file.invoiceNo || '-' }} + 已作废 +
++ {{ typeLabel(file.invoiceType) }} + · {{ file.invoiceDate }} + + · ¥{{ Number(file.amount).toFixed(2) }} + +
+{{ errorText }}
+ + + diff --git a/app/components/HjcTenderFiles.vue b/app/components/HjcTenderFiles.vue index 6713c9c..51a644f 100644 --- a/app/components/HjcTenderFiles.vue +++ b/app/components/HjcTenderFiles.vue @@ -26,8 +26,8 @@ type="button" class="min-w-0 flex-1 truncate text-left text-sm text-blue-600 hover:underline disabled:opacity-60" :title="nameOf(file)" - :disabled="busyIndex === idx" - @click="openFile(file, idx)" + :disabled="busyKey === file.url" + @click="download(file, file.url)" > {{ nameOf(file) }} @@ -35,10 +35,10 @@ @@ -56,13 +56,8 @@ import type { HjcTenderFile } from '~/types/tender' * (标书附件仅 `payStatus === 1` 的订单下发、公告附件随项目上下架), * 所以这里不做任何权限判断,也不从项目字段里自己拼地址。 * - * **下载为什么要绕一圈**:一站式的静态文件服务已加鉴权,附件不再直连 - * (工作区根目录 `docs/adr/0007-attachment-download-via-platform-proxy.md`)。 - * 下发的地址是**本平台资源地址**,形如 - * `/api/hjc/attachment?kind=tender&orderNo=xxx&index=0` —— 只有资源标识, - * 既没有文件路径(路径由后端查,防越权),也没有票据。**点击时**才用这里的 - * 标识去换一张一次性短时票据,再拿票据去后端取文件(ADR 0007 补记:现取的 - * 票据永远新鲜,不会出现"页面放久了点不动")。 + * 「点击下载」走 `useAttachmentDownload`:先换一张一次性票据、再取文件 + * (为什么要绕这一圈见该 composable 的注释)。 */ const props = withDefaults( defineProps<{ @@ -78,66 +73,9 @@ const files = computed支付成功后可在此下载标书附件。
+ +电子发票
+