From b0046e84b9f95ce07dbbd117758da848ede67546 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期一, 28 七月 2025 08:14:05 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs |   79 ++++++++++++++++++++++-----------------
 1 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
index dd8582d..d5bc7e6 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
@@ -82,17 +82,12 @@
                     }
                     catch (Exception ex)
                     {
-                        MessageBox.Show(ex.Message);
+                        Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
                     }
                 };
                 frm.ShowDialog();
             };
-
-            this.ucBtnPrint1.btnDesignClick += (s, e) =>
-            {
-                ucBtnPrint1.rptParameter = "rpt_wwtl{}";
-            };
-            this.ucBtnPrint1.btnReportClick += (s, e) =>
+            this.ucBtnPrint1.btnPrintClick += (s, e) =>
             {
                 ucBtnPrint1.guidKey = "";
                 string rowGuid = lbMxGuid.Text.Trim();
@@ -189,8 +184,6 @@
             getPageList(1);
         }
 
-
-
         /// <summary>
         ///     瀹℃牳浜嬩欢
         /// </summary>
@@ -233,7 +226,7 @@
                 lbGuid, txt_billNo, gridView1, "billNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -251,18 +244,19 @@
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
+                    MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     if (xtraTabControl1.SelectedTabPageIndex == 0)
                     { }
                     else
                         Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                     getPageList(this.pageBar1.CurrentPage);
                 }
-
-                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                else
+                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -314,7 +308,9 @@
                 gvList.Add(gvMx2);
                 UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
             }
-
+            //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼渚涘簲鍟嗗拰缁勭粐srm,绂佺敤
+            txt_tbl002.IsReadly = true;
+            txt_tbl005.ReadOnly = true;
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -343,13 +339,13 @@
             string workId = txt_tbl002.GetId();
             if (string.IsNullOrEmpty(workId.Trim()))
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
                 txt_tbl002.Focus();
                 return;
             }
             if (txt_tbl005.SelectedIndex <= 0)
             {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨閫�鏂欑被鍨嬶紒");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨閫�鏂欑被鍨嬶紒");
                 txt_tbl005.Focus();
                 return;
             }
@@ -382,12 +378,18 @@
                         MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
                         return;
                     }
+                    string _tld014 = row["tld014"].ToString();
+                    if (string.IsNullOrEmpty(_tld014))
+                    {
+                        MsgHelper.ShowError("閫�鏂欏娉ㄤ笉鑳戒负绌猴紒");
+                        return;
+                    }
                     _obj.list.Add(new
                     {
                         Guid = _guid,
                         AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["aboutGuid"].ToString()),
                         Sl = _sl, //鐢宠鏁伴噺
-                        Remark = row["tld014"].ToString()
+                        Remark = _tld014
                     });
                 }
             }
@@ -395,9 +397,9 @@
             {
                 string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
+                    ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     lbGuid.Text = _rtn.rtnData.outGuid;
                     txt_billNo.Text = _rtn.rtnData.outNo;
                     toolBarMenu1.isSetBtn = true;
@@ -408,10 +410,12 @@
                     toolBarMenu1.currentAction = "";
                     Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
+                else
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -422,7 +426,7 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain1.DataSource = null;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
@@ -466,7 +470,7 @@
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new
@@ -519,7 +523,7 @@
                         gcMx2.ForceInitialize();
                         gvMx2.BestFitColumns();
                         gvMx2.BestFitColumns();
-                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2); 
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
                     }
                     else
                     {
@@ -527,11 +531,11 @@
                     }
                 }
                 else
-                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -570,13 +574,15 @@
                     var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                     if (_rtn.rtnCode > 0)
                     {
-                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+                        MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+                        getModel(lbGuid.Text);
                     }
-                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    else
+                        MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
                 }
                 catch (Exception ex)
                 {
-                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                    MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
                 }
             }
         }
@@ -611,13 +617,15 @@
                     var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                     if (_rtn.rtnCode > 0)
                     {
-                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+                        MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+                        getModel(lbGuid.Text);
                     }
-                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    else
+                        MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
                 }
                 catch (Exception ex)
                 {
-                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                    MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
                 }
             }
         }
@@ -636,13 +644,14 @@
                 case 0:
                     strMsg = "鍙嶅鏍�";
                     break;
-            };
+            }
+            ;
             toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -659,9 +668,9 @@
                     _webServiceName + "EditModelSubmit",
                     JsonConvert.SerializeObject(_obj));
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                 if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                 {
+                    MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
                     if (xtraTabControl1.SelectedTabPageIndex == 1)
                     {
                         getModel(lbGuid.Text.Trim());
@@ -670,10 +679,12 @@
                     gridView1.FocusedRowHandle = rowHandle;
                     UtilityHelper.SetCheckIco(gridView1, "isChk", "tbl011", "tbl012", picCheckBox, this, _inFieldValue.ToString());
                 }
+                else
+                    MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 

--
Gitblit v1.9.3