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.
140 lines
3.8 KiB
140 lines
3.8 KiB
using ChangKeTec.Wms.Models.Enums;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
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
|
|
{
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
|
public int UID { get; set; }
|
|
|
|
[NotMapped]
|
|
public string 盘点状态 => CheckState.ToString();
|
|
|
|
[NotMapped]
|
|
public string 盘点结果 => CheckResult.ToString();
|
|
|
|
[DisplayName("差异数量")]
|
|
[NotMapped]
|
|
public decimal DiffQty => _ignoreCheckStateList.Contains(CheckState) ? 0 : FinalCheckQty - BookQty;
|
|
|
|
private readonly List<EnumCheckState> _ignoreCheckStateList = new List<EnumCheckState>
|
|
{
|
|
EnumCheckState.未盘点,
|
|
EnumCheckState.盘点中,
|
|
EnumCheckState.作废
|
|
};
|
|
|
|
|
|
[DisplayName("差异金额")]
|
|
[NotMapped]
|
|
public decimal DiffAmount => DiffQty * PartPrice;
|
|
|
|
|
|
[Key]
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(500)]
|
|
[DisplayName("盘点标签")]
|
|
public string TagCode { get; set; }
|
|
|
|
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(50)]
|
|
[DisplayName("单据编号")]
|
|
public string BillNum { get; set; }
|
|
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(50)]
|
|
[DisplayName("盘点库位")]
|
|
public string LocCode { get; set; } = "";
|
|
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(50)]
|
|
[DisplayName("箱码")]
|
|
public string BarCode { get; set; } = "";
|
|
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(50)]
|
|
[DisplayName("物料号")]
|
|
public string PartCode { get; set; } = "";
|
|
|
|
[NotMapped]
|
|
[DisplayName("物料描述")]
|
|
public string PartDesc => WmsCache.GetPartDesc(PartCode);
|
|
|
|
[Required(AllowEmptyStrings = true)]
|
|
[StringLength(50)]
|
|
[DisplayName("批次")]
|
|
public string Batch { get; set; } = "";
|
|
|
|
[DisplayName("物料状态")]
|
|
public EnumStockState StockState { get; set; } = EnumStockState.合格;
|
|
|
|
[DisplayName("物料价格")]
|
|
public decimal PartPrice { get; set; }
|
|
|
|
[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; }
|
|
|
|
[DisplayName("初盘时间")]
|
|
public DateTime CheckTime { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[DisplayName("初盘人")]
|
|
public string CheckOper { get; set; }
|
|
|
|
[Column(TypeName = "money")]
|
|
[DisplayName("重盘数量")]
|
|
public decimal ReCheckQty { get; set; }
|
|
|
|
[DisplayName("重盘时间")]
|
|
public DateTime ReCheckTime { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[DisplayName("重盘人")]
|
|
public string ReCheckOper { get; set; }
|
|
|
|
[Column(TypeName = "money")]
|
|
[DisplayName("监盘数量")]
|
|
public decimal SupCheckQty { get; set; }
|
|
|
|
[DisplayName("监盘时间")]
|
|
public DateTime SupCheckTime { get; set; }
|
|
|
|
[StringLength(50)]
|
|
[DisplayName("监盘人")]
|
|
public string SupCheckOper { get; set; }
|
|
|
|
|
|
public EnumCheckState CheckState { get; set; }
|
|
|
|
|
|
public EnumCheckResult CheckResult { get; set; }
|
|
|
|
[DisplayName("供应商编号")]
|
|
public string VendId { get; set; }
|
|
|
|
[DisplayName("供应商批次")]
|
|
public string VendBatch { get; set; }
|
|
|
|
}
|
|
}
|