using Muchinfo.MTPClient.Data.Enums; using Muchinfo.MTPClient.Data.Helper; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Windows; namespace Muchinfo.MTPClient.Data.Model.Delivery { /// /// 交割提货-申请 /// public class TakaDeliveryGoodsApplyModel : INotifyPropertyChanged { #region 重写方法 public event PropertyChangedEventHandler PropertyChanged; private void INotifyPropertyChanged(string name) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(name)); } } #endregion #region SQL字段 // #endregion #region 仓单表WarehouseReciept /// /// 仓单ID /// [PropertyDisc("WRID")] public long WRID { get; set; } /// /// 仓单号 /// [PropertyDisc("WRCode")] public string WRCode { get; set; } /// /// 仓单类型 /// [PropertyDisc("WRType")] public eWRType WRType { get; set; } /// /// 交割商品ID /// [PropertyDisc("DeliveryGoodsId")] public long DeliveryGoodsId { get; set; } ///// ///// 等级 ///// //[PropertyDisc("Rank")] //public string Rank { get; set; } ///// ///// 品牌 ///// //[PropertyDisc("Brand")] //public string Brand { get; set; } private string _Brand = "-"; /// /// 品牌 /// [PropertyDisc("Brand")] public string Brand { get { return _Brand; } set { _Brand = value; } } private string _Rank = "-"; /// /// 等级 /// [PropertyDisc("Rank")] public string Rank { get { return _Rank; } set { _Rank = value; } } /// /// 单位 /// [PropertyDisc("GoodsUnitId")] public long GoodsUnitId { get; set; } ///// ///// 规格 ///// //[PropertyDisc("Spec")] //public string Spec { get; set; } private string _Spec = "-"; /// /// 规格 /// [PropertyDisc("Spec")] public string Spec { get { return _Spec; } set { _Spec = value; } } /// /// 注册数量 /// [PropertyDisc("Qty")] public decimal Qty { get; set; } /// /// 冻结数量 /// [PropertyDisc("FreezeQty")] public decimal FreezeQty { get; set; } /// /// 兑付数量 /// [PropertyDisc("PayQty")] public decimal PayQty { get; set; } public decimal AvlQty { get { return Qty - FreezeQty - PayQty; } } /// /// 库位 /// [PropertyDisc("StorePlace")] public long StorePlace { get; set; } /// /// 货值金额 /// [PropertyDisc("StoreAmount")] public decimal StoreAmount { get; set; } /// /// 仓储费 /// [PropertyDisc("StoreCharge")] public decimal StoreCharge { get; set; } /// /// 仓储起始时间 /// [PropertyDisc("StoreStart")] public DateTime StoreStart { get; set; } /// /// 仓储结束时间 /// [PropertyDisc("StoreEnd")] public DateTime StoreEnd { get; set; } /// /// 存货人Id /// [PropertyDisc("WRAccountId")] public long WRAccountId { get; set; } /// /// 状态 /// [PropertyDisc("Status")] public eWRStatus Status { get; set; } /// /// 存储仓库Id /// [PropertyDisc("WareHouseId")] public long WareHouseId { get; set; } #endregion #region 仓库表WareHouse /// /// 仓库名称 /// [PropertyDisc("WareHouseName")] public string WareHouseName { get; set; } /// /// 倉庫地址 /// [PropertyDisc("WareHouseAddress")] public string WarehouseAddress { get; set; } /// /// 仓库地区 /// [PropertyDisc("AreaAddress")] public string AreaAddress { get; set; } /// /// 仓库具体地址 /// [PropertyDisc("detailAddress")] public string DetailAddress { get; set; } #endregion #region 交割商品DeliveryGoods /// /// 交割商品名称 /// [PropertyDisc("DeliveryGoodsName")] public string DeliveryGoodsName { get; set; } /// /// 交割商品代碼 /// [PropertyDisc("DeliveryGoodsCode")] public string DeliveryGoodsCode { get; set; } public string DisplayGoodsCodeName { get { return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName); } } /// /// 收货人 /// [PropertyDisc("PERSONNAME")] public string PersonName { get; set; } /// /// 联系方式 /// [PropertyDisc("TELPHONE")] public string Telphone { get; set; } /// /// 联系方式 /// [PropertyDisc("ADDRESS")] public string Address { get; set; } /// /// 提货方式 /// [PropertyDisc("TAKETYPE")] public TakeGoodsWay TakeGoodsWay { get; set; } /// /// 证件号 /// [PropertyDisc("IdCardNum")] public string IdCardNum { get; set; } #endregion /// /// 状态-转换显示 /// public string StatusDisplay { get { return Status.Discription(); } } /// /// 是否选中-自定义字段 /// private bool _isSelected; /// /// 是否选中-自定义字段 /// public bool IsSelected { get { return _isSelected; } set { _isSelected = value; INotifyPropertyChanged("IsSelected"); } } private bool _isEnabled = true; /// /// 是否可用-自定义字段 /// public bool IsEnabled { get { return _isEnabled; } set { _isEnabled = value; INotifyPropertyChanged("IsEnabled"); } } /// /// 仓单类型-字符串 /// public string WRTypeDisplay { get { if (WRType != null) { return WRType.Discription(); } else { return "-"; } } } /// /// 开始时间 /// public string StoreStartDisplay { get { if (StoreStart != null && StoreStart != DateTime.MinValue) { return StoreStart.ToString("yyyy-MM-dd HH:mm:ss"); } else { return "-"; } } } /// /// 结束时间 /// public string StoreEndDisplay { get { if (StoreEnd != null && StoreEnd != DateTime.MinValue) { return StoreEnd.ToString("yyyy-MM-dd HH:mm:ss"); } else { return "-"; } } } /// /// 合约单位 /// public string GoodsUnitIdDisplay { get; set; } /// /// 收货人 /// [PropertyDisc("personname")] public string personname { get; set; } /// /// 联系电话 /// [PropertyDisc("telphone")] public string telphone { get; set; } /// /// 收货地址 /// [PropertyDisc("address")] public string address { get; set; } #region 是否可以提货-自定义字段 private Visibility _canTakeGoods = Visibility.Collapsed; /// ///是否可以提货-自定义字段 /// Changes to that property's value raise the PropertyChanged event. /// public Visibility CanTakeGoods { get { return _canTakeGoods; } set { _canTakeGoods = value; INotifyPropertyChanged("CanTakeGoods"); } } #endregion } }