feat:增加根据选择是否需要材料炉批号进行管控

This commit is contained in:
2026-09-28 13:41:22 +08:00
parent 2105a7c6d6
commit 01ae65b8ab
31 changed files with 526 additions and 173 deletions
@@ -40,6 +40,7 @@ namespace FineUIPro.Web.CLGL
protected void Page_Load(object sender, EventArgs e)
{
ConfigureMaterialBatchColumns(Grid2);
if (!IsPostBack)
{
InitDrpList();
@@ -260,7 +261,7 @@ namespace FineUIPro.Web.CLGL
{
if (validateDetail)
{
Alert.ShowInTop("请选择材料主编码!", MessageBoxIcon.Warning);
Alert.ShowInTop(Project_SysSetService.UsesMaterialBatchNumber(this.CurrUser.LoginProjectId) ? "请选择材料主编码!" : "请选择材料编码!", MessageBoxIcon.Warning);
return false;
}
continue;
@@ -388,8 +389,10 @@ namespace FineUIPro.Web.CLGL
private List<HJGL_MaterialCodeLib> GetMaterialList()
{
bool usesMaterialBatch = Project_SysSetService.UsesMaterialBatchNumber(this.CurrUser.LoginProjectId);
return MaterialCodeLibService.GetMaterialCodeLibList()
.Where(x => string.IsNullOrEmpty(x.ProjectId) || x.ProjectId == this.CurrUser.LoginProjectId)
.Where(x => (string.IsNullOrEmpty(x.ProjectId) || x.ProjectId == this.CurrUser.LoginProjectId)
&& (usesMaterialBatch || x.MaterialCode == x.Code))
.OrderBy(x => x.MaterialCode)
.ToList();
}