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.
156 lines
4.3 KiB
156 lines
4.3 KiB
1 year 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 TS_STOCK_CUST
|
||
|
{
|
||
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||
|
public long UID { get; set; }
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 0)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("����")]
|
||
|
public string BarCode { get; set; } = "";
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 1)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("��λ")]
|
||
|
public string LocCode { get; set; } = "";
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("����")]
|
||
|
public string AreaCode { get; set; }
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 2)]
|
||
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||
|
[DisplayName("״̬")]
|
||
|
public EnumStockState State { get; set; } = EnumStockState.�ϸ�;
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 3)]
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("���Ϻ�")]
|
||
|
public string PartCode { get; set; } = "";
|
||
|
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("����")]
|
||
|
public string Batch { get; set; } = "";
|
||
|
|
||
|
[Column(TypeName = "money")]
|
||
|
[DisplayName("����")]
|
||
|
|
||
|
public decimal Qty { get; set; }
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[DisplayName("���ߺ�")]
|
||
|
public string EqptCode { get; set; } = "";
|
||
|
|
||
|
[NotMapped]
|
||
|
[DisplayName("����һ")]
|
||
|
public string PartDesc1 => WmsCache.GetPartDesc1(PartCode);
|
||
|
[NotMapped]
|
||
|
[DisplayName("������")]
|
||
|
public string PartDesc2 => WmsCache.GetPartDesc2(PartCode);
|
||
|
[NotMapped]
|
||
|
[DisplayName("��Ŀ����")]
|
||
|
public string ProjectId => WmsCache.GetProjectId(PartCode);
|
||
|
[NotMapped]
|
||
|
[DisplayName("��λ")]
|
||
|
public string Unit => WmsCache.GetUnit(PartCode);
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[DisplayName("��Ӧ�̱���")]
|
||
|
public string VendId { get; set; } = "";
|
||
|
|
||
|
[NotMapped]
|
||
|
public string ��Ӧ������ => WmsCache.GetVenderName(VendId);
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[DisplayName("��Ӧ������")]
|
||
|
public string VendBatch { get; set; } = "";
|
||
|
|
||
|
[NotMapped]
|
||
|
[DisplayName("ERP��λ")]
|
||
|
public string ErpLocCode => WmsCache.GetErpLocCode(LocCode);
|
||
|
|
||
|
[StringLength(50)]
|
||
|
|
||
|
public string PlanOrderId { get; set; }
|
||
|
|
||
|
|
||
|
[Column(TypeName = "money")]
|
||
|
|
||
|
public decimal Amount { get; set; }
|
||
|
|
||
|
|
||
|
[DisplayName("�ջ�ʱ��")]
|
||
|
|
||
|
public DateTime ReceiveDate { get; set; }
|
||
|
|
||
|
[Column(TypeName = "date")]
|
||
|
[DisplayName("��������")]
|
||
|
public DateTime ProduceDate { get; set; }
|
||
|
|
||
|
[Column(TypeName = "date")]
|
||
|
[DisplayName("ʧЧ����")]
|
||
|
public DateTime OverdueDate { get; set; }
|
||
|
|
||
|
[DisplayName("����ʱ��")]
|
||
|
public DateTime UpdateTime { get; set; }
|
||
|
|
||
|
[Column(TypeName = "money")]
|
||
|
[DisplayName("��������")]
|
||
|
public decimal UpdateQty { get; set; }
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("�ݱ���")]
|
||
|
public string TracebackCode { get; set; }
|
||
|
|
||
|
|
||
|
public int VinState { get; set; }
|
||
|
|
||
|
[StringLength(500)]
|
||
|
[DisplayName("��ע")]
|
||
|
public string Remark { get; set; }
|
||
|
|
||
|
public TS_STOCK_DETAIL ToDetail()
|
||
|
{
|
||
|
return new TS_STOCK_DETAIL
|
||
|
{
|
||
|
BarCode = BarCode,
|
||
|
LocCode = LocCode,
|
||
|
AreaCode = AreaCode,
|
||
|
PartCode = PartCode,
|
||
|
Batch = Batch,
|
||
|
VendId = VendId,
|
||
|
EqptCode = EqptCode,
|
||
|
PlanOrderId = PlanOrderId,
|
||
|
State = State,
|
||
|
Qty = 0,
|
||
|
Amount = Amount,
|
||
|
ProduceDate = ProduceDate,
|
||
|
OverdueDate = OverdueDate,
|
||
|
UpdateTime = UpdateTime,
|
||
|
UpdateQty = 0,
|
||
|
TracebackCode = TracebackCode,
|
||
|
ReceiveDate = ReceiveDate,
|
||
|
VendBatch = VendBatch,
|
||
|
|
||
|
VinState = VinState
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|