This commit is contained in:
2025-06-25 11:52:01 +08:00
3 changed files with 129 additions and 68 deletions
@@ -19,18 +19,18 @@
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称" <f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged"> LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件" <f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件"
AutoPostBack="true" Label="焊工号" LabelWidth="90px" AutoPostBack="true" Label="焊工号" LabelWidth="90px"
OnTextChanged="Tree_TextChanged" Width="300px" LabelAlign="Right"> OnTextChanged="Tree_TextChanged" Width="300px" LabelAlign="Right">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:DatePicker ID="txtTrustDateMonth" runat="server" Label="月份" <f:DatePicker ID="txtTrustDateMonth" runat="server" Label="月份"
@@ -65,7 +65,7 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right" Hidden="true"> <f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right" Hidden="true">
<Items> <Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server" > <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnAudit" Text="审核" ToolTip="审核后才可进行检测" Icon="Accept" runat="server" <f:Button ID="btnAudit" Text="审核" ToolTip="审核后才可进行检测" Icon="Accept" runat="server"
OnClick="btnAudit_Click" Hidden="true"> OnClick="btnAudit_Click" Hidden="true">
@@ -112,9 +112,11 @@
<f:Label ID="lbIsAudit" Label="是否审核" runat="server" Hidden="true" <f:Label ID="lbIsAudit" Label="是否审核" runat="server" Hidden="true"
LabelWidth="105px" LabelAlign="Right"> LabelWidth="105px" LabelAlign="Right">
</f:Label> </f:Label>
<f:Button ID="Button1" Text="打印" Icon="Printer" runat="server" <f:Button ID="btnBack" Text="退回" Icon="ArrowLeft" runat="server" OnClick="btnBack_Click">
OnClick="btnPrint_Click" > </f:Button>
</f:Button> <f:Button ID="Button1" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click">
</f:Button>
</Items> </Items>
</f:FormRow> </f:FormRow>
</Rows> </Rows>
@@ -126,7 +128,7 @@
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
DataIDField="PointBatchItemId" AllowSorting="true" SortField="PipelineCode,WeldJointCode" DataIDField="PointBatchItemId" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="25" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> PageSize="25" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" EnableCheckBoxSelect="true" EnableMultiSelect="true">
<Columns> <Columns>
<f:RenderField Width="160px" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String" <f:RenderField Width="160px" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String"
HeaderText="管线号" HeaderTextAlign="Center" TextAlign="Left" HeaderText="管线号" HeaderTextAlign="Center" TextAlign="Left"
@@ -190,7 +192,7 @@
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1050px" Height="650px"> IsModal="true" Width="1050px" Height="650px">
</f:Window> </f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true" <f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px"> IsModal="true" Width="1010px" Height="660px">
</f:Window> </f:Window>
@@ -630,13 +630,13 @@ namespace FineUIPro.Web.HJGL.PointTrust
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID); // Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId); var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
var CH_WeldMethod = (from batch in Funs.DB.View_Batch_BatchTrustItem 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 join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
where batch.TrustBatchId == trust.TrustBatchId where batch.TrustBatchId == trust.TrustBatchId
select joint.WeldingMethodCode).Distinct().ToList(); select joint.WeldingMethodCode).Distinct().ToList();
var CH_SlopeType = (from batch in Funs.DB.View_Batch_BatchTrustItem var CH_SlopeType = (from batch in Funs.DB.View_Batch_BatchTrustItem
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
where batch.TrustBatchId == trust.TrustBatchId where batch.TrustBatchId == trust.TrustBatchId
select joint.GrooveTypeCode).Distinct().ToList(); select joint.GrooveTypeCode).Distinct().ToList();
if (trust != null) if (trust != null)
{ {
string varValue = string.Empty; string varValue = string.Empty;
@@ -649,7 +649,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
} }
if (CH_WeldMethod.Count>0) if (CH_WeldMethod.Count > 0)
{ {
dr["CH_WeldMethod"] = string.Join(",", CH_WeldMethod); dr["CH_WeldMethod"] = string.Join(",", CH_WeldMethod);
} }
@@ -677,7 +677,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
var list = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(trust.DetectionRateId); var list = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(trust.DetectionRateId);
if (list != null) if (list != null)
{ {
dr["CH_NDTRate"] = list.DetectionRateValue+"%"; dr["CH_NDTRate"] = list.DetectionRateValue + "%";
} }
@@ -989,9 +989,6 @@ namespace FineUIPro.Web.HJGL.PointTrust
} }
} }
protected void btnBack_Click(object sender, EventArgs e)
{
}
#region #region
/// <summary> /// <summary>
/// 判断是否可以删除 /// 判断是否可以删除
@@ -1026,5 +1023,60 @@ namespace FineUIPro.Web.HJGL.PointTrust
} }
} }
#endregion #endregion
/// <summary>
/// 退回
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnBack_Click(object sender, EventArgs e)
{
Model.SGGLDB db = Funs.DB;
string trustBatchId = string.Empty;
var lists = this.Grid1.SelectedRowIDArray;
if (lists.Count() > 0)
{
if (lbIsTrust.Text=="未委托")
{
Alert.ShowInTop("未委托,无需退回!", MessageBoxIcon.Warning);
return;
}
foreach (var pointBatchItemId in lists)
{
//删除选中委托单明细
var batchTrustItem = (from x in db.HJGL_Batch_BatchTrustItem where x.PointBatchItemId == pointBatchItemId select x).FirstOrDefault();
if (batchTrustItem != null)
{
trustBatchId = batchTrustItem.TrustBatchId;
BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId);
}
//修改点口中的委托状态
var pointBatchItem = (from x in db.HJGL_Batch_PointBatchItem where x.PointBatchItemId == pointBatchItemId select x).FirstOrDefault();
if (pointBatchItem != null)
{
if (pointBatchItem.IsBuildTrust != null)
{
pointBatchItem.IsBuildTrust = null;
db.SubmitChanges();
}
}
}
var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId);
if (trustItemList.Count == 0)
{
BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId);
}
PageInfo();
BindGrid();
ShowNotify("退回成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
}
} }
} }
@@ -7,12 +7,10 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PointTrust namespace FineUIPro.Web.HJGL.PointTrust {
{
public partial class TrustBatch public partial class TrustBatch {
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -230,6 +228,15 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// </remarks> /// </remarks>
protected global::FineUIPro.Label lbIsAudit; protected global::FineUIPro.Label lbIsAudit;
/// <summary>
/// btnBack 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnBack;
/// <summary> /// <summary>
/// Button1 控件。 /// Button1 控件。
/// </summary> /// </summary>