From fcbd3be5b8cff86da965eaee5f17bd3831cb9a80 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 11 九月 2025 17:47:11 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
index 5d449b8..2dbd766 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
@@ -150,10 +150,7 @@
             };
             //婧愬崟浜嬩欢
             txt_fHasLinkRad.SelectedIndex = 0;
-            layItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            layItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            //layItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            layItem4.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            setSrm();
             txt_fHasLinkRad.SelectedIndexChanged += (s, e) =>
             {
                 setSrm();
@@ -253,7 +250,7 @@
                 lbGuid, txt_billNo, gridView1, "billNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -271,18 +268,20 @@
                 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);
                 }
+                else
 
-                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
 
         }
@@ -322,7 +321,7 @@
                 lbGuid, txt_billNo, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -344,7 +343,7 @@
             txt_fRequireOrgId.IsReadly = true;
             txt_fOwnerIdHead.IsReadly = true;
             txt_fPurchaseDeptId.IsReadly = true;
-          //  txt_fPurchaserId.IsReadly = true;
+            //  txt_fPurchaserId.IsReadly = true;
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -519,7 +518,11 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            gcMain1.DataSource = null;
+            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+            _sbSqlWhere.Append(" and a.TH_ORG_ID in");
+            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+            _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "BILL_NO", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -734,6 +737,9 @@
             var rowhandle = gvMx1.FocusedRowHandle;
             if (rowhandle < 0)
                 return;
+            var dr = gvMx1.GetDataRow(rowhandle);
+            var strItemId = dr["itemId"].ToString();
+
             var strOrgGuid = txt_thOrgId.GetId();
             if (string.IsNullOrEmpty(strOrgGuid))
             {
@@ -741,13 +747,15 @@
                 return;
             }
             ;
-            SelectCk frm = new SelectCk(strOrgGuid);
+            SelectCk frm = new SelectCk(strOrgGuid, strItemId);
             frm.UpdateParent += (ss, ee) =>
             {
                 var lst = new List<dynamic>();
                 lst = ee.DynamicList;
                 gvMx1.SetFocusedRowCellValue("depotName", lst[0].name);
                 gvMx1.SetFocusedRowCellValue("depotId", lst[0].guid);
+                gvMx1.SetFocusedRowCellValue("kcQty", lst[0].kcQty);
+                gvMx1.BestFitColumns();
             };
             frm.ShowDialog();
         }
@@ -760,7 +768,7 @@
             {
                 layItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 layItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-               // layItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                // layItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 layItem4.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             }
             else

--
Gitblit v1.9.3