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.

137 lines
3.6 KiB

4 years ago
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ChangKeTec.Wms.Models.Enums;
namespace ChangKeTec.Wms.Models.Wms
{
public partial class TB_CHECK_DETAIL
{
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int UID { get; set; }
[NotMapped]
public string ̵״̬ => CheckState.ToString();
[DisplayName("��������")]
[NotMapped]
public decimal DiffQty => GetDiffQty();
private decimal GetDiffQty()
{
if (CheckState == EnumCheckState.δ̵)
return 0;
else
return FinalCheckQty - BookQty;
}
[DisplayName("��������")]
[NotMapped]
public decimal DiffAmount => GetDiffAmount();
private decimal GetDiffAmount()
{
var price = WmsCache.GetPartPrice(PartCode);
return price * DiffQty;
}
[Key]
[Column(Order=0)]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("���ݱ���")]
public string BillNum { get; set; }
[Key]
[Column(Order = 1)]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("�̵���λ")]
public string BillLocCode { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("������λ")]
public string BookLocCode { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("ʵ�ʿ�λ")]
public string CheckLocCode { get; set; }
[Key]
[Column(Order = 2)]
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("����")]
public string BarCode { get; set; }
[Key]
[Column(Order = 3)]
[DisplayName("����״̬")]
public EnumStockState State { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("���Ϻ�")]
public string PartCode { get; set; }
[NotMapped]
public string => WmsCache.GetPartDesc(PartCode);
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("����")]
public string Batch { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("���ߺ�")]
public string EqptCode { get; set; } = "";
[Column(TypeName = "money")]
[DisplayName("��������")]
public decimal BookQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("�̵�����")]
public decimal FinalCheckQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("��������")]
public decimal CheckQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("��������")]
public decimal ReCheckQty { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("�̵�ʱ��")]
public string CheckTime { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("�̵���")]
public string OperName { get; set; }
[StringLength(50)]
[DisplayName("��Ӧ�̱���")]
public string VendId { get; set; }
[StringLength(50)]
[DisplayName("��Ӧ������")]
public string VendBatch { get; set; }
[DisplayName("��������")]
public DateTime? ProduceDate { get; set; }
public EnumCheckState CheckState { get; set; }
}
}