From 640f5f3d154538a350306da03ff2528b35949709 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 06 十一月 2024 08:19:31 +0800
Subject: [PATCH] iqc

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs |  142 ++++++++++++++++++++++++++--------------------
 1 files changed, 80 insertions(+), 62 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
index 19ab028..6e3b0e4 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
@@ -4,10 +4,8 @@
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
-using DevExpress.DataAccess.DataFederation;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
-using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
@@ -54,19 +52,28 @@
                     e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
                 e.Graphics.DrawString(str, f, Brushes.Gray, r);
             };
-            this.txt_depotsCode.KeyFile = "depotCode";
-            this.txt_suppNo.KeyFile = "suppNo";
+            //璁剧疆浠撳簱閫夋嫨
+            this.txt_depotsId.KeyFile = "depotId";
+            this.txt_depotsId.EditChanged += (s, e) =>
+            {
+                txtDepotsId.Text = this.txt_depotsId.GetId();
+            };
+            //璁剧疆渚涘簲鍟嗛�夋嫨
+            this.txt_suppId.KeyFile = "id";
+            this.txt_suppId.EditChanged += (s, e) =>
+            {
+                txtSupplierId.Text = this.txt_suppId.GetId();
+            };
             //閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
             btnSelect.Click += (s, e) =>
             {
-                if (string.IsNullOrEmpty(this.txt_suppNo.GetId()))
+                if (string.IsNullOrEmpty(this.txt_suppId.GetId()))
                 {
                     Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨渚涘簲鍟嗭紝鎵嶈兘閫夋嫨鏉ユ枡鏄庣粏锛�");
                     return;
                 }
-                System.Text.StringBuilder sbWhere = new StringBuilder();
-                sbWhere.Append(" and A.SUPPLIER=" + this.txt_suppNo.GetId());
-                var frm = new SelectCgMx(this.txt_suppNo.GetCode(), sbWhere.ToString());
+                var frm = new SelectCgMx(this.txt_suppId.GetId());
+                //璧嬪�肩粰鏄庣粏琛�
                 frm.UpdateParent += (ss, ee) =>
                 {
                     var lst = new List<string>();
@@ -90,45 +97,7 @@
                 frm.ShowDialog();
             };
         }
-
-        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
-        {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_billNo, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
-        }
-
-        /// <summary>
-        ///     鍙嶆楠�
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        /// <exception cref="NotImplementedException"></exception>
-        private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e)
-        {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_billNo, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
-        }
-
-        /// <summary>
-        ///     妫�楠�
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        /// <exception cref="NotImplementedException"></exception>
-        private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
-        {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_billNo, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
-        }
+      
 
         /// <summary>
         ///     鍙屽嚮浜嬩欢
@@ -175,7 +144,49 @@
             _filterList = e.FilterList;
             getPageList(1, pageBar1.RowsCount);
         }
+        /// <summary>
+        /// 鏃ュ織
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_billNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
 
+        /// <summary>
+        ///     鍙嶆楠�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_billNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
+
+        /// <summary>
+        ///     妫�楠�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_billNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
         /// <summary>
         ///     鍙栨秷浜嬩欢
         /// </summary>
@@ -280,30 +291,32 @@
         private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
         {
             toolBarMenu1.isSetBtn = false;
-            var _ckCode = txt_depotsCode.GetCode(); //浠撳簱缂栧彿 depots_code
-            var _gysCode = txt_suppNo.GetCode(); //渚涘簲鍟嗙紪鍙�
-            if (string.IsNullOrEmpty(_gysCode))
+            var _ckId = txt_depotsId.GetId(); //浠撳簱缂栧彿 depots_code
+            var _gysId = txt_suppId.GetId(); //渚涘簲鍟嗙紪鍙�
+            if (string.IsNullOrEmpty(_gysId))
             {
                 MsgHelper.Warning("璇烽�夋嫨渚涘簲鍟嗭紒");
-                txt_suppNo.Focus();
+                txt_suppId.Focus();
                 return;
             }
 
-            if (string.IsNullOrEmpty(_ckCode))
+            if (string.IsNullOrEmpty(_ckId))
             {
                 MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
-                txt_depotsCode.Focus();
+                txt_depotsId.Focus();
                 return;
             }
-            var _obj = new MesInvItemArn();
-            _obj.Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()); //鍒拌揣鍗曚富閿�
-            _obj.PaperBillNo = txt_paperBillNo.Text.Trim(); //閫佽揣鍗曞彿;
-            _obj.Remark = txt_remark.Text.Trim(); //澶囨敞
-            _obj.SuppNo = _gysCode; //渚涘簲鍟嗙紪鍙�
-            _obj.DepotsCode = _ckCode; //浠撳簱缂栧彿 depots_code
-            _obj.FType = txt_fType.Checked; //0=閲囪喘锛�1=濮斿
-            _obj.UrgentFlag = txt_urgentFlag.Checked;//0=涓嶆�ワ紝1=鎬�
-            _obj.list = new List<MesInvItemArnDetail>();
+            var _obj = new MesInvItemArn()
+            {
+                Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //鍒拌揣鍗曚富閿�
+                PaperBillNo = txt_paperBillNo.Text.Trim(), //閫佽揣鍗曞彿;
+                Remark = txt_remark.Text.Trim(), //澶囨敞
+                SuppId = _gysId, //渚涘簲鍟�
+                DepotsId = _ckId,//浠撳簱
+                FType = txt_fType.Checked,//0=閲囪喘锛�1=濮斿
+                UrgentFlag = txt_urgentFlag.Checked,//0=涓嶆�ワ紝1=鎬�
+                list = new List<MesInvItemArnDetail>(),
+            };
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
             if (gvMx1.DataRowCount <= 0)
@@ -444,6 +457,11 @@
             }
         }
 
+        /// <summary>
+        /// 鏄庣粏鍒犻櫎
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void repositoryItemButtonEdit1_ButtonClick(object sender,
             ButtonPressedEventArgs e)
         {

--
Gitblit v1.9.3