1
heshaofeng
2026-03-25 37454e625df68d40897112b2e8c2e3cf4d7163e3
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -270,6 +270,79 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "documentTypeEmun":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(DocumentType);
                            List<int> enums = Enum.GetValues(typeof(DocumentType)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(DocumentType).GetField(((DocumentType)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "takeStockStatusEnum":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(TakeStockStatusEnum);
                            List<int> enums = Enum.GetValues(typeof(TakeStockStatusEnum)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(TakeStockStatusEnum).GetField(((TakeStockStatusEnum)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "takeStockDetailStatusEnum":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(TakeStockDetailStatusEnum);
                            List<int> enums = Enum.GetValues(typeof(TakeStockDetailStatusEnum)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(TakeStockDetailStatusEnum).GetField(((TakeStockDetailStatusEnum)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                }
                return result;
            }