From 236874a930147c27e46c673d8c1a607f1260e8aa Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 31 三月 2025 12:43:43 +0800
Subject: [PATCH] 追溯码

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
index e03800a..d198b59 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTui.cs
@@ -69,7 +69,13 @@
                     this.txt_fCustId.Focus();
                     return;
                 }
-                var frm = new SelectShuoTuiSq(this.txt_fCustId.GetId(), txt_fStockOrgId.GetId(), txt_fIsLink.SelectedIndex.ToString());
+                if (string.IsNullOrEmpty(this.txt_fStockId.GetId()))
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浠撳簱锛�");
+                    this.txt_fStockId.Focus();
+                    return;
+                }
+                var frm = new SelectShuoTuiSq(this.txt_fCustId.GetId(), txt_fStockOrgId.GetId(), txt_fStockId.GetId(),  txt_fIsLink.SelectedIndex.ToString());
                 //璧嬪�肩粰鏄庣粏琛�
                 frm.UpdateParent += (ss, ee) =>
                 {
@@ -86,7 +92,7 @@
                             _row["wlmc"] = dym.itemName;
                             _row["wlgg"] = dym.itemModel;
                             _row["dwName"] = dym.dwName;
-                            _row["fQty"] = dym.rksl;
+                            _row["fQty"] = dym.kt;
                             _row["sQty"] = 0;
                             _row["itemId"] = dym.itemId;
                             _Table.Rows.Add(_row);
@@ -95,6 +101,7 @@
                         gcMx1.DataSource = _Table;
                         gcMx1.ForceInitialize();
                         gvMx1.CloseEditor();
+                        gvMx1.PostEditor();
                         gvMx1.UpdateCurrentRow();
                     }
                     catch (Exception ex)
@@ -143,7 +150,7 @@
             gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
             gridView1.ActiveFilter.Clear();
             gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
-            var frm = new ShowFilter(gridView1.Columns, _filterList);
+              var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
             frm.UpdateParent += Frm_UpdateParent;
             frm.ShowDialog();
         }
@@ -308,7 +315,7 @@
             var _ckId = txt_fStockId.GetId();
             var _khId = txt_fCustId.GetId();
             string _orgId = txt_fStockOrgId.GetId();
-
+            int _fIsLink= txt_fIsLink.SelectedIndex==0?1:0;
             if (string.IsNullOrEmpty(_orgId))
             {
                 MsgHelper.Warning("璇烽�夋嫨缁勭粐锛�");
@@ -340,12 +347,14 @@
                 Remark = txt_remark.Text.Trim(), //澶囨敞
                 CusId = int.Parse(_khId),
                 DepotId = int.Parse(_ckId),
-                FIsLink = txt_fIsLink.SelectedIndex == 0 ,
+                FIsLink = _fIsLink,//鏈夋棤婧愬崟
                 FReturnStyle = txt_fReturnStyle.Text,//閫�鏂欐柟寮�
                 list = new List<dynamic>(),
-            };
+            }; gvMx1.PostEditor();
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
+            
+          
             if (gvMx1.DataRowCount <= 0)
             {
                 MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
@@ -363,9 +372,9 @@
                         MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
                         return;
                     }
-                    if (string.IsNullOrEmpty(_msl))
+                    if (string.IsNullOrEmpty(row["fStockStatusId"].ToString()) || row["fStockStatusId"].ToString()=="璇烽�夋嫨")
                     {
-                        MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
+                        MsgHelper.ShowError("璇烽�夋嫨搴撳瓨鐘舵�侊紒");
                         return;
                     }
                     _obj.list.Add(new
@@ -426,7 +435,7 @@
                     {
                         gcMain1.DataSource = dt;
                         gcMain1.ForceInitialize();
-                        gridView1.BestFitColumns();
+                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -558,6 +567,7 @@
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {
             gvMx1.CloseEditor();
+            gvMx1.PostEditor();
             gvMx1.UpdateCurrentRow();
             var rowhandle = gvMx1.FocusedRowHandle;
             if (rowhandle < 0)

--
Gitblit v1.9.3