1
lu
2025-04-03 b54d247ffc912c4af1c96fe05bc6ca1630a77be0
1
已修改4个文件
131 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/Toast.Designer.cs 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcDictionary.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcDictionarySelect.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs
@@ -67,9 +67,9 @@
            this.splitMx1 = new DevExpress.XtraEditors.SplitContainerControl();
            this.splitTop1 = new DevExpress.XtraEditors.SplitContainerControl();
            this.layoutMx1 = new DevExpress.XtraLayout.LayoutControl();
            this.txt_badReson = new UcDictionary();
            this.txt_remark = new UcDictionary();
            this.txt_repairMethd = new UcDictionary();
            this.txt_badReson = new Gs.DevApp.UserControl.UcDictionary();
            this.txt_remark = new Gs.DevApp.UserControl.UcDictionary();
            this.txt_repairMethd = new Gs.DevApp.UserControl.UcDictionary();
            this.lbGuid = new System.Windows.Forms.Label();
            this.txt_gdbh = new DevExpress.XtraEditors.TextEdit();
            this.txt_gx = new DevExpress.XtraEditors.TextEdit();
@@ -544,15 +544,17 @@
            this.txt_badReson.Size = new System.Drawing.Size(410, 54);
            this.txt_badReson.TabIndex = 26;
            this.txt_badReson.TextTxt = "";
            this.txt_badReson.WhereTxt = "s_type=\'现场维修不良原因\'";
            // 
            // txt_remark
            // 
            this.txt_remark.BtnTxt = "不良现像";
            this.txt_remark.BtnTxt = "不良现象";
            this.txt_remark.Location = new System.Drawing.Point(12, 96);
            this.txt_remark.Name = "txt_remark";
            this.txt_remark.Size = new System.Drawing.Size(410, 54);
            this.txt_remark.TabIndex = 25;
            this.txt_remark.TextTxt = "";
            this.txt_remark.WhereTxt = "s_type=\'现场维修不良现象\'";
            // 
            // txt_repairMethd
            // 
@@ -562,7 +564,7 @@
            this.txt_repairMethd.Size = new System.Drawing.Size(411, 112);
            this.txt_repairMethd.TabIndex = 24;
            this.txt_repairMethd.TextTxt = "";
            this.txt_repairMethd.WhereTxt = "s_type=\'现场维修不良对策\'";
            // 
            // lbGuid
            // 
DevApp/Gs.DevApp/UserControl/Toast.Designer.cs
@@ -32,16 +32,16 @@
            DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition();
            DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition();
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            this.panel1 = new System.Windows.Forms.Panel();
            this.testo = new DevExpress.XtraEditors.LabelControl();
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            this.panel1 = new System.Windows.Forms.Panel();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
            this.layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
            this.SuspendLayout();
            // 
            // layoutControl1
@@ -53,9 +53,18 @@
            this.layoutControl1.Name = "layoutControl1";
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1108, 126, 812, 500);
            this.layoutControl1.Root = this.Root;
            this.layoutControl1.Size = new System.Drawing.Size(644, 705);
            this.layoutControl1.Size = new System.Drawing.Size(567, 590);
            this.layoutControl1.TabIndex = 9;
            this.layoutControl1.Text = "layoutControl1";
            //
            // panel1
            //
            this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.ok123;
            this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
            this.panel1.Location = new System.Drawing.Point(12, 12);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(543, 517);
            this.panel1.TabIndex = 8;
            // 
            // testo
            // 
@@ -68,9 +77,9 @@
            this.testo.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
            this.testo.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            this.testo.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.Vertical;
            this.testo.Location = new System.Drawing.Point(12, 648);
            this.testo.Location = new System.Drawing.Point(12, 533);
            this.testo.Name = "testo";
            this.testo.Size = new System.Drawing.Size(620, 45);
            this.testo.Size = new System.Drawing.Size(543, 45);
            this.testo.StyleController = this.layoutControl1;
            this.testo.TabIndex = 7;
            this.testo.Text = "labelControl1";
@@ -95,38 +104,29 @@
            this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
            rowDefinition1,
            rowDefinition2});
            this.Root.Size = new System.Drawing.Size(644, 705);
            this.Root.Size = new System.Drawing.Size(567, 590);
            this.Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            this.layoutControlItem1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.layoutControlItem1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
            this.layoutControlItem1.Control = this.testo;
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 636);
            this.layoutControlItem1.Name = "layoutControlItem1";
            this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 1;
            this.layoutControlItem1.Size = new System.Drawing.Size(624, 49);
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem1.TextVisible = false;
            //
            // panel1
            //
            this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.ok123;
            this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
            this.panel1.Location = new System.Drawing.Point(12, 12);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(620, 632);
            this.panel1.TabIndex = 8;
            // 
            // layoutControlItem2
            // 
            this.layoutControlItem2.Control = this.panel1;
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
            this.layoutControlItem2.Name = "layoutControlItem2";
            this.layoutControlItem2.Size = new System.Drawing.Size(624, 636);
            this.layoutControlItem2.Size = new System.Drawing.Size(547, 521);
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem2.TextVisible = false;
            //
            // layoutControlItem1
            //
            this.layoutControlItem1.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.layoutControlItem1.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
            this.layoutControlItem1.Control = this.testo;
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 521);
            this.layoutControlItem1.Name = "layoutControlItem1";
            this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 1;
            this.layoutControlItem1.Size = new System.Drawing.Size(547, 49);
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem1.TextVisible = false;
            // 
            // Toast
            // 
@@ -134,7 +134,7 @@
            this.Appearance.Options.UseBackColor = true;
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(644, 705);
            this.ClientSize = new System.Drawing.Size(567, 590);
            this.ControlBox = false;
            this.Controls.Add(this.layoutControl1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
@@ -148,8 +148,8 @@
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
            this.layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
            this.ResumeLayout(false);
        }
DevApp/Gs.DevApp/UserControl/UcDictionary.cs
@@ -19,10 +19,8 @@
            InitializeComponent();
        }
        /// <summary>
        ///     总记录数
        /// 按钮文字
        /// </summary>
        public string BtnTxt
        {
@@ -33,9 +31,8 @@
            }
        }
        /// <summary>
        ///     总记录数
        /// 文本框文字
        /// </summary>
        public string TextTxt
        {
@@ -46,9 +43,17 @@
            }
        }
        /// <summary>
        /// 查询条件
        /// </summary>
        public string WhereTxt
        {
            get;
            set;
        }
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            UcDictionarySelect frm = new UcDictionarySelect(this.BtnTxt, "");
            UcDictionarySelect frm = new UcDictionarySelect(this.BtnTxt, this.WhereTxt);
            frm.UpdateParent += (ss, ee) =>
            {
                System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
DevApp/Gs.DevApp/UserControl/UcDictionarySelect.cs
@@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Windows.Forms;
@@ -14,31 +13,31 @@
{
    public partial class UcDictionarySelect : DevExpress.XtraEditors.XtraForm
    {
        private List<string> lstCheckedKeyID = new List<string>();//选择局ID集合
        private List<dynamic> lstCheckedKeyID = new List<dynamic>();//选择集合
        string strTitle = "";
        string strWhere = "";
        public UcDictionarySelect(string _strTitle, string _strWhere)
        {
            InitializeComponent();
            tlMenu.CustomDrawNodeCheckBox += TreeList1_CustomDrawNodeCheckBox;
            getTree();
            tlMenu.OptionsBehavior.Editable = true;
            tlMenu.OptionsSelection.EnableAppearanceFocusedCell = false;
            tlMenu.OptionsSelection.MultiSelect = true;
            tlMenu.OptionsSelection.MultiSelectMode = TreeListMultiSelectMode.CellSelect;
            this.strTitle = _strTitle;
            this.strWhere = _strWhere;
            this.Text = _strTitle;
            getTree();
            tlMenu.CustomDrawNodeCheckBox += TreeList1_CustomDrawNodeCheckBox;
            //  tlMenu.OptionsBehavior.Editable = true;
            tlMenu.OptionsSelection.EnableAppearanceFocusedCell = false;
            //  tlMenu.OptionsSelection.MultiSelect = true;
            // tlMenu.OptionsSelection.MultiSelectMode = TreeListMultiSelectMode.CellSelect;
            btnIn.Click += (s, e) =>
            {
                findOrigin(tlMenu);
                var list = new List<dynamic>();
                foreach (string key in lstCheckedKeyID)
                foreach (dynamic key in lstCheckedKeyID)
                {
                    list.Add(new
                    {
                        //  dicCode = "001",
                        dicTxt = key
                        dicCode = key.dicCode,
                        dicTxt = key.dicTxt
                    });
                };
                UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list });
@@ -84,7 +83,8 @@
        /// </summary>
        private void getTree()
        {
            var pgq = new PageQueryModel(1, 999999, "a.defect_name");
            string _where = " and 1=1 and "+this.strWhere;
            var pgq = new PageQueryModel(1, 999999, "a.defect_name","asc","", _where);
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
@@ -125,20 +125,30 @@
                    if (drv != null)
                    {
                        string KeyFieldName = (string)drv["defectName"];
                        lstCheckedKeyID.Add(KeyFieldName);
                        string dicCode = (string)drv["defectCode"];
                        lstCheckedKeyID.Add(new
                        {
                            dicCode = dicCode,
                            dicTxt = KeyFieldName
                        });
                    }
                }
                return;//递归终止
            }
            foreach (TreeListNode node in parentNode.Nodes)
            {
                if (node.CheckState == CheckState.Checked)
                if (node.CheckState == CheckState.Checked && parentNode.Nodes.Count == 0)
                {
                    DataRowView drv = tlMenu.GetDataRecordByNode(node) as DataRowView;//关键代码,就是不知道是这样获取数据而纠结了很久(鬼知道可以转换为DataRowView啊)
                    if (drv != null)
                    {
                        string KeyFieldName = (string)drv["defectName"];
                        lstCheckedKeyID.Add(KeyFieldName);
                        string dicCode = (string)drv["defectCode"];
                        lstCheckedKeyID.Add(new
                        {
                            dicCode = dicCode,
                            dicTxt = KeyFieldName
                        });
                    }
                }
                GetCheckedKeyID(node);