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.
166 lines
4.4 KiB
166 lines
4.4 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_DELIVER_PLAN
|
||
|
{
|
||
|
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
|
||
|
public int UID { get; set; }
|
||
|
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 0)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("�ƻ�����")]
|
||
|
public string BillNum { get; set; }
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 1)]
|
||
|
[DisplayName("�ƻ�������")]
|
||
|
public DateTime DeliverDate { get; set; }
|
||
|
|
||
|
[Key]
|
||
|
[Column(Order = 2)]
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("���Ϻ�")]
|
||
|
public string PartCode { get; set; }
|
||
|
|
||
|
[NotMapped]
|
||
|
[DisplayName("��������")]
|
||
|
public string PartDesc => WmsCache.GetPartDesc1(PartCode);
|
||
|
|
||
|
[StringLength(50)]
|
||
|
[DisplayName("�ͻ�����")]
|
||
|
public string CustId { get; set; }
|
||
|
|
||
|
[NotMapped]
|
||
|
[DisplayName("�ͻ����Ϻ�")]
|
||
|
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
|
||
|
|
||
|
[Column(TypeName = "money")]
|
||
|
[DisplayName("�ƻ���")]
|
||
|
public decimal PlanQty { get; set; }
|
||
|
|
||
|
// [NotMapped]
|
||
|
// [Column(TypeName = "money")]
|
||
|
// [DisplayName("����������")]
|
||
|
// public decimal AskedQty { get; set; }
|
||
|
|
||
|
|
||
|
[Column(TypeName = "money")]
|
||
|
[DisplayName("�ѷ���")]
|
||
|
public decimal DeliverQty { get; set; }
|
||
|
|
||
|
[NotMapped]
|
||
|
[DisplayName("������")]
|
||
|
public decimal FinishPercent =>(PlanQty == 0 ? 0 : DeliverQty / PlanQty);
|
||
|
|
||
|
public string ״̬ => ((EnumBillState)State).ToString();
|
||
|
|
||
|
|
||
|
[DisplayName("�ƻ�������")]
|
||
|
public int DeliverYear { get; set; }
|
||
|
|
||
|
[DisplayName("�ƻ�������")]
|
||
|
public int DeliverMonth { get; set; }
|
||
|
|
||
|
[DisplayName("�ƻ�������")]
|
||
|
public int DeliverWeek { get; set; }
|
||
|
|
||
|
|
||
|
[DisplayName("��Ŀ����")]
|
||
|
[NotMapped]
|
||
|
public string ProjectId => WmsCache.GetProjectId(PartCode);
|
||
|
|
||
|
[DisplayName("���۶�����")]
|
||
|
public string SoBillNum { get; set; }
|
||
|
|
||
|
[DisplayName("���۶�����")]
|
||
|
public int SoLineNum { get; set; }
|
||
|
|
||
|
[DisplayName("�ƻ�Ա")]
|
||
|
public string Planner { get; set; }
|
||
|
|
||
|
public EnumBillState State { get; set; }
|
||
|
|
||
|
[StringLength(200)]
|
||
|
[DisplayName("��ע")]
|
||
|
public string Remark { get; set; }
|
||
|
|
||
|
[NotMapped]
|
||
|
public DateTime BillTime { get; set; }
|
||
|
}
|
||
|
|
||
|
public class TB_DELIVER_PLAN_WEEK
|
||
|
{
|
||
|
[DisplayName("������")]
|
||
|
public int DeliverYear { get; set; }
|
||
|
|
||
|
[DisplayName("������")]
|
||
|
public int DeliverWeek { get; set; }
|
||
|
|
||
|
[DisplayName("��Ŀ����")]
|
||
|
public string ProjectId { get; set; }
|
||
|
|
||
|
[DisplayName("���Ϻ�")]
|
||
|
public string PartCode { get; set; }
|
||
|
|
||
|
[DisplayName("��������")]
|
||
|
public string PartDesc => WmsCache.GetPartDesc(PartCode);
|
||
|
|
||
|
[DisplayName("�ͻ�����")]
|
||
|
public string CustId { get; set; }
|
||
|
|
||
|
[DisplayName("�ͻ����Ϻ�")]
|
||
|
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
|
||
|
|
||
|
[DisplayName("�ƻ�����")]
|
||
|
public decimal PlanQty { get; set; }
|
||
|
|
||
|
[DisplayName("��������")]
|
||
|
public decimal DeliverQty { get; set; }
|
||
|
|
||
|
[DisplayName("������")]
|
||
|
public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty / PlanQty);
|
||
|
|
||
|
}
|
||
|
|
||
|
public class TB_DELIVER_PLAN_MONTH
|
||
|
{
|
||
|
[DisplayName("������")]
|
||
|
public int DeliverYear { get; set; }
|
||
|
|
||
|
[DisplayName("������")]
|
||
|
public int DeliverMonth { get; set; }
|
||
|
|
||
|
[DisplayName("��Ŀ����")]
|
||
|
public string ProjectId { get; set; }
|
||
|
|
||
|
[DisplayName("���Ϻ�")]
|
||
|
public string PartCode { get; set; }
|
||
|
|
||
|
[DisplayName("��������")]
|
||
|
public string PartDesc => WmsCache.GetPartDesc(PartCode);
|
||
|
|
||
|
[DisplayName("�ͻ�����")]
|
||
|
public string CustId { get; set; }
|
||
|
|
||
|
[DisplayName("�ͻ����Ϻ�")]
|
||
|
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
|
||
|
|
||
|
[DisplayName("�ƻ�����")]
|
||
|
public decimal PlanQty { get; set; }
|
||
|
|
||
|
[DisplayName("��������")]
|
||
|
public decimal DeliverQty { get; set; }
|
||
|
|
||
|
[DisplayName("������")]
|
||
|
public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty/ PlanQty);
|
||
|
|
||
|
}
|
||
|
}
|