From e561543dfdc09245898a983b237ea712b9aa49b7 Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期五, 19 九月 2025 16:02:03 +0800 Subject: [PATCH] 检验报表增加 --- DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.Designer.cs | 421 +++++++ DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.Designer.cs | 421 +++++++ DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.cs | 242 ++++ DevApp/Gs.DevApp/Gs.DevApp.csproj | 36 DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.Designer.cs | 421 +++++++ DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.resx | 123 ++ DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.Designer.cs | 421 +++++++ DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.cs | 242 ++++ DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.cs | 242 ++++ DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.cs | 242 ++++ DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.resx | 123 ++ DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.resx | 123 ++ DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.resx | 123 ++ 13 files changed, 3,180 insertions(+), 0 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.Designer.cs new file mode 100644 index 0000000..d6e7af4 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.Designer.cs @@ -0,0 +1,421 @@ +/* Create By GS EasyCode */ +namespace Gs.DevApp.DevFrm.Rpt +{ + partial class FQCMX + { + /// <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.components = new System.ComponentModel.Container(); + this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gcMain1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemNo1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemModel = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.pageBar1 = new UserControls.Data.UcPageBar(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.tips = new DevExpress.Utils.ToolTipController(this.components); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit(); + this.split1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).BeginInit(); + this.split1.Panel2.SuspendLayout(); + this.split1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + this.SuspendLayout(); + // + // toolBarMenu1 + // + this.toolBarMenu1.chkParameter = null; + this.toolBarMenu1.currentAction = null; + this.toolBarMenu1.defaultActions = "鏌ヨ"; + this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; + this.toolBarMenu1.guidKey = null; + this.toolBarMenu1.isSetBtn = false; + this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); + this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.toolBarMenu1.Name = "toolBarMenu1"; + this.toolBarMenu1.rptParameter = null; + this.toolBarMenu1.Size = new System.Drawing.Size(987, 62); + this.toolBarMenu1.TabIndex = 0; + this.toolBarMenu1.xlsInService = null; + this.toolBarMenu1.xlsOutParameter = null; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 62); + this.xtraTabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(987, 468); + this.xtraTabControl1.TabIndex = 3; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.split1); + this.xtraTabPage1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(985, 442); + this.xtraTabPage1.Text = "鏁版嵁鍒楄〃"; + // + // split1 + // + this.split1.Dock = System.Windows.Forms.DockStyle.Fill; + this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; + this.split1.Horizontal = false; + this.split1.Location = new System.Drawing.Point(0, 0); + this.split1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.split1.Name = "split1"; + // + // split1.Panel1 + // + this.split1.Panel1.Controls.Add(this.gcMain1); + this.split1.Panel1.Controls.Add(this.pageBar1); + this.split1.Panel1.Text = "Panel1"; + // + // split1.Panel2 + // + this.split1.Panel2.Controls.Add(this.gridControl1); + this.split1.Panel2.Text = "Panel2"; + this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.split1.Size = new System.Drawing.Size(985, 442); + this.split1.SplitterPosition = 170; + this.split1.TabIndex = 0; + // + // gcMain1 + // + this.gcMain1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcMain1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Location = new System.Drawing.Point(0, 0); + this.gcMain1.MainView = this.gridView1; + this.gcMain1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Name = "gcMain1"; + this.gcMain1.Size = new System.Drawing.Size(985, 232); + this.gcMain1.TabIndex = 5; + this.gcMain1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.Row.Options.UseFont = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn8, + this.itemNo1, + this.itemName, + this.itemModel, + this.gridColumn1, + this.gridColumn2}); + this.gridView1.DetailHeight = 272; + this.gridView1.GridControl = this.gcMain1; + this.gridView1.IndicatorWidth = 44; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsFind.ShowSearchNavButtons = false; + this.gridView1.OptionsView.ShowAutoFilterRow = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gridColumn8 + // + this.gridColumn8.Caption = "鏈堜唤"; + this.gridColumn8.FieldName = "yf"; + this.gridColumn8.MinWidth = 21; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Tag = "daa001"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 0; + this.gridColumn8.Width = 79; + // + // itemNo1 + // + this.itemNo1.Caption = "鏉ユ枡鎬诲崟鏁�"; + this.itemNo1.FieldName = "llzds"; + this.itemNo1.MinWidth = 21; + this.itemNo1.Name = "itemNo1"; + this.itemNo1.Tag = "itemNo"; + this.itemNo1.Visible = true; + this.itemNo1.VisibleIndex = 1; + this.itemNo1.Width = 79; + // + // itemName + // + this.itemName.Caption = "涓嶅悎鏍煎崟鏁�"; + this.itemName.FieldName = "bhgds"; + this.itemName.MinWidth = 21; + this.itemName.Name = "itemName"; + this.itemName.Tag = "itemName"; + this.itemName.Visible = true; + this.itemName.VisibleIndex = 2; + this.itemName.Width = 79; + // + // itemModel + // + this.itemModel.Caption = "鍚堟牸鐜�"; + this.itemModel.FieldName = "hgl"; + this.itemModel.MinWidth = 21; + this.itemModel.Name = "itemModel"; + this.itemModel.Tag = "itemModel"; + this.itemModel.Visible = true; + this.itemModel.VisibleIndex = 3; + this.itemModel.Width = 79; + // + // gridColumn1 + // + this.gridColumn1.Caption = "瓒呮椂鍗曟暟"; + this.gridColumn1.FieldName = "csds"; + this.gridColumn1.MinWidth = 21; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 79; + // + // gridColumn2 + // + this.gridColumn2.Caption = "妫�楠屽強鏃剁巼"; + this.gridColumn2.FieldName = "jyjsl"; + this.gridColumn2.MinWidth = 21; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 5; + this.gridColumn2.Width = 79; + // + // pageBar1 + // + this.pageBar1.CurrentPage = 1; + this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pageBar1.Location = new System.Drawing.Point(0, 232); + this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.pageBar1.Name = "pageBar1"; + this.pageBar1.RecordCount = 0; + this.pageBar1.Size = new System.Drawing.Size(985, 30); + this.pageBar1.TabIndex = 4; + this.pageBar1.TotalPages = 0; + // + // gridControl1 + // + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView2; + this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(985, 170); + this.gridControl1.TabIndex = 5; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView2}); + // + // gridView2 + // + this.gridView2.Appearance.Row.Options.UseFont = true; + this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn9, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16}); + this.gridView2.DetailHeight = 272; + this.gridView2.GridControl = this.gridControl1; + this.gridView2.IndicatorWidth = 44; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsFind.ShowSearchNavButtons = false; + this.gridView2.OptionsView.ShowAutoFilterRow = true; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // gridColumn9 + // + this.gridColumn9.Caption = "搴忓彿"; + this.gridColumn9.FieldName = "xh"; + this.gridColumn9.MinWidth = 21; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Tag = "daa001"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 0; + this.gridColumn9.Width = 79; + // + // gridColumn20 + // + this.gridColumn20.Caption = "妫�楠屽崟鍙�"; + this.gridColumn20.FieldName = "releaseNo"; + this.gridColumn20.MinWidth = 21; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 1; + this.gridColumn20.Width = 79; + // + // gridColumn21 + // + this.gridColumn21.Caption = "鐗╂枡缂栫爜"; + this.gridColumn21.FieldName = "itemNo"; + this.gridColumn21.MinWidth = 21; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 2; + this.gridColumn21.Width = 79; + // + // gridColumn22 + // + this.gridColumn22.Caption = "鐗╂枡鍚嶇О"; + this.gridColumn22.FieldName = "itemName"; + this.gridColumn22.MinWidth = 21; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 3; + this.gridColumn22.Width = 79; + // + // gridColumn12 + // + this.gridColumn12.Caption = "瑙勬牸鍨嬪彿"; + this.gridColumn12.FieldName = "itemModel"; + this.gridColumn12.MinWidth = 21; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Tag = "itemModel"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 6; + this.gridColumn12.Width = 79; + // + // gridColumn13 + // + this.gridColumn13.Caption = "鏁伴噺"; + this.gridColumn13.FieldName = "quantity"; + this.gridColumn13.MinWidth = 21; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 5; + this.gridColumn13.Width = 79; + // + // gridColumn14 + // + this.gridColumn14.Caption = "缁撴灉"; + this.gridColumn14.FieldName = "checkResu"; + this.gridColumn14.MinWidth = 21; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 6; + this.gridColumn14.Width = 79; + // + // gridColumn15 + // + this.gridColumn15.Caption = "妫�楠屼汉"; + this.gridColumn15.FieldName = "jyr"; + this.gridColumn15.MinWidth = 21; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 7; + this.gridColumn15.Width = 79; + // + // gridColumn16 + // + this.gridColumn16.Caption = "妫�楠屾椂闂�"; + this.gridColumn16.FieldName = "jyDate"; + this.gridColumn16.MinWidth = 21; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 8; + this.gridColumn16.Width = 79; + // + // IQCMX + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(987, 530); + this.Controls.Add(this.xtraTabControl1); + this.Controls.Add(this.toolBarMenu1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "IQCMX"; + this.Text = "鎴愬搧鍏ュ簱璁板綍琛�"; + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); + this.split1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); + this.split1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1)).EndInit(); + this.split1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + this.ResumeLayout(false); + + } + #endregion + private UserControl.UcToolBarMenu toolBarMenu1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraEditors.SplitContainerControl split1; + private UserControls.Data.UcPageBar pageBar1; + private DevExpress.XtraGrid.GridControl gcMain1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn itemNo1; + private DevExpress.XtraGrid.Columns.GridColumn itemName; + private DevExpress.XtraGrid.Columns.GridColumn itemModel; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.Utils.ToolTipController tips; + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.cs new file mode 100644 index 0000000..dec76c8 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.cs @@ -0,0 +1,242 @@ +using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; +using DevExpress.Utils.DirectXPaint; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; +using Gs.DevApp.UserControl; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlTypes; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Gs.DevApp.DevFrm.Rpt +{ + public partial class FQCMX : DevExpress.XtraEditors.XtraForm + { + //鏉$爜浜ゆ槗鏄庣粏 + string _webServiceName = "FqcItemsManager/"; + List<FilterEntity> _filterList = new List<FilterEntity>(); + public FQCMX() + { + InitializeComponent(); + this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; + this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + this.toolBarMenu1.getXmlConfig(); + // 璁剧疆gridView1鍙傛暟锛屽苟娣诲姞琛岄�夋嫨浜嬩欢澶勭悊 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", null, tips, true, null); + // 娣诲姞gridView1鐨勮閫夋嫨鍙樺寲浜嬩欢 + gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; + // 璁剧疆gridView2鍙傛暟 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); + getPageList(1); + pageBar1.PagerEvent += PageBar1_PagerEvent; + } + + /// <summary> + /// gridView1琛岄�夋嫨鍙樺寲浜嬩欢澶勭悊 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void GridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + if (e.FocusedRowHandle >= 0) + { + // 鑾峰彇閫変腑琛岀殑宸ュ崟鍗曞彿 + var dr = gridView1.GetDataRow(e.FocusedRowHandle); + if (dr != null) + { + string workOrderNo = dr["yf"].ToString(); + if (!string.IsNullOrEmpty(workOrderNo)) + { + // 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + getCPMXDetail(workOrderNo); + } + } + } + else + { + // 濡傛灉娌℃湁閫変腑琛岋紝娓呯┖gridView2 + clearGridView2(); + } + } + + /// <summary> + /// 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + /// </summary> + /// <param name="workOrderNo">宸ュ崟鍗曞彿</param> + private void getCPMXDetail(string workOrderNo) + { + try + { + + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + + // 鏋勯�犺姹傚弬鏁� + var requestObj = new + { + yf = workOrderNo, + keyWhere = _sbSqlWhere.ToString() + }; + string json = JsonConvert.SerializeObject(requestObj); + + // 璋冪敤鍚庡彴鎺ュ彛鑾峰彇鏄庣粏鏁版嵁 + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetFQCMXDetail", json); + ReturnModel<dynamic> _rtn = UtilityHelper.ReturnToDynamic(strReturn); + + if (_rtn.rtnCode > 0) + { + dynamic dy = _rtn.rtnData; + JObject _job = JObject.Parse(strReturn); + JArray array = new JArray(); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); + if (dt.Rows.Count > 0) + { + gridControl1.BindingContext = new BindingContext(); + gridControl1.DataSource = dt; + gridControl1.ForceInitialize(); + gridView2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2); + } + else + { + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + } + else + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁澶辫触锛�" + _rtn.rtnMsg); + clearGridView2(); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁寮傚父锛�" + ex.Message); + clearGridView2(); + } + } + + /// <summary> + /// 娓呯┖gridView2 + /// </summary> + private void clearGridView2() + { + gridControl1.DataSource = null; + UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + + private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) + { + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + await Task.Delay(100); + getPageList(1); + } + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="curPage"></param> + /// <param name="pageSize"></param> + private void PageBar1_PagerEvent(int curPage, int pageSize) + { + getPageList(curPage); + } + /// <summary> + /// 鏌ヨ浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) + { + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + gridView1.ActiveFilter.Clear(); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); + frm.UpdateParent += Frm_UpdateParent; + frm.ShowDialog(); + } + /// <summary> + /// 鏌ヨ鍥炶皟 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) + { + _filterList = e.FilterList; + getPageList(1); + } + + /// <summary> + /// 鍒锋柊浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) + { + getPageList(this.pageBar1.CurrentPage); + } + + /// <summary> + /// + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage) + { + gcMain1.DataSource = null; + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.INDEP_DATE", "asc", "", _sbSqlWhere.ToString()); + string json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetFQCMX", json); + ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain1.BindingContext = new BindingContext(); + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + if (dt.Rows.Count > 0) + { + gcMain1.DataSource = dt; + gcMain1.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + + } + else + UtilityHelper.SetDefaultTable(gcMain1, gridView1); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉 + pageBar1.CurrentPage = curPage;//褰撳墠椤� + pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟 + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.resx b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.resx new file mode 100644 index 0000000..a4826a3 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/FQCMX.resx @@ -0,0 +1,123 @@ +<?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> + <metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.Designer.cs new file mode 100644 index 0000000..a07260d --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.Designer.cs @@ -0,0 +1,421 @@ +/* Create By GS EasyCode */ +namespace Gs.DevApp.DevFrm.Rpt +{ + partial class IPQCSJMX + { + /// <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.components = new System.ComponentModel.Container(); + this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gcMain1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemNo1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemModel = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.pageBar1 = new UserControls.Data.UcPageBar(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.tips = new DevExpress.Utils.ToolTipController(this.components); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit(); + this.split1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).BeginInit(); + this.split1.Panel2.SuspendLayout(); + this.split1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + this.SuspendLayout(); + // + // toolBarMenu1 + // + this.toolBarMenu1.chkParameter = null; + this.toolBarMenu1.currentAction = null; + this.toolBarMenu1.defaultActions = "鏌ヨ"; + this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; + this.toolBarMenu1.guidKey = null; + this.toolBarMenu1.isSetBtn = false; + this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); + this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.toolBarMenu1.Name = "toolBarMenu1"; + this.toolBarMenu1.rptParameter = null; + this.toolBarMenu1.Size = new System.Drawing.Size(987, 62); + this.toolBarMenu1.TabIndex = 0; + this.toolBarMenu1.xlsInService = null; + this.toolBarMenu1.xlsOutParameter = null; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 62); + this.xtraTabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(987, 468); + this.xtraTabControl1.TabIndex = 3; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.split1); + this.xtraTabPage1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(985, 442); + this.xtraTabPage1.Text = "鏁版嵁鍒楄〃"; + // + // split1 + // + this.split1.Dock = System.Windows.Forms.DockStyle.Fill; + this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; + this.split1.Horizontal = false; + this.split1.Location = new System.Drawing.Point(0, 0); + this.split1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.split1.Name = "split1"; + // + // split1.Panel1 + // + this.split1.Panel1.Controls.Add(this.gcMain1); + this.split1.Panel1.Controls.Add(this.pageBar1); + this.split1.Panel1.Text = "Panel1"; + // + // split1.Panel2 + // + this.split1.Panel2.Controls.Add(this.gridControl1); + this.split1.Panel2.Text = "Panel2"; + this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.split1.Size = new System.Drawing.Size(985, 442); + this.split1.SplitterPosition = 170; + this.split1.TabIndex = 0; + // + // gcMain1 + // + this.gcMain1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcMain1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Location = new System.Drawing.Point(0, 0); + this.gcMain1.MainView = this.gridView1; + this.gcMain1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Name = "gcMain1"; + this.gcMain1.Size = new System.Drawing.Size(985, 232); + this.gcMain1.TabIndex = 5; + this.gcMain1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.Row.Options.UseFont = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn8, + this.itemNo1, + this.itemName, + this.itemModel, + this.gridColumn1, + this.gridColumn2}); + this.gridView1.DetailHeight = 272; + this.gridView1.GridControl = this.gcMain1; + this.gridView1.IndicatorWidth = 44; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsFind.ShowSearchNavButtons = false; + this.gridView1.OptionsView.ShowAutoFilterRow = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gridColumn8 + // + this.gridColumn8.Caption = "鏈堜唤"; + this.gridColumn8.FieldName = "yf"; + this.gridColumn8.MinWidth = 21; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Tag = "daa001"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 0; + this.gridColumn8.Width = 79; + // + // itemNo1 + // + this.itemNo1.Caption = "鏉ユ枡鎬诲崟鏁�"; + this.itemNo1.FieldName = "llzds"; + this.itemNo1.MinWidth = 21; + this.itemNo1.Name = "itemNo1"; + this.itemNo1.Tag = "itemNo"; + this.itemNo1.Visible = true; + this.itemNo1.VisibleIndex = 1; + this.itemNo1.Width = 79; + // + // itemName + // + this.itemName.Caption = "涓嶅悎鏍煎崟鏁�"; + this.itemName.FieldName = "bhgds"; + this.itemName.MinWidth = 21; + this.itemName.Name = "itemName"; + this.itemName.Tag = "itemName"; + this.itemName.Visible = true; + this.itemName.VisibleIndex = 2; + this.itemName.Width = 79; + // + // itemModel + // + this.itemModel.Caption = "鍚堟牸鐜�"; + this.itemModel.FieldName = "hgl"; + this.itemModel.MinWidth = 21; + this.itemModel.Name = "itemModel"; + this.itemModel.Tag = "itemModel"; + this.itemModel.Visible = true; + this.itemModel.VisibleIndex = 3; + this.itemModel.Width = 79; + // + // gridColumn1 + // + this.gridColumn1.Caption = "瓒呮椂鍗曟暟"; + this.gridColumn1.FieldName = "csds"; + this.gridColumn1.MinWidth = 21; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 79; + // + // gridColumn2 + // + this.gridColumn2.Caption = "妫�楠屽強鏃剁巼"; + this.gridColumn2.FieldName = "jyjsl"; + this.gridColumn2.MinWidth = 21; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 5; + this.gridColumn2.Width = 79; + // + // pageBar1 + // + this.pageBar1.CurrentPage = 1; + this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pageBar1.Location = new System.Drawing.Point(0, 232); + this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.pageBar1.Name = "pageBar1"; + this.pageBar1.RecordCount = 0; + this.pageBar1.Size = new System.Drawing.Size(985, 30); + this.pageBar1.TabIndex = 4; + this.pageBar1.TotalPages = 0; + // + // gridControl1 + // + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView2; + this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(985, 170); + this.gridControl1.TabIndex = 5; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView2}); + // + // gridView2 + // + this.gridView2.Appearance.Row.Options.UseFont = true; + this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn9, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16}); + this.gridView2.DetailHeight = 272; + this.gridView2.GridControl = this.gridControl1; + this.gridView2.IndicatorWidth = 44; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsFind.ShowSearchNavButtons = false; + this.gridView2.OptionsView.ShowAutoFilterRow = true; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // gridColumn9 + // + this.gridColumn9.Caption = "搴忓彿"; + this.gridColumn9.FieldName = "xh"; + this.gridColumn9.MinWidth = 21; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Tag = "daa001"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 0; + this.gridColumn9.Width = 79; + // + // gridColumn20 + // + this.gridColumn20.Caption = "妫�楠屽崟鍙�"; + this.gridColumn20.FieldName = "releaseNo"; + this.gridColumn20.MinWidth = 21; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 1; + this.gridColumn20.Width = 79; + // + // gridColumn21 + // + this.gridColumn21.Caption = "鐗╂枡缂栫爜"; + this.gridColumn21.FieldName = "itemNo"; + this.gridColumn21.MinWidth = 21; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 2; + this.gridColumn21.Width = 79; + // + // gridColumn22 + // + this.gridColumn22.Caption = "鐗╂枡鍚嶇О"; + this.gridColumn22.FieldName = "itemName"; + this.gridColumn22.MinWidth = 21; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 3; + this.gridColumn22.Width = 79; + // + // gridColumn12 + // + this.gridColumn12.Caption = "瑙勬牸鍨嬪彿"; + this.gridColumn12.FieldName = "itemModel"; + this.gridColumn12.MinWidth = 21; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Tag = "itemModel"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 6; + this.gridColumn12.Width = 79; + // + // gridColumn13 + // + this.gridColumn13.Caption = "鏁伴噺"; + this.gridColumn13.FieldName = "quantity"; + this.gridColumn13.MinWidth = 21; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 5; + this.gridColumn13.Width = 79; + // + // gridColumn14 + // + this.gridColumn14.Caption = "缁撴灉"; + this.gridColumn14.FieldName = "checkResu"; + this.gridColumn14.MinWidth = 21; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 6; + this.gridColumn14.Width = 79; + // + // gridColumn15 + // + this.gridColumn15.Caption = "妫�楠屼汉"; + this.gridColumn15.FieldName = "jyr"; + this.gridColumn15.MinWidth = 21; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 7; + this.gridColumn15.Width = 79; + // + // gridColumn16 + // + this.gridColumn16.Caption = "妫�楠屾椂闂�"; + this.gridColumn16.FieldName = "jyDate"; + this.gridColumn16.MinWidth = 21; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 8; + this.gridColumn16.Width = 79; + // + // IQCMX + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(987, 530); + this.Controls.Add(this.xtraTabControl1); + this.Controls.Add(this.toolBarMenu1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "IQCMX"; + this.Text = "鎴愬搧鍏ュ簱璁板綍琛�"; + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); + this.split1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); + this.split1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1)).EndInit(); + this.split1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + this.ResumeLayout(false); + + } + #endregion + private UserControl.UcToolBarMenu toolBarMenu1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraEditors.SplitContainerControl split1; + private UserControls.Data.UcPageBar pageBar1; + private DevExpress.XtraGrid.GridControl gcMain1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn itemNo1; + private DevExpress.XtraGrid.Columns.GridColumn itemName; + private DevExpress.XtraGrid.Columns.GridColumn itemModel; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.Utils.ToolTipController tips; + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.cs new file mode 100644 index 0000000..e7562a3 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.cs @@ -0,0 +1,242 @@ +using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; +using DevExpress.Utils.DirectXPaint; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; +using Gs.DevApp.UserControl; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlTypes; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Gs.DevApp.DevFrm.Rpt +{ + public partial class IPQCSJMX : DevExpress.XtraEditors.XtraForm + { + //鏉$爜浜ゆ槗鏄庣粏 + string _webServiceName = "FqcItemsManager/"; + List<FilterEntity> _filterList = new List<FilterEntity>(); + public IPQCSJMX() + { + InitializeComponent(); + this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; + this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + this.toolBarMenu1.getXmlConfig(); + // 璁剧疆gridView1鍙傛暟锛屽苟娣诲姞琛岄�夋嫨浜嬩欢澶勭悊 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", null, tips, true, null); + // 娣诲姞gridView1鐨勮閫夋嫨鍙樺寲浜嬩欢 + gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; + // 璁剧疆gridView2鍙傛暟 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); + getPageList(1); + pageBar1.PagerEvent += PageBar1_PagerEvent; + } + + /// <summary> + /// gridView1琛岄�夋嫨鍙樺寲浜嬩欢澶勭悊 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void GridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + if (e.FocusedRowHandle >= 0) + { + // 鑾峰彇閫変腑琛岀殑宸ュ崟鍗曞彿 + var dr = gridView1.GetDataRow(e.FocusedRowHandle); + if (dr != null) + { + string workOrderNo = dr["yf"].ToString(); + if (!string.IsNullOrEmpty(workOrderNo)) + { + // 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + getCPMXDetail(workOrderNo); + } + } + } + else + { + // 濡傛灉娌℃湁閫変腑琛岋紝娓呯┖gridView2 + clearGridView2(); + } + } + + /// <summary> + /// 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + /// </summary> + /// <param name="workOrderNo">宸ュ崟鍗曞彿</param> + private void getCPMXDetail(string workOrderNo) + { + try + { + + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + + // 鏋勯�犺姹傚弬鏁� + var requestObj = new + { + yf = workOrderNo, + keyWhere = _sbSqlWhere.ToString() + }; + string json = JsonConvert.SerializeObject(requestObj); + + // 璋冪敤鍚庡彴鎺ュ彛鑾峰彇鏄庣粏鏁版嵁 + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIPQCSJMXDetail", json); + ReturnModel<dynamic> _rtn = UtilityHelper.ReturnToDynamic(strReturn); + + if (_rtn.rtnCode > 0) + { + dynamic dy = _rtn.rtnData; + JObject _job = JObject.Parse(strReturn); + JArray array = new JArray(); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); + if (dt.Rows.Count > 0) + { + gridControl1.BindingContext = new BindingContext(); + gridControl1.DataSource = dt; + gridControl1.ForceInitialize(); + gridView2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2); + } + else + { + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + } + else + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁澶辫触锛�" + _rtn.rtnMsg); + clearGridView2(); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁寮傚父锛�" + ex.Message); + clearGridView2(); + } + } + + /// <summary> + /// 娓呯┖gridView2 + /// </summary> + private void clearGridView2() + { + gridControl1.DataSource = null; + UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + + private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) + { + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + await Task.Delay(100); + getPageList(1); + } + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="curPage"></param> + /// <param name="pageSize"></param> + private void PageBar1_PagerEvent(int curPage, int pageSize) + { + getPageList(curPage); + } + /// <summary> + /// 鏌ヨ浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) + { + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + gridView1.ActiveFilter.Clear(); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); + frm.UpdateParent += Frm_UpdateParent; + frm.ShowDialog(); + } + /// <summary> + /// 鏌ヨ鍥炶皟 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) + { + _filterList = e.FilterList; + getPageList(1); + } + + /// <summary> + /// 鍒锋柊浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) + { + getPageList(this.pageBar1.CurrentPage); + } + + /// <summary> + /// + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage) + { + gcMain1.DataSource = null; + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.INDEP_DATE", "asc", "", _sbSqlWhere.ToString()); + string json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIPQCSJMX", json); + ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain1.BindingContext = new BindingContext(); + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + if (dt.Rows.Count > 0) + { + gcMain1.DataSource = dt; + gcMain1.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + + } + else + UtilityHelper.SetDefaultTable(gcMain1, gridView1); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉 + pageBar1.CurrentPage = curPage;//褰撳墠椤� + pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟 + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.resx b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.resx new file mode 100644 index 0000000..a4826a3 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCSJMX.resx @@ -0,0 +1,123 @@ +<?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> + <metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.Designer.cs new file mode 100644 index 0000000..82fd704 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.Designer.cs @@ -0,0 +1,421 @@ +/* Create By GS EasyCode */ +namespace Gs.DevApp.DevFrm.Rpt +{ + partial class IPQCXJMX + { + /// <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.components = new System.ComponentModel.Container(); + this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gcMain1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemNo1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemModel = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.pageBar1 = new UserControls.Data.UcPageBar(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.tips = new DevExpress.Utils.ToolTipController(this.components); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit(); + this.split1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).BeginInit(); + this.split1.Panel2.SuspendLayout(); + this.split1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + this.SuspendLayout(); + // + // toolBarMenu1 + // + this.toolBarMenu1.chkParameter = null; + this.toolBarMenu1.currentAction = null; + this.toolBarMenu1.defaultActions = "鏌ヨ"; + this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; + this.toolBarMenu1.guidKey = null; + this.toolBarMenu1.isSetBtn = false; + this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); + this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.toolBarMenu1.Name = "toolBarMenu1"; + this.toolBarMenu1.rptParameter = null; + this.toolBarMenu1.Size = new System.Drawing.Size(987, 62); + this.toolBarMenu1.TabIndex = 0; + this.toolBarMenu1.xlsInService = null; + this.toolBarMenu1.xlsOutParameter = null; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 62); + this.xtraTabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(987, 468); + this.xtraTabControl1.TabIndex = 3; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.split1); + this.xtraTabPage1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(985, 442); + this.xtraTabPage1.Text = "鏁版嵁鍒楄〃"; + // + // split1 + // + this.split1.Dock = System.Windows.Forms.DockStyle.Fill; + this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; + this.split1.Horizontal = false; + this.split1.Location = new System.Drawing.Point(0, 0); + this.split1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.split1.Name = "split1"; + // + // split1.Panel1 + // + this.split1.Panel1.Controls.Add(this.gcMain1); + this.split1.Panel1.Controls.Add(this.pageBar1); + this.split1.Panel1.Text = "Panel1"; + // + // split1.Panel2 + // + this.split1.Panel2.Controls.Add(this.gridControl1); + this.split1.Panel2.Text = "Panel2"; + this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.split1.Size = new System.Drawing.Size(985, 442); + this.split1.SplitterPosition = 170; + this.split1.TabIndex = 0; + // + // gcMain1 + // + this.gcMain1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcMain1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Location = new System.Drawing.Point(0, 0); + this.gcMain1.MainView = this.gridView1; + this.gcMain1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Name = "gcMain1"; + this.gcMain1.Size = new System.Drawing.Size(985, 232); + this.gcMain1.TabIndex = 5; + this.gcMain1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.Row.Options.UseFont = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn8, + this.itemNo1, + this.itemName, + this.itemModel, + this.gridColumn1, + this.gridColumn2}); + this.gridView1.DetailHeight = 272; + this.gridView1.GridControl = this.gcMain1; + this.gridView1.IndicatorWidth = 44; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsFind.ShowSearchNavButtons = false; + this.gridView1.OptionsView.ShowAutoFilterRow = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gridColumn8 + // + this.gridColumn8.Caption = "鏈堜唤"; + this.gridColumn8.FieldName = "yf"; + this.gridColumn8.MinWidth = 21; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Tag = "daa001"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 0; + this.gridColumn8.Width = 79; + // + // itemNo1 + // + this.itemNo1.Caption = "鏉ユ枡鎬诲崟鏁�"; + this.itemNo1.FieldName = "llzds"; + this.itemNo1.MinWidth = 21; + this.itemNo1.Name = "itemNo1"; + this.itemNo1.Tag = "itemNo"; + this.itemNo1.Visible = true; + this.itemNo1.VisibleIndex = 1; + this.itemNo1.Width = 79; + // + // itemName + // + this.itemName.Caption = "涓嶅悎鏍煎崟鏁�"; + this.itemName.FieldName = "bhgds"; + this.itemName.MinWidth = 21; + this.itemName.Name = "itemName"; + this.itemName.Tag = "itemName"; + this.itemName.Visible = true; + this.itemName.VisibleIndex = 2; + this.itemName.Width = 79; + // + // itemModel + // + this.itemModel.Caption = "鍚堟牸鐜�"; + this.itemModel.FieldName = "hgl"; + this.itemModel.MinWidth = 21; + this.itemModel.Name = "itemModel"; + this.itemModel.Tag = "itemModel"; + this.itemModel.Visible = true; + this.itemModel.VisibleIndex = 3; + this.itemModel.Width = 79; + // + // gridColumn1 + // + this.gridColumn1.Caption = "瓒呮椂鍗曟暟"; + this.gridColumn1.FieldName = "csds"; + this.gridColumn1.MinWidth = 21; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 79; + // + // gridColumn2 + // + this.gridColumn2.Caption = "妫�楠屽強鏃剁巼"; + this.gridColumn2.FieldName = "jyjsl"; + this.gridColumn2.MinWidth = 21; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 5; + this.gridColumn2.Width = 79; + // + // pageBar1 + // + this.pageBar1.CurrentPage = 1; + this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pageBar1.Location = new System.Drawing.Point(0, 232); + this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.pageBar1.Name = "pageBar1"; + this.pageBar1.RecordCount = 0; + this.pageBar1.Size = new System.Drawing.Size(985, 30); + this.pageBar1.TabIndex = 4; + this.pageBar1.TotalPages = 0; + // + // gridControl1 + // + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView2; + this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(985, 170); + this.gridControl1.TabIndex = 5; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView2}); + // + // gridView2 + // + this.gridView2.Appearance.Row.Options.UseFont = true; + this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn9, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16}); + this.gridView2.DetailHeight = 272; + this.gridView2.GridControl = this.gridControl1; + this.gridView2.IndicatorWidth = 44; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsFind.ShowSearchNavButtons = false; + this.gridView2.OptionsView.ShowAutoFilterRow = true; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // gridColumn9 + // + this.gridColumn9.Caption = "搴忓彿"; + this.gridColumn9.FieldName = "xh"; + this.gridColumn9.MinWidth = 21; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Tag = "daa001"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 0; + this.gridColumn9.Width = 79; + // + // gridColumn20 + // + this.gridColumn20.Caption = "妫�楠屽崟鍙�"; + this.gridColumn20.FieldName = "releaseNo"; + this.gridColumn20.MinWidth = 21; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 1; + this.gridColumn20.Width = 79; + // + // gridColumn21 + // + this.gridColumn21.Caption = "鐗╂枡缂栫爜"; + this.gridColumn21.FieldName = "itemNo"; + this.gridColumn21.MinWidth = 21; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 2; + this.gridColumn21.Width = 79; + // + // gridColumn22 + // + this.gridColumn22.Caption = "鐗╂枡鍚嶇О"; + this.gridColumn22.FieldName = "itemName"; + this.gridColumn22.MinWidth = 21; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 3; + this.gridColumn22.Width = 79; + // + // gridColumn12 + // + this.gridColumn12.Caption = "瑙勬牸鍨嬪彿"; + this.gridColumn12.FieldName = "itemModel"; + this.gridColumn12.MinWidth = 21; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Tag = "itemModel"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 6; + this.gridColumn12.Width = 79; + // + // gridColumn13 + // + this.gridColumn13.Caption = "鏁伴噺"; + this.gridColumn13.FieldName = "quantity"; + this.gridColumn13.MinWidth = 21; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 5; + this.gridColumn13.Width = 79; + // + // gridColumn14 + // + this.gridColumn14.Caption = "缁撴灉"; + this.gridColumn14.FieldName = "checkResu"; + this.gridColumn14.MinWidth = 21; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 6; + this.gridColumn14.Width = 79; + // + // gridColumn15 + // + this.gridColumn15.Caption = "妫�楠屼汉"; + this.gridColumn15.FieldName = "jyr"; + this.gridColumn15.MinWidth = 21; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 7; + this.gridColumn15.Width = 79; + // + // gridColumn16 + // + this.gridColumn16.Caption = "妫�楠屾椂闂�"; + this.gridColumn16.FieldName = "jyDate"; + this.gridColumn16.MinWidth = 21; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 8; + this.gridColumn16.Width = 79; + // + // IQCMX + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(987, 530); + this.Controls.Add(this.xtraTabControl1); + this.Controls.Add(this.toolBarMenu1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "IQCMX"; + this.Text = "鎴愬搧鍏ュ簱璁板綍琛�"; + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); + this.split1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); + this.split1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1)).EndInit(); + this.split1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + this.ResumeLayout(false); + + } + #endregion + private UserControl.UcToolBarMenu toolBarMenu1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraEditors.SplitContainerControl split1; + private UserControls.Data.UcPageBar pageBar1; + private DevExpress.XtraGrid.GridControl gcMain1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn itemNo1; + private DevExpress.XtraGrid.Columns.GridColumn itemName; + private DevExpress.XtraGrid.Columns.GridColumn itemModel; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.Utils.ToolTipController tips; + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.cs new file mode 100644 index 0000000..4cae1e5 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.cs @@ -0,0 +1,242 @@ +using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; +using DevExpress.Utils.DirectXPaint; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; +using Gs.DevApp.UserControl; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlTypes; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Gs.DevApp.DevFrm.Rpt +{ + public partial class IPQCXJMX : DevExpress.XtraEditors.XtraForm + { + //鏉$爜浜ゆ槗鏄庣粏 + string _webServiceName = "FqcItemsManager/"; + List<FilterEntity> _filterList = new List<FilterEntity>(); + public IPQCXJMX() + { + InitializeComponent(); + this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; + this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + this.toolBarMenu1.getXmlConfig(); + // 璁剧疆gridView1鍙傛暟锛屽苟娣诲姞琛岄�夋嫨浜嬩欢澶勭悊 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", null, tips, true, null); + // 娣诲姞gridView1鐨勮閫夋嫨鍙樺寲浜嬩欢 + gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; + // 璁剧疆gridView2鍙傛暟 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); + getPageList(1); + pageBar1.PagerEvent += PageBar1_PagerEvent; + } + + /// <summary> + /// gridView1琛岄�夋嫨鍙樺寲浜嬩欢澶勭悊 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void GridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + if (e.FocusedRowHandle >= 0) + { + // 鑾峰彇閫変腑琛岀殑宸ュ崟鍗曞彿 + var dr = gridView1.GetDataRow(e.FocusedRowHandle); + if (dr != null) + { + string workOrderNo = dr["yf"].ToString(); + if (!string.IsNullOrEmpty(workOrderNo)) + { + // 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + getCPMXDetail(workOrderNo); + } + } + } + else + { + // 濡傛灉娌℃湁閫変腑琛岋紝娓呯┖gridView2 + clearGridView2(); + } + } + + /// <summary> + /// 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + /// </summary> + /// <param name="workOrderNo">宸ュ崟鍗曞彿</param> + private void getCPMXDetail(string workOrderNo) + { + try + { + + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + + // 鏋勯�犺姹傚弬鏁� + var requestObj = new + { + yf = workOrderNo, + keyWhere = _sbSqlWhere.ToString() + }; + string json = JsonConvert.SerializeObject(requestObj); + + // 璋冪敤鍚庡彴鎺ュ彛鑾峰彇鏄庣粏鏁版嵁 + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIPQCXJMXDetail", json); + ReturnModel<dynamic> _rtn = UtilityHelper.ReturnToDynamic(strReturn); + + if (_rtn.rtnCode > 0) + { + dynamic dy = _rtn.rtnData; + JObject _job = JObject.Parse(strReturn); + JArray array = new JArray(); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); + if (dt.Rows.Count > 0) + { + gridControl1.BindingContext = new BindingContext(); + gridControl1.DataSource = dt; + gridControl1.ForceInitialize(); + gridView2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2); + } + else + { + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + } + else + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁澶辫触锛�" + _rtn.rtnMsg); + clearGridView2(); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁寮傚父锛�" + ex.Message); + clearGridView2(); + } + } + + /// <summary> + /// 娓呯┖gridView2 + /// </summary> + private void clearGridView2() + { + gridControl1.DataSource = null; + UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + + private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) + { + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + await Task.Delay(100); + getPageList(1); + } + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="curPage"></param> + /// <param name="pageSize"></param> + private void PageBar1_PagerEvent(int curPage, int pageSize) + { + getPageList(curPage); + } + /// <summary> + /// 鏌ヨ浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) + { + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + gridView1.ActiveFilter.Clear(); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); + frm.UpdateParent += Frm_UpdateParent; + frm.ShowDialog(); + } + /// <summary> + /// 鏌ヨ鍥炶皟 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) + { + _filterList = e.FilterList; + getPageList(1); + } + + /// <summary> + /// 鍒锋柊浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) + { + getPageList(this.pageBar1.CurrentPage); + } + + /// <summary> + /// + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage) + { + gcMain1.DataSource = null; + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.erp_sczz in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.INDEP_DATE", "asc", "", _sbSqlWhere.ToString()); + string json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIPQCXJMX", json); + ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain1.BindingContext = new BindingContext(); + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + if (dt.Rows.Count > 0) + { + gcMain1.DataSource = dt; + gcMain1.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + + } + else + UtilityHelper.SetDefaultTable(gcMain1, gridView1); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉 + pageBar1.CurrentPage = curPage;//褰撳墠椤� + pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟 + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.resx b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.resx new file mode 100644 index 0000000..a4826a3 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IPQCXJMX.resx @@ -0,0 +1,123 @@ +<?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> + <metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.Designer.cs new file mode 100644 index 0000000..f81d8f1 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.Designer.cs @@ -0,0 +1,421 @@ +/* Create By GS EasyCode */ +namespace Gs.DevApp.DevFrm.Rpt +{ + partial class IQCMX + { + /// <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.components = new System.ComponentModel.Container(); + this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gcMain1 = new DevExpress.XtraGrid.GridControl(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemNo1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemName = new DevExpress.XtraGrid.Columns.GridColumn(); + this.itemModel = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.pageBar1 = new UserControls.Data.UcPageBar(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.tips = new DevExpress.Utils.ToolTipController(this.components); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit(); + this.split1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).BeginInit(); + this.split1.Panel2.SuspendLayout(); + this.split1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + this.SuspendLayout(); + // + // toolBarMenu1 + // + this.toolBarMenu1.chkParameter = null; + this.toolBarMenu1.currentAction = null; + this.toolBarMenu1.defaultActions = "鏌ヨ"; + this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; + this.toolBarMenu1.guidKey = null; + this.toolBarMenu1.isSetBtn = false; + this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); + this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.toolBarMenu1.Name = "toolBarMenu1"; + this.toolBarMenu1.rptParameter = null; + this.toolBarMenu1.Size = new System.Drawing.Size(987, 62); + this.toolBarMenu1.TabIndex = 0; + this.toolBarMenu1.xlsInService = null; + this.toolBarMenu1.xlsOutParameter = null; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 62); + this.xtraTabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl1.Size = new System.Drawing.Size(987, 468); + this.xtraTabControl1.TabIndex = 3; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.split1); + this.xtraTabPage1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(985, 442); + this.xtraTabPage1.Text = "鏁版嵁鍒楄〃"; + // + // split1 + // + this.split1.Dock = System.Windows.Forms.DockStyle.Fill; + this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; + this.split1.Horizontal = false; + this.split1.Location = new System.Drawing.Point(0, 0); + this.split1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.split1.Name = "split1"; + // + // split1.Panel1 + // + this.split1.Panel1.Controls.Add(this.gcMain1); + this.split1.Panel1.Controls.Add(this.pageBar1); + this.split1.Panel1.Text = "Panel1"; + // + // split1.Panel2 + // + this.split1.Panel2.Controls.Add(this.gridControl1); + this.split1.Panel2.Text = "Panel2"; + this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.split1.Size = new System.Drawing.Size(985, 442); + this.split1.SplitterPosition = 170; + this.split1.TabIndex = 0; + // + // gcMain1 + // + this.gcMain1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcMain1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Location = new System.Drawing.Point(0, 0); + this.gcMain1.MainView = this.gridView1; + this.gcMain1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gcMain1.Name = "gcMain1"; + this.gcMain1.Size = new System.Drawing.Size(985, 232); + this.gcMain1.TabIndex = 5; + this.gcMain1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // gridView1 + // + this.gridView1.Appearance.Row.Options.UseFont = true; + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn8, + this.itemNo1, + this.itemName, + this.itemModel, + this.gridColumn1, + this.gridColumn2}); + this.gridView1.DetailHeight = 272; + this.gridView1.GridControl = this.gcMain1; + this.gridView1.IndicatorWidth = 44; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsFind.ShowSearchNavButtons = false; + this.gridView1.OptionsView.ShowAutoFilterRow = true; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gridColumn8 + // + this.gridColumn8.Caption = "鏈堜唤"; + this.gridColumn8.FieldName = "yf"; + this.gridColumn8.MinWidth = 21; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Tag = "daa001"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 0; + this.gridColumn8.Width = 79; + // + // itemNo1 + // + this.itemNo1.Caption = "鏉ユ枡鎬诲崟鏁�"; + this.itemNo1.FieldName = "llzds"; + this.itemNo1.MinWidth = 21; + this.itemNo1.Name = "itemNo1"; + this.itemNo1.Tag = "itemNo"; + this.itemNo1.Visible = true; + this.itemNo1.VisibleIndex = 1; + this.itemNo1.Width = 79; + // + // itemName + // + this.itemName.Caption = "涓嶅悎鏍煎崟鏁�"; + this.itemName.FieldName = "bhgds"; + this.itemName.MinWidth = 21; + this.itemName.Name = "itemName"; + this.itemName.Tag = "itemName"; + this.itemName.Visible = true; + this.itemName.VisibleIndex = 2; + this.itemName.Width = 79; + // + // itemModel + // + this.itemModel.Caption = "鍚堟牸鐜�"; + this.itemModel.FieldName = "hgl"; + this.itemModel.MinWidth = 21; + this.itemModel.Name = "itemModel"; + this.itemModel.Tag = "itemModel"; + this.itemModel.Visible = true; + this.itemModel.VisibleIndex = 3; + this.itemModel.Width = 79; + // + // gridColumn1 + // + this.gridColumn1.Caption = "瓒呮椂鍗曟暟"; + this.gridColumn1.FieldName = "csds"; + this.gridColumn1.MinWidth = 21; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 79; + // + // gridColumn2 + // + this.gridColumn2.Caption = "妫�楠屽強鏃剁巼"; + this.gridColumn2.FieldName = "jyjsl"; + this.gridColumn2.MinWidth = 21; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 5; + this.gridColumn2.Width = 79; + // + // pageBar1 + // + this.pageBar1.CurrentPage = 1; + this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pageBar1.Location = new System.Drawing.Point(0, 232); + this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.pageBar1.Name = "pageBar1"; + this.pageBar1.RecordCount = 0; + this.pageBar1.Size = new System.Drawing.Size(985, 30); + this.pageBar1.TabIndex = 4; + this.pageBar1.TotalPages = 0; + // + // gridControl1 + // + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView2; + this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gridControl1.Name = "gridControl1"; + this.gridControl1.Size = new System.Drawing.Size(985, 170); + this.gridControl1.TabIndex = 5; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView2}); + // + // gridView2 + // + this.gridView2.Appearance.Row.Options.UseFont = true; + this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn9, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16}); + this.gridView2.DetailHeight = 272; + this.gridView2.GridControl = this.gridControl1; + this.gridView2.IndicatorWidth = 44; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsFind.ShowSearchNavButtons = false; + this.gridView2.OptionsView.ShowAutoFilterRow = true; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // gridColumn9 + // + this.gridColumn9.Caption = "搴忓彿"; + this.gridColumn9.FieldName = "xh"; + this.gridColumn9.MinWidth = 21; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Tag = "daa001"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 0; + this.gridColumn9.Width = 79; + // + // gridColumn20 + // + this.gridColumn20.Caption = "妫�楠屽崟鍙�"; + this.gridColumn20.FieldName = "releaseNo"; + this.gridColumn20.MinWidth = 21; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 1; + this.gridColumn20.Width = 79; + // + // gridColumn21 + // + this.gridColumn21.Caption = "鐗╂枡缂栫爜"; + this.gridColumn21.FieldName = "itemNo"; + this.gridColumn21.MinWidth = 21; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 2; + this.gridColumn21.Width = 79; + // + // gridColumn22 + // + this.gridColumn22.Caption = "鐗╂枡鍚嶇О"; + this.gridColumn22.FieldName = "itemName"; + this.gridColumn22.MinWidth = 21; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 3; + this.gridColumn22.Width = 79; + // + // gridColumn12 + // + this.gridColumn12.Caption = "瑙勬牸鍨嬪彿"; + this.gridColumn12.FieldName = "itemModel"; + this.gridColumn12.MinWidth = 21; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Tag = "itemModel"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 6; + this.gridColumn12.Width = 79; + // + // gridColumn13 + // + this.gridColumn13.Caption = "鏁伴噺"; + this.gridColumn13.FieldName = "quantity"; + this.gridColumn13.MinWidth = 21; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 5; + this.gridColumn13.Width = 79; + // + // gridColumn14 + // + this.gridColumn14.Caption = "缁撴灉"; + this.gridColumn14.FieldName = "checkResu"; + this.gridColumn14.MinWidth = 21; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 6; + this.gridColumn14.Width = 79; + // + // gridColumn15 + // + this.gridColumn15.Caption = "妫�楠屼汉"; + this.gridColumn15.FieldName = "jyr"; + this.gridColumn15.MinWidth = 21; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 7; + this.gridColumn15.Width = 79; + // + // gridColumn16 + // + this.gridColumn16.Caption = "妫�楠屾椂闂�"; + this.gridColumn16.FieldName = "jyDate"; + this.gridColumn16.MinWidth = 21; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 8; + this.gridColumn16.Width = 79; + // + // IQCMX + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(987, 530); + this.Controls.Add(this.xtraTabControl1); + this.Controls.Add(this.toolBarMenu1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "IQCMX"; + this.Text = "鎴愬搧鍏ュ簱璁板綍琛�"; + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); + this.split1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); + this.split1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.split1)).EndInit(); + this.split1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gcMain1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + this.ResumeLayout(false); + + } + #endregion + private UserControl.UcToolBarMenu toolBarMenu1; + private DevExpress.XtraTab.XtraTabControl xtraTabControl1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage1; + private DevExpress.XtraEditors.SplitContainerControl split1; + private UserControls.Data.UcPageBar pageBar1; + private DevExpress.XtraGrid.GridControl gcMain1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn itemNo1; + private DevExpress.XtraGrid.Columns.GridColumn itemName; + private DevExpress.XtraGrid.Columns.GridColumn itemModel; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.Utils.ToolTipController tips; + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.cs new file mode 100644 index 0000000..d13fa48 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.cs @@ -0,0 +1,242 @@ +using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; +using DevExpress.Utils.DirectXPaint; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; +using Gs.DevApp.UserControl; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlTypes; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Gs.DevApp.DevFrm.Rpt +{ + public partial class IQCMX : DevExpress.XtraEditors.XtraForm + { + //鏉$爜浜ゆ槗鏄庣粏 + string _webServiceName = "FqcItemsManager/"; + List<FilterEntity> _filterList = new List<FilterEntity>(); + public IQCMX() + { + InitializeComponent(); + this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; + this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + this.toolBarMenu1.getXmlConfig(); + // 璁剧疆gridView1鍙傛暟锛屽苟娣诲姞琛岄�夋嫨浜嬩欢澶勭悊 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", null, tips, true, null); + // 娣诲姞gridView1鐨勮閫夋嫨鍙樺寲浜嬩欢 + gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; + // 璁剧疆gridView2鍙傛暟 + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); + getPageList(1); + pageBar1.PagerEvent += PageBar1_PagerEvent; + } + + /// <summary> + /// gridView1琛岄�夋嫨鍙樺寲浜嬩欢澶勭悊 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void GridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) + { + if (e.FocusedRowHandle >= 0) + { + // 鑾峰彇閫変腑琛岀殑宸ュ崟鍗曞彿 + var dr = gridView1.GetDataRow(e.FocusedRowHandle); + if (dr != null) + { + string workOrderNo = dr["yf"].ToString(); + if (!string.IsNullOrEmpty(workOrderNo)) + { + // 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + getCPMXDetail(workOrderNo); + } + } + } + else + { + // 濡傛灉娌℃湁閫変腑琛岋紝娓呯┖gridView2 + clearGridView2(); + } + } + + /// <summary> + /// 鏍规嵁宸ュ崟鍗曞彿鑾峰彇鏄庣粏鏁版嵁 + /// </summary> + /// <param name="workOrderNo">宸ュ崟鍗曞彿</param> + private void getCPMXDetail(string workOrderNo) + { + try + { + + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.ReceiveOrgId in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + + // 鏋勯�犺姹傚弬鏁� + var requestObj = new + { + yf = workOrderNo, + keyWhere = _sbSqlWhere.ToString() + }; + string json = JsonConvert.SerializeObject(requestObj); + + // 璋冪敤鍚庡彴鎺ュ彛鑾峰彇鏄庣粏鏁版嵁 + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIQCMXDetail", json); + ReturnModel<dynamic> _rtn = UtilityHelper.ReturnToDynamic(strReturn); + + if (_rtn.rtnCode > 0) + { + dynamic dy = _rtn.rtnData; + JObject _job = JObject.Parse(strReturn); + JArray array = new JArray(); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); + if (dt.Rows.Count > 0) + { + gridControl1.BindingContext = new BindingContext(); + gridControl1.DataSource = dt; + gridControl1.ForceInitialize(); + gridView2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2); + } + else + { + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + } + else + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁澶辫触锛�" + _rtn.rtnMsg); + clearGridView2(); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鑾峰彇鏄庣粏鏁版嵁寮傚父锛�" + ex.Message); + clearGridView2(); + } + } + + /// <summary> + /// 娓呯┖gridView2 + /// </summary> + private void clearGridView2() + { + gridControl1.DataSource = null; + UtilityHelper.SetDefaultTable(gridControl1, gridView2); + } + + private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) + { + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + await Task.Delay(100); + getPageList(1); + } + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="curPage"></param> + /// <param name="pageSize"></param> + private void PageBar1_PagerEvent(int curPage, int pageSize) + { + getPageList(curPage); + } + /// <summary> + /// 鏌ヨ浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) + { + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + gridView1.ActiveFilter.Clear(); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); + frm.UpdateParent += Frm_UpdateParent; + frm.ShowDialog(); + } + /// <summary> + /// 鏌ヨ鍥炶皟 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) + { + _filterList = e.FilterList; + getPageList(1); + } + + /// <summary> + /// 鍒锋柊浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) + { + getPageList(this.pageBar1.CurrentPage); + } + + /// <summary> + /// + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage) + { + gcMain1.DataSource = null; + System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); + _sbSqlWhere.Append(" and a.ReceiveOrgId in"); + _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere()); + _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList)); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.INDEP_DATE", "asc", "", _sbSqlWhere.ToString()); + string json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetIQCMX", json); + ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain1.BindingContext = new BindingContext(); + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + if (dt.Rows.Count > 0) + { + gcMain1.DataSource = dt; + gcMain1.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + + } + else + UtilityHelper.SetDefaultTable(gcMain1, gridView1); + gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉 + pageBar1.CurrentPage = curPage;//褰撳墠椤� + pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟 + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } + } + catch (Exception ex) + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } + } + } +} \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.resx b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.resx new file mode 100644 index 0000000..a4826a3 --- /dev/null +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/IQCMX.resx @@ -0,0 +1,123 @@ +<?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> + <metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj b/DevApp/Gs.DevApp/Gs.DevApp.csproj index 45a48c5..973a3d8 100644 --- a/DevApp/Gs.DevApp/Gs.DevApp.csproj +++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj @@ -788,6 +788,30 @@ <Compile Include="DevFrm\Rpt\CkYtmx.Designer.cs"> <DependentUpon>CkYtmx.cs</DependentUpon> </Compile> + <Compile Include="DevFrm\Rpt\IPQCSJMX.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DevFrm\Rpt\IPQCSJMX.Designer.cs"> + <DependentUpon>IPQCSJMX.cs</DependentUpon> + </Compile> + <Compile Include="DevFrm\Rpt\IPQCXJMX.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DevFrm\Rpt\IPQCXJMX.Designer.cs"> + <DependentUpon>IPQCXJMX.cs</DependentUpon> + </Compile> + <Compile Include="DevFrm\Rpt\FQCMX.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DevFrm\Rpt\FQCMX.Designer.cs"> + <DependentUpon>FQCMX.cs</DependentUpon> + </Compile> + <Compile Include="DevFrm\Rpt\IQCMX.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="DevFrm\Rpt\IQCMX.Designer.cs"> + <DependentUpon>IQCMX.cs</DependentUpon> + </Compile> <Compile Include="DevFrm\Rpt\CPMX.cs"> <SubType>Form</SubType> </Compile> @@ -1936,6 +1960,18 @@ <EmbeddedResource Include="DevFrm\Rpt\CkYtmx.resx"> <DependentUpon>CkYtmx.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="DevFrm\Rpt\IPQCSJMX.resx"> + <DependentUpon>IPQCSJMX.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DevFrm\Rpt\IPQCXJMX.resx"> + <DependentUpon>IPQCXJMX.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DevFrm\Rpt\FQCMX.resx"> + <DependentUpon>FQCMX.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="DevFrm\Rpt\IQCMX.resx"> + <DependentUpon>IQCMX.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="DevFrm\Rpt\CPMX.resx"> <DependentUpon>CPMX.cs</DependentUpon> </EmbeddedResource> -- Gitblit v1.9.3