feat:增加焊前管理,材料管理条码扫码接口,材料信息导入支持无炉批号/有炉批号 多种导入方式
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CuttingCheck.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreWeld.CuttingCheck" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>下料抽检记录台账</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="下料抽检记录台账"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CuttingCheckId"
|
||||
DataIDField="CuttingCheckId" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
|
||||
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
|
||||
Width="260px" LabelWidth="90px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号" EmptyText="输入查询条件"
|
||||
Width="260px" LabelWidth="90px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" Text="查询" Icon="SystemSearch" EnablePostBack="true"
|
||||
OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="220px" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String"
|
||||
HeaderText="管线号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="WeldJointCode" DataField="WeldJointCode" FieldType="String"
|
||||
HeaderText="焊口号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="150px" ColumnID="IsMaterialCodeBatchNoAccurate" DataField="IsMaterialCodeBatchNoAccurate"
|
||||
HeaderText="材料准确" HeaderTextAlign="Center" TextAlign="Center" RenderAsStaticField="true">
|
||||
</f:CheckBoxField>
|
||||
<f:CheckBoxField Width="170px" ColumnID="IsMaterialQuantityAccurate" DataField="IsMaterialQuantityAccurate"
|
||||
HeaderText="材料数量准确" HeaderTextAlign="Center" TextAlign="Center" RenderAsStaticField="true">
|
||||
</f:CheckBoxField>
|
||||
<f:RenderField Width="120px" ColumnID="CheckPersonName" DataField="CheckPersonName" FieldType="String"
|
||||
HeaderText="检查人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="170px" ColumnID="CheckTime" DataField="CheckTime" FieldType="Date"
|
||||
RendererArgument="yyyy-MM-dd HH:mm" HeaderText="检查时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="120px" ColumnID="IsQualified" DataField="IsQualified"
|
||||
HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Center" RenderAsStaticField="true">
|
||||
</f:CheckBoxField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="下料抽检" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="720px" Height="420px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class CuttingCheck : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
var result = PreWeldInspectionService.GetCuttingCheckList(
|
||||
CurrUser.LoginProjectId,
|
||||
txtPipelineCode.Text.Trim(),
|
||||
txtWeldJointCode.Text.Trim(),
|
||||
Grid1.PageIndex,
|
||||
Grid1.PageSize);
|
||||
Grid1.RecordCount = result.Item2;
|
||||
Grid1.DataSource = result.Item1;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = 0;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldCuttingCheckMenuId, Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference("CuttingCheckEdit.aspx"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldCuttingCheckMenuId, Const.BtnModify))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("CuttingCheckEdit.aspx?CuttingCheckId={0}", Grid1.SelectedRowID)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
|
||||
|
||||
public partial class CuttingCheck
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CuttingCheckEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreWeld.CuttingCheckEdit" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑下料抽检</title>
|
||||
<base target="_self" />
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldJoint" runat="server" Label="焊口" Required="true"
|
||||
ShowRedStar="true" LabelWidth="170px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="chkMaterialCodeBatchNo" runat="server" Label="材料编码及炉批号校验"
|
||||
LabelWidth="170px">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="chkMaterialQuantity" runat="server" Label="材料数量校验"
|
||||
LabelWidth="170px">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="dpCheckTime" runat="server" Label="检查时间" LabelWidth="170px"
|
||||
DateFormatString="yyyy-MM-dd">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Text="保存" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,92 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class CuttingCheckEdit : PageBase
|
||||
{
|
||||
public string CuttingCheckId
|
||||
{
|
||||
get { return (string)ViewState["CuttingCheckId"]; }
|
||||
set { ViewState["CuttingCheckId"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
CuttingCheckId = Request.Params["CuttingCheckId"];
|
||||
BindWeldJoint();
|
||||
if (!string.IsNullOrEmpty(CuttingCheckId))
|
||||
{
|
||||
BindData();
|
||||
}
|
||||
else
|
||||
{
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BindWeldJoint()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var data = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == CurrUser.LoginProjectId
|
||||
orderby x.PipelineCode, x.WeldJointCode
|
||||
select new
|
||||
{
|
||||
x.WeldJointId,
|
||||
WeldJointName = x.PipelineCode + " / " + x.WeldJointCode
|
||||
}).ToList();
|
||||
drpWeldJoint.DataTextField = "WeldJointName";
|
||||
drpWeldJoint.DataValueField = "WeldJointId";
|
||||
drpWeldJoint.DataSource = data;
|
||||
drpWeldJoint.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
var model = PreWeldInspectionService.GetCuttingCheckById(CuttingCheckId);
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
drpWeldJoint.SelectedValue = model.WeldJointId;
|
||||
chkMaterialCodeBatchNo.Checked = model.IsMaterialCodeBatchNoAccurate;
|
||||
chkMaterialQuantity.Checked = model.IsMaterialQuantityAccurate;
|
||||
dpCheckTime.SelectedDate = model.CheckTime;
|
||||
txtRemark.Text = model.Remark;
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldCuttingCheckMenuId, Const.BtnSave))
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var item = new Model.PreWeldCuttingCheckItem
|
||||
{
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldJointId = drpWeldJoint.SelectedValue,
|
||||
IsMaterialCodeBatchNoAccurate = chkMaterialCodeBatchNo.Checked,
|
||||
IsMaterialQuantityAccurate = chkMaterialQuantity.Checked,
|
||||
CheckPerson = CurrUser.PersonId,
|
||||
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
|
||||
CreateUser = CurrUser.PersonId,
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
APIPreWeldInspectionService.SaveCuttingCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
|
||||
|
||||
public partial class CuttingCheckEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldJoint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldJoint;
|
||||
|
||||
/// <summary>
|
||||
/// chkMaterialCodeBatchNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox chkMaterialCodeBatchNo;
|
||||
|
||||
/// <summary>
|
||||
/// chkMaterialQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox chkMaterialQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// dpCheckTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpCheckTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FitupCheck.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreWeld.FitupCheck" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>组对抽检列表台账</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组对抽检列表台账"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
|
||||
DataIDField="WeldJointId" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
|
||||
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
|
||||
Width="260px" LabelWidth="90px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号" EmptyText="输入查询条件"
|
||||
Width="260px" LabelWidth="90px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" Text="查询" Icon="SystemSearch" EnablePostBack="true"
|
||||
OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="220px" ColumnID="PipelineCode" DataField="PipelineCode" FieldType="String"
|
||||
HeaderText="管线号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="WeldJointCode" DataField="WeldJointCode" FieldType="String"
|
||||
HeaderText="焊口号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="GrooveTypeCode" DataField="GrooveTypeCode" FieldType="String"
|
||||
HeaderText="坡口类型" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="170px" ColumnID="GrooveProcessType" DataField="GrooveProcessType" FieldType="String"
|
||||
HeaderText="坡口加工类型" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="GrooveAngle" DataField="GrooveAngle" FieldType="Double"
|
||||
HeaderText="坡口角度" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="FitupGap" DataField="FitupGap" FieldType="Double"
|
||||
HeaderText="组对间隙" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Misalignment" DataField="Misalignment" FieldType="Double"
|
||||
HeaderText="错边量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="组对抽检" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="760px" Height="520px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class FitupCheck : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
var result = PreWeldInspectionService.GetFitupCheckList(
|
||||
CurrUser.LoginProjectId,
|
||||
txtPipelineCode.Text.Trim(),
|
||||
txtWeldJointCode.Text.Trim(),
|
||||
Grid1.PageIndex,
|
||||
Grid1.PageSize);
|
||||
Grid1.RecordCount = result.Item2;
|
||||
Grid1.DataSource = result.Item1;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = 0;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldFitupCheckMenuId, Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference("FitupCheckEdit.aspx"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldFitupCheckMenuId, Const.BtnModify))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("FitupCheckEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
|
||||
|
||||
public partial class FitupCheck
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FitupCheckEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreWeld.FitupCheckEdit" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑组对抽检</title>
|
||||
<base target="_self" />
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldJoint" runat="server" Label="焊口" Required="true"
|
||||
ShowRedStar="true" LabelWidth="170px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpGrooveType" runat="server" Label="坡口类型" Required="true"
|
||||
ShowRedStar="true" LabelWidth="170px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtGrooveProcessType" runat="server" Label="坡口加工类型" LabelWidth="170px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numGrooveAngle" runat="server" Label="坡口角度" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numFitupGap" runat="server" Label="组对间隙" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="numMisalignment" runat="server" Label="错边量" LabelWidth="170px" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="dpCheckTime" runat="server" Label="检查时间" LabelWidth="170px"
|
||||
DateFormatString="yyyy-MM-dd">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="500" LabelWidth="170px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Text="保存" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,133 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class FitupCheckEdit : PageBase
|
||||
{
|
||||
public string WeldJointId
|
||||
{
|
||||
get { return (string)ViewState["WeldJointId"]; }
|
||||
set { ViewState["WeldJointId"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
WeldJointId = Request.Params["WeldJointId"];
|
||||
BindWeldJoint();
|
||||
BindGrooveType();
|
||||
if (!string.IsNullOrEmpty(WeldJointId))
|
||||
{
|
||||
BindData();
|
||||
}
|
||||
else
|
||||
{
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BindWeldJoint()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var data = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == CurrUser.LoginProjectId
|
||||
orderby x.PipelineCode, x.WeldJointCode
|
||||
select new
|
||||
{
|
||||
x.WeldJointId,
|
||||
WeldJointName = x.PipelineCode + " / " + x.WeldJointCode
|
||||
}).ToList();
|
||||
drpWeldJoint.DataTextField = "WeldJointName";
|
||||
drpWeldJoint.DataValueField = "WeldJointId";
|
||||
drpWeldJoint.DataSource = data;
|
||||
drpWeldJoint.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindGrooveType()
|
||||
{
|
||||
drpGrooveType.DataTextField = "BaseInfoName";
|
||||
drpGrooveType.DataValueField = "BaseInfoId";
|
||||
drpGrooveType.DataSource = APIBaseInfoService.getGrooveType();
|
||||
drpGrooveType.DataBind();
|
||||
}
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
var model = PreWeldInspectionService.GetFitupCheckByWeldJointId(WeldJointId);
|
||||
var weldJoint = APIPreWeldInspectionService.GetPreWeldJointByWeldJointId(WeldJointId);
|
||||
if (weldJoint != null)
|
||||
{
|
||||
drpWeldJoint.SelectedValue = weldJoint.WeldJointId;
|
||||
drpWeldJoint.Enabled = false;
|
||||
drpGrooveType.SelectedValue = weldJoint.GrooveTypeId;
|
||||
txtGrooveProcessType.Text = weldJoint.GrooveProcessType;
|
||||
if (weldJoint.GrooveAngle.HasValue)
|
||||
{
|
||||
numGrooveAngle.Text = weldJoint.GrooveAngle.Value.ToString();
|
||||
}
|
||||
if (weldJoint.FitupGap.HasValue)
|
||||
{
|
||||
numFitupGap.Text = weldJoint.FitupGap.Value.ToString();
|
||||
}
|
||||
if (weldJoint.Misalignment.HasValue)
|
||||
{
|
||||
numMisalignment.Text = weldJoint.Misalignment.Value.ToString();
|
||||
}
|
||||
}
|
||||
if (model != null)
|
||||
{
|
||||
drpGrooveType.SelectedValue = model.GrooveTypeId;
|
||||
txtGrooveProcessType.Text = model.GrooveProcessType;
|
||||
if (model.GrooveAngle.HasValue)
|
||||
{
|
||||
numGrooveAngle.Text = model.GrooveAngle.Value.ToString();
|
||||
}
|
||||
if (model.FitupGap.HasValue)
|
||||
{
|
||||
numFitupGap.Text = model.FitupGap.Value.ToString();
|
||||
}
|
||||
if (model.Misalignment.HasValue)
|
||||
{
|
||||
numMisalignment.Text = model.Misalignment.Value.ToString();
|
||||
}
|
||||
dpCheckTime.SelectedDate = model.CheckTime;
|
||||
txtRemark.Text = model.Remark;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldFitupCheckMenuId, Const.BtnSave))
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var item = new Model.PreWeldFitupCheckItem
|
||||
{
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldJointId = drpWeldJoint.SelectedValue,
|
||||
GrooveTypeId = drpGrooveType.SelectedValue,
|
||||
GrooveProcessType = txtGrooveProcessType.Text.Trim(),
|
||||
GrooveAngle = string.IsNullOrWhiteSpace(numGrooveAngle.Text) ? (decimal?)null : Convert.ToDecimal(numGrooveAngle.Text),
|
||||
FitupGap = string.IsNullOrWhiteSpace(numFitupGap.Text) ? (decimal?)null : Convert.ToDecimal(numFitupGap.Text),
|
||||
Misalignment = string.IsNullOrWhiteSpace(numMisalignment.Text) ? (decimal?)null : Convert.ToDecimal(numMisalignment.Text),
|
||||
CheckPerson = CurrUser.PersonId,
|
||||
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
|
||||
CreateUser = CurrUser.PersonId,
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
APIPreWeldInspectionService.SaveFitupCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
|
||||
|
||||
public partial class FitupCheckEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldJoint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldJoint;
|
||||
|
||||
/// <summary>
|
||||
/// drpGrooveType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpGrooveType;
|
||||
|
||||
/// <summary>
|
||||
/// txtGrooveProcessType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGrooveProcessType;
|
||||
|
||||
/// <summary>
|
||||
/// numGrooveAngle 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numGrooveAngle;
|
||||
|
||||
/// <summary>
|
||||
/// numFitupGap 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numFitupGap;
|
||||
|
||||
/// <summary>
|
||||
/// numMisalignment 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox numMisalignment;
|
||||
|
||||
/// <summary>
|
||||
/// dpCheckTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpCheckTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
<f:ListItem Text="补充导入" Value="0" />
|
||||
<f:ListItem Text="更新导入" Value="1" />
|
||||
</f:DropDownList>
|
||||
<f:CheckBox ID="ckIncludeBatch" runat="server" Label="导入类别" Text="是否包含炉批号" Checked="false">
|
||||
</f:CheckBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
|
||||
@@ -117,8 +117,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.PipelineMatTemplateUrl;
|
||||
string filePath = Const.PipelineMatTemplateUrl;
|
||||
string filePath = ckIncludeBatch.Checked ? Const.PipelineMatWithBatchTemplateUrl : Const.PipelineMatTemplateUrl;
|
||||
string uploadfilepath = rootPath + filePath;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
@@ -137,8 +137,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
List<string> result = new List<string>();
|
||||
bool includeBatch = ckIncludeBatch.Checked;
|
||||
int minColumnCount = includeBatch ? 7 : 5;
|
||||
|
||||
if (count < 5)
|
||||
matList.Clear();
|
||||
if (count < minColumnCount)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列";
|
||||
@@ -204,14 +207,38 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (pds[i].D != null && !string.IsNullOrEmpty(pds[i].D.ToString()))
|
||||
{
|
||||
string materialCode = pds[i].D.ToString().Trim();
|
||||
var lib = from x in Funs.DB.HJGL_MaterialCodeLib where x.Code == materialCode select x;
|
||||
if (lib.Count() > 0)
|
||||
item.MaterialCode2 = materialCode;
|
||||
if (includeBatch)
|
||||
{
|
||||
item.MaterialCode2 = materialCode;
|
||||
string heatNo = pds[i].F == null ? string.Empty : pds[i].F.ToString().Trim();
|
||||
string batchNo = pds[i].G == null ? string.Empty : pds[i].G.ToString().Trim();
|
||||
if (string.IsNullOrEmpty(heatNo))
|
||||
{
|
||||
result.Add((i + 2) + "Line, [炉号] 不能为空</br>");
|
||||
}
|
||||
if (string.IsNullOrEmpty(batchNo))
|
||||
{
|
||||
result.Add((i + 2) + "Line, [批号] 不能为空</br>");
|
||||
}
|
||||
|
||||
string mainMaterialCode = materialCode + "-" + heatNo + "-" + batchNo;
|
||||
var lib = from x in Funs.DB.HJGL_MaterialCodeLib where x.MaterialCode == mainMaterialCode select x;
|
||||
if (lib.Count() > 0)
|
||||
{
|
||||
item.MaterialCode = lib.First().MaterialCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add("第" + (i + 2).ToString() + "行,材料编码库不存在此材料主编码-" + mainMaterialCode + "</br>");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add("第" + (i + 2).ToString() + "行,材料编码库不存在此材料编码-" + materialCode + "</br>");
|
||||
var lib = from x in Funs.DB.HJGL_MaterialCodeLib where x.Code == materialCode select x;
|
||||
if (lib.Count() == 0)
|
||||
{
|
||||
result.Add("第" + (i + 2).ToString() + "行,材料编码库不存在此材料编码-" + materialCode + "</br>");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -252,7 +279,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
// result.Add((i + 2) + "Line, [预制组件] 不能为空</br>");
|
||||
}
|
||||
}
|
||||
var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode2 == item.MaterialCode2 && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents);
|
||||
var model = includeBatch
|
||||
? matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents)
|
||||
: matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode2 == item.MaterialCode2 && x.WeldJointId == item.WeldJointId && x.PrefabricatedComponents == item.PrefabricatedComponents);
|
||||
if (model.Count() == 0)
|
||||
{
|
||||
matList.Add(item);
|
||||
@@ -488,6 +517,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
&& x.WeldJointId == item.WeldJointId
|
||||
&& x.PipelineId == item.PipelineId
|
||||
&& x.PrefabricatedComponents == item.PrefabricatedComponents
|
||||
&& (string.IsNullOrEmpty(item.MaterialCode) || x.MaterialCode == item.MaterialCode)
|
||||
select x;
|
||||
if (pipeLineMat.Count() == 0 || pipeLineMat == null)
|
||||
{
|
||||
|
||||
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DrpType;
|
||||
|
||||
/// <summary>
|
||||
/// ckIncludeBatch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIncludeBatch;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user