From 2e7894b3470ad826a3d629d7119106157956e50a Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 26 十月 2024 16:56:17 +0800 Subject: [PATCH] 选择检验项目明细 --- DevApp/Gs.DevApp/UserControl/SelectCheckDt.cs | 102 ++++++++++++ DevApp/Gs.DevApp/UserControl/SelectCheckDt.Designer.cs | 258 ++++++++++++++++++++++++++++++++ DevApp/Gs.DevApp/UserControl/SelectCheckDt.resx | 120 +++++++++++++++ 3 files changed, 480 insertions(+), 0 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/SelectCheckDt.Designer.cs b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.Designer.cs new file mode 100644 index 0000000..6d0974e --- /dev/null +++ b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.Designer.cs @@ -0,0 +1,258 @@ +锘縩amespace Gs.DevApp.UserControl +{ + partial class SelectCheckDt + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.gcMain = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gv_guid = new DevExpress.XtraGrid.Columns.GridColumn(); + this.鏄惁鍙敤 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gv_salesOrderId = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gv_orderLineId = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gv_itemId = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gv_purchaseUnit = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gv_purchaseQty = new DevExpress.XtraGrid.Columns.GridColumn(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); + this.pageBar1 = new UserControls.Data.UcPageBar(); + ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); + this.panelControl1.SuspendLayout(); + this.SuspendLayout(); + // + // gcMain + // + this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcMain.Font = new System.Drawing.Font("Tahoma", 10F); + this.gcMain.Location = new System.Drawing.Point(0, 0); + this.gcMain.MainView = this.gridView1; + this.gcMain.Name = "gcMain"; + this.gcMain.Size = new System.Drawing.Size(941, 607); + this.gcMain.TabIndex = 1; + this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 10F); + this.gridView1.Appearance.Row.Options.UseFont = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gv_guid, + this.鏄惁鍙敤, + this.gv_salesOrderId, + this.gv_orderLineId, + this.gv_itemId, + this.gv_purchaseUnit, + this.gv_purchaseQty}); + this.gridView1.GridControl = this.gcMain; + this.gridView1.IndicatorWidth = 50; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsFind.ShowSearchNavButtons = false; + this.gridView1.OptionsView.ShowAutoFilterRow = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gv_guid + // + this.gv_guid.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_guid.AppearanceCell.Options.UseFont = true; + this.gv_guid.Caption = "涓婚敭涓嶈兘鍒犻櫎"; + this.gv_guid.FieldName = "guid"; + this.gv_guid.MinWidth = 50; + this.gv_guid.Name = "gv_guid"; + this.gv_guid.OptionsColumn.AllowEdit = false; + this.gv_guid.Tag = "query_a.guid"; + this.gv_guid.Width = 94; + // + // 鏄惁鍙敤 + // + this.鏄惁鍙敤.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.鏄惁鍙敤.AppearanceCell.Options.UseFont = true; + this.鏄惁鍙敤.Caption = "閲囪喘鍗曞彿 "; + this.鏄惁鍙敤.FieldName = "isEnabled"; + this.鏄惁鍙敤.MinWidth = 100; + this.鏄惁鍙敤.Name = "鏄惁鍙敤"; + this.鏄惁鍙敤.OptionsColumn.AllowEdit = false; + this.鏄惁鍙敤.Tag = "query_a.BILL_NO"; + this.鏄惁鍙敤.Visible = true; + this.鏄惁鍙敤.VisibleIndex = 0; + this.鏄惁鍙敤.Width = 100; + // + // gv_salesOrderId + // + this.gv_salesOrderId.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_salesOrderId.AppearanceCell.Options.UseFont = true; + this.gv_salesOrderId.Caption = "瀹℃壒鏍囧織"; + this.gv_salesOrderId.FieldName = "fOneChecked"; + this.gv_salesOrderId.MinWidth = 100; + this.gv_salesOrderId.Name = "gv_salesOrderId"; + this.gv_salesOrderId.OptionsColumn.AllowEdit = false; + this.gv_salesOrderId.Tag = "query_a.SALES_ORDER_ID"; + this.gv_salesOrderId.Visible = true; + this.gv_salesOrderId.VisibleIndex = 1; + this.gv_salesOrderId.Width = 100; + // + // gv_orderLineId + // + this.gv_orderLineId.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_orderLineId.AppearanceCell.Options.UseFont = true; + this.gv_orderLineId.Caption = "鎵瑰噯鏍囪"; + this.gv_orderLineId.FieldName = "fTwoChecked"; + this.gv_orderLineId.MinWidth = 100; + this.gv_orderLineId.Name = "gv_orderLineId"; + this.gv_orderLineId.OptionsColumn.AllowEdit = false; + this.gv_orderLineId.Tag = "query_a.ORDER_LINE_ID"; + this.gv_orderLineId.Visible = true; + this.gv_orderLineId.VisibleIndex = 2; + this.gv_orderLineId.Width = 100; + // + // gv_itemId + // + this.gv_itemId.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_itemId.AppearanceCell.Options.UseFont = true; + this.gv_itemId.Caption = "鐗╂枡缂栫爜 "; + this.gv_itemId.FieldName = "itemNo"; + this.gv_itemId.MinWidth = 100; + this.gv_itemId.Name = "gv_itemId"; + this.gv_itemId.OptionsColumn.AllowEdit = false; + this.gv_itemId.Tag = "query_a.ITEM_ID"; + this.gv_itemId.Visible = true; + this.gv_itemId.VisibleIndex = 3; + this.gv_itemId.Width = 100; + // + // gv_purchaseUnit + // + this.gv_purchaseUnit.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_purchaseUnit.AppearanceCell.Options.UseFont = true; + this.gv_purchaseUnit.Caption = "鐗╂枡鍚嶇О"; + this.gv_purchaseUnit.FieldName = "itemName"; + this.gv_purchaseUnit.MinWidth = 100; + this.gv_purchaseUnit.Name = "gv_purchaseUnit"; + this.gv_purchaseUnit.OptionsColumn.AllowEdit = false; + this.gv_purchaseUnit.Tag = "query_a.PURCHASE_UNIT"; + this.gv_purchaseUnit.Visible = true; + this.gv_purchaseUnit.VisibleIndex = 4; + this.gv_purchaseUnit.Width = 100; + // + // gv_purchaseQty + // + this.gv_purchaseQty.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.gv_purchaseQty.AppearanceCell.Options.UseFont = true; + this.gv_purchaseQty.Caption = "鐗╂枡瑙勬牸"; + this.gv_purchaseQty.FieldName = "itemModel"; + this.gv_purchaseQty.MinWidth = 100; + this.gv_purchaseQty.Name = "gv_purchaseQty"; + this.gv_purchaseQty.OptionsColumn.AllowEdit = false; + this.gv_purchaseQty.Tag = "query_a.PURCHASE_QTY"; + this.gv_purchaseQty.Visible = true; + this.gv_purchaseQty.VisibleIndex = 5; + this.gv_purchaseQty.Width = 100; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 0); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(943, 682); + this.xtraTabControl1.TabIndex = 3; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.gcMain); + this.xtraTabPage1.Controls.Add(this.panelControl1); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(941, 650); + this.xtraTabPage1.Text = "璇烽�夋嫨闇�瑕佸鍏ョ殑鏁版嵁"; + // + // panelControl1 + // + this.panelControl1.Controls.Add(this.pageBar1); + this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panelControl1.Location = new System.Drawing.Point(0, 607); + this.panelControl1.Name = "panelControl1"; + this.panelControl1.Size = new System.Drawing.Size(941, 43); + this.panelControl1.TabIndex = 4; + // + // pageBar1 + // + this.pageBar1.CurrentPage = 1; + this.pageBar1.Dock = System.Windows.Forms.DockStyle.Right; + this.pageBar1.Location = new System.Drawing.Point(-45, 2); + this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); + this.pageBar1.Name = "pageBar1"; + this.pageBar1.RecordCount = 0; + this.pageBar1.RowsCount = 50; + this.pageBar1.Size = new System.Drawing.Size(984, 39); + this.pageBar1.TabIndex = 3; + this.pageBar1.TotalPages = 0; + // + // SelectCheckDt + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(943, 682); + this.Controls.Add(this.xtraTabControl1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "SelectCheckDt"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "閫夋嫨闇�瑕佸叆瀵煎叆鐨勬暟鎹�"; + ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); + this.panelControl1.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + private DevExpress.XtraGrid.GridControl gcMain; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private UserControls.Data.UcPageBar pageBar1; + private DevExpress.XtraGrid.Columns.GridColumn gv_purchaseQty; + private DevExpress.XtraGrid.Columns.GridColumn gv_purchaseUnit; + private DevExpress.XtraGrid.Columns.GridColumn gv_itemId; + private DevExpress.XtraGrid.Columns.GridColumn gv_orderLineId; + private DevExpress.XtraGrid.Columns.GridColumn gv_salesOrderId; + private DevExpress.XtraGrid.Columns.GridColumn 鏄惁鍙敤; + private DevExpress.XtraGrid.Columns.GridColumn gv_guid; + private DevExpress.XtraEditors.PanelControl panelControl1; + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/SelectCheckDt.cs b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.cs new file mode 100644 index 0000000..52dc2ad --- /dev/null +++ b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.cs @@ -0,0 +1,102 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using DevExpress.XtraEditors; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; +using Newtonsoft.Json; + +namespace Gs.DevApp.UserControl +{ + public partial class SelectCheckDt : DevExpress.XtraEditors.XtraForm + { + private readonly List<FilterEntity> _filterList = + new List<FilterEntity>(); + + private readonly string _webServiceName = "MesQmCheckitemManager/"; + + public SelectCheckDt() + { + InitializeComponent(); + pageBar1.PagerEvent += PageBar1_PagerEvent; + gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; + getPageList(1, UtilityHelper.GetPageSize()); + gridView1.IndicatorWidth = 50; + gridView1.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + }; + + } + /// <summary> + /// 鍙屽嚮浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) + { + var rowGuid = + UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); + if (string.IsNullOrEmpty(rowGuid)) + return; + var list = new List<string>(); + list.Add(rowGuid); + UpdateParent?.Invoke(this, + new UpdateParentEventArgs { StringList = list }); + Close(); + + } + + /// <summary> + /// 鍥炶皟浜嬩欢 + /// </summary> + public event EventHandler<UpdateParentEventArgs> UpdateParent; + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="curPage"></param> + /// <param name="pageSize"></param> + private void PageBar1_PagerEvent(int curPage, int pageSize) + { + getPageList(curPage, pageSize); + } + + /// <summary> + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage, int pageSize) + { + var _sbSqlWhere = new StringBuilder(); + foreach (var itm in _filterList) + _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + + itm.fileValue + "'"); + var pgq = new PageQueryModel(curPage, pageSize, "create_date", "asc", + "", _sbSqlWhere.ToString()); + var json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", + _webServiceName + "GetListPage", json); + var dd = UtilityHelper.ReturnToTablePage(strReturn); + var dt = dd.rtnData.list; + gcMain.BindingContext = new BindingContext(); + gcMain.DataSource = dt; + gcMain.ForceInitialize(); + var dddd = dd.rtnData.pages; //鎬婚〉 + pageBar1.TotalPages = dddd; + pageBar1.RecordCount = dd.rtnData.total; //璁板綍鎬绘暟 + pageBar1.CurrentPage = curPage; //褰撳墠椤� + pageBar1.RowsCount = pageSize; //姣忛〉鏄剧ず + pageBar1.setTxt(); + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/SelectCheckDt.resx b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DevApp/Gs.DevApp/UserControl/SelectCheckDt.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file -- Gitblit v1.9.3