| using System; | 
| using System.Collections.Generic; | 
| using System.Linq; | 
| using System.Reflection.Metadata; | 
| using System.Text; | 
| using System.Threading.Tasks; | 
| using WIDESEA_Core.Attributes; | 
| using WIDESEA_Core.BaseRepository; | 
| using WIDESEA_DTO.Inbound; | 
| using WIDESEA_Model.Models; | 
|   | 
| namespace WIDESEA_DTO | 
| { | 
|      | 
|     /// <summary> | 
|     /// 采购单模型 | 
|     /// </summary> | 
|     [ModelValidate] | 
|     public class PurchaseOrderModel | 
|     { | 
|         /// <summary> | 
|         /// 操作类型(1:新增、2:修改、3:删除、4:关闭[删除、关闭只要单号,已生成收货单的不能删除]) | 
|         /// </summary> | 
|         [PropertyValidate("操作类型", Check = new object[] { 1, 2, 3, 4 })] | 
|         public int Way { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 采购单号 | 
|         /// </summary> | 
|         [PropertyValidate("采购单号", NotNullAndEmpty = true)] | 
|         public string OrderNo { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 单据类型(S:标准入库、V:寄售补给入库) | 
|         /// </summary> | 
|         [PropertyValidate("单据类型", NotNullAndEmpty = true, Check = new[] { "S", "V" })] | 
|         public string Type { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 供应商编号 | 
|         /// </summary> | 
|         [PropertyValidate("供应商编号", NotNullAndEmpty = true)] | 
|         public string SCode { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 采购数量 | 
|         /// </summary> | 
|         [PropertyValidate("采购数量", MinValue = 0, IsContainMinValue = false)] | 
|         public float Amount { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 下单日期 | 
|         /// </summary> | 
|         [PropertyValidate("下单日期", NotNullAndEmpty = true)] | 
|         public string OrderDate { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 备注 | 
|         /// </summary> | 
|         public string Note { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 物料列表 | 
|         /// </summary> | 
|         [PropertyValidate("物料列表", NotNullAndEmpty = true)] | 
|         public List<PurchaseOrderDetailModel> MList { get; set; } | 
|     } | 
|   | 
|     /// <summary> | 
|     /// 采购单明细模型 | 
|     /// </summary> | 
|     [ModelValidate] | 
|     public class PurchaseOrderDetailModel | 
|     { | 
|         /// <summary> | 
|         /// 行号 | 
|         /// </summary> | 
|         public int RowId { get; set; } | 
|   | 
|         [PropertyValidate("物料编号", NotNullAndEmpty = true)] | 
|         public string MCode { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 仓库编号 | 
|         /// </summary> | 
|         [PropertyValidate("仓库编号", NotNullAndEmpty = true)] | 
|         public string WaId { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 数量 | 
|         /// </summary> | 
|         [PropertyValidate("采购数量", MinValue = 0, IsContainMinValue = false)] | 
|         public float Qty { get; set; } | 
|   | 
|         /// <summary> | 
|         /// 单位 | 
|         /// </summary> | 
|         [PropertyValidate("单位", NotNullAndEmpty = true)] | 
|         public string Unit { get; set; } | 
|     } | 
| } |