using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
using System.Windows;
namespace Muchinfo.MTPClient.Data.Model.Delivery
{
///
/// 交割仓单查询Model
///
public class DeliveryWarehouse:ViewModelBase
{
#region SQL字段
//
#endregion
#region 交割商品表DeliveryGoods
///
/// 交割商品名称
///
[PropertyDisc("DeliveryGoodsName")]
public string DeliveryGoodsName { get; set; }
///
/// 交割商品代碼
///
[PropertyDisc("deliverygoodscode")]
public string DeliveryGoodsCode { get; set; }
///
/// 交割商品名称
///
public string DeliveryGoodsCodeNameDisplay
{
get
{
return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName);
}
}
#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; }
///
/// 仓单类型-转换字符
///
public string WRTypeDisplay
{
get
{
return WRType.Discription();
}
}
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("GoodsunitName")]
public string GoodsunitName { get; set; }
private string _Spec="-";
///
/// 规格
///
[PropertyDisc("Spec")]
public string Spec
{
get { return _Spec; }
set { _Spec = value; }
}
private string _Nature="-";
///
/// 性质(损耗标准)
///
[PropertyDisc("Nature")]
public string Nature
{
get { return _Nature; }
set { _Nature = value; }
}
private string _Package="-";
///
/// 包装
///
[PropertyDisc("PACKAGE")]
public string Package
{
get { return _Package; }
set { _Package = value; }
}
private string _Pcs="-";
///
/// 件数
///
[PropertyDisc("Pcs")]
public string Pcs
{
get { return _Pcs; }
set { _Pcs = value; }
}
private string _Mark="-";
///
/// 标记
///
[PropertyDisc("Mark")]
public string Mark
{
get { return _Mark; }
set { _Mark = value; }
}
///
/// 注册数量
///
[PropertyDisc("Qty")]
public decimal Qty { get; set; }
public string QtyDisplay
{
get
{
if (Qty != decimal.Zero)
{
return Qty.ToString();
}
else
{
return "-";
}
}
}
///
/// 可用数量
///
public decimal AvailQty
{
get
{
return Qty - FreezeQty;
}
}
///
/// 冻结数量
///
[PropertyDisc("FreezeQty")]
public decimal FreezeQty { get; set; }
public string FreezeQtyDisplay
{
get
{
if (FreezeQty != decimal.Zero)
{
return FreezeQty.ToString();
}
else
{
return "-";
}
}
}
///
/// 兑付数量
///
[PropertyDisc("PayQty")]
public decimal PayQty { get; set; }
public string PayQtyDisplay
{
get
{
if (PayQty != decimal.Zero)
{
return PayQty.ToString();
}
else
{
return "-";
}
}
}
///
/// 存储仓库
///
[PropertyDisc("WareHouseId")]
public string WareHouseId { get; set; }
private string _StorePlace="-";
///
/// 库位
///
[PropertyDisc("StorePlace")]
public string StorePlace
{
get { return _StorePlace; }
set { _StorePlace = value; }
}
///
/// 仓储起始时间
///
[PropertyDisc("StoreStart")]
public DateTime StoreStart { get; set; }
public string StoreStartDisplay
{
get
{
if (StoreStart != DateTime.MinValue && StoreStart != DateTime.MaxValue)
{
return StoreStart.ToString("yyyy-MM-dd");
}
else
{
return "-";
}
}
}
///
/// 仓储结束时间
///
[PropertyDisc("StoreEnd")]
public DateTime StoreEnd { get; set; }
public string StoreEndDisplay
{
get
{
if (StoreEnd != DateTime.MinValue && StoreEnd != DateTime.MaxValue)
{
return StoreEnd.ToString("yyyy-MM-dd");
}
else
{
return "-";
}
}
}
private string _StoreGoodsCode="-";
///
/// 物料编号
///
[PropertyDisc("StoreGoodsCode")]
public string StoreGoodsCode
{
get { return _StoreGoodsCode; }
set { _StoreGoodsCode = value; }
}
private string _StoreGoodsName="-";
///
/// 仓储物名
///
[PropertyDisc("StoreGoodsName")]
public string StoreGoodsName
{
get { return _StoreGoodsName; }
set { _StoreGoodsName = value; }
}
///
/// 货值金额
///
[PropertyDisc("StoreAmount")]
public decimal StoreAmount { get; set; }
public string StoreAmountDisplay
{
get
{
if (StoreAmount != decimal.Zero)
{
return StoreAmount.ToString();
}
else
{
return "-";
}
}
}
///
/// 是否办理保险
///
[PropertyDisc("HasPolicy")]
public int HasPolicy { get; set; }
public string HasPolicyDisplay
{
get
{
if (HasPolicy != 0)
{
return "是";
}
else
{
return "否";
}
}
}
///
/// 保险期限
///
[PropertyDisc("PolicyPeriod")]
public DateTime PolicyPeriod { get; set; }
public string PolicyPeriodDisplay
{
get
{
if (PolicyPeriod != DateTime.MinValue && PolicyPeriod != DateTime.MaxValue)
{
return PolicyPeriod.ToString("yyyy-MM-dd");
}
else
{
return "-";
}
}
}
private string _Insurer="-";
///
/// 保险人
///
[PropertyDisc("Insurer")]
public string Insurer
{
get { return _Insurer; }
set { _Insurer = value; }
}
private string _InsurancePolicy="-";
///
/// 关联保单
///
[PropertyDisc("InsurancePolicy")]
public string InsurancePolicy
{
get { return _InsurancePolicy; }
set { _InsurancePolicy = value; }
}
///
/// 仓储费
///
[PropertyDisc("StoreCharge")]
public decimal StoreCharge { get; set; }
public string StoreChargeDisplay
{
get
{
if (StoreCharge != decimal.Zero)
{
return StoreCharge.ToString();
}
else
{
return "-";
}
}
}
private string _WRSAVER="-";
///
/// 存货人( 显示自己的仓单)
///
[PropertyDisc("accountname")]
public string WRSAVER
{
get { return _WRSAVER; }
set { _WRSAVER = value; }
}
private string _WareHousePerson="-";
///
/// 仓管人
///
[PropertyDisc("WareHousePerson")]
public string WareHousePerson
{
get { return _WareHousePerson; }
set { _WareHousePerson = value; }
}
private string _ContractNo;
///
/// 合同号
///
[PropertyDisc("ContractNo")]
public string ContractNo
{
get { return _ContractNo; }
set { _ContractNo = value; }
}
///
/// 创建时间
///
[PropertyDisc("CreateTime")]
public DateTime CreateTime { get; set; }
///
/// 创建人
///
[PropertyDisc("CreatorId")]
public int CreatorId { get; set; }
///
/// 存货人Id
///
[PropertyDisc("WRAccountId")]
public long WRAccountId { get; set; }
///
/// 状态
///
[PropertyDisc("Status")]
public eWRStatus Status { get; set; }
///
/// 状态-转换显示
///
public string StatusDisplay
{
get
{
return Status.Discription();
}
}
///
/// 处理状态
///
[PropertyDisc("ProcStatus")]
public string ProcStatus { get; set; }
///
/// 存入单号STOREINCODE
///
[PropertyDisc("STOREINCODE")]
public string STOREINCODE { get; set; }
///
/// 注册单号
///
[PropertyDisc("WRREGISTERCODE")]
public string WRREGISTERCODE { get; set; }
///
/// 合约单位
///
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; }
///
/// 證件號
///
[PropertyDisc("IdCardNum")]
public string IdCardNum { get; set; }
#endregion
#region 出库单表OutStoreRequest
///
/// 申请时间
///
[PropertyDisc("RequestTime")]
public DateTime RequestTime { get; set; }
///
/// 审核时间
///
[PropertyDisc("AuditTime")]
public DateTime AuditTime { get; set; }
///
/// 审核人
///
[PropertyDisc("AuditId")]
public long AuditId { get; set; }
///
/// 审核状态
///
[PropertyDisc("AuditStatus")]
public eAuditStatus AuditStatus { get; set; }
///
/// 备注
///
[PropertyDisc("Remark")]
public string Remark { get; set; }
#endregion
#region 仓库表WareHousegion
private string _WareHouseName="-";
///
/// 存储仓库名称
///
[PropertyDisc("WareHouseName")]
public string WareHouseName
{
get { return _WareHouseName; }
set { _WareHouseName = value; }
}
///
/// 仓库地址
///
[PropertyDisc("WarehouseAddress")]
public string WarehouseAddress { get; set; }
///
/// 仓库地区
///
[PropertyDisc("AreaAddress")]
public string AreaAddress { get; set; }
///
/// 仓库具体地址
///
[PropertyDisc("detailAddress")]
public string DetailAddress { get; set; }
///
/// 收货方式TakeGoodsWay
///
[PropertyDisc("TAKETYPE")]
public TakeGoodsWay TakeGoodsWay { get; set; }
#endregion
#region 是否可提货
///
/// 是否可提货-自定义字段
///
private Visibility _isVisibility = Visibility.Collapsed;
///
/// 是否可提货-自定义字段
///
public Visibility IsVisibility
{
get { return _isVisibility; }
set { _isVisibility = value; }
}
private bool _isSelected;
///
///是否选择仓单
///
public bool IsSelected
{
get { return _isSelected; }
set { Set(() => IsSelected, ref _isSelected, value); }
}
#endregion
}
}