bug
lu
7 天以前 ccbe3fad6c7ebb9c1e936163c7f04cb469ff32fc
bug
已添加3个文件
已修改3个文件
484 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/SelectDaa.Designer.cs 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/SelectDaa.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/SelectDaa.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
@@ -90,7 +90,20 @@
                txt_qt013.getSuppler(_orgId, _ucKh);
                txt_qt009.getSuppler(_orgId, _ucBm);
            };
            //选择srm明细
            txt_qt035.ButtonClick += (s, e) =>
            {
                string strSrmNo = "";
                SelectDaa frm = new SelectDaa();
                frm.UpdateParent += (ss, ee) =>
                {
                    var lst = new List<dynamic>();
                    lst = ee.DynamicList;
                    strSrmNo = lst[0].guid;
                    txt_qt035.Text = strSrmNo;
                };
                frm.ShowDialog();
            };
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -83,7 +83,20 @@
                    MsgHelper.Warning("提示:" + ex.Message);
                }
            };
            //选择srm明细
            txt_qt035.ButtonClick += (s, e) =>
            {
                string strSrmNo = "";
                SelectDaa frm = new SelectDaa();
                frm.UpdateParent += (ss, ee) =>
                {
                    var lst = new List<dynamic>();
                    lst = ee.DynamicList;
                    strSrmNo = lst[0].guid;
                    txt_qt035.Text = strSrmNo;
                };
                frm.ShowDialog();
            };
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -926,6 +926,12 @@
    <Compile Include="UserControl\SelectCk.Designer.cs">
      <DependentUpon>SelectCk.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\SelectDaa.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="UserControl\SelectDaa.Designer.cs">
      <DependentUpon>SelectDaa.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\SelectDeleteBar.cs">
      <SubType>Form</SubType>
    </Compile>
@@ -1655,6 +1661,9 @@
    <EmbeddedResource Include="UserControl\SelectCk.resx">
      <DependentUpon>SelectCk.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\SelectDaa.resx">
      <DependentUpon>SelectDaa.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\SelectDeleteBar.resx">
      <DependentUpon>SelectDeleteBar.cs</DependentUpon>
    </EmbeddedResource>
DevApp/Gs.DevApp/UserControl/SelectDaa.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,231 @@
namespace Gs.DevApp.UserControl
{
    partial class SelectDaa
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            this.gcMain = new DevExpress.XtraGrid.GridControl();
            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gv_operationTime = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_operationTable = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_userName = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_Btn = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit();
            this.SuspendLayout();
            //
            // gcMain
            //
            this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcMain.Location = new System.Drawing.Point(0, 0);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
            this.gcMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemButtonEdit1});
            this.gcMain.Size = new System.Drawing.Size(996, 489);
            this.gcMain.TabIndex = 3;
            this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView1});
            //
            // gridView1
            //
            this.gridView1.Appearance.Row.Options.UseFont = true;
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gv_operationTime,
            this.gv_operationTable,
            this.gv_userName,
            this.gridColumn1,
            this.gridColumn2,
            this.gridColumn3,
            this.gridColumn4,
            this.gridColumn5,
            this.gv_Btn});
            this.gridView1.GridControl = this.gcMain;
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsFind.ShowSearchNavButtons = false;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            //
            // gv_operationTime
            //
            this.gv_operationTime.AppearanceCell.Options.UseFont = true;
            this.gv_operationTime.Caption = "生产线别";
            this.gv_operationTime.FieldName = "xb";
            this.gv_operationTime.MinWidth = 10;
            this.gv_operationTime.Name = "gv_operationTime";
            this.gv_operationTime.OptionsColumn.AllowEdit = false;
            this.gv_operationTime.Tag = "query_OPERATION_TIME";
            this.gv_operationTime.Visible = true;
            this.gv_operationTime.VisibleIndex = 1;
            this.gv_operationTime.Width = 48;
            //
            // gv_operationTable
            //
            this.gv_operationTable.AppearanceCell.Options.UseFont = true;
            this.gv_operationTable.Caption = "生产车间";
            this.gv_operationTable.FieldName = "dptnName";
            this.gv_operationTable.MinWidth = 10;
            this.gv_operationTable.Name = "gv_operationTable";
            this.gv_operationTable.OptionsColumn.AllowEdit = false;
            this.gv_operationTable.Tag = "query_OPERATION_TABLE";
            this.gv_operationTable.Visible = true;
            this.gv_operationTable.VisibleIndex = 2;
            this.gv_operationTable.Width = 48;
            //
            // gv_userName
            //
            this.gv_userName.AppearanceCell.Options.UseFont = true;
            this.gv_userName.Caption = "工单号";
            this.gv_userName.FieldName = "daa001";
            this.gv_userName.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
            this.gv_userName.MinWidth = 10;
            this.gv_userName.Name = "gv_userName";
            this.gv_userName.OptionsColumn.AllowEdit = false;
            this.gv_userName.Tag = "query_USER_NAME";
            this.gv_userName.Visible = true;
            this.gv_userName.VisibleIndex = 0;
            this.gv_userName.Width = 50;
            //
            // gv_Btn
            //
            this.gv_Btn.Caption = "选择";
            this.gv_Btn.ColumnEdit = this.repositoryItemButtonEdit1;
            this.gv_Btn.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
            this.gv_Btn.MinWidth = 25;
            this.gv_Btn.Name = "gv_Btn";
            this.gv_Btn.Visible = true;
            this.gv_Btn.VisibleIndex = 8;
            this.gv_Btn.Width = 50;
            //
            // repositoryItemButtonEdit1
            //
            this.repositoryItemButtonEdit1.AutoHeight = false;
            editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.checkbox2_16x162;
            editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "选择", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick);
            //
            // gridColumn1
            //
            this.gridColumn1.Caption = "投料单号";
            this.gridColumn1.FieldName = "daa014";
            this.gridColumn1.MinWidth = 25;
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 3;
            this.gridColumn1.Width = 50;
            //
            // gridColumn2
            //
            this.gridColumn2.Caption = "任务单号";
            this.gridColumn2.FieldName = "daa021";
            this.gridColumn2.MinWidth = 25;
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 4;
            this.gridColumn2.Width = 50;
            //
            // gridColumn3
            //
            this.gridColumn3.Caption = "产品编码";
            this.gridColumn3.FieldName = "itemNo";
            this.gridColumn3.MinWidth = 25;
            this.gridColumn3.Name = "gridColumn3";
            this.gridColumn3.Visible = true;
            this.gridColumn3.VisibleIndex = 5;
            this.gridColumn3.Width = 50;
            //
            // gridColumn4
            //
            this.gridColumn4.Caption = "产品名称";
            this.gridColumn4.FieldName = "itemName";
            this.gridColumn4.MinWidth = 25;
            this.gridColumn4.Name = "gridColumn4";
            this.gridColumn4.Visible = true;
            this.gridColumn4.VisibleIndex = 6;
            this.gridColumn4.Width = 50;
            //
            // gridColumn5
            //
            this.gridColumn5.Caption = "规格型号";
            this.gridColumn5.FieldName = "itemModel";
            this.gridColumn5.MinWidth = 25;
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 7;
            this.gridColumn5.Width = 50;
            //
            // SelectDaa
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(996, 489);
            this.Controls.Add(this.gcMain);
            this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "SelectDaa";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "选择关联工单";
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit();
            this.ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraGrid.GridControl gcMain;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraGrid.Columns.GridColumn gv_operationTime;
        private DevExpress.XtraGrid.Columns.GridColumn gv_operationTable;
        private DevExpress.XtraGrid.Columns.GridColumn gv_userName;
        private DevExpress.XtraGrid.Columns.GridColumn gv_Btn;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
    }
}
DevApp/Gs.DevApp/UserControl/SelectDaa.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.UserControl
{
    public partial class SelectDaa : DevExpress.XtraEditors.XtraForm
    {
        private List<FilterEntity> _filterList = new List<FilterEntity>();
        public SelectDaa()
        {
            InitializeComponent();
            getPageList(1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false);
        }
        /// <summary>
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            gcMain.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", ""," and 1=1" + _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", "WomdaaManager/GetListSelect", json);
                var dd = UtilityHelper.ReturnToTablePage(strReturn);
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns();
                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                }
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var rowhandle = gridView1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            if (e.Button.Index == 0)
            {
                var dr = gridView1.GetDataRow(rowhandle);
                var mxGuid = dr["daa001"].ToString();
                if (string.IsNullOrEmpty(mxGuid))
                {
                    return;
                }
                var list = new List<dynamic>();
                list.Add(new
                {
                    guid = mxGuid,
                });
                UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list });
                Close();
            }
        }
        /// <summary>
        ///     é€‰æ‹©åŽçš„回调事件
        /// </summary>
        public event EventHandler<UpdateParentEventArgs> UpdateParent;
    }
}
DevApp/Gs.DevApp/UserControl/SelectDaa.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>