20250509 新增质量事故报告报表

This commit is contained in:
2025-05-09 15:29:52 +08:00
parent 2245263c29
commit 1cda2d1914
11 changed files with 1608 additions and 14 deletions
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.BaseInfo;
using NPOI.OpenXmlFormats.Spreadsheet;
using System;
using System.Linq;
@@ -57,7 +58,7 @@ namespace FineUIPro.Web.SES
BLL.ItemService.InitDropDownList(this.drpItem, true);
BLL.CurrencyService.InitDropDownList(this.drpCurrency, true); //币种
BLL.FOTypeService.InitDropDownList(this.drpFOTypeId, true);
BLL.TypeService.InitDropDownList(this.drpType, true);
BLL.TypeService.InitDropDownList(this.drpType, true);
//合同员
this.drpContract_Admin.DataTextField = "UserName";
@@ -231,7 +232,7 @@ namespace FineUIPro.Web.SES
}
if (data.IfExtend.HasValue)
{
if (data.IfExtend==true)
if (data.IfExtend == true)
{
this.drpIfExtend.SelectedValue = "True";
this.txtPreviousFO.Enabled = true;
@@ -450,19 +451,40 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("Please select Const.Records!", MessageBoxIcon.Warning);
return;
}
if (this.drpAllocation.SelectedValue == "N")
if (drpAllocation.SelectedValue == "0")
{
if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null)
Alert.ShowInTop("Please select Allocation(Y/N)!", MessageBoxIcon.Warning);
return;
}
if (this.drpAllocation.SelectedValue == "Y")
{
if (!string.IsNullOrEmpty(this.numProportion_of_FC_Definition.Text.Trim()))
{
if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100)
decimal d = Funs.GetNewDecimalOrZero(this.numProportion_of_FC_Definition.Text.Trim());
if (d <= 0 || d >= 100)
{
Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning);
Alert.ShowInTop("当Allocation选择Y时,Volume Allocation必须是大于0或者小于100!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("Volume Allocation不能为空!", MessageBoxIcon.Warning);
return;
}
}
//if (this.drpAllocation.SelectedValue == "N")
//{
// if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != null)
// {
// if (Funs.GetNewDecimal(numProportion_of_FC_Definition.Text) != 100)
// {
// Alert.ShowInTop("当Allocation选择N时,Volume Allocation应该是100%,请检查数据后再保存!", MessageBoxIcon.Warning);
// return;
// }
// }
//}
Model.FC_SESRelatedData newData = new Model.FC_SESRelatedData();
@@ -749,5 +771,15 @@ namespace FineUIPro.Web.SES
this.txtActual_Budget.Text = this.txtInitial_Budget.Text.Trim();
}
}
protected void drpAllocation_SelectedIndexChanged(object sender, EventArgs e)
{
//选择N时,current allocation 默认为100
this.numProportion_of_FC_Definition.Text = string.Empty;
if (this.drpAllocation.SelectedValue == "N")
{
this.numProportion_of_FC_Definition.Text = "100";
}
}
}
}