tjx
2025-10-19 f7849313bc283bb6a7d411e3ed433925ab996a4f
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
@@ -1,5 +1,6 @@
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.DevFrm.Rk;
using Gs.DevApp.Entity;
@@ -137,6 +138,7 @@
                        gvMx1.UpdateCurrentRow();
                        gvMx1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                        ConfigureOaColumns();
                    }
                    catch (Exception ex)
                    {
@@ -145,9 +147,43 @@
                };
                frm.ShowDialog();
            };
            ConfigureOaColumns();
        }
        private void ConfigureOaColumns()
        {
            ConfigureOaColumn(gridColumn15, "clyj", "处理意见", 17);
            ConfigureOaColumn(gridColumn16, "txsl", "挑选数量", 18);
            ConfigureOaColumn(gridColumn2, "xblb", "选别类别", 19);
        }
        private static void ConfigureOaColumn(GridColumn column, string fieldName, string caption, int visibleIndex)
        {
            if (column == null)
            {
                return;
            }
            if (!string.IsNullOrEmpty(fieldName))
            {
                column.FieldName = fieldName;
            }
            if (!string.IsNullOrEmpty(caption))
            {
                column.Caption = caption;
            }
            column.Visible = true;
            column.VisibleIndex = visibleIndex;
            column.OptionsColumn.AllowEdit = false;
            column.OptionsColumn.ReadOnly = true;
            column.OptionsColumn.ShowInCustomizationForm = true;
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
@@ -335,6 +371,7 @@
            gridViews.Add(gvMx1);
            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
            Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
            ConfigureOaColumns();
            //增加时,默认组织
            string deftOrg = UtilityHelper.GetFirstOrg(txt_receiveOrgId);
            txt_isSrm.Checked = false;
@@ -523,10 +560,12 @@
                        gcMx1.ForceInitialize();
                        gvMx1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                        ConfigureOaColumns();
                    }
                    else
                    {
                        UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
                        ConfigureOaColumns();
                    }
                }
                else
@@ -714,4 +753,4 @@
            }
        }
    }
}
}