材料表识别
This commit is contained in:
parent
eeae7d2252
commit
1b9844a395
|
|
@ -1119,6 +1119,7 @@
|
|||
<Content Include="HJGL\CheckManage\TestingReportSelect.aspx" />
|
||||
<Content Include="HJGL\CheckManage\UTReportEdit.aspx" />
|
||||
<Content Include="HJGL\DataIn\DataIn.aspx" />
|
||||
<Content Include="HJGL\DataIn\DrawingRecognitionContentEdit.aspx" />
|
||||
<Content Include="HJGL\DataIn\DataInEdit.aspx" />
|
||||
<Content Include="HJGL\DataIn\DrawingRecognitionContent.aspx" />
|
||||
<Content Include="HJGL\DataIn\JointIn.aspx" />
|
||||
|
|
@ -5620,6 +5621,13 @@
|
|||
<Compile Include="HJGL\DataIn\DataIn.aspx.designer.cs">
|
||||
<DependentUpon>DataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\DataIn\DrawingRecognitionContentEdit.aspx.cs">
|
||||
<DependentUpon>DrawingRecognitionContentEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\DataIn\DrawingRecognitionContentEdit.aspx.designer.cs">
|
||||
<DependentUpon>DrawingRecognitionContentEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\DataIn\DataInEdit.aspx.cs">
|
||||
<DependentUpon>DataInEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"> </f:ToolbarFill>
|
||||
<f:Button ID="Button1" runat="server" Text="审核材料表"
|
||||
OnClick="btnSave1_Click" >
|
||||
<f:Button ID="btnAudit" runat="server" Text="审核材料表"
|
||||
OnClick="btnAudit_Click" >
|
||||
</f:Button>
|
||||
<f:Button ID="Button2" runat="server" Text="保存材料表" Hidden="true"
|
||||
<f:Button ID="btnSave" runat="server" Text="保存材料表" Hidden="true"
|
||||
OnClick="btnSave_Click" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<div id="app"></div>
|
||||
</f:ContentPanel>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="" EnableCollapse="true" Hidden="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="id" EnableColumnLines="true" DataIDField="id"
|
||||
runat="server" BoxFlex="1" DataKeyNames="id" EnableColumnLines="true" DataIDField="id" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" AllowColumnLocking="true">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||
|
|
@ -69,7 +69,10 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1200px" Height="500px">
|
||||
</f:Window>
|
||||
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using UglyToad.PdfPig.Writer;
|
|||
|
||||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
public partial class DrawingRecognitionContent : System.Web.UI.Page
|
||||
public partial class DrawingRecognitionContent : PageBase
|
||||
{
|
||||
public string URL
|
||||
{
|
||||
|
|
@ -106,18 +106,12 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
|
||||
}
|
||||
|
||||
protected void btnSave1_Click(object sender, EventArgs e)
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.Hidden = false;
|
||||
contentPanel1.Hidden = true;
|
||||
Button2.Hidden = false;
|
||||
Button1.Hidden = true;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
btnAudit.Hidden = true;
|
||||
btnSave.Hidden = false;
|
||||
JObject jobject = JObject.Parse(resultdata.Value);
|
||||
JArray jArray = jobject.Value<JArray>("material_rows");
|
||||
dt = new DataTable();
|
||||
|
|
@ -132,7 +126,6 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
dt.Columns.Add("page_no");
|
||||
dt.Columns.Add("remark");
|
||||
|
||||
|
||||
// 遍历并提取数据
|
||||
foreach (JObject item in jArray)
|
||||
{
|
||||
|
|
@ -149,11 +142,48 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
row["remark"] = item.Value<string>("remark");
|
||||
dt.Rows.Add(row);
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
}
|
||||
#region 双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_DataInMenuId, Const.BtnAdd))
|
||||
{
|
||||
DrawingRecognitionContentEdit.dicDt.Add(CurrUser.UserId, dt);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrawingRecognitionContentEdit.aspx?Index={0}", Grid1.SelectedRowIndex, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,22 +69,22 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// Button1 控件。
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button1;
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// Button2 控件。
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button2;
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// contentPanel1 控件。
|
||||
|
|
@ -103,5 +103,14 @@ namespace FineUIPro.Web.HJGL.DataIn
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrawingRecognitionContentEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.DrawingRecognitionContentEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<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:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交" ValidateForms="SimpleForm1,SimpleForm2,SimpleForm3"
|
||||
OnClick="btnSave_Click" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipeNo" Label="管线号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="100" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtDrawingNumber" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="20" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCategory" Label="类型" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtQty" Label="数量" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSpec" Label="规格" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPageNo" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" Label="描述" ID="txtDescription" Readonly="true" Height="50px" LabelWidth="120px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
</Rows>
|
||||
</f:Form>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using BLL;
|
||||
|
||||
public partial class DrawingRecognitionContentEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 临时表主键
|
||||
/// </summary>
|
||||
public static Dictionary<string, DataTable> dicDt = new Dictionary<string, DataTable>();
|
||||
public int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)ViewState["Index"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Index"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.Index = int.Parse(Request.Params["Index"]);
|
||||
DataTable dt = dicDt[CurrUser.UserId];
|
||||
var dataInTemp = dt.Rows[this.Index];
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
this.txtPipeNo.Text = dataInTemp["pipe_no"].ToString();
|
||||
this.txtDrawingNumber.Text = dataInTemp["drawing_number"].ToString();
|
||||
this.txtCategory.Text = dataInTemp["category"].ToString();
|
||||
this.txtQty.Text = dataInTemp["qty"].ToString();
|
||||
this.txtSpec.Text = dataInTemp["spec"].ToString();
|
||||
this.txtPageNo.Text = dataInTemp["page_no"].ToString();
|
||||
this.txtDescription.Text = dataInTemp["description"].ToString();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交按钮
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt = dicDt[CurrUser.UserId];
|
||||
var dataInTemp = dt.Rows[this.Index];
|
||||
dataInTemp["pipe_no"] = this.txtPipeNo.Text;
|
||||
dataInTemp["drawing_number"] = this.txtDrawingNumber.Text;
|
||||
dataInTemp["category"] = this.txtCategory.Text;
|
||||
dataInTemp["qty"] = this.txtQty.Text;
|
||||
dataInTemp["spec"] = this.txtSpec.Text;
|
||||
dataInTemp["page_no"] = this.txtPageNo.Text;
|
||||
dataInTemp["description"] = this.txtDescription;
|
||||
Alert.ShowInTop("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
dicDt.Remove(CurrUser.UserId);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
143
HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContentEdit.aspx.designer.cs
generated
Normal file
143
HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContentEdit.aspx.designer.cs
generated
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
|
||||
|
||||
public partial class DrawingRecognitionContentEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// txtPipeNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipeNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtDrawingNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDrawingNumber;
|
||||
|
||||
/// <summary>
|
||||
/// txtCategory 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCategory;
|
||||
|
||||
/// <summary>
|
||||
/// txtQty 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQty;
|
||||
|
||||
/// <summary>
|
||||
/// txtSpec 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSpec;
|
||||
|
||||
/// <summary>
|
||||
/// txtPageNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPageNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtDescription 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtDescription;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue