From f5570a2f60dc9b9c201dcc8b227510a89bf69042 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 01 七月 2025 11:29:32 +0800
Subject: [PATCH] 工序增加是否追溯码

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs |   68 +++++++++++++++++++++++++++-------
 1 files changed, 54 insertions(+), 14 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
index ec2d2e2..1ae2c35 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
@@ -25,7 +25,7 @@
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
-            });
+            }, tips);
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
                 getModel(value);
@@ -35,17 +35,11 @@
             }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
-
             this.txt_suppNo_1.EditChanged += (s, e) =>
             {
                 txt_suppId.Text = this.txt_suppNo_1.GetCode();
             };
-
-            this.ucBtnPrint1.btnDesignClick += (s, e) =>
-            {
-                ucBtnPrint1.rptParameter = "rpt_ItemInv{}";
-            };
-            this.ucBtnPrint1.btnReportClick += (s, e) =>
+            this.ucBtnPrint1.btnPrintClick += (s, e) =>
             {
                 string rowGuid, rowName;
                 (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
@@ -58,14 +52,14 @@
                     this.ucBtnPrint1.rptParameter = "return false";
                     return;
                 }
-                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_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();
@@ -106,7 +100,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();
         }
@@ -150,7 +144,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, " org.FNumber asc ,a.item_no ", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -184,8 +178,11 @@
             {
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-
         }
+        /// <summary>
+        /// 璇诲彇瀹炰綋
+        /// </summary>
+        /// <param name="strGuid"></param>
         private void getModel(string strGuid)
         {
             bool isEdit = false;
@@ -244,5 +241,48 @@
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
         }
+
+        /// <summary>
+        /// 閲嶆墦
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+
+        private void rptChongDa_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+        {
+            MsgHelper.ShowInformation("鍔熻兘寮�鍙戜腑锛�");
+            return;
+            var rowhandle = gvMx1.FocusedRowHandle;
+            if (rowhandle < 0)
+                return;
+            if (e.Button.Index == 0)
+            {
+                var dr = gvMx1.GetDataRow(rowhandle);
+                var mxGuid = dr["guid"].ToString();
+                if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
+                    return;
+                var _obj = new
+                {
+                    mxGuid = mxGuid,
+                    inType = "daa"
+                };
+                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);
+                }
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3