更新采购申请

This commit is contained in:
吴红兵
2026-03-01 21:55:33 +08:00
parent f2df01c38e
commit 992e9f5a3e
14 changed files with 837 additions and 948 deletions

View File

@@ -440,7 +440,7 @@
</el-col>
</el-row>
<div v-if="viewImplementPurchaseFiles.length" class="mb16">
<div class="view-label mb8">采购文件</div>
<div class="view-label mb8">招标文件</div>
<el-table :data="viewImplementPurchaseFiles" border size="small" max-height="240">
<el-table-column type="index" label="版本" width="70" align="center">
<template #default="{ $index }">V{{ $index + 1 }}</template>
@@ -632,7 +632,7 @@ const dataForm = reactive({
agentId: '',
agentName: '',
});
/** 查看时展示的采购文件列表(实施采购上传的 type=130 */
/** 查看时展示的招标文件列表(实施采购上传的 type=130 */
const viewImplementPurchaseFiles = ref<{ id: string; fileTitle?: string; createTime?: string; remark?: string }[]>([]);
const categoryTreeData = ref<any[]>([]);
const categoryCodePath = ref<string[]>([]); // 级联选择器的路径数组
@@ -652,7 +652,7 @@ const loading = ref(false);
const helpDialogVisible = ref(false);
// 文件类型映射(对应数据库 file_type 字段)
// 10:商务洽谈纪要 20:市场采购纪要 30:网上商城采购相关材料 40:可行性论证报告 50:会议记录 60:其他材料 70:单一来源专家论证表 90:进口产品专家论证表 100:政府采购意向表 110:履约验收单 120:采购需求表 130:采购文件
// 10:商务洽谈纪要 20:市场采购纪要 30:网上商城采购相关材料 40:可行性论证报告 50:会议记录 60:其他材料 70:单一来源专家论证表 90:进口产品专家论证表 100:政府采购意向表 110:履约验收单 120:采购需求表 130:招标文件
const FILE_TYPE_MAP: Record<string, string> = {
businessNegotiationTable: '10', // 商务洽谈纪要
marketPurchaseMinutes: '20', // 市场采购纪要
@@ -1286,10 +1286,10 @@ async function loadDetail(applyId: string | number) {
});
}
});
// 查看时展示实施采购的采购文件列表type=130
// 查看时展示实施采购的招标文件列表type=130
const purchaseFiles = fileList.filter((f: any) => String(f.fileType) === '130').map((f: any) => ({
id: f.id,
fileTitle: f.fileTitle || f.file_title || '采购文件',
fileTitle: f.fileTitle || f.file_title || '招标文件',
createTime: f.createTime || f.create_time,
remark: f.remark,
}));
@@ -1318,13 +1318,13 @@ function downloadImplementFile(file: { id?: string; remark?: string; fileTitle?:
// 优先使用文件ID下载
if (file?.id) {
const url = `/purchase/purchasingfiles/downloadById?fileId=${encodeURIComponent(file.id)}`;
other.downBlobFile(url, {}, file.fileTitle || '采购文件');
other.downBlobFile(url, {}, file.fileTitle || '招标文件');
return;
}
// 兼容旧数据:使用文件路径下载
if (file?.remark) {
const url = `/purchase/purchasingfiles/download?fileName=${encodeURIComponent(file.remark)}&fileTitle=${encodeURIComponent(file.fileTitle || '采购文件')}`;
other.downBlobFile(url, {}, file.fileTitle || '采购文件');
const url = `/purchase/purchasingfiles/download?fileName=${encodeURIComponent(file.remark)}&fileTitle=${encodeURIComponent(file.fileTitle || '招标文件')}`;
other.downBlobFile(url, {}, file.fileTitle || '招标文件');
return;
}
useMessage().warning('无法获取文件信息');