feat: 完善材料维护、管线导入与焊接检测报表

为支持材料数量修正和局部管线更新,补充维护与导入入口并隔离窗口审核状态;同步修正焊接日报、外观检测及委托单输出,并简化材料匹配逻辑。
This commit is contained in:
2026-10-13 15:14:21 +08:00
parent 6af12ba9cb
commit e00a3ddcf0
13 changed files with 498 additions and 489 deletions
@@ -44,6 +44,7 @@ namespace FineUIPro.Web.HJGL.DataImport
? Const._Null
: pipeLineMat.MaterialCode;
this.txtMaterialCode.Text = pipeLineMat.MaterialCode2;
this.txtNumber.Text = pipeLineMat.Number.ToString();
this.drpPipeArea.SelectedValue = string.IsNullOrEmpty(pipeLineMat.PipeArea)
? PipelineService.PipeArea_SHOP
: pipeLineMat.PipeArea;
@@ -100,16 +101,25 @@ namespace FineUIPro.Web.HJGL.DataImport
}
/// <summary>
/// 保存材料主编码和材料编码。
/// 保存材料编码、数量和用途。
/// </summary>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.PipeLineMatId))
Model.HJGL_PipeLineMat pipeLineMat = PipelineMatService.GetPipeLineMat(this.PipeLineMatId);
if (pipeLineMat == null)
{
Alert.ShowInTop("未找到材料记录!", MessageBoxIcon.Warning);
return;
}
decimal number;
if (!decimal.TryParse(this.txtNumber.Text.Trim(), out number)
|| number < 0m || number > 9999999.99m || decimal.Round(number, 2) != number)
{
Alert.ShowInTop("数量请输入0至9999999.99之间的数值,最多保留两位小数!", MessageBoxIcon.Warning);
return;
}
string mainMaterialCode = GetMainMaterialCode();
if (!string.IsNullOrEmpty(mainMaterialCode) && MaterialCodeLibService.GetMaterialCodeLib(mainMaterialCode) == null)
{
@@ -117,11 +127,11 @@ namespace FineUIPro.Web.HJGL.DataImport
return;
}
PipelineMatService.UpdateMaterialCodes(
this.PipeLineMatId,
mainMaterialCode,
this.txtMaterialCode.Text.Trim());
PipelineMatService.UpdatePipeArea(this.PipeLineMatId, this.drpPipeArea.SelectedValue);
pipeLineMat.MaterialCode = mainMaterialCode;
pipeLineMat.MaterialCode2 = this.txtMaterialCode.Text.Trim();
pipeLineMat.Number = number;
pipeLineMat.PipeArea = this.drpPipeArea.SelectedValue;
PipelineMatService.UpdatePipeLineMat(pipeLineMat);
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}