From e04f1e7ef8bd338814e916f5e47051bf51aafe7c Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 23 Sep 2025 14:52:29 +0800 Subject: [PATCH] 1 --- .../WeldMat/Stock/StockInEdit.aspx | 6 +++-- .../WeldMat/Stock/StockInEdit.aspx.cs | 24 +++++++++++++++++++ .../Stock/StockInEdit.aspx.designer.cs | 9 +++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx index c7c37a7..e05784d 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx +++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx @@ -51,10 +51,12 @@ - + - + + + diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs index e927895..f0373f5 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs @@ -369,6 +369,30 @@ namespace FineUIPro.Web.WeldMat.Stock } } + protected void btnAmount_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.txtWeight.Text.Trim())) + { + if (!string.IsNullOrEmpty(this.hdWeldId.Text.Trim())) + { + var weld = BLL.WeldInfoService.GetWeldInfoById(this.hdWeldId.Text.Trim()); + if (weld != null) + { + if (weld.ConvertValue.HasValue) + { + decimal? amountCov = Funs.GetNewDecimal(this.txtWeight.Text.Trim()) / weld.ConvertValue; + int amount = Convert.ToInt32(Math.Floor(amountCov.Value)); + this.txtAmount.Text = amount.ToString(); + } + else + { + this.txtAmount.Text = this.txtWeight.Text.Trim(); + } + } + } + } + } + protected void txtAmount_TextChanged(object sender, EventArgs e) { if (this.trRemainingAmount.Hidden == true) diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs index 3b2de18..cfc827b 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs @@ -120,6 +120,15 @@ namespace FineUIPro.Web.WeldMat.Stock { /// protected global::FineUIPro.NumberBox txtWeight; + /// + /// btnAmount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAmount; + /// /// txtAmount 控件。 ///