From 141f60bd32ea2027665a0495b6d9f538e8b7dad0 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 10 四月 2025 14:19:04 +0800
Subject: [PATCH] #修改 1. 修改收货单历史档显示 2. 修改采购PO单显示问题

---
 rsf-admin/src/page/components/DictionarySelect.jsx |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/rsf-admin/src/page/components/DictionarySelect.jsx b/rsf-admin/src/page/components/DictionarySelect.jsx
index 43dc811..0eb2fab 100644
--- a/rsf-admin/src/page/components/DictionarySelect.jsx
+++ b/rsf-admin/src/page/components/DictionarySelect.jsx
@@ -2,14 +2,13 @@
 import { useState, useEffect } from 'react';
 import {
     Button, useListContext, SelectInput,
-    required,
+    required, SelectArrayInput,
     useTranslate, useNotify
 } from 'react-admin';
 import request from '@/utils/request';
 
 const DictionarySelect = (props) => {
-    const { dictTypeCode, name, ...parmas } = props;
-    const { selectedIds } = useListContext();
+    const { dictTypeCode, name, multiple = false, ...parmas } = props;
     const translate = useTranslate();
     const notify = useNotify();
     const [list, setList] = useState([])
@@ -25,20 +24,22 @@
             setList(res.data.data.records.map((item) => {
                 return {
                     id: item.value,
-                    name: item.value
+                    name: item.label
                 }
             }))
         } else {
             notify(res.data.msg);
         }
     }
+    const InputComponent = multiple ? SelectArrayInput : SelectInput;
 
     return (
-        <SelectInput
+        <InputComponent
             source={name}
             choices={list}
             {...parmas}
         />
+
     );
 };
 

--
Gitblit v1.9.1