From 8c7ac11905cc442d9cf8920de01dc5ef29179987 Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期一, 01 九月 2025 17:48:50 +0800
Subject: [PATCH] 工单撤回报工条码选择

---
 DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs |   97 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 95 insertions(+), 2 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
index d396cf2..53d7660 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -19,6 +19,16 @@
         public Frm_Womdaa()
         {
             InitializeComponent();
+
+            //鍔犲叆checkbox begin
+            this.gvMx2.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
+            this.gvMx2.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMx2, gvMx2); };
+            this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
+            this.colChkInt.OptionsFilter.AllowAutoFilter = false;
+            this.colChkInt.OptionsFilter.AllowFilter = false;
+            this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;
+            //鍔犲叆checkbox end
+
             this.splitMx99.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2;
             this.splitMx98.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2;
             this.splitMx100.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2;
@@ -34,6 +44,7 @@
             toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
             this.toolBarMenu1.btnShouJianClick += ToolBarMenu1_btnShouJianClick;
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick;
+            this.toolBarMenu1.btnChbgClick += ToolBarMenu1_btnChbgClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
@@ -233,6 +244,17 @@
         {
             getPageList(curPage);
         }
+
+        /// <summary>
+        ///     鎾ゅ洖鎶ュ伐浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnChbgClick(object sender, EventArgs e)
+        {
+            _toolChbg(1);
+        }
+
         /// <summary>
         /// 鏌ヨ浜嬩欢
         /// </summary>
@@ -579,7 +601,7 @@
                     lbGuid.Text = strGuid;
                     List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                     gvList.Add(gvMx1);
-                    gvList.Add(gvMx2);
+                   // gvList.Add(gvMx2);
                     UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
                     JObject _job = JObject.Parse(strJson);
                     JArray array = new JArray();
@@ -899,7 +921,78 @@
                    + "," + ""
                    + "}";
         }
-      
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="inFieldValue"></param>
+        private void _toolChbg(int _inFieldValue)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_daa001, gridView1, "daa001");
+            toolBarMenu1.guidKey = rowGuid;
+            //if (string.IsNullOrEmpty(rowGuid))
+            //{
+            //    MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+            //    return;
+            //}
+            //if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+            //    return;
+
+            System.Text.StringBuilder sb = new System.Text.StringBuilder();
+            gvMx2.PostEditor();
+            gvMx2.UpdateCurrentRow();
+            DataTable dt = this.gcMx2.DataSource as DataTable;
+            {
+                foreach (DataRow dr in dt.Rows)
+                {
+                    string checkBox = dr["chkInt"].ToString();
+                    string _guid = dr["guid"].ToString();
+                    if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
+                    {
+                        if (sb.Length > 0)
+                            sb.Append(",");
+                        sb.Append(_guid);
+                    }
+                }
+            }
+            if (string.IsNullOrEmpty(sb.ToString()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨鏉$爜锛�");
+                return;
+            }
+
+            //Gs.DevApp.ToolBox.MsgHelper.ShowError(sb.ToString());
+
+            var _obj = new
+            {
+                billNo = sb.ToString(),
+                inFieldValue = _inFieldValue.ToString()
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelChbg", JsonConvert.SerializeObject(_obj));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+                {
+                    if (xtraTabControl1.SelectedTabPageIndex == 1)
+                    {
+                        getModel(lbGuid.Text.Trim());
+                    }
+                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+                    gridView1.FocusedRowHandle = rowHandle;
+                    //UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
+                }
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
         #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3