From ecb7a60de1639f520712ce95f99414b0dd2c9713 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 14 四月 2025 08:30:40 +0800
Subject: [PATCH] 自动打印

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs |   45 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
index 8249cd7..3f7c8bc 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
@@ -37,14 +37,14 @@
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isCheck", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
-            });
+            }, tips);
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
                 getModel(value);
             }, (value) =>
             {
                 getPageList(this.pageBar1.CurrentPage);
-            });
+            }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             //閫夋嫨搴撳瓨缁勭粐锛堝彉鏄庣粏涓殑鐗╂枡鍜屽彉璐т富锛�
@@ -104,15 +104,25 @@
                 }
                 this.ucBtnPrint1.rptParameter = "rpt_Strk{" + lbMxGuid.Text.Trim()
                        + "," + ""
-                       + "," + ""
+                       + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString()
                        + "," + txt_iCount_1.Text.Trim()
                        + "," + txt_psnQty_1.Text.Trim()
                        + "}";
             };
+            //鑷姩璁$畻鎵撳嵃閲�
+            txt_psnQty_1.TextChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut);
+            };
+
+            radOut.SelectedIndexChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut);
+            };
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
-            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
             Task.Delay(100);
             getPageList(1);
         }
@@ -149,7 +159,7 @@
             gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
             gridView1.ActiveFilter.Clear();
             gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
-              var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+            var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
             frm.UpdateParent += Frm_UpdateParent;
             frm.ShowDialog();
         }
@@ -294,7 +304,7 @@
             string kcZz = txt_fStockOrgId.GetId();//搴撳瓨缁勭粐
             string inRkyy = txt_remark.Text.Trim();//鍘熷洜
             string kcCk = txt_fStockId.GetId();//浠撳簱
-            string kh=txt_fCustId.GetId();//瀹㈡埛
+            string kh = txt_fCustId.GetId();//瀹㈡埛
             if (string.IsNullOrEmpty(kcZz))
             {
                 Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨缁勭粐锛�");
@@ -319,7 +329,7 @@
                 kcZz = kcZz,//搴撳瓨缁勭粐
                 kcCk = kcCk,//搴撳瓨浠撳簱
                 inRkyy = inRkyy,//鍏ュ簱鍘熷洜
-                kh= kh,
+                kh = kh,
                 list = new List<dynamic>(),
             };
             gvMx1.CloseEditor();
@@ -366,6 +376,7 @@
                     gvList.Add(gvMx2);
                     UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
                     toolBarMenu1.currentAction = "";
+                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
             }
             catch (Exception ex)
@@ -418,6 +429,7 @@
         }
         private void getModel(string strGuid)
         {
+            gcMx1.DataSource = null;
             bool isEdit = false;
             if (toolBarMenu1.currentAction == "add") return;
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
@@ -458,6 +470,7 @@
                         gcMx1.DataSource = dt;
                         gcMx1.ForceInitialize();
                         gvMx1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                     }
                     else
                     {
@@ -475,6 +488,7 @@
                         gcMx2.DataSource = dt2;
                         gcMx2.ForceInitialize();
                         gvMx2.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
                     }
                     else
                     {
@@ -631,7 +645,20 @@
                 txtWlmc.Text = row["itemName"].ToString();
                 txtQuantity.Text = row["sqsl"].ToString();//鐢宠鎬婚噺
                 txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
-                txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
+                txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
+            }
+            else
+            {
+                lbMxGuid.Text = "";
+                ucBtnPrint1.guidKey = "";
+                txtWlid.Text = "";
+                txtWlgg.Text = "";
+                txtWlmc.Text = "";
+                txtQuantity.Text = "";
+                txtYdy.Text = "";
+                txt_kQty.Text = "";
+                txt_psnQty_1.Text = "";
+                txt_iCount_1.Text = "";
             }
         }
         /// <summary>
@@ -658,7 +685,7 @@
                 try
                 {
                     var strJson = UtilityHelper.HttpPost("",
-                        _webServiceName + "DeleteBarcode",
+                           "VArrivalBarcodeManager/DeleteBarcode",
                         JsonConvert.SerializeObject(_obj));
                     var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                     if (_rtn.rtnCode > 0)

--
Gitblit v1.9.3