From adb79299e86660a7f205466cf1ea48c6b25b1398 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 18 六月 2026 13:14:37 +0800
Subject: [PATCH] 1.计量器具台账上传附件报错 2.质量拉的数据不对(未明确) 3.计量器具台账逾期的做标红提醒 4.设备保养定时任务和记录要加上具体的保养内容 5.质量要区分质检规则抽检还是全检,抽检的话是抽多少百分比 6.供应商管理东西太少了,没有资质文件啊这些东西(是不是可以参考pro) 7.采购审批把人从李莹莹改成龙红星

---
 src/views/officeProcessAutomation/ApproveManage/approve-template/useSelectOptionSources.js |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-template/useSelectOptionSources.js b/src/views/officeProcessAutomation/ApproveManage/approve-template/useSelectOptionSources.js
new file mode 100644
index 0000000..8397288
--- /dev/null
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-template/useSelectOptionSources.js
@@ -0,0 +1,45 @@
+import { reactive, ref } from "vue";
+import {
+  collectOptionSourcesFromFields,
+  fetchSelectOptionCaches,
+  resolveFieldSelectOptions,
+  resolveSelectDisplayLabel,
+} from "./selectOptionSource.js";
+
+/** 涓嬫媺鍔ㄦ�侀�夐」锛氫汉鍛� / 閮ㄩ棬缂撳瓨涓庤В鏋� */
+export function useSelectOptionSources() {
+  const loading = ref(false);
+  const caches = reactive({
+    users: [],
+    deptOptions: [],
+  });
+
+  async function ensureForFields(fields) {
+    const sources = collectOptionSourcesFromFields(fields);
+    if (!sources.length) return;
+    loading.value = true;
+    try {
+      const next = await fetchSelectOptionCaches(sources);
+      caches.users = next.users;
+      caches.deptOptions = next.deptOptions;
+    } finally {
+      loading.value = false;
+    }
+  }
+
+  function getOptions(field) {
+    return resolveFieldSelectOptions(field, caches);
+  }
+
+  function getDisplayLabel(field, val) {
+    return resolveSelectDisplayLabel(field, val, caches);
+  }
+
+  return {
+    loading,
+    caches,
+    ensureForFields,
+    getOptions,
+    getDisplayLabel,
+  };
+}

--
Gitblit v1.9.3