From 0cedb538f7bfefa75a80134fffb8d65cf5074e98 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期三, 03 十二月 2025 11:18:40 +0800
Subject: [PATCH] 其他出入库代码搬祈禧的

---
 DevApp/Gs.DevApp/UserControl/SelectDaa.cs |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/SelectDaa.cs b/DevApp/Gs.DevApp/UserControl/SelectDaa.cs
index 12f0706..01b7a0f 100644
--- a/DevApp/Gs.DevApp/UserControl/SelectDaa.cs
+++ b/DevApp/Gs.DevApp/UserControl/SelectDaa.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.DevApp.Entity;
+锘縰sing DevExpress.XtraCharts.GLGraphics.Platform;
+using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
 using System;
@@ -16,21 +17,28 @@
     public partial class SelectDaa : DevExpress.XtraEditors.XtraForm
     {
         private List<FilterEntity> _filterList = new List<FilterEntity>();
-        public SelectDaa()
+        private string orgId = "";
+        public SelectDaa(string _orgId)
         {
             InitializeComponent();
+            orgId = _orgId;
             getPageList(1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false);
         }
-        
+
         /// <summary>
         /// </summary>
         /// <param name="curPage">绗嚑椤�</param>
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
-            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", ""," and 1=1" + _sbSqlWhere.ToString());
+            gcMain.DataSource = null;
+            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+            _sbSqlWhere.Append(" and a.erp_sczz =" + orgId);
+            _sbSqlWhere.Append(" and a.erp_sczz in");
+            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+            _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
+            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", "", " and 1=1" + _sbSqlWhere.ToString());
             var json = JsonConvert.SerializeObject(pgq);
             try
             {
@@ -44,12 +52,11 @@
                     {
                         gcMain.DataSource = dt;
                         gcMain.ForceInitialize();
-                        gridView1.BestFitColumns();
                         Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
-
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain, gridView1);
+                    gridView1.BestFitColumns();
                 }
                 else
                 {
@@ -61,7 +68,6 @@
                 MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
-
 
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {
@@ -80,6 +86,8 @@
                 list.Add(new
                 {
                     guid = mxGuid,
+                    gdlx = dr["daa025"].ToString(),//宸ュ崟绫诲瀷
+                    gdlxWlid = dr["daa002"].ToString(),//宸ュ崟绫诲瀷鐗╂枡id
                 });
                 UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list });
                 Close();

--
Gitblit v1.9.3