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
@@ -23,15 +23,22 @@ namespace FineUIPro.Web.HJGL.DataImport
protected void Page_Load(object sender, EventArgs e)
{
bool usesMaterialBatch = BLL.Project_SysSetService.UsesMaterialBatchNumber(this.CurrUser.LoginProjectId);
this.txtHeatNo.Readonly = true;
this.txtBatchNo.Readonly = true;
this.drpMainMaterialCode.Hidden = !usesMaterialBatch;
this.txtHeatNo.Hidden = !usesMaterialBatch;
this.txtBatchNo.Hidden = !usesMaterialBatch;
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.PipeLineMatId = Request.Params["PipeLineMatId"];
BindMainMaterialCodes();
if (usesMaterialBatch)
{
BindMainMaterialCodes();
}
Model.HJGL_PipeLineMat pipeLineMat = PipelineMatService.GetPipeLineMat(this.PipeLineMatId);
if (pipeLineMat == null)
@@ -111,6 +118,19 @@ namespace FineUIPro.Web.HJGL.DataImport
}
string mainMaterialCode = GetMainMaterialCode();
bool usesMaterialBatch = BLL.Project_SysSetService.UsesMaterialBatchNumber(this.CurrUser.LoginProjectId);
string materialCode = this.txtMaterialCode.Text.Trim();
if (!usesMaterialBatch)
{
Model.HJGL_MaterialCodeLib material = MaterialCodeLibService.GetMaterialCodeLib(materialCode);
if (material == null)
{
Alert.ShowInTop("材料编码库不存在此材料编码,请先维护材料主数据!", MessageBoxIcon.Warning);
return;
}
mainMaterialCode = materialCode;
}
if (!string.IsNullOrEmpty(mainMaterialCode) && MaterialCodeLibService.GetMaterialCodeLib(mainMaterialCode) == null)
{
Alert.ShowInTop("所选材料主编码不存在,请重新选择!", MessageBoxIcon.Warning);
@@ -120,7 +140,7 @@ namespace FineUIPro.Web.HJGL.DataImport
PipelineMatService.UpdateMaterialCodes(
this.PipeLineMatId,
mainMaterialCode,
this.txtMaterialCode.Text.Trim());
materialCode);
PipelineMatService.UpdatePipeArea(this.PipeLineMatId, this.drpPipeArea.SelectedValue);
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());