diff --git a/src/views/finance/purchasingrequisition/add.vue b/src/views/finance/purchasingrequisition/add.vue index b90a661..dc859c4 100644 --- a/src/views/finance/purchasingrequisition/add.vue +++ b/src/views/finance/purchasingrequisition/add.vue @@ -11,6 +11,11 @@
+
+ + 帮助 + +
+ + + + 以下规则仅作为自动推荐与必填校验依据,实际录入时可在允许范围内调整。 + + + + + + +
实施采购信息 @@ -416,7 +480,7 @@ import { getDicts } from '/@/api/admin/dict'; import { useMessage } from '/@/hooks/message'; import UploadFile from '/@/components/Upload/index.vue'; import other from '/@/utils/other'; -import { Document, Download } from '@element-plus/icons-vue'; +import { Document, Download, QuestionFilled } from '@element-plus/icons-vue'; import { fetchList as getBusinessDeptList } from '/@/api/purchase/purchasingBusinessDept'; import { getPage as getSchoolLeaderPage } from '/@/api/finance/purchasingschoolleader'; import { Session } from '/@/utils/storage'; @@ -557,6 +621,7 @@ const purchaseTypeUnionList = ref([]); const businessDeptList = ref([]); const schoolLeaderList = ref([]); const loading = ref(false); +const helpDialogVisible = ref(false); // 文件类型映射(对应数据库 file_type 字段) // 10:商务洽谈纪要 20:市场采购纪要 30:网上商城采购相关材料 40:可行性论证报告 50:会议记录 60:其他材料 70:单一来源专家论证表 90:进口产品专家论证表 100:政府采购意向表 110:履约验收单 120:采购需求表 130:采购文件 @@ -675,9 +740,20 @@ const schoolUnifiedPurchaseFormDefault = computed(() => { return null; }); -// 学校统一采购时采购形式是否禁用(采购中心审核时放开;否则由规则自动选择时禁用) -const schoolUnifiedPurchaseFormDisabled = computed(() => - (isFlowEmbed.value && isPurchaseCenter.value) ? false : (flowFieldDisabled('purchaseMode') || (schoolUnifiedPurchaseFormDefault.value != null))); +// 学校统一采购时采购形式是否禁用 +// 申请阶段:始终可选(根据默认值自动选中后,允许用户自行修改) +// 流程嵌入:采购中心节点可编辑,其他节点只读 +const schoolUnifiedPurchaseFormDisabled = computed(() => { + if (!isFlowEmbed.value) { + return false; + } + // 流程嵌入且为采购中心:放开编辑 + if (isPurchaseCenter.value) { + return false; + } + // 其他流程节点只读 + return true; +}); // 特殊情况字典 value:0否 1紧急 2单一 3进口 const isUrgentSpecial = computed(() => dataForm.isSpecial === '1'); diff --git a/src/views/finance/purchasingtemplate/index.vue b/src/views/finance/purchasingtemplate/index.vue index 4d8ef73..fa99065 100644 --- a/src/views/finance/purchasingtemplate/index.vue +++ b/src/views/finance/purchasingtemplate/index.vue @@ -192,13 +192,21 @@ const handleUploadConfirm = async () => { } }; -const handleDownload = (row: any) => { +const handleDownload = async (row: any) => { if (!row?.templateType) { useMessage().error('缺少模板类型编码'); return; } const url = getTemplateDownloadUrl(row.templateType); - window.open(url, '_blank'); + const fileName = row.templateName || row.templateTitle || row.templateType; + try { + await (window as any).other?.downBlobFile?.(url, {}, fileName) || + // 兼容直接使用工具函数 + (await import('/@/utils/other')).default.downBlobFile(url, {}, fileName); + } catch (e) { + // 如果工具函数不可用,则退回 window.open + window.open(url, '_blank'); + } }; const openEditDialog = (row: any) => {