20220923 焊接终版测试修改

This commit is contained in:
2022-09-23 22:29:48 +08:00
parent 08c2646ef1
commit 5e4a7de2ac
18 changed files with 1521 additions and 126 deletions
@@ -43,7 +43,7 @@
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Text="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置查询" Text="重置查询" Icon="ArrowUndo" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnNew" Icon="Add" Text="新增" EnablePostBack="true" Hidden="true"
runat="server">
@@ -119,7 +119,7 @@
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="材料信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
<f:Window ID="Window1" Title="附件上传" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="800px" Height="460px">
</f:Window>
@@ -41,20 +41,40 @@
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtPipelineComponentCode" runat="server" Label="组件编号"
EmptyText="输入查询条件"
Width="240px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:DropDownList ID="drpState" Label="组件状态" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
</f:Button>
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnDelete" OnClick="btnDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
Text="删除" Icon="Delete">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImportQRCode" Text="导入二维码信息" ToolTip="导入二维码信息" Icon="PackageIn" runat="server" OnClick="btnImportQRCode_Click">
</f:Button>
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
runat="server" OnClick="btnBatchAdd_Click">
</f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="btnDelete" OnClick="btnDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
Text="删除" Icon="Delete">
<f:Button ID="btnSinglePreview" ToolTip="管道预制加工图" Icon="PageRed" Text="管道预制加工图"
EnablePostBack="true" OnClick="btnSinglePreview_Click" runat="server">
</f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -99,6 +119,10 @@
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
@@ -131,6 +155,10 @@
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
<f:Window ID="Window4" Title="管道预制加工图" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="false" EnableDrag="false" AutoScroll="true"
Width="800px" Height="600px">
</f:Window>
</form>
<script type="text/javascript">
@@ -17,6 +17,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
HJGL_PipelineComponentService.InitMainItemDownList(drpState,true);
}
}
@@ -158,17 +161,30 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
com.QRCode,com.State,pipe.PlanStartDate
com.QRCode,com.State,pipe.PlanStartDate,com.DrawingName
FROM HJGL_Pipeline_Component com
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
WHERE 1= 1";
WHERE com.PipelineId =@PipelineId ";
List<SqlParameter> listStr = new List<SqlParameter> { };
strSql += " AND com.PipelineId =@PipelineId";
// strSql += " AND com.PipelineId =@PipelineId";
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
{
strSql += " AND com.PipelineComponentCode like @PipelineComponentCode";
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
}
if (drpState.SelectedValue!=Const._Null)
{
strSql += " AND com.State =@State";
listStr.Add(new SqlParameter("@State", drpState.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -390,6 +406,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
#endregion
/// <summary>
/// 搜索
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
public string ConvertImageUrlByImage(object str, object id)
{
string path = string.Empty;
@@ -423,5 +448,32 @@ namespace FineUIPro.Web.HJGL.PreDesign
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
}
protected void btnSinglePreview_Click(object sender, EventArgs e)
{
//string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf";
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
var id = Grid1.SelectedRowID;
if (string.IsNullOrEmpty(id))
{
ShowNotify("请选择相对应的图纸", MessageBoxIcon.Warning);
return;
}
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, this.CurrUser.LoginProjectId);
if (filemodel != null)
{
string httpUrl = filemodel.FilePath;
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
}
else
{
ShowNotify("请上传相关图纸", MessageBoxIcon.Warning);
return;
}
}
}
}
@@ -104,6 +104,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtPipelineComponentCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipelineComponentCode;
/// <summary>
/// drpState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpState;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -122,6 +140,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnImportQRCode 控件。
/// </summary>
@@ -140,6 +194,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Button btnBatchAdd;
/// <summary>
/// btnSinglePreview 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSinglePreview;
/// <summary>
/// btnPrint 控件。
/// </summary>
@@ -149,15 +212,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -238,5 +292,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window3;
/// <summary>
/// Window4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window4;
}
}
@@ -52,15 +52,28 @@
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:WindowField ColumnID="PipelineComponentCode" HeaderTextAlign="Center" TextAlign="Left"
<f:TemplateField ColumnID="PipelineId" Width="180px" HeaderText="管线号" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertPipelineId(Eval("PipelineId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="PipelineComponentCode" DataField="PipelineComponentCode" SortField="PipelineComponentCode"
FieldType="String" HeaderText="组件编号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<%-- <f:WindowField ColumnID="PipelineComponentCode" HeaderTextAlign="Center" TextAlign="Left"
Width="180px" WindowID="Window1" HeaderText="组件编号" DataTextField="PipelineComponentCode"
DataIFrameUrlFields="PipelineComponentId" DataIFrameUrlFormatString="PrePipelineEdit.aspx?PipelineComponentId={0}"
Title="组件编号" DataToolTipField="PipelineComponentCode" SortField="PipelineComponentCode"
Locked="true">
</f:WindowField>
</f:WindowField> --%>
<f:RenderField Width="200px" ColumnID="QRCode" DataField="QRCode" SortField="QRCode"
FieldType="String" HeaderText="物流箱号" HeaderTextAlign="Center"
FieldType="String" HeaderText="二维码信息" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
@@ -221,12 +221,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
var dt = pds.AsEnumerable()
.GroupBy(x => new {
pipelinecode = x.Field<string>("管线号"),
PipelineComponentCode = x.Field<string>("预制组件")
PipelineComponentCode = x.Field<string>("预制组件"),
DrawingName = x.Field<string>("预制图纸名称"),
})
.Select(x => new
{
pipelinecode = x.Key.pipelinecode,
PipelineComponentCode = x.Key.PipelineComponentCode,
DrawingName = x.Key.DrawingName,
QRCode = String.Join("&", x.Select(z => z.Field<string>("二维码信息")))
});
foreach (var item in dt)
@@ -244,6 +246,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
rootName.QRCode.Add(qRCodeQRCodeItem);
}
hJGL_Pipeline_Component.QRCode = JsonConvert.SerializeObject(rootName);
hJGL_Pipeline_Component.DrawingName = item.DrawingName;
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
}
errorInfos = string.Empty;
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// lbImageUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>