From a387709376961b134da6fb35975663947519e5b2 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 19 八月 2026 17:42:04 +0800
Subject: [PATCH] 天津-阳光彩印 1.公出管理列表详情页「申请部门」当前只展示部门 ID,需替换为部门名称展示 2.同一机台排产多人、多班组生产时,报工支持拆分录入多人产量、分开记录各班组生产时长,生产核算自动汇总全部工时 3.生产工单列表删除「计划开始、计划结束」字段,移除进度条组件,简化页面展示 4.销售台账新增产品弹窗内含税单价小数位数调整为 5 位,匹配合同精准计价需求,避免金额尾差

---
 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 0f9144a..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, elTagClass: p.cssClass }))
-      })
+    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