diff --git a/src/views/finance/purchasingrequisition/add.vue b/src/views/finance/purchasingrequisition/add.vue
index de05d2d..824fad5 100644
--- a/src/views/finance/purchasingrequisition/add.vue
+++ b/src/views/finance/purchasingrequisition/add.vue
@@ -396,6 +396,46 @@
+
+
+
+
实施采购信息
+
+
+ 实施采购方式
+ {{ dataForm.implementType === '1' ? '自行组织采购' : dataForm.implementType === '2' ? '委托代理采购' : dataForm.implementType || '—' }}
+
+
+ 文件审批状态
+
+ 撤回
+ 暂存
+ 运行中
+ 完成
+ 作废
+ 终止
+ —
+
+
+
+
+
采购文件
+
+
+ V{{ $index + 1 }}
+
+
+
+ {{ formatImplementFileTime(row.createTime) }}
+
+
+
+ 下载
+
+
+
+
+
@@ -554,7 +594,13 @@ const dataForm = reactive({
schoolLeaderName: '',
// 其他材料(zip压缩包)
otherMaterials: '',
+ // 实施采购信息(查看时展示)
+ implementType: '',
+ fileFlowInstId: '',
+ fileFlowStatus: '',
});
+/** 查看时展示的采购文件列表(实施采购上传的 type=130) */
+const viewImplementPurchaseFiles = ref<{ id: string; fileTitle?: string; createTime?: string; remark?: string }[]>([]);
const categoryTreeData = ref([]);
const categoryCodePath = ref([]); // 级联选择器的路径数组
const fundSourceList = ref([]);
@@ -1100,6 +1146,9 @@ async function loadDetail(applyId: string | number) {
schoolLeaderUserId: detail.schoolLeaderUserId ?? '',
schoolLeaderName: detail.schoolLeaderName ?? '',
otherMaterials: detail.otherMaterials ?? '',
+ implementType: detail.implementType ?? '',
+ fileFlowInstId: detail.fileFlowInstId ?? '',
+ fileFlowStatus: detail.fileFlowStatus ?? '',
});
setCategoryCodePath();
if (dataForm.budget != null) {
@@ -1129,9 +1178,20 @@ async function loadDetail(applyId: string | number) {
});
}
});
+ // 查看时展示实施采购的采购文件列表(type=130)
+ const purchaseFiles = fileList.filter((f: any) => String(f.fileType) === '130').map((f: any) => ({
+ id: f.id,
+ fileTitle: f.fileTitle || f.file_title || '采购文件',
+ createTime: f.createTime || f.create_time,
+ remark: f.remark,
+ }));
+ viewImplementPurchaseFiles.value = purchaseFiles;
+ } else {
+ viewImplementPurchaseFiles.value = [];
}
} catch (err) {
console.error('加载采购申请附件失败', err);
+ viewImplementPurchaseFiles.value = [];
}
}
} catch (e) {
@@ -1140,6 +1200,21 @@ async function loadDetail(applyId: string | number) {
}
}
+function formatImplementFileTime(t?: string) {
+ if (!t) return '—';
+ const d = new Date(t);
+ return isNaN(d.getTime()) ? t : d.toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' });
+}
+
+function downloadImplementFile(file: { remark?: string; fileTitle?: string }) {
+ if (!file?.remark) {
+ useMessage().warning('无法获取文件路径');
+ return;
+ }
+ const url = `/purchase/purchasingfiles/download?fileName=${encodeURIComponent(file.remark)}&fileTitle=${encodeURIComponent(file.fileTitle || '采购文件')}`;
+ other.downBlobFile(url, {}, file.fileTitle || '采购文件');
+}
+
/** 流程嵌入时提供给 orderVue.currElTabIsView 的 methods(只读/禁用提交) */
const flowMethods = {
disableForm(disabled?: boolean) {
@@ -1827,6 +1902,9 @@ onMounted(async () => {
.mb16 {
margin-bottom: 16px;
}
+.mb8 {
+ margin-bottom: 8px;
+}
.mb10 {
margin-bottom: 10px;
}
@@ -1842,6 +1920,18 @@ onMounted(async () => {
margin-bottom: 16px;
}
+.implement-info-block {
+ .view-label {
+ font-size: 14px;
+ color: var(--el-text-color-secondary);
+ margin-bottom: 4px;
+ }
+ .view-value {
+ font-size: 14px;
+ color: var(--el-text-color-primary);
+ }
+}
+
/* 紧凑表单样式 */
.compact-form {
:deep(.el-form-item) {