namespace Sln.Wcs.UI.ViewModels.Base; public class FieldConfig { public string PropertyName { get; set; } = string.Empty; public string DisplayName { get; set; } = string.Empty; public FieldType FieldType { get; set; } = FieldType.Text; public bool IsReadOnly { get; set; } public bool IsRequired { get; set; } public List Options { get; set; } = new(); } public class ComboOption { public object? Value { get; set; } public string Display { get; set; } = string.Empty; } public enum FieldType { Text, Number, Combo, CheckBox } public static class StandardOptions { public static readonly List TaskType = new() { new() { Value = 1, Display = "1 - 入库" }, new() { Value = 2, Display = "2 - 出库" }, }; public static readonly List TaskCategory = new() { new() { Value = 1, Display = "1 - 包材" }, new() { Value = 2, Display = "2 - 成品" }, new() { Value = 3, Display = "3 - 托盘" }, }; public static readonly List TaskStatus = new() { new() { Value = 1, Display = "1 - 待执行" }, new() { Value = 2, Display = "2 - 执行中" }, new() { Value = 3, Display = "3 - 已完成" }, }; public static readonly List ExecutionMode = new() { new() { Value = 0, Display = "0 - 自动" }, new() { Value = 1, Display = "1 - 手动" }, }; public static readonly List DeviceType = new() { new() { Value = 0, Display = "0 - 输送线" }, new() { Value = 1, Display = "1 - AGV" }, new() { Value = 2, Display = "2 - 提升机" }, }; public static readonly List DeviceStatus = new() { new() { Value = 0, Display = "0 - 正常" }, new() { Value = 1, Display = "1 - 在忙" }, new() { Value = 2, Display = "2 - 异常" }, }; public static readonly List LocationStatus = new() { new() { Value = 0, Display = "0 - 未使用" }, new() { Value = 1, Display = "1 - 已使用" }, new() { Value = 2, Display = "2 - 锁库" }, new() { Value = 3, Display = "3 - 异常" }, }; public static readonly List OperationType = new() { new() { Value = "0", Display = "0 - 默认读写" }, new() { Value = "1", Display = "1 - 只读" }, new() { Value = "2", Display = "2 - 只写" }, }; }