From ccc1b0d541d8f3bdd2bcb72dd0b5533e68b886d5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 09 六月 2025 09:53:37 +0800
Subject: [PATCH] 采购明细报表

---
 DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs |   44 ++++++++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
index 5c79944..9a46f4b 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwPc.cs
@@ -28,18 +28,18 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             this.toolBarMenu1.getXmlConfig();
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, this, "shChk", "", (value) =>
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "shChk", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
-            });
+            }, tips);
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
                 getModel(value);
             }, (value) =>
             {
                 getPageList(this.pageBar1.CurrentPage);
-            });
+            }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             ////閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
@@ -79,7 +79,7 @@
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
-            _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
             Task.Delay(100);
             getPageList(1);
         }
@@ -221,17 +221,28 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
         {
-            string rowGuid = "", rowName = "";
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_hNo, gridView1);
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_hNo, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
-            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
-            gvList.Add(gvMx1);
-            UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
+
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid);
+
+            }
+            else
+            {
+                List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+                gvList.Add(gvMx1);
+                UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
+            }
+
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -318,6 +329,7 @@
                     gvList.Add(gvMx1);
                     UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
                     toolBarMenu1.currentAction = "";
+                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
             }
             catch (Exception ex)
@@ -333,7 +345,7 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -373,15 +385,11 @@
         private void getModel(string strGuid)
         {
             bool isEdit = false;
-            if (toolBarMenu1.currentAction == "add")
-            {
-                Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
-                return;
-            };
+            if (toolBarMenu1.currentAction == "add") return;
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new

--
Gitblit v1.9.3