Преглед на файлове

物品详细表 --> 增加物品单位

LEIYI преди 4 месеца
родител
ревизия
b4b423f12b

+ 5 - 0
OASystem/OASystem.Domain/Dtos/PersonnelModule/GoodsDTO.cs

@@ -53,6 +53,11 @@ namespace OASystem.Domain.Dtos.PersonnelModule
         /// </summary>
         public int Type { get; set; }
 
+        /// <summary>
+        /// 物品单位
+        /// </summary>
+        public string Unit { get; set; }
+
         /// <summary>
         /// 备注
         /// </summary>

+ 1 - 1
OASystem/OASystem.Domain/Entities/PersonnelModule/Pm_GoodsInfo.cs

@@ -53,7 +53,7 @@ namespace OASystem.Domain.Entities.PersonnelModule
         /// 单位(个、箱、包 等等)
         /// </summary>
         [SugarColumn(ColumnDescription = "单位(个、箱、包 等等)", IsNullable = true, ColumnDataType = "varchar(20)")]
-        public decimal Unit { get; set; }
+        public string Unit { get; set; }
 
         /// <summary>
         /// 最后操作人

+ 2 - 0
OASystem/OASystem.Domain/ViewModels/PersonnelModule/GoodsInfoView.cs

@@ -33,6 +33,8 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
 
         public decimal StockQuantity { get; set; }
 
+        public string Unit { get; set; }
+
         //SugarColumn(IsIgnore = true),
 
         [Navigate(NavigateType.OneToMany, nameof(GoodsListReceiveView.GoodsId))]

+ 4 - 0
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/GoodsRepository.cs

@@ -117,6 +117,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                 LastUpdateUserName = x.UserData?.CnName ?? string.Empty,
                 x.LastUpdateTime,
                 StockQuantity = x.StockQuantity - x.WaitAuditQuantity,
+                x.Unit,
                 x.StockQuantityLabel,
             }).ToList();
 
@@ -151,6 +152,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                                           gi.OQ_Total,
                                           gi.PriceTotal,
                                           gi.StockQuantity,
+                                          gi.Unit,
                                           gi.Remark,
                                           LastUpdateUserName = u1.CnName,
                                           gi.LastUpdateTime,
@@ -182,6 +184,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                 OQ_Total = 0,
                 PriceTotal = 0,
                 StockQuantity = 0,
+                Unit = dto.Unit,
                 Remark = dto.Remark,
                 LastUpdateUserId = currUserId,
                 LastUpdateTime = DateTime.Now,
@@ -195,6 +198,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                                          {
                                              x.Name,
                                              x.Type,
+                                             x.Unit,
                                              x.Remark,
                                              x.LastUpdateUserId,
                                              x.LastUpdateTime,