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

120 lines
3.2 KiB

1 year ago
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.CompilerServices;
using ChangKeTec.Wms.Models.Enums;
using CK.SCP.Utils;
namespace ChangKeTec.Wms.Models.Wms
{
public partial class TL_TRANSACTION
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long UID { get; set; }
[DisplayName("����Ա")]
[Required(AllowEmptyStrings = true)]
[StringLength(80)]
public string OperName { get; set; }
[DisplayName("��־ʱ��")] public DateTime LogTime { get; set; }
[DisplayName("����")]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
public string BarCode { get; set; }
[DisplayName("���ݱ���")]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
public string BillNum { get; set; }
[DisplayName("����������")]
public EnumBillType BillType { get; set; }
[NotMapped]
[DisplayName("��������")]
public string StrBillType => EnumHelper.GetDesc(BillType);
[DisplayName("������������")]
public int SubBillType { get; set; } = 0;
[NotMapped]
[DisplayName("����������")]
public string StrSubBillType => GetStringSubBillType(SubBillType);
[DisplayName("��������")] public int TransType { get; set; }
[DisplayName("���Ϻ�")]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
public string PartCode { get; set; }
[NotMapped] [DisplayName("��������")] public string PartDesc => WmsCache.GetPartDesc(PartCode);
[DisplayName("����")]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
public string Batch { get; set; }
[DisplayName("����")]
[Column(TypeName = "money")]
public decimal Qty { get; set; }
[DisplayName("״̬")] public EnumStockState State { get; set; }
[DisplayName("��λ")]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
public string LocCode { get; set; }
[DisplayName("����")] [NotMapped] public string AreaCode => WmsCache.GetAreaCode(LocCode);
[NotMapped] public string ErpLocCode => WmsCache.GetErpLocCode(LocCode);
[DisplayName("���ߺ�")]
[StringLength(50)]
public string EqptCode { get; set; }
[DisplayName("��Ӧ�̱���")]
[StringLength(50)]
public string VendId { get; set; }
[DisplayName("��Ӧ������")]
[StringLength(50)]
public string VendBatch { get; set; }
[DisplayName("��ע")]
[StringLength(500)]
public string Remark { get; set; }
private string GetStringSubBillType(int subBillType)
{
string strSubBillType = string.Empty;
try
{
var enumSubBillType = (EnumSubBillType) subBillType;
strSubBillType = EnumHelper.GetDesc(enumSubBillType);
}
catch (Exception)
{
// ignored
}
return strSubBillType;
}
}
}