You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.5 KiB
C#

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<ComboOption> 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<ComboOption> TaskType = new()
{
new() { Value = 1, Display = "1 - 入库" },
new() { Value = 2, Display = "2 - 出库" },
};
public static readonly List<ComboOption> TaskCategory = new()
{
new() { Value = 1, Display = "1 - 包材" },
new() { Value = 2, Display = "2 - 成品" },
new() { Value = 3, Display = "3 - 托盘" },
};
public static readonly List<ComboOption> TaskStatus = new()
{
new() { Value = 1, Display = "1 - 待执行" },
new() { Value = 2, Display = "2 - 执行中" },
new() { Value = 3, Display = "3 - 已完成" },
};
public static readonly List<ComboOption> ExecutionMode = new()
{
new() { Value = 0, Display = "0 - 自动" },
new() { Value = 1, Display = "1 - 手动" },
};
public static readonly List<ComboOption> DeviceType = new()
{
new() { Value = 0, Display = "0 - 输送线" },
new() { Value = 1, Display = "1 - AGV" },
new() { Value = 2, Display = "2 - 提升机" },
};
public static readonly List<ComboOption> DeviceStatus = new()
{
new() { Value = 0, Display = "0 - 正常" },
new() { Value = 1, Display = "1 - 在忙" },
new() { Value = 2, Display = "2 - 异常" },
};
public static readonly List<ComboOption> 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<ComboOption> OperationType = new()
{
new() { Value = "0", Display = "0 - 默认读写" },
new() { Value = "1", Display = "1 - 只读" },
new() { Value = "2", Display = "2 - 只写" },
};
}