所有数量类型填写支持小数

This commit is contained in:
hehaibing-1996
2025-03-25 17:04:09 +08:00
parent 43b34b7980
commit 9fb0658a39
15 changed files with 22 additions and 22 deletions

View File

@ -92,7 +92,7 @@ namespace WCS.BLL.DbModels
/// 物料数量 /// 物料数量
/// </summary> /// </summary>
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")] [SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
public int MatQty { get; set; } public decimal MatQty { get; set; }
#endregion #endregion
#region #region

View File

@ -70,13 +70,13 @@ namespace WCS.BLL.DbModels
/// 物料数量(更新前物料数量) /// 物料数量(更新前物料数量)
/// </summary> /// </summary>
[SugarColumn(ColumnName = "before_qty", IsNullable = false, ColumnDescription = "物料数量(更新前物料数量)")] [SugarColumn(ColumnName = "before_qty", IsNullable = false, ColumnDescription = "物料数量(更新前物料数量)")]
public int BeforeQty { get; set; } public decimal BeforeQty { get; set; }
/// <summary> /// <summary>
/// 物料数量(更新后物料数量) /// 物料数量(更新后物料数量)
/// </summary> /// </summary>
[SugarColumn(ColumnName = "after_qty", IsNullable = false, ColumnDescription = "物料数量(更新后物料数量)")] [SugarColumn(ColumnName = "after_qty", IsNullable = false, ColumnDescription = "物料数量(更新后物料数量)")]
public int AfterQty { get; set; } public decimal AfterQty { get; set; }
/// <summary> /// <summary>
/// 物料供应商 /// 物料供应商

View File

@ -76,13 +76,13 @@ namespace WCS.BLL.DbModels
/// 物料数量(原始数量) /// 物料数量(原始数量)
/// </summary> /// </summary>
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量(原始数量)")] [SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量(原始数量)")]
public int MatQty { get; set; } public decimal MatQty { get; set; }
/// <summary> /// <summary>
/// 物料数量(盘点数量) /// 物料数量(盘点数量)
/// </summary> /// </summary>
[SugarColumn(ColumnName = "stocktaking_qty", IsNullable = false, ColumnDescription = "物料数量(盘点数量)")] [SugarColumn(ColumnName = "stocktaking_qty", IsNullable = false, ColumnDescription = "物料数量(盘点数量)")]
public int StocktakingQty { get; set; } public decimal StocktakingQty { get; set; }
/// <summary> /// <summary>
/// 物料供应商 /// 物料供应商

View File

@ -13,7 +13,7 @@ namespace WCS.Model.ApiModel.BatchBindMatDetail
public string { get; set; } public string { get; set; }
public string { get; set; } public string { get; set; }
public int? { get; set; } public decimal? { get; set; }
public string { get; set; } public string { get; set; }
} }

View File

@ -36,7 +36,7 @@ namespace WCS.Model.ApiModel.MatDetailCurrentInfo
public string? MatCustomer { get; set; } = string.Empty; public string? MatCustomer { get; set; } = string.Empty;
public int MatQty { get; set; } public decimal MatQty { get; set; }
#endregion #endregion
#region #region
@ -56,7 +56,7 @@ namespace WCS.Model.ApiModel.MatDetailCurrentInfo
public DateTime? BindTime { get; set; } = DateTime.Now; public DateTime? BindTime { get; set; } = DateTime.Now;
#region #region
public int StocktakingQty { get; set; } = -1; public decimal StocktakingQty { get; set; } = -1;
#endregion #endregion
public int RowNumber { get; set; } public int RowNumber { get; set; }

View File

@ -8,6 +8,6 @@ namespace WCS.Model.ApiModel.MatDetailCurrentInfo
{ {
public int MatDetailCurrentInfoId { get; set; } public int MatDetailCurrentInfoId { get; set; }
public int MatQty { get; set; } public decimal MatQty { get; set; }
} }
} }

View File

@ -26,9 +26,9 @@ namespace WCS.Model.ApiModel.MatDetailHistoryInfo
public string MatSpec { get; set; } public string MatSpec { get; set; }
public int BeforeQty { get; set; } public decimal BeforeQty { get; set; }
public int AfterQty { get; set; } public decimal AfterQty { get; set; }
public string? MatSupplier { get; set; } public string? MatSupplier { get; set; }

View File

@ -44,7 +44,7 @@ namespace WCS.Model.ApiModel.PDAMatBind
/// <summary> /// <summary>
/// 物料数量 /// 物料数量
/// </summary> /// </summary>
public int Qty { get; set; } public decimal Qty { get; set; }
public int NeedLocationAreaId { get; set; } = 0; public int NeedLocationAreaId { get; set; } = 0;

View File

@ -14,6 +14,6 @@ namespace WCS.Model.ApiModel.PDAProductionLineCallOut
/// <summary> /// <summary>
/// 修改后的数量 /// 修改后的数量
/// </summary> /// </summary>
public int MatQty { get; set; } public decimal MatQty { get; set; }
} }
} }

View File

@ -60,12 +60,12 @@ namespace WCS.Model.ApiModel.Stocktaking
/// <summary> /// <summary>
/// 物料数量(原始数量) /// 物料数量(原始数量)
/// </summary> /// </summary>
public int MatQty { get; set; } public decimal MatQty { get; set; }
/// <summary> /// <summary>
/// 物料数量(盘点数量) /// 物料数量(盘点数量)
/// </summary> /// </summary>
public int StocktakingQty { get; set; } public decimal StocktakingQty { get; set; }
/// <summary> /// <summary>
/// 物料供应商 /// 物料供应商

View File

@ -8,6 +8,6 @@ namespace WCS.Model.ApiModel.Stocktaking
{ {
public int MatDetailCurrentInfoId { get; set; } public int MatDetailCurrentInfoId { get; set; }
public int StocktakingQty { get; set; } public decimal StocktakingQty { get; set; }
} }
} }

View File

@ -8,6 +8,6 @@ namespace WCS.Model.ApiModel.Stocktaking
{ {
public int MatDetailStocktakingInfoId { get; set; } public int MatDetailStocktakingInfoId { get; set; }
public int StocktakingQty { get; set; } public decimal StocktakingQty { get; set; }
} }
} }

View File

@ -135,8 +135,8 @@ namespace 智慧物流软件系统.ViewModel
} }
} }
private int matQty; private decimal matQty;
public int MatQty public decimal MatQty
{ {
get { return matQty; } get { return matQty; }
set set

View File

@ -38,7 +38,7 @@ namespace 智慧物流软件系统
try try
{ {
txtMatQty.Text = txtMatQty.Text.Trim(); txtMatQty.Text = txtMatQty.Text.Trim();
var qty = int.Parse(txtMatQty.Text); var qty = decimal.Parse(txtMatQty.Text);
if (qty < 0) if (qty < 0)
{ {
HandyControl.Controls.MessageBox.Show("数量请输入大于0的值"); HandyControl.Controls.MessageBox.Show("数量请输入大于0的值");

View File

@ -46,7 +46,7 @@ namespace 智慧物流软件系统
{ {
try try
{ {
int.Parse(StocktakingQty.Text); decimal.Parse(StocktakingQty.Text);
} }
catch catch
{ {
@ -56,7 +56,7 @@ namespace 智慧物流软件系统
return; return;
} }
matDetailStocktakingInfo.StocktakingQty = int.Parse(StocktakingQty.Text); ; matDetailStocktakingInfo.StocktakingQty = decimal.Parse(StocktakingQty.Text); ;
this.DialogResult = true; this.DialogResult = true;
this.Close(); this.Close();