From 2057778ce796422f1dab4ec011ca66eb1faf66cf Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期日, 13 七月 2025 10:00:15 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs |   76 +++++++++++++++++++++++++++----------
 1 files changed, 55 insertions(+), 21 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
index 8a66c2d..e4e768f 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
@@ -35,14 +35,14 @@
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isChk", "", (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;
             //閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
@@ -77,6 +77,8 @@
                         gcMx1.BindingContext = new BindingContext();
                         gcMx1.DataSource = _oldTable;
                         gcMx1.ForceInitialize();
+                        gvMx1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                     }
                     catch (Exception ex)
                     {
@@ -85,24 +87,19 @@
                 };
                 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();
                 ucBtnPrint1.guidKey = rowGuid;
-                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
                 {
-                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
                     txt_iCount_1.Focus();
                     this.ucBtnPrint1.rptParameter = "return false";
                     return;
                 }
-                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
                 {
                     Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
                     txt_psnQty_1.Focus();
@@ -117,10 +114,20 @@
                 }
                 this.ucBtnPrint1.rptParameter = "rpt_wwtl{" + lbMxGuid.Text.Trim()
                        + "," + ""
-                       + "," + ""
+                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
                        + "," + txt_iCount_1.Text.Trim()
                        + "," + txt_psnQty_1.Text.Trim()
                        + "}";
+            };
+            //鑷姩璁$畻鎵撳嵃閲�
+            txt_psnQty_1.TextChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
+            };
+
+            radOut.SelectedIndexChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
             };
         }
 
@@ -162,7 +169,7 @@
             gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
             gridView1.ActiveFilter.Clear();
             gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
-              var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+            var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
             frm.UpdateParent += Frm_UpdateParent;
             frm.ShowDialog();
         }
@@ -177,7 +184,7 @@
             getPageList(1);
         }
 
-    
+
 
         /// <summary>
         ///     瀹℃牳浜嬩欢
@@ -311,13 +318,14 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 1);
             lbGuid.Text = "";
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
             List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
             gridViews.Add(gvMx1);
             gridViews.Add(gvMx2);
             UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
             Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+
         }
         /// <summary>
         /// 淇濆瓨浜嬩欢
@@ -369,11 +377,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 //鐢宠鏁伴噺
+                        Sl = _sl, //鐢宠鏁伴噺
+                        Remark = _tld014
                     });
                 }
             }
@@ -392,6 +407,7 @@
                     gvList.Add(gvMx2);
                     UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
                     toolBarMenu1.currentAction = "";
+                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
             }
             catch (Exception ex)
@@ -407,7 +423,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
@@ -445,6 +461,7 @@
         }
         private void getModel(string strGuid)
         {
+            gcMx1.DataSource = null;
             bool isEdit = false;
             if (toolBarMenu1.currentAction == "add") return;
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
@@ -483,6 +500,8 @@
                         gcMx1.DataSource = dt;
                         gcMx1.ForceInitialize();
                         gvMx1.BestFitColumns();
+                        gvMx1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                     }
                     else
                     {
@@ -500,6 +519,8 @@
                         gcMx2.DataSource = dt2;
                         gcMx2.ForceInitialize();
                         gvMx2.BestFitColumns();
+                        gvMx2.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2); 
                     }
                     else
                     {
@@ -586,7 +607,7 @@
                 try
                 {
                     var strJson = UtilityHelper.HttpPost("",
-                        _webServiceName + "DeleteBarcode",
+                       "VArrivalBarcodeManager/DeleteBarcode",
                         JsonConvert.SerializeObject(_obj));
                     var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                     if (_rtn.rtnCode > 0)
@@ -667,9 +688,22 @@
                 txtWlid.Text = row["tld002"].ToString();
                 txtWlgg.Text = row["tld004"].ToString();
                 txtWlmc.Text = row["tld003"].ToString();
-                txtQuantity.Text = row["tld004"].ToString();//鐢宠鎬婚噺
-                txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
-                txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
+                txtQuantity.Text = row["tld005"].ToString();//鐢宠鎬婚噺
+                txt_yQty.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
+                txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
+            }
+            else
+            {
+                lbMxGuid.Text = "";
+                ucBtnPrint1.guidKey = "";
+                txtWlid.Text = "";
+                txtWlgg.Text = "";
+                txtWlmc.Text = "";
+                txtQuantity.Text = "";
+                txt_yQty.Text = "";
+                txt_kQty.Text = "";
+                txt_psnQty_1.Text = "";
+                txt_iCount_1.Text = "";
             }
         }
     }

--
Gitblit v1.9.3