From 719a47b4aff725d4224b85e2b2079983cb31cf89 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期二, 23 十二月 2025 13:28:36 +0800
Subject: [PATCH] 增加临时查询方案
---
DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs | 47 +++++++++++----
DevApp/Gs.DevApp/UserControl/ShowFilter.resx | 21 +++++++
DevApp/Gs.DevApp/UserControl/ShowFilter.cs | 57 +++++++++++++++++++
3 files changed, 111 insertions(+), 14 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs
index 2efe221..51bcaa6 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs
@@ -29,6 +29,7 @@
/// </summary>
private void InitializeComponent()
{
+ DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode();
DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -44,8 +45,8 @@
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShowFilter));
this.panel1 = new System.Windows.Forms.Panel();
- this.btnEsc = new DevExpress.XtraEditors.SimpleButton();
this.btnQuery = new DevExpress.XtraEditors.SimpleButton();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -87,6 +88,8 @@
this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemComboBox3Sql = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.btnFa = new DevExpress.XtraEditors.SimpleButton();
+ this.btnEsc = new DevExpress.XtraEditors.SimpleButton();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
@@ -119,23 +122,13 @@
// panel1
//
this.panel1.Controls.Add(this.btnEsc);
+ this.panel1.Controls.Add(this.btnFa);
this.panel1.Controls.Add(this.btnQuery);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 529);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(734, 44);
this.panel1.TabIndex = 1;
- //
- // btnEsc
- //
- this.btnEsc.Appearance.Options.UseFont = true;
- this.btnEsc.Dock = System.Windows.Forms.DockStyle.Right;
- this.btnEsc.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
- this.btnEsc.Location = new System.Drawing.Point(546, 0);
- this.btnEsc.Name = "btnEsc";
- this.btnEsc.Size = new System.Drawing.Size(94, 44);
- this.btnEsc.TabIndex = 1;
- this.btnEsc.Text = "鍙栨秷鏌ヨ";
//
// btnQuery
//
@@ -147,7 +140,7 @@
this.btnQuery.Location = new System.Drawing.Point(640, 0);
this.btnQuery.Name = "btnQuery";
this.btnQuery.Size = new System.Drawing.Size(94, 44);
- this.btnQuery.TabIndex = 0;
+ this.btnQuery.TabIndex = 3;
this.btnQuery.Text = "纭畾鏌ヨ";
//
// xtraTabControl1
@@ -173,6 +166,9 @@
// gcMain
//
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
+ gridLevelNode1.RelationName = "Level1";
+ this.gcMain.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] {
+ gridLevelNode1});
this.gcMain.Location = new System.Drawing.Point(0, 0);
this.gcMain.MainView = this.gridView1;
this.gcMain.Name = "gcMain";
@@ -592,6 +588,28 @@
this.gridColumn9.VisibleIndex = 3;
this.gridColumn9.Width = 94;
//
+ // btnFa
+ //
+ this.btnFa.Appearance.Options.UseFont = true;
+ this.btnFa.Dock = System.Windows.Forms.DockStyle.Right;
+ this.btnFa.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnFa.ImageOptions.Image")));
+ this.btnFa.Location = new System.Drawing.Point(459, 0);
+ this.btnFa.Name = "btnFa";
+ this.btnFa.Size = new System.Drawing.Size(181, 44);
+ this.btnFa.TabIndex = 1;
+ this.btnFa.Text = "淇濆瓨涓轰复鏃舵煡璇㈡柟妗�";
+ //
+ // btnEsc
+ //
+ this.btnEsc.Appearance.Options.UseFont = true;
+ this.btnEsc.Dock = System.Windows.Forms.DockStyle.Right;
+ this.btnEsc.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
+ this.btnEsc.Location = new System.Drawing.Point(365, 0);
+ this.btnEsc.Name = "btnEsc";
+ this.btnEsc.Size = new System.Drawing.Size(94, 44);
+ this.btnEsc.TabIndex = 4;
+ this.btnEsc.Text = "鍙栨秷鍏抽棴";
+ //
// ShowFilter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -638,7 +656,6 @@
#endregion
private System.Windows.Forms.Panel panel1;
- private DevExpress.XtraEditors.SimpleButton btnEsc;
private DevExpress.XtraEditors.SimpleButton btnQuery;
private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
@@ -681,5 +698,7 @@
private DevExpress.XtraGrid.Columns.GridColumn gridColumn17;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn18;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn19;
+ private DevExpress.XtraEditors.SimpleButton btnFa;
+ private DevExpress.XtraEditors.SimpleButton btnEsc;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
index 8a1957c..2a83a73 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -1,6 +1,7 @@
锘縰sing DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Columns;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -66,8 +67,64 @@
if (xtraTabControl1.SelectedTabPageIndex == 1)
getPageListQuery();
};
+ #region 淇濆瓨涓存椂鏌ヨ鏂规 2025-12-23鍔犱笂
+ btnFa.Click += (s, e) =>
+ {
+ gridView1.CloseEditor();
+ gridView1.UpdateCurrentRow();
+ var sbWhere = new StringBuilder();
+ var listGv = new List<FilterEntity>();
+ for (var i = 0; i < gridView1.DataRowCount; i++)
+ {
+ if (string.IsNullOrEmpty(gridView1.GetRowCellValue(i, "field")
+ .ToString())
+ || string.IsNullOrEmpty(gridView1
+ .GetRowCellValue(i, "fieldWhere").ToString())
+ || string.IsNullOrEmpty(gridView1
+ .GetRowCellValue(i, "fieldValue").ToString())
+ )
+ continue;
+ string _fieId, _fileIdDec;
+ (_fieId, _fileIdDec) =
+ _getFiled(gridView1.GetRowCellValue(i, "field").ToString());
+ string _fileWhere, _fileWhereDec;
+ (_fileWhere, _fileWhereDec) = _getFiled(gridView1
+ .GetRowCellValue(i, "fieldWhere").ToString());
+ var _fieldValue = gridView1.GetRowCellValue(i, "fieldValue")
+ .ToString();
+ var _fieldType = gridView1.GetRowCellValue(i, "fieldType")
+ .ToString();
+ //濡傛灉鏄痩ike 瑕佸姞涓婄櫨鍒嗗彿
+ if (_fileWhere.Contains("like"))
+ {
+ _fileWhere = "like";
+ _fieldValue = "%" + _fieldValue + "%";
+ }
+ listGv.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere,
+ _fileWhereDec, _fieldValue, _fieldType));
+ //鎶婅繖涓猯istGv淇濆瓨鑷虫暟鎹簱
+ }
+ var _obj = new { formPath = _fullName, list = listGv };
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", "Fm/SetFormSearchAll", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ };
+ #endregion
}
+
/// <summary>
/// 鏌ヨ闆嗗悎
/// </summary>
diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.resx b/DevApp/Gs.DevApp/UserControl/ShowFilter.resx
index 1af7de1..8d26bee 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.resx
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.resx
@@ -117,4 +117,25 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="btnFa.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv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