From a89f2c46d1f53a4d9e23dc76b949b40d2b2b18a6 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 08 二月 2025 08:22:22 +0800
Subject: [PATCH] 采购退货

---
 DevApp/Gs.DevApp/UserControl/SelectCgMx.cs |   57 +++++++++++++++++++++++++++++++--------------------------
 1 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs b/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
index 677d751..16f1de7 100644
--- a/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
+++ b/DevApp/Gs.DevApp/UserControl/SelectCgMx.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Text;
 using System.Windows.Forms;
+using DevExpress.Utils.DirectXPaint;
 using DevExpress.XtraEditors;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
@@ -14,26 +15,28 @@
         private readonly List<FilterEntity> _filterList =
             new List<FilterEntity>();
 
-        private readonly string _webServiceName = "MesRohInDataManager/";
-        private string suppCode = "";
-        private string strWhere = "";
+        private readonly string _webServiceName = "MesInvItemArnManager/";
+        private string suppId = "";
+        private string receiveOrgId = "";
+        private string isWw = "";
         /// <summary>
-        /// 渚涘簲鍟嗙紪鍙�
+        /// 
         /// </summary>
-        /// <param name="supp_no"></param>
-        public SelectCgMx(string _suppCode, string _strWhere)
+        /// <param name="_suppId"></param>
+        /// <param name="_receiveOrgId"></param>
+        /// <param name="_isWw"></param>
+        public SelectCgMx(string _suppId, string _receiveOrgId, string _isWw)
         {
             InitializeComponent();
-            this.suppCode = _suppCode;
-            this.strWhere = _strWhere;
+            this.suppId = _suppId;
+            this.receiveOrgId = _receiveOrgId;
+            this.isWw= _isWw;
             pageBar1.PagerEvent += PageBar1_PagerEvent;
-            getPageList(1, UtilityHelper.GetPageSize());
-            gridView1.IndicatorWidth = 50;
-            gridView1.CustomDrawRowIndicator += (s, e) =>
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
             {
-                if (e.Info.IsRowIndicator && e.RowHandle >= 0)
-                    e.Info.DisplayText = (e.RowHandle + 1).ToString();
-            };
+
+            });
+            getPageList(1, UtilityHelper.GetPageSize());
             btnIn.Click += (s, e) =>
             {
                 var list = new List<string>();
@@ -54,7 +57,7 @@
         }
 
         /// <summary>
-        ///     鍥炶皟浜嬩欢
+        ///     閫夋嫨鍚庣殑鍥炶皟浜嬩欢
         /// </summary>
         public event EventHandler<UpdateParentEventArgs> UpdateParent;
 
@@ -74,29 +77,31 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage, int pageSize)
         {
-            var _sbSqlWhere = new StringBuilder();
-            _sbSqlWhere.Append(strWhere);
-            foreach (var itm in _filterList)
-                _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" +
-                                   itm.fileValue + "'");
-            var pgq = new PageQueryModel(curPage, pageSize, "B.BILL_NO", "asc",
-                "", _sbSqlWhere.ToString());
-            var json = JsonConvert.SerializeObject(pgq);
+            var _obj = new
+            {
+                currentPage = curPage,
+                everyPageSize = pageSize,
+                sortName = "",
+                keyWhere = "",
+                inBusType = isWw,
+                inSupId = this.suppId,
+                inReceiveOrgId = this.receiveOrgId,
+            };
+            var json = JsonConvert.SerializeObject(_obj);
             try
             {
                 var strReturn = UtilityHelper.HttpPost("",
-                    _webServiceName + "GetListPage", json);
+                    _webServiceName + "SelectForm", json);
                 var dd = UtilityHelper.ReturnToTablePage(strReturn);
                 var dt = dd.rtnData.list;
                 gcMain.BindingContext = new BindingContext();
                 gcMain.DataSource = dt;
                 gcMain.ForceInitialize();
+                gridView1.BestFitColumns();
                 var dddd = dd.rtnData.pages; //鎬婚〉
                 pageBar1.TotalPages = dddd;
                 pageBar1.RecordCount = dd.rtnData.total; //璁板綍鎬绘暟
                 pageBar1.CurrentPage = curPage; //褰撳墠椤�
-                pageBar1.RowsCount = pageSize; //姣忛〉鏄剧ず
-                pageBar1.setTxt();
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3