From 48c9e2692ee60cdb6c1c4a297791a5bdcdc698c4 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 27 二月 2025 18:15:54 +0800
Subject: [PATCH] 销售
---
DevApp/Gs.DevApp/DevFrm/WW/Frm_WwGd.cs | 119 +++++++++++++++++++++++------------------------------------
1 files changed, 47 insertions(+), 72 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwGd.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwGd.cs
index 82edb3b..d5f9c55 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwGd.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwGd.cs
@@ -1,4 +1,3 @@
-using DevExpress.RichEdit.Export;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -7,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -29,9 +27,14 @@
this.toolBarMenu1.btnTzblClick += ToolBarMenu1_btnTzblClick;
this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick;
this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
+ toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ toolBarMenu1.btnLayoutClick += ToolBarMenu1_btnLayoutClick;
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gridView1);
+ gvList.Add(gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, this, "pcShChk", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
});
@@ -44,22 +47,40 @@
});
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- this.ucBtnPrint1.btnDesignClick += (s, e) =>
- {
- ucBtnPrint1.rptParameter = "rpt_daa{}";
- };
- this.ucBtnPrint1.btnReportClick += (s, e) =>
- {
- _print();
- };
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+ Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
}
-
+ /// <summary>
+ /// 鏃ュ織
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_daa001, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ }
+ /// <summary>
+ /// 甯冨眬浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLayoutClick(object sender, EventArgs e)
+ {
+ string _formNamespace = this.GetType().FullName;
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gridView1);
+ gvList.Add(gvMx1);
+ Gs.DevApp.UserControl.showLayOut DevFrm = new showLayOut(_formNamespace, gvList);
+ DevFrm.ShowDialog();
+ }
/// <summary>
/// 鍒嗛〉浜嬩欢
/// </summary>
@@ -145,14 +166,15 @@
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
/// <summary>
@@ -230,6 +252,7 @@
{
gcMain.DataSource = dt;
gcMain.ForceInitialize();
+ gridView1.BestFitColumns();
}
else
UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -289,26 +312,11 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
}
else
{
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
- }
- JArray array2 = new JArray();
- foreach (var a in _job["rtnData"]["list2"])
- {
- array2.Add(a);
- }
- DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
- if (dt.Rows.Count > 0)
- {
- gcMx2.BindingContext = new BindingContext();
- gcMx2.DataSource = dt2;
- gcMx2.ForceInitialize();
- }
- else
- {
- Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
}
}
else
@@ -394,38 +402,5 @@
}
}
- private void _print()
- {
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_daa001, gridView1);
- ucBtnPrint1.guidKey = rowGuid;
- if (rowGuid.Length < 36)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�");
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
- txt_iCount_1.Focus();
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
- txt_psnQty_1.Focus();
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- this.ucBtnPrint1.rptParameter = "rpt_daa{" + ""
- + "," + txt_printRemark.Text.Trim()
- + "," + ""
- + "," + txt_iCount_1.Text.Trim()
- + "," + txt_psnQty_1.Text.Trim()
- + "}";
- }
}
}
\ No newline at end of file
--
Gitblit v1.9.3