Compare commits
No commits in common. "62069ae4b153ec8db9232b07bf2ca538498fae56" and "66f479da9cf40f1dc8cc5d99ac6d577208e3f68b" have entirely different histories.
62069ae4b1
...
66f479da9c
|
@ -42,7 +42,7 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="检测单节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
<f:Tree ID="tvControlItem" ShowHeader="false" Title="检测单节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||||
Height="640px" runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
Height="640px" runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||||
AutoLeafIdentification="true" EnableTextSelection="true">
|
AutoLeafIdentification="true" EnableTextSelection="true" >
|
||||||
</f:Tree>
|
</f:Tree>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
@ -107,23 +107,12 @@
|
||||||
</f:Form>
|
</f:Form>
|
||||||
</Items>
|
</Items>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,HotProessTrust %>"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="检测单明细" EnableCollapse="true"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
|
runat="server" BoxFlex="1" DataKeyNames="NDEItemID" AllowCellEditing="true" AllowColumnLocking="true"
|
||||||
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
|
EnableColumnLines="true" ClicksToEdit="2" DataIDField="NDEItemID" AllowSorting="true"
|
||||||
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
|
SortField="PipelineCode,WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||||
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
|
EnableTextSelection="True">
|
||||||
<Toolbars>
|
|
||||||
<f:Toolbar ID="Toolbar3" Position="Top" ToolbarAlign="Right" runat="server">
|
|
||||||
<Items>
|
|
||||||
<f:TextBox ID="txtIsoNo" Label="<%$ Resources:Lan,PipelineCode %>" runat="server"
|
|
||||||
LabelWidth="120px" LabelAlign="Right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
|
||||||
</f:TextBox>
|
|
||||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
|
||||||
</f:ToolbarFill>
|
|
||||||
</Items>
|
|
||||||
</f:Toolbar>
|
|
||||||
</Toolbars>
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="<%$ Resources:Lan,SerialNumber %>"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="<%$ Resources:Lan,SerialNumber %>"
|
||||||
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
|
@ -143,20 +132,10 @@
|
||||||
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="120px">
|
TextAlign="Center" Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,TrustDate %>" ColumnID="CreatedTime"
|
<f:RenderField HeaderText="<%$ Resources:Lan,TrustDate %>" ColumnID="ProessDate"
|
||||||
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
DataField="ProessDate" SortField="ProessDate" FieldType="Date" Renderer="Date"
|
||||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
|
||||||
</f:RenderField>
|
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
|
||||||
</f:RenderField>
|
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,IsPass %>" ColumnID="StatusText"
|
|
||||||
DataField="StatusText" SortField="status" FieldType="String" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left" Width="100px">
|
|
||||||
</f:RenderField>
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||||
|
|
|
@ -8,7 +8,6 @@ using System.Web;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using Model;
|
using Model;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||||
using FineUIPro.Web.common.ProjectSet;
|
|
||||||
|
|
||||||
namespace FineUIPro.Web.WeldingProcess.PMI
|
namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
|
@ -49,6 +48,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(this.txtNDEDateMonth.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtNDEDateMonth.Text.Trim()))
|
||||||
{
|
{
|
||||||
|
DateTime startTime = Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01");
|
||||||
|
DateTime endTime = startTime.AddMonths(1);
|
||||||
this.tvControlItem.Nodes.Clear();
|
this.tvControlItem.Nodes.Clear();
|
||||||
List<Model.Base_Unit> units = new List<Model.Base_Unit>();
|
List<Model.Base_Unit> units = new List<Model.Base_Unit>();
|
||||||
Model.Project_Unit pUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
|
Model.Project_Unit pUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
|
||||||
|
@ -95,20 +96,30 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// <param name="node"></param>
|
/// <param name="node"></param>
|
||||||
private void BindNodes(TreeNode node)
|
private void BindNodes(TreeNode node)
|
||||||
{
|
{
|
||||||
DateTime startTime = Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01");
|
|
||||||
DateTime endTime = startTime.AddMonths(1);
|
|
||||||
string searchCode = this.txtSearchCode.Text.Trim();
|
|
||||||
if (node.ToolTip == "Unit")
|
if (node.ToolTip == "Unit")
|
||||||
{
|
{
|
||||||
string unitId = node.NodeID;
|
///装置
|
||||||
var ndt = from x in Funs.DB.PMI_Delegation
|
var install = (from x in Funs.DB.Project_Installation
|
||||||
where x.UnitId == unitId
|
join y in Funs.DB.PMI_Delegation on x.InstallationId equals y.InstallationId
|
||||||
&& x.ProjectId == this.CurrUser.LoginProjectId
|
where y.UnitId == node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
&& x.DelegationDate >= startTime && x.DelegationDate <= endTime
|
orderby x.InstallationCode
|
||||||
&&( x.DelegationNo.Contains(searchCode)|| searchCode=="")
|
select x).Distinct();
|
||||||
select x;
|
foreach (var q in install)
|
||||||
//if (!string.IsNullOrWhiteSpace(searchCode))
|
{
|
||||||
// ndt = ndt.Where(q => q.DelegationNo.Contains(searchCode));
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = q.InstallationName;
|
||||||
|
newNode.NodeID = q.InstallationId + "|" + node.NodeID;
|
||||||
|
newNode.ToolTip = "Installation";
|
||||||
|
node.Nodes.Add(newNode);
|
||||||
|
BindNodes(newNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (node.ToolTip == "Installation")
|
||||||
|
{
|
||||||
|
string[] unitAndInstallationArr= node.NodeID.Split('|');
|
||||||
|
var ndt = from x in Funs.DB.PMI_Delegation where x.UnitId == unitAndInstallationArr[1]
|
||||||
|
&& x.InstallationId == unitAndInstallationArr[0]
|
||||||
|
&& x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||||
foreach (var q in ndt)
|
foreach (var q in ndt)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -151,51 +162,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(this.hdPMIId.Text) && this.tvControlItem.SelectedNode.ToolTip == "DelegationNo")
|
if (!string.IsNullOrWhiteSpace(this.hdPMIId.Text) && this.tvControlItem.SelectedNode.ToolTip == "DelegationNo")
|
||||||
{
|
{
|
||||||
string strSql = string.Empty;
|
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
||||||
this.SetTextTemp();
|
this.SetTextTemp();
|
||||||
this.PageInfoLoad(); ///页面输入提交信息
|
this.PageInfoLoad(); ///页面输入提交信息
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
|
||||||
{
|
|
||||||
var result = Funs.DB.PMI_Delegation.FirstOrDefault(t => t.Id == this.tvControlItem.SelectedNodeID);
|
|
||||||
if (result != null)
|
|
||||||
{
|
|
||||||
this.PMIID = result.Id;
|
|
||||||
strSql = @"SELECT *,
|
|
||||||
(case status when 0 then '合格' else '不合格' end) StatusText
|
|
||||||
FROM [View_PMI_DelegationDetails] WHERE ProjectId= @ProjectId AND PMIID=@PMIDelegationId ";
|
|
||||||
|
|
||||||
listStr.Add(new SqlParameter("@ProjectId", result != null ? result.ProjectId : this.CurrUser.LoginProjectId));
|
|
||||||
listStr.Add(new SqlParameter("@PMIDelegationId", this.PMIID));
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
|
|
||||||
{
|
|
||||||
strSql += @" and PipelineCode like '%'+@PipelineCode+'%' ";
|
|
||||||
listStr.Add(new SqlParameter("@PipelineCode", this.txtIsoNo.Text.Trim()));
|
|
||||||
}
|
|
||||||
|
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
|
||||||
// 2.获取当前分页数据
|
|
||||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
|
||||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
|
||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
|
||||||
Grid1.DataSource = table;
|
|
||||||
Grid1.DataBind();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string StatusText(int status) {
|
|
||||||
if (status == 0)
|
|
||||||
return "合格";
|
|
||||||
else
|
|
||||||
return "不合格";
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 加载页面输入提交信息
|
#region 加载页面输入提交信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面输入提交信息
|
/// 加载页面输入提交信息
|
||||||
|
@ -213,10 +185,9 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
DelegationDate=x.DelegationDate,
|
DelegationDate=x.DelegationDate,
|
||||||
InstallationName=n.InstallationName,
|
InstallationName=n.InstallationName,
|
||||||
UnitName=y.UnitName,
|
UnitName=y.UnitName,
|
||||||
DetectionMethod="PMI光谱分析",
|
DetectionMethod="待定",
|
||||||
Tabler=x.Tabler,
|
Tabler=x.Tabler,
|
||||||
Remark=x.Remark,
|
Remark=x.Remark,
|
||||||
DetectionStandard=x.DetectionStandard,
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
if (pageInfo.Count>0)
|
if (pageInfo.Count>0)
|
||||||
{
|
{
|
||||||
|
@ -227,7 +198,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
|
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
|
||||||
this.txtTabler.Text = pageInfo[0].Tabler;
|
this.txtTabler.Text = pageInfo[0].Tabler;
|
||||||
this.txtRemark.Text = pageInfo[0].Remark;
|
this.txtRemark.Text = pageInfo[0].Remark;
|
||||||
this.txtDetectionStandard.Text= pageInfo[0].DetectionStandard;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -244,7 +214,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
this.txtDetectionMethod.Text = string.Empty;
|
this.txtDetectionMethod.Text = string.Empty;
|
||||||
this.txtTabler.Text = string.Empty;
|
this.txtTabler.Text = string.Empty;
|
||||||
this.txtRemark.Text = string.Empty;
|
this.txtRemark.Text = string.Empty;
|
||||||
this.txtDetectionStandard.Text = string.Empty;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -221,33 +221,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Toolbar3 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Toolbar Toolbar3;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtIsoNo 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.TextBox txtIsoNo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToolbarFill2 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue