TakaDeliveryGoodsApplyModel.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Data.Helper;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows;
  9. namespace Muchinfo.MTPClient.Data.Model.Delivery
  10. {
  11. /// <summary>
  12. /// 交割提货-申请
  13. /// </summary>
  14. public class TakaDeliveryGoodsApplyModel : INotifyPropertyChanged
  15. {
  16. #region 重写方法
  17. public event PropertyChangedEventHandler PropertyChanged;
  18. private void INotifyPropertyChanged(string name)
  19. {
  20. if (PropertyChanged != null)
  21. {
  22. PropertyChanged(this, new PropertyChangedEventArgs(name));
  23. }
  24. }
  25. #endregion
  26. #region SQL字段
  27. //<select id="SearchTakaDeliveryGoodsApply" parameterType="java.util.Map"
  28. // resultType="HashMap">
  29. // SELECT
  30. // re.WRID,
  31. // re.WRCode,
  32. // re.WRType,
  33. // re.DeliveryGoodsId,
  34. // re.Rank,
  35. // re.Brand,
  36. // re.GoodsUnitId,
  37. // re.Spec,
  38. // re.Qty,
  39. // re.FreezeQty,
  40. // re.PayQty,
  41. // re.StorePlace,
  42. // re.StoreAmount,
  43. // re.StoreCharge,
  44. // re.StoreStart,
  45. // re.StoreEnd,
  46. // re.WRAccountId,
  47. // re.Status,
  48. // re.WareHouseId,
  49. // re.personname,
  50. // re.telphone,
  51. // re.address,
  52. // wh.WareHouseName,
  53. // gs.DeliveryGoodsName
  54. // from WarehouseReciept re
  55. // left join WareHouse wh on wh.WareHouseId=re.WareHouseId
  56. // left join DeliveryGoods gs on gs.DeliveryGoodsId=re.DeliveryGoodsId
  57. // <where>
  58. // re.WRAccountId =#{accountId}
  59. // </where>
  60. // order by re.CreateTime desc
  61. // </select>
  62. #endregion
  63. #region 仓单表WarehouseReciept
  64. /// <summary>
  65. /// 仓单ID
  66. /// </summary>
  67. [PropertyDisc("WRID")]
  68. public long WRID { get; set; }
  69. /// <summary>
  70. /// 仓单号
  71. /// </summary>
  72. [PropertyDisc("WRCode")]
  73. public string WRCode { get; set; }
  74. /// <summary>
  75. /// 仓单类型
  76. /// </summary>
  77. [PropertyDisc("WRType")]
  78. public eWRType WRType { get; set; }
  79. /// <summary>
  80. /// 交割商品ID
  81. /// </summary>
  82. [PropertyDisc("DeliveryGoodsId")]
  83. public long DeliveryGoodsId { get; set; }
  84. ///// <summary>
  85. ///// 等级
  86. ///// </summary>
  87. //[PropertyDisc("Rank")]
  88. //public string Rank { get; set; }
  89. ///// <summary>
  90. ///// 品牌
  91. ///// </summary>
  92. //[PropertyDisc("Brand")]
  93. //public string Brand { get; set; }
  94. private string _Brand = "-";
  95. /// <summary>
  96. /// 品牌
  97. /// </summary>
  98. [PropertyDisc("Brand")]
  99. public string Brand
  100. {
  101. get { return _Brand; }
  102. set { _Brand = value; }
  103. }
  104. private string _Rank = "-";
  105. /// <summary>
  106. /// 等级
  107. /// </summary>
  108. [PropertyDisc("Rank")]
  109. public string Rank
  110. {
  111. get { return _Rank; }
  112. set { _Rank = value; }
  113. }
  114. /// <summary>
  115. /// 单位
  116. /// </summary>
  117. [PropertyDisc("GoodsUnitId")]
  118. public long GoodsUnitId { get; set; }
  119. ///// <summary>
  120. ///// 规格
  121. ///// </summary>
  122. //[PropertyDisc("Spec")]
  123. //public string Spec { get; set; }
  124. private string _Spec = "-";
  125. /// <summary>
  126. /// 规格
  127. /// </summary>
  128. [PropertyDisc("Spec")]
  129. public string Spec
  130. {
  131. get { return _Spec; }
  132. set { _Spec = value; }
  133. }
  134. /// <summary>
  135. /// 注册数量
  136. /// </summary>
  137. [PropertyDisc("Qty")]
  138. public decimal Qty { get; set; }
  139. /// <summary>
  140. /// 冻结数量
  141. /// </summary>
  142. [PropertyDisc("FreezeQty")]
  143. public decimal FreezeQty { get; set; }
  144. /// <summary>
  145. /// 兑付数量
  146. /// </summary>
  147. [PropertyDisc("PayQty")]
  148. public decimal PayQty { get; set; }
  149. public decimal AvlQty
  150. {
  151. get
  152. {
  153. return Qty - FreezeQty - PayQty;
  154. }
  155. }
  156. /// <summary>
  157. /// 库位
  158. /// </summary>
  159. [PropertyDisc("StorePlace")]
  160. public long StorePlace { get; set; }
  161. /// <summary>
  162. /// 货值金额
  163. /// </summary>
  164. [PropertyDisc("StoreAmount")]
  165. public decimal StoreAmount { get; set; }
  166. /// <summary>
  167. /// 仓储费
  168. /// </summary>
  169. [PropertyDisc("StoreCharge")]
  170. public decimal StoreCharge { get; set; }
  171. /// <summary>
  172. /// 仓储起始时间
  173. /// </summary>
  174. [PropertyDisc("StoreStart")]
  175. public DateTime StoreStart { get; set; }
  176. /// <summary>
  177. /// 仓储结束时间
  178. /// </summary>
  179. [PropertyDisc("StoreEnd")]
  180. public DateTime StoreEnd { get; set; }
  181. /// <summary>
  182. /// 存货人Id
  183. /// </summary>
  184. [PropertyDisc("WRAccountId")]
  185. public long WRAccountId { get; set; }
  186. /// <summary>
  187. /// 状态
  188. /// </summary>
  189. [PropertyDisc("Status")]
  190. public eWRStatus Status { get; set; }
  191. /// <summary>
  192. /// 存储仓库Id
  193. /// </summary>
  194. [PropertyDisc("WareHouseId")]
  195. public long WareHouseId { get; set; }
  196. #endregion
  197. #region 仓库表WareHouse
  198. /// <summary>
  199. /// 仓库名称
  200. /// </summary>
  201. [PropertyDisc("WareHouseName")]
  202. public string WareHouseName { get; set; }
  203. /// <summary>
  204. /// 倉庫地址
  205. /// </summary>
  206. [PropertyDisc("WareHouseAddress")]
  207. public string WarehouseAddress { get; set; }
  208. /// <summary>
  209. /// 仓库地区
  210. /// </summary>
  211. [PropertyDisc("AreaAddress")]
  212. public string AreaAddress { get; set; }
  213. /// <summary>
  214. /// 仓库具体地址
  215. /// </summary>
  216. [PropertyDisc("detailAddress")]
  217. public string DetailAddress { get; set; }
  218. #endregion
  219. #region 交割商品DeliveryGoods
  220. /// <summary>
  221. /// 交割商品名称
  222. /// </summary>
  223. [PropertyDisc("DeliveryGoodsName")]
  224. public string DeliveryGoodsName { get; set; }
  225. /// <summary>
  226. /// 交割商品代碼
  227. /// </summary>
  228. [PropertyDisc("DeliveryGoodsCode")]
  229. public string DeliveryGoodsCode { get; set; }
  230. public string DisplayGoodsCodeName
  231. {
  232. get
  233. {
  234. return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName);
  235. }
  236. }
  237. /// <summary>
  238. /// 收货人
  239. /// </summary>
  240. [PropertyDisc("PERSONNAME")]
  241. public string PersonName { get; set; }
  242. /// <summary>
  243. /// 联系方式
  244. /// </summary>
  245. [PropertyDisc("TELPHONE")]
  246. public string Telphone { get; set; }
  247. /// <summary>
  248. /// 联系方式
  249. /// </summary>
  250. [PropertyDisc("ADDRESS")]
  251. public string Address { get; set; }
  252. /// <summary>
  253. /// 提货方式
  254. /// </summary>
  255. [PropertyDisc("TAKETYPE")]
  256. public TakeGoodsWay TakeGoodsWay { get; set; }
  257. /// <summary>
  258. /// 证件号
  259. /// </summary>
  260. [PropertyDisc("IdCardNum")]
  261. public string IdCardNum { get; set; }
  262. #endregion
  263. /// <summary>
  264. /// 状态-转换显示
  265. /// </summary>
  266. public string StatusDisplay
  267. {
  268. get
  269. {
  270. return Status.Discription();
  271. }
  272. }
  273. /// <summary>
  274. /// 是否选中-自定义字段
  275. /// </summary>
  276. private bool _isSelected;
  277. /// <summary>
  278. /// 是否选中-自定义字段
  279. /// </summary>
  280. public bool IsSelected
  281. {
  282. get { return _isSelected; }
  283. set
  284. {
  285. _isSelected = value;
  286. INotifyPropertyChanged("IsSelected");
  287. }
  288. }
  289. private bool _isEnabled = true;
  290. /// <summary>
  291. /// 是否可用-自定义字段
  292. /// </summary>
  293. public bool IsEnabled
  294. {
  295. get { return _isEnabled; }
  296. set
  297. {
  298. _isEnabled = value;
  299. INotifyPropertyChanged("IsEnabled");
  300. }
  301. }
  302. /// <summary>
  303. /// 仓单类型-字符串
  304. /// </summary>
  305. public string WRTypeDisplay
  306. {
  307. get
  308. {
  309. if (WRType != null)
  310. {
  311. return WRType.Discription();
  312. }
  313. else
  314. {
  315. return "-";
  316. }
  317. }
  318. }
  319. /// <summary>
  320. /// 开始时间
  321. /// </summary>
  322. public string StoreStartDisplay
  323. {
  324. get
  325. {
  326. if (StoreStart != null && StoreStart != DateTime.MinValue)
  327. {
  328. return StoreStart.ToString("yyyy-MM-dd HH:mm:ss");
  329. }
  330. else
  331. {
  332. return "-";
  333. }
  334. }
  335. }
  336. /// <summary>
  337. /// 结束时间
  338. /// </summary>
  339. public string StoreEndDisplay
  340. {
  341. get
  342. {
  343. if (StoreEnd != null && StoreEnd != DateTime.MinValue)
  344. {
  345. return StoreEnd.ToString("yyyy-MM-dd HH:mm:ss");
  346. }
  347. else
  348. {
  349. return "-";
  350. }
  351. }
  352. }
  353. /// <summary>
  354. /// 合约单位
  355. /// </summary>
  356. public string GoodsUnitIdDisplay { get; set; }
  357. /// <summary>
  358. /// 收货人
  359. /// </summary>
  360. [PropertyDisc("personname")]
  361. public string personname { get; set; }
  362. /// <summary>
  363. /// 联系电话
  364. /// </summary>
  365. [PropertyDisc("telphone")]
  366. public string telphone { get; set; }
  367. /// <summary>
  368. /// 收货地址
  369. /// </summary>
  370. [PropertyDisc("address")]
  371. public string address { get; set; }
  372. #region 是否可以提货-自定义字段
  373. private Visibility _canTakeGoods = Visibility.Collapsed;
  374. /// <summary>
  375. ///是否可以提货-自定义字段
  376. /// Changes to that property's value raise the PropertyChanged event.
  377. /// </summary>
  378. public Visibility CanTakeGoods
  379. {
  380. get
  381. {
  382. return _canTakeGoods;
  383. }
  384. set
  385. {
  386. _canTakeGoods = value;
  387. INotifyPropertyChanged("CanTakeGoods");
  388. }
  389. }
  390. #endregion
  391. }
  392. }