This commit is contained in:
2026-08-12 20:19:39 +08:00
50 changed files with 2593 additions and 1384 deletions
@@ -600,6 +600,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
}
string reportId = this.tvControlItem.SelectedNode.NodeID;
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))
{