From c93910363c60e95266a2f9468c1346e68124adef Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 11 七月 2025 17:06:11 +0800
Subject: [PATCH] 验退

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs |  128 +++++++++++++++++++++++++-----------------
 1 files changed, 75 insertions(+), 53 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
index 84d8a0a..fc317c4 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs
@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using Gs.DevApp.DevFrm.Rpt;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
@@ -37,7 +38,7 @@
             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);
@@ -73,23 +74,19 @@
                 }
             };
             gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
-            this.ucBtnPrint1.btnDesignClick += (s, e) =>
-            {
-                ucBtnPrint1.rptParameter = "rpt_Strk{}";
-            };
-            this.ucBtnPrint1.btnReportClick += (s, e) =>
+            this.ucBtnPrint1.btnPrintClick += (s, e) =>
             {
                 ucBtnPrint1.guidKey = "";
                 string rowGuid = lbMxGuid.Text.Trim();
                 ucBtnPrint1.guidKey = rowGuid;
-                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
                 {
-                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
                     txt_iCount_1.Focus();
                     this.ucBtnPrint1.rptParameter = "return false";
                     return;
                 }
-                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
                 {
                     Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
                     txt_psnQty_1.Focus();
@@ -104,15 +101,64 @@
                 }
                 this.ucBtnPrint1.rptParameter = "rpt_Strk{" + lbMxGuid.Text.Trim()
                        + "," + ""
-                       + "," + ""
+                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
                        + "," + txt_iCount_1.Text.Trim()
                        + "," + txt_psnQty_1.Text.Trim()
                        + "}";
             };
+            this.ucBtnPrint1.btnAllClick += (s, e) =>
+            {
+                string rowGuid = lbMxGuid.Text.Trim();
+                if (rowGuid.Length < 10)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+                    this.ucBtnPrint1.rptParameter = "return false";
+                    return;
+                }
+                SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "鍙楁墭鍏ュ簱");
+                string strCodeList = "";
+                frm.UpdateParent += (ss, ee) =>
+                {
+                    strCodeList = ee.StringSingle;
+                };
+                frm.ShowDialog();
+                if (string.IsNullOrEmpty(strCodeList))
+                    return;
+                try
+                {
+                    string rptParameter = "rpt_Strk{"
+                    + "100"
+                    + "," + ""
+                    + "," + ""
+                    + "," + ""
+                    + "," + ""
+                    + "," + strCodeList
+                    + "}";
+                    using (Form rpt = new RptPreview(rowGuid, rptParameter))
+                    {
+                        rpt.ShowDialog();
+                    }
+                    frm.Close();
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.ShowError(ex.Message);
+                }
+            };
+            //鑷姩璁$畻鎵撳嵃閲�
+            txt_psnQty_1.TextChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
+            };
+
+            radOut.SelectedIndexChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
+            };
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
-            _filterList=Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
             Task.Delay(100);
             getPageList(1);
         }
@@ -149,7 +195,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();
         }
@@ -282,6 +328,8 @@
             UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
             Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
+            //澧炲姞鏃讹紝榛樿缁勭粐
+            string deftOrg = UtilityHelper.GetFirstOrg(txt_fStockOrgId);
         }
         /// <summary>
         /// 淇濆瓨浜嬩欢
@@ -294,7 +342,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 +367,7 @@
                 kcZz = kcZz,//搴撳瓨缁勭粐
                 kcCk = kcCk,//搴撳瓨浠撳簱
                 inRkyy = inRkyy,//鍏ュ簱鍘熷洜
-                kh= kh,
+                kh = kh,
                 list = new List<dynamic>(),
             };
             gvMx1.CloseEditor();
@@ -382,7 +430,7 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "billNo", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -635,46 +683,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();//鍙墦鍗版�婚噺
             }
-        }
-        /// <summary>
-        /// 绉诲嚭鏉$爜
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
-        {
-            var rowhandle = gvMx2.FocusedRowHandle;
-            if (rowhandle < 0)
-                return;
-            if (e.Button.Index == 0)
+            else
             {
-                var dr = gvMx2.GetDataRow(rowhandle);
-                var mxGuid = dr["guid"].ToString();
-                if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
-                    return;
-                var _obj = new
-                {
-                    mxGuid = mxGuid,
-                    inType = "dhtm"
-                };
-                try
-                {
-                    var strJson = UtilityHelper.HttpPost("",
-                           "VArrivalBarcodeManager/DeleteBarcode",
-                        JsonConvert.SerializeObject(_obj));
-                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                    if (_rtn.rtnCode > 0)
-                    {
-                        if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
-                    }
-                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
-                }
-                catch (Exception ex)
-                {
-                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
-                }
+                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 = "";
             }
         }
     }

--
Gitblit v1.9.3