20250624 委托退回

This commit is contained in:
毕文静 2025-06-24 14:56:11 +08:00
parent 8816de937f
commit 3e35d00626
3 changed files with 129 additions and 68 deletions

View File

@ -19,18 +19,18 @@
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
</f:DropDownList>
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
</f:DropDownList>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件"
AutoPostBack="true" Label="焊工号" LabelWidth="90px"
OnTextChanged="Tree_TextChanged" Width="300px" LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
<Items>
<f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件"
AutoPostBack="true" Label="焊工号" LabelWidth="90px"
OnTextChanged="Tree_TextChanged" Width="300px" LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtTrustDateMonth" runat="server" Label="月份"
@ -65,7 +65,7 @@
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right" Hidden="true">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server" >
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAudit" Text="审核" ToolTip="审核后才可进行检测" Icon="Accept" runat="server"
OnClick="btnAudit_Click" Hidden="true">
@ -75,7 +75,7 @@
</f:Button>--%>
<f:Button ID="btnDelete" Text="删除" Icon="Delete" runat="server" Hidden="true"
OnClick="btnDelete_Click">
</f:Button>
</f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click" Hidden="true">
</f:Button>
@ -105,16 +105,18 @@
<f:Label ID="lbNDEUnit" Label="检测单位" runat="server"
LabelWidth="170px" LabelAlign="Right">
</f:Label>
<f:Label ID="lbIsTrust" Label="是否委托" runat="server"
LabelWidth="105px" LabelAlign="Right">
</f:Label>
<f:Label ID="lbIsAudit" Label="是否审核" runat="server" Hidden="true"
LabelWidth="105px" LabelAlign="Right">
</f:Label>
<f:Button ID="Button1" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click" >
</f:Button>
<f:Button ID="btnBack" Text="退回" Icon="ArrowLeft" runat="server" OnClick="btnBack_Click">
</f:Button>
<f:Button ID="Button1" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows>
@ -126,7 +128,7 @@
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
DataIDField="PointBatchItemId" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
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>
<f:RenderField Width="160px" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String"
HeaderText="管线号" HeaderTextAlign="Center" TextAlign="Left"
@ -190,8 +192,8 @@
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1050px" Height="650px">
</f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
<f:Menu ID="Menu1" runat="server">

View File

@ -630,13 +630,13 @@ namespace FineUIPro.Web.HJGL.PointTrust
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
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
select joint.WeldingMethodCode).Distinct().ToList();
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
where batch.TrustBatchId == trust.TrustBatchId
select joint.WeldingMethodCode).Distinct().ToList();
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
where batch.TrustBatchId == trust.TrustBatchId
select joint.GrooveTypeCode).Distinct().ToList();
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
where batch.TrustBatchId == trust.TrustBatchId
select joint.GrooveTypeCode).Distinct().ToList();
if (trust != null)
{
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);
}
@ -677,7 +677,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
var list = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(trust.DetectionRateId);
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
/// <summary>
/// 判断是否可以删除
@ -1026,5 +1023,60 @@ namespace FineUIPro.Web.HJGL.PointTrust
}
}
#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;
}
}
}
}

View File

@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PointTrust
{
public partial class TrustBatch
{
namespace FineUIPro.Web.HJGL.PointTrust {
public partial class TrustBatch {
/// <summary>
/// form1 控件。
/// </summary>
@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpUnit 控件。
/// </summary>
@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// Toolbar4 控件。
/// </summary>
@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// txtWelderCode 控件。
/// </summary>
@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWelderCode;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTrustDateMonth 控件。
/// </summary>
@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTrustDateMonth;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAudit 控件。
/// </summary>
@ -148,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnDelete 控件。
/// </summary>
@ -157,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// btnPrint 控件。
/// </summary>
@ -166,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -175,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtTrustBatchCode 控件。
/// </summary>
@ -184,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTrustBatchCode;
/// <summary>
/// txtTrustDate 控件。
/// </summary>
@ -193,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTrustDate;
/// <summary>
/// txtDetectionTypeCode 控件。
/// </summary>
@ -202,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtDetectionTypeCode;
/// <summary>
/// lbNDEUnit 控件。
/// </summary>
@ -211,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbNDEUnit;
/// <summary>
/// lbIsTrust 控件。
/// </summary>
@ -220,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbIsTrust;
/// <summary>
/// lbIsAudit 控件。
/// </summary>
@ -229,7 +227,16 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbIsAudit;
/// <summary>
/// btnBack 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnBack;
/// <summary>
/// Button1 控件。
/// </summary>
@ -238,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -247,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -256,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -265,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -274,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@ -283,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@ -292,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -301,7 +308,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnPointAudit 控件。
/// </summary>