From e00905e53ee5d91d9e488ecf5ece3e25b9889436 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 一月 2026 16:14:44 +0800
Subject: [PATCH] 湟水峡 1.采购模块不要项目名称 2.加一个有待回款登记的提示 3.回款登记、付款登记改成和销售订单价格关联,并且可以多个一起回款或付款 4.合同管理不要下载合同了,跟合同相关的字段可以去掉了 5.重构生产模块 6.测试流程并修改bug

---
 src/utils/dict.js |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/utils/dict.js b/src/utils/dict.js
index 8db7d97..a6db068 100644
--- a/src/utils/dict.js
+++ b/src/utils/dict.js
@@ -1,17 +1,24 @@
+import useDictStore from '@/store/modules/dict'
 import { getDicts } from '@/api/system/dict/data'
 
 /**
  * 鑾峰彇瀛楀吀鏁版嵁
  */
 export function useDict(...args) {
-  const res = ref({});
+  const res = ref({})
   return (() => {
-    args.forEach((d, index) => {
-      res.value[d] = [];
-      getDicts(d).then(resp => {
-        res.value[d] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass }))
-      })
+    args.forEach((dictType, index) => {
+      res.value[dictType] = []
+      const dicts = useDictStore().getDict(dictType)
+      if (dicts) {
+        res.value[dictType] = dicts
+      } else {
+        getDicts(dictType).then(resp => {
+          res.value[dictType] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass }))
+          useDictStore().setDict(dictType, res.value[dictType])
+        })
+      }
     })
-    return toRefs(res.value);
+    return toRefs(res.value)
   })()
 }
\ No newline at end of file

--
Gitblit v1.9.3