feat: 完善材料管理与焊接业务功能

This commit is contained in:
2026-08-06 15:33:11 +08:00
parent e418b60fdb
commit 1de898812e
49 changed files with 2566 additions and 555 deletions
@@ -598,6 +598,21 @@ namespace FineUIPro.Web.HJGL.PointTrust
return;
}
}
protected void btnPrintAttachment4_Click(object sender, EventArgs e)
{
ViewState["TrustPrintTemplate"] = "附件4";
btnPrint_Click(sender, e);
}
protected void btnPrintAttachment6_Click(object sender, EventArgs e)
{
ViewState["TrustPrintTemplate"] = "附件6";
btnPrint_Click(sender, e);
}
/// <summary>
/// 按所选模板打印检测委托单。附件4为主单,附件6为无损检测附页,两者共用当前委托数据源。
/// </summary>
protected void btnPrint_Click(object sender, EventArgs e)
{
// string reportId = this.tvControlItem.SelectedNode.NodeID;
@@ -629,6 +644,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
if (trust == null)
{
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
return;
}
var CH_WeldMethod = (from batch in Funs.DB.View_Batch_BatchTrustItem
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
where batch.TrustBatchId == trust.TrustBatchId
@@ -723,7 +743,9 @@ namespace FineUIPro.Web.HJGL.PointTrust
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx";
initTemplatePath = (ViewState["TrustPrintTemplate"] as string) == "附件6"
? "File\\Fastreport\\无损检测委托单_附件6.frx"
: "File\\Fastreport\\管道焊口检测委托单_附件4.frx";
if (File.Exists(rootPath + initTemplatePath))
{