From 7ec0b6ddb14897fa47769b14cc4cb36049bb5ebb Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 22 六月 2026 09:11:53 +0800
Subject: [PATCH] 1、报价系统中,需将付款方式改为选择项(现金、电汇、微信、支付宝等),不能做成手工输入;4、退货单未明确退货规则;5、客户往来信息过于简单,只做总结性信息,无多维度明细信息;
---
src/utils/dict.js | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/utils/dict.js b/src/utils/dict.js
new file mode 100644
index 0000000..a6db068
--- /dev/null
+++ b/src/utils/dict.js
@@ -0,0 +1,24 @@
+import useDictStore from '@/store/modules/dict'
+import { getDicts } from '@/api/system/dict/data'
+
+/**
+ * 鑾峰彇瀛楀吀鏁版嵁
+ */
+export function useDict(...args) {
+ const res = ref({})
+ return (() => {
+ 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)
+ })()
+}
\ No newline at end of file
--
Gitblit v1.9.3