StockOutView.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.TeachingMaterial
  9. {
  10. [Serializable]
  11. public class StockOutView
  12. {
  13. /// <summary>
  14. /// 出库ID
  15. /// </summary>
  16. [DisplayName("出库ID")]
  17. public Guid StockOutID { get; set; }
  18. /// <summary>
  19. /// 出库明细ID
  20. /// </summary>
  21. [DisplayName("出库明细ID")]
  22. public Guid StockOutDetailID { get; set; }
  23. /// <summary>
  24. /// 学年学期
  25. /// </summary>
  26. [Required]
  27. [DisplayName("学年学期")]
  28. public Guid? SchoolyearID { get; set; }
  29. /// <summary>
  30. /// 学年学期
  31. /// </summary>
  32. [DisplayName("学年学期")]
  33. [Required]
  34. public string SchoolyearName { get; set; }
  35. /// <summary>
  36. /// 出库单据号
  37. /// </summary>
  38. /// [Required]
  39. [DisplayName("出库单据号")]
  40. [Required]
  41. public string StockOutNo { get; set; }
  42. /// <summary>
  43. /// 书库名称
  44. /// </summary>
  45. [DisplayName("书库名称")]
  46. public string LibraryName { get; set; }
  47. /// <summary>
  48. /// 教材信息ID
  49. /// </summary>
  50. [DisplayName("教材信息ID")]
  51. public Guid TeachingMaterialPoolID { get; set; }
  52. /// <summary>
  53. /// 教材编号
  54. /// </summary>
  55. [DisplayName("教材编号")]
  56. public string TeachingMaterialCode { get; set; }
  57. /// <summary>
  58. /// 教材名称
  59. /// </summary>
  60. [DisplayName("教材名称")]
  61. public string TeachingMaterialName { get; set; }
  62. /// <summary>
  63. /// 出版单位ID
  64. /// </summary>
  65. [DisplayName("出版单位ID")]
  66. public Guid? PublishID { get; set; }
  67. /// <summary>
  68. /// 出版单位
  69. /// </summary>
  70. [DisplayName("出版单位")]
  71. public string PublishName { get; set; }
  72. /// <summary>
  73. /// 供应商ID
  74. /// </summary>
  75. [DisplayName("供应商ID")]
  76. public Guid? SupplierID { get; set; }
  77. /// <summary>
  78. /// ISBN
  79. /// </summary>
  80. [DisplayName("ISBN")]
  81. public string ISBN { get; set; }
  82. /// <summary>
  83. /// 供应商
  84. /// </summary>
  85. [DisplayName("供应商")]
  86. public string SupplierName { get; set; }
  87. /// <summary>
  88. /// 版本时间
  89. /// </summary>
  90. [DisplayName("版本时间")]
  91. public string PublishTime { get; set; }
  92. /// <summary>
  93. /// 作者
  94. /// </summary>
  95. [DisplayName("作者")]
  96. [Required]
  97. public string Author { get; set; }
  98. /// <summary>
  99. /// 单价
  100. /// </summary>
  101. [DisplayName("单价")]
  102. public decimal? Price { get; set; }
  103. /// <summary>
  104. /// 领书数量
  105. /// </summary>
  106. [DisplayName("领书数量")]
  107. public int GetBookQuantity { get; set; }
  108. /// <summary>
  109. /// 领书数量
  110. /// </summary>
  111. [DisplayName("领书数量")]
  112. public int OutNumber { get; set; }
  113. /// <summary>
  114. /// 数量
  115. /// </summary>
  116. [DisplayName("数量")]
  117. public int? Quantity { get; set; }
  118. /// <summary>
  119. /// 折扣率
  120. /// </summary>
  121. [DisplayName("折扣率")]
  122. [Required]
  123. [RegularExpression(@"[\d]?(\.[\d]{0,2})?", ErrorMessage = "必须填写小数值")]
  124. public decimal? Discount { get; set; }
  125. /// <summary>
  126. /// 折扣率(四舍五入)
  127. /// </summary>
  128. public decimal? DiscountStr
  129. {
  130. get
  131. {
  132. if (this.Discount == null)
  133. return 0;
  134. return Math.Round((decimal)Discount, 2);
  135. }
  136. }
  137. /// <summary>
  138. /// 折合价
  139. /// </summary>
  140. [DisplayName("折合价")]
  141. public decimal? DiscountPrice { get; set; }
  142. /// <summary>
  143. /// 折合价(四舍五入)
  144. /// </summary>
  145. public decimal? DiscountPriceStr
  146. {
  147. get
  148. {
  149. if (this.DiscountPrice == null)
  150. return 0;
  151. return Math.Round((decimal)DiscountPrice, 2);
  152. }
  153. }
  154. /// <summary>
  155. /// 总价(实洋)
  156. /// </summary>
  157. [DisplayName("总价(实洋)")]
  158. public decimal? TotalDollar { get; set; }
  159. /// <summary>
  160. /// 实洋(四舍五入)
  161. /// </summary>
  162. public decimal? TotalDollarStr
  163. {
  164. get
  165. {
  166. if (this.TotalDollar == null)
  167. return 0;
  168. return Math.Round((decimal)TotalDollar, 2);
  169. }
  170. }
  171. /// <summary>
  172. /// 码洋
  173. /// </summary>
  174. [DisplayName("码洋")]
  175. public decimal? TotalPrice { get; set; }
  176. /// <summary>
  177. /// 码洋(四舍五入)
  178. /// </summary>
  179. public decimal? TotalPriceStr
  180. {
  181. get
  182. {
  183. if (this.TotalPrice == null)
  184. return 0;
  185. return Math.Round((decimal)TotalPrice, 2);
  186. }
  187. }
  188. /// <summary>
  189. /// 单据总金额
  190. /// </summary>
  191. [DisplayName("单据总金额")]
  192. public decimal? StockOutSumMoney { get; set; }
  193. /// <summary>
  194. /// 领书人
  195. /// </summary>
  196. [Required]
  197. [DisplayName("领书人")]
  198. public Guid? RecipientUserID { get; set; }
  199. /// <summary>
  200. /// 领书人
  201. /// </summary>
  202. [DisplayName("领书人")]
  203. public string RecipientUserName { get; set; }
  204. /// <summary>
  205. /// 领书人编号
  206. /// </summary>
  207. [Required]
  208. [DisplayName("领书人编号")]
  209. public string GetBookNo { get; set; }
  210. /// <summary>
  211. /// 领书日期
  212. /// </summary>
  213. [DisplayName("领书日期")]
  214. [Required]
  215. public DateTime? StockOutTime { get; set; }
  216. /// <summary>
  217. /// 出库人
  218. /// </summary>
  219. [DisplayName("出库人")]
  220. public string StockOutUserName { get; set; }
  221. /// <summary>
  222. /// 出库类型
  223. /// </summary>
  224. [DisplayName("出库类型")]
  225. [Required]
  226. public int? StockOutTypeID { get; set; }
  227. /// <summary>
  228. /// 出库类型
  229. /// </summary>
  230. [DisplayName("出库类型")]
  231. public string StockOutTypeName { get; set; }
  232. /// <summary>
  233. /// 出库类型
  234. /// </summary>
  235. [DisplayName("出库类型")]
  236. public string StockOutTypeNameStr
  237. {
  238. get
  239. {
  240. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StockOutType.ToString())
  241. .Where(x => x.Value == StockOutTypeID)
  242. .Select(x => x.Name).FirstOrDefault();
  243. }
  244. }
  245. /// <summary>
  246. /// 状态
  247. /// </summary>
  248. [DisplayName("状态")]
  249. public int? RecordStatus { get; set; }
  250. /// <summary>
  251. /// 状态
  252. /// </summary>
  253. [DisplayName("状态")]
  254. public string RecordStatusName { get; set; }
  255. /// <summary>
  256. /// 出库说明
  257. /// </summary>
  258. [DisplayName("出库说明")]
  259. public string Desc { get; set; }
  260. }
  261. }