From 47d90c78a5e00f50e804705aa208ff1f264cb4f6 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期日, 09 二月 2025 12:09:19 +0800
Subject: [PATCH] 工单细节

---
 DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
index 5d6f140..151b18b 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -175,6 +175,7 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
         {
+            toolBarMenu1.currentAction = "edit";
             string rowGuid = "", rowName = "";
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_daa001, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
@@ -183,9 +184,17 @@
                 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(panel1.Controls, true);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid);
+            }
+            else
+            {
+                List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+                gvList.Add(gvMx1);
+                gvList.Add(gvMx2);
+                UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
+            }
         }
 
         /// <summary>
@@ -228,7 +237,7 @@
         private void getPageList(int curPage)
         {
             var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
-            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
+            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "desc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
             {
@@ -265,11 +274,13 @@
         private void getModel(string strGuid)
         {
             bool isEdit = false;
-            if (toolBarMenu1.currentAction == "add")
+            if (toolBarMenu1.currentAction == "add") return;
+            if (toolBarMenu1.currentAction == "edit") isEdit = true;
+            if (string.IsNullOrEmpty(strGuid))
             {
-                Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
-            };
+            }
             if (string.IsNullOrEmpty(strGuid))
             {
                 ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");

--
Gitblit v1.9.3