Explorar el Código

需求单、流转卡界面优化

Ge mingyu hace 1 año
padre
commit
257d744b09

+ 6 - 82
SIMDP/SIMDP.View/FormCopulerRequest.Designer.cs

@@ -32,11 +32,6 @@ namespace SIMDP
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCopulerRequest));
-            this.txt_CurrentPage = new DevExpress.XtraEditors.TextEdit();
-            this.btn_Last = new DevExpress.XtraEditors.SimpleButton();
-            this.btn_Next = new DevExpress.XtraEditors.SimpleButton();
-            this.btn_Previous = new DevExpress.XtraEditors.SimpleButton();
-            this.btn_First = new DevExpress.XtraEditors.SimpleButton();
             this.label_PageInfo = new DevExpress.XtraEditors.LabelControl();
             this.btn_Delete = new DevExpress.XtraEditors.SimpleButton();
             this.btn_Edit = new DevExpress.XtraEditors.SimpleButton();
@@ -68,7 +63,6 @@ namespace SIMDP
             this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.timerRefresh = new System.Windows.Forms.Timer(this.components);
-            ((System.ComponentModel.ISupportInitialize)(this.txt_CurrentPage.Properties)).BeginInit();
             this.panel1.SuspendLayout();
             this.coTableLayoutPanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dateEditStart.Properties.CalendarTimeProperties)).BeginInit();
@@ -81,72 +75,14 @@ namespace SIMDP
             ((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
             this.SuspendLayout();
             // 
-            // txt_CurrentPage
-            // 
-            this.txt_CurrentPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.txt_CurrentPage.EditValue = "1";
-            this.txt_CurrentPage.Location = new System.Drawing.Point(1207, 286);
-            this.txt_CurrentPage.Name = "txt_CurrentPage";
-            this.txt_CurrentPage.Size = new System.Drawing.Size(25, 20);
-            this.txt_CurrentPage.TabIndex = 13;
-            this.txt_CurrentPage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_CurrentPage_KeyDown_1);
-            // 
-            // btn_Last
-            // 
-            this.btn_Last.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btn_Last.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(230)))), ((int)(((byte)(244)))));
-            this.btn_Last.Appearance.Options.UseBackColor = true;
-            this.btn_Last.Location = new System.Drawing.Point(1271, 286);
-            this.btn_Last.Name = "btn_Last";
-            this.btn_Last.Size = new System.Drawing.Size(30, 20);
-            this.btn_Last.TabIndex = 9;
-            this.btn_Last.Text = ">|";
-            this.btn_Last.Click += new System.EventHandler(this.btn_Last_Click);
-            // 
-            // btn_Next
-            // 
-            this.btn_Next.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btn_Next.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(230)))), ((int)(((byte)(244)))));
-            this.btn_Next.Appearance.Options.UseBackColor = true;
-            this.btn_Next.Location = new System.Drawing.Point(1235, 286);
-            this.btn_Next.Name = "btn_Next";
-            this.btn_Next.Size = new System.Drawing.Size(30, 20);
-            this.btn_Next.TabIndex = 10;
-            this.btn_Next.Text = ">";
-            this.btn_Next.Click += new System.EventHandler(this.btn_Next_Click);
-            // 
-            // btn_Previous
-            // 
-            this.btn_Previous.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btn_Previous.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(230)))), ((int)(((byte)(244)))));
-            this.btn_Previous.Appearance.Options.UseBackColor = true;
-            this.btn_Previous.Location = new System.Drawing.Point(1175, 286);
-            this.btn_Previous.Name = "btn_Previous";
-            this.btn_Previous.Size = new System.Drawing.Size(30, 20);
-            this.btn_Previous.TabIndex = 11;
-            this.btn_Previous.Text = "<";
-            this.btn_Previous.Click += new System.EventHandler(this.btn_Previous_Click);
-            // 
-            // btn_First
-            // 
-            this.btn_First.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btn_First.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(230)))), ((int)(((byte)(244)))));
-            this.btn_First.Appearance.Options.UseBackColor = true;
-            this.btn_First.Location = new System.Drawing.Point(1139, 286);
-            this.btn_First.Name = "btn_First";
-            this.btn_First.Size = new System.Drawing.Size(30, 20);
-            this.btn_First.TabIndex = 12;
-            this.btn_First.Text = "|<";
-            this.btn_First.Click += new System.EventHandler(this.btn_First_Click);
-            // 
             // label_PageInfo
             // 
             this.label_PageInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.label_PageInfo.Location = new System.Drawing.Point(6, 289);
             this.label_PageInfo.Name = "label_PageInfo";
-            this.label_PageInfo.Size = new System.Drawing.Size(213, 14);
+            this.label_PageInfo.Size = new System.Drawing.Size(75, 14);
             this.label_PageInfo.TabIndex = 8;
-            this.label_PageInfo.Text = "共 {0} 条记录,每页 {1} 条,共 {2} 页";
+            this.label_PageInfo.Text = "共 {0} 条记录";
             // 
             // btn_Delete
             // 
@@ -185,11 +121,6 @@ namespace SIMDP
             // panel1
             // 
             this.panel1.Controls.Add(this.coTableLayoutPanel1);
-            this.panel1.Controls.Add(this.txt_CurrentPage);
-            this.panel1.Controls.Add(this.btn_Last);
-            this.panel1.Controls.Add(this.btn_Next);
-            this.panel1.Controls.Add(this.btn_Previous);
-            this.panel1.Controls.Add(this.btn_First);
             this.panel1.Controls.Add(this.label_PageInfo);
             this.panel1.Controls.Add(this.gridControl_CopulerRequest);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -240,7 +171,7 @@ namespace SIMDP
             // 
             this.dateEditStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.dateEditStart.EditValue = new System.DateTime(2019, 2, 27, 8, 48, 5, 0);
-            this.dateEditStart.Location = new System.Drawing.Point(87, 3);
+            this.dateEditStart.Location = new System.Drawing.Point(87, 4);
             this.dateEditStart.Name = "dateEditStart";
             this.dateEditStart.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
             this.dateEditStart.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -255,7 +186,7 @@ namespace SIMDP
             // 
             this.dateEditEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.dateEditEnd.EditValue = new System.DateTime(2019, 2, 27, 0, 0, 0, 0);
-            this.dateEditEnd.Location = new System.Drawing.Point(278, 3);
+            this.dateEditEnd.Location = new System.Drawing.Point(278, 4);
             this.dateEditEnd.Name = "dateEditEnd";
             this.dateEditEnd.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
             this.dateEditEnd.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -318,7 +249,7 @@ namespace SIMDP
             // txt_remark
             // 
             this.txt_remark.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.txt_remark.Location = new System.Drawing.Point(469, 3);
+            this.txt_remark.Location = new System.Drawing.Point(469, 5);
             this.txt_remark.Name = "txt_remark";
             this.txt_remark.Size = new System.Drawing.Size(101, 20);
             this.txt_remark.TabIndex = 27;
@@ -336,7 +267,7 @@ namespace SIMDP
             // txt_MrlCode
             // 
             this.txt_MrlCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.txt_MrlCode.Location = new System.Drawing.Point(660, 3);
+            this.txt_MrlCode.Location = new System.Drawing.Point(660, 5);
             this.txt_MrlCode.Name = "txt_MrlCode";
             this.txt_MrlCode.Size = new System.Drawing.Size(101, 20);
             this.txt_MrlCode.TabIndex = 27;
@@ -354,7 +285,6 @@ namespace SIMDP
             this.gridControl_CopulerRequest.TabIndex = 0;
             this.gridControl_CopulerRequest.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView});
-            this.gridControl_CopulerRequest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.gridControl_CopulerRequest_KeyDown);
             // 
             // gridView
             // 
@@ -519,7 +449,6 @@ namespace SIMDP
             this.Name = "FormCopulerRequest";
             this.Text = "车钩需求单";
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormCopulerRequest_KeyDown);
-            ((System.ComponentModel.ISupportInitialize)(this.txt_CurrentPage.Properties)).EndInit();
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             this.coTableLayoutPanel1.ResumeLayout(false);
@@ -537,11 +466,6 @@ namespace SIMDP
         }
 
         #endregion
-        private DevExpress.XtraEditors.TextEdit txt_CurrentPage;
-        private DevExpress.XtraEditors.SimpleButton btn_Last;
-        private DevExpress.XtraEditors.SimpleButton btn_Next;
-        private DevExpress.XtraEditors.SimpleButton btn_Previous;
-        private DevExpress.XtraEditors.SimpleButton btn_First;
         private DevExpress.XtraEditors.LabelControl label_PageInfo;
         private DevExpress.XtraEditors.SimpleButton btn_Delete;
         private DevExpress.XtraEditors.SimpleButton btn_Edit;

+ 13 - 175
SIMDP/SIMDP.View/FormCopulerRequest.cs

@@ -1,15 +1,11 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Windows.Forms;
 using ProjectBase.Controls;
 using SIMDP.BLL;
-using ProjectBase.Data.Pager;
 using SIMDP.Model;
 using SIMDP.Util;
 using ProjectBase.Data.BaseDAL;
-using ProjectBase.Data.Logs;
-using ProjectBase.Data.Redis;
 using System.Drawing;
 using DevExpress.XtraGrid.Views.Grid;
 
@@ -17,147 +13,35 @@ namespace SIMDP
 {
     public partial class FormCopulerRequest : BaseDock
     {
-        private const int pageSize = 500;  // 每页数据量
-        private int pageCount = 1; // 查询结果页数
-        PagerInfo pagerInfo = new PagerInfo();
-        private delegate void refreshDelegate();
-
         public FormCopulerRequest()
         {
             InitializeComponent();
 
-            InitCtrls();
+            dateEditStart.EditValue = DateTime.Today.AddMonths(-3);
+
+            dateEditEnd.EditValue = DateTime.Today;
 
-            pagerInfo.CurrenetPageIndex = 1;
             Search_RefreshData();
 
             this.KeyPreview = true;
         }
 
-        private void InitCtrls()
-        {
-            this.dateEditStart.EditValue = DateTime.Today.AddMonths(-3);
-            this.dateEditEnd.EditValue = DateTime.Today;
-            Dictionary<string, string> linkType2 = new Dictionary<string, string>();
-            linkType2.Add("0", "所有任务");
-            linkType2.Add("01", "未配盘");
-            linkType2.Add("2", "配盘完成");
-        }
-
-        /// <summary>
-        /// 获取所有数据
-        /// </summary>
-        private void BindData()
-        {
-            pagerInfo.CurrenetPageIndex = 1;
-            GetPageNumber(BLLFactory<BlCopulerRequest>.Instance.GetRecordCount());
-            this.gridControl_CopulerRequest.DataSource = BLLFactory<BlCopulerRequest>.Instance.GetAll(pagerInfo);
-        }
-
-        /// <summary>
-        /// 根据条件获取数据
-        /// </summary>
         private void Search_RefreshData()
         {
             string condition = " 1=1";
-            string startTime = string.Format("{0} ", this.dateEditStart.Text);
-            string endTime = string.Format("{0} ", Convert.ToDateTime(this.dateEditEnd.Text).AddDays(1).ToString());//0607
-            condition += string.Format(" and DATE >= '{0}' and DATE <= '{1}'", startTime, endTime);
-
-            GetPageNumber(BLLFactory<BlCopulerRequest>.Instance.GetRecordCount(condition));
-            txt_CurrentPage.Text = pagerInfo.CurrenetPageIndex.ToString();
-            this.gridControl_CopulerRequest.DataSource = BLLFactory<BlCopulerRequest>.Instance.FindWithPager(condition, pagerInfo);
-            this.gridControl_CopulerRequest.RefreshDataSource();
-            return;
-        }
-
-        /// <summary>
-        /// 获取数据表一共有多少条数据
-        /// </summary>
-        private void GetPageNumber(int recordCount)
-        {
-            //取得总页数
-            if (recordCount % pageSize == 0)
-            {
-                pageCount = recordCount / pageSize;
-            }
-            else
-            {
-                pageCount = recordCount / pageSize + 1;
-            }
-            this.label_PageInfo.Text = string.Format("共 {0} 条记录,每页 {1} 条,共 {2} 页", recordCount, pageSize, pageCount);
-            pagerInfo.RecordCount = recordCount;
-            pagerInfo.PageSize = pageSize;
-        }
+            condition += string.Format($" and DATE >= '{dateEditStart.Text}' and DATE <= '{Convert.ToDateTime(dateEditEnd.Text).AddDays(1)}'");
+            List<MoCopulerRequest> listcopuler = BLLFactory<BlCopulerRequest>.Instance.Find(condition);
 
-        /// <summary>
-        /// 第一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btn_First_Click(object sender, EventArgs e)
-        {
-            pagerInfo.CurrenetPageIndex = 1;
-            Search_RefreshData();
+            gridControl_CopulerRequest.DataSource = listcopuler;
+            gridControl_CopulerRequest.RefreshDataSource();
+            label_PageInfo.Text = $"共 {listcopuler.Count} 条记录";
         }
 
-        /// <summary>
-        /// 最后一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btn_Last_Click(object sender, EventArgs e)
-        {
-            pagerInfo.CurrenetPageIndex = pageCount > 0 ? pageCount : 1;
-            Search_RefreshData();
-        }
-
-        /// <summary>
-        /// 上一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btn_Previous_Click(object sender, EventArgs e)
-        {
-            if (pagerInfo.CurrenetPageIndex >= 2)
-            {
-                pagerInfo.CurrenetPageIndex -= 1;
-                Search_RefreshData();
-            }
-            else
-            {
-                pagerInfo.CurrenetPageIndex = 1;
-                Search_RefreshData();
-            }
-        }
-
-        /// <summary>
-        /// 下一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btn_Next_Click(object sender, EventArgs e)
-        {
-            if (pagerInfo.CurrenetPageIndex < pageCount)
-            {
-                pagerInfo.CurrenetPageIndex += 1;
-                Search_RefreshData();
-            }
-            else
-            {
-                pagerInfo.CurrenetPageIndex = pageCount > 0 ? pageCount : 1;
-                Search_RefreshData();
-            }
-        }
-
-        /// <summary>
-        /// 按照条件查询数据
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
         private void btn_Query_Click(object sender, EventArgs e)
         {
-            pagerInfo.CurrenetPageIndex = 1;
+            this.txt_remark.Text = "";
+            this.txt_MrlCode.Text = "";
+
             Search_RefreshData();
         }
 
@@ -199,38 +83,8 @@ namespace SIMDP
             FormEditCopulerRequest editTask = new FormEditCopulerRequest(selectRow);
             editTask.saveData += new FormEditCopulerRequest.save(Search_RefreshData);
             editTask.ShowDialog();
-
         }
 
-        private void txt_CurrentPage_KeyDown_1(object sender, KeyEventArgs e)
-        {
-            if (e.KeyCode == Keys.Enter)
-            {
-                int num;
-                try
-                {
-                    num = Convert.ToInt16(txt_CurrentPage.Text);
-                }
-                catch
-                {
-                    num = 1;
-                }
-
-                if (num > pageCount)
-                    num = pageCount;
-                if (num < 1)
-                    num = 1;
-
-                pagerInfo.CurrenetPageIndex = num;
-                Search_RefreshData();
-            }
-        }
-
-        /// <summary>
-        /// 显示序号列
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
         private void gridView_PLC_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
         {
             if (e.Info.IsRowIndicator && e.RowHandle >= 0)
@@ -239,22 +93,12 @@ namespace SIMDP
             }
         }
 
-        /// <summary>
-        /// Timer自动刷新
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
         private void RefreshAuto(object sender, EventArgs e)
         {
             if (!this.IsActive) return;
             if (!chk_Refresh.Checked) return;
 
-            int rowHandle = gridView.FocusedRowHandle;
-
             Search_RefreshData();
-
-            gridView.FocusedRowHandle = rowHandle;
-
         }
 
         private void Enter_KeyDown(object sender, KeyEventArgs e)
@@ -265,12 +109,6 @@ namespace SIMDP
             }
         }
 
-        RedisHelper redis = new RedisHelper();
-        private void gridControl_CopulerRequest_KeyDown(object sender, KeyEventArgs e)
-        {
-          
-        }
-
         private void FormCopulerRequest_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.Control && e.KeyCode == Keys.W)
@@ -327,9 +165,9 @@ namespace SIMDP
                 string copiedData = (sender as GridView).GetRowCellDisplayText(gridHitInfo.RowHandle, gridHitInfo.Column);
                 if (string.IsNullOrEmpty(copiedData)) return;
 
-            //    DevExpress.XtraEditors.XtraMessageBox.Show($"{copiedData.Replace("},","},\n")}", "BOM", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                //    DevExpress.XtraEditors.XtraMessageBox.Show($"{copiedData.Replace("},","},\n")}", "BOM", MessageBoxButtons.OK, MessageBoxIcon.Information);
 
-                UserMessageBox editTask = new UserMessageBox(copiedData,"BOM");
+                UserMessageBox editTask = new UserMessageBox(copiedData, "BOM");
                 editTask.ShowDialog();
 
                 return;

+ 65 - 95
SIMDP/SIMDP.View/FormEditProductTask.Designer.cs

@@ -92,9 +92,8 @@
             this.panelControl1.Controls.Add(this.btn_Save);
             this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panelControl1.Location = new System.Drawing.Point(0, 0);
-            this.panelControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.panelControl1.Name = "panelControl1";
-            this.panelControl1.Size = new System.Drawing.Size(369, 659);
+            this.panelControl1.Size = new System.Drawing.Size(326, 516);
             this.panelControl1.TabIndex = 0;
             // 
             // gcl_Barcode
@@ -106,30 +105,28 @@
             this.gcl_Barcode.Controls.Add(this.labelControl6);
             this.gcl_Barcode.Controls.Add(this.labelControl7);
             this.gcl_Barcode.Controls.Add(this.txt_SmallBarcode);
-            this.gcl_Barcode.Location = new System.Drawing.Point(10, 260);
+            this.gcl_Barcode.Location = new System.Drawing.Point(9, 202);
             this.gcl_Barcode.Margin = new System.Windows.Forms.Padding(2);
             this.gcl_Barcode.Name = "gcl_Barcode";
-            this.gcl_Barcode.Size = new System.Drawing.Size(352, 106);
+            this.gcl_Barcode.Size = new System.Drawing.Size(311, 82);
             this.gcl_Barcode.TabIndex = 31;
             this.gcl_Barcode.Text = "托盘号绑定";
             // 
             // txt_LargeBarcode
             // 
             this.txt_LargeBarcode.EditValue = "";
-            this.txt_LargeBarcode.Location = new System.Drawing.Point(131, 39);
-            this.txt_LargeBarcode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_LargeBarcode.Location = new System.Drawing.Point(115, 30);
             this.txt_LargeBarcode.Name = "txt_LargeBarcode";
-            this.txt_LargeBarcode.Size = new System.Drawing.Size(195, 24);
+            this.txt_LargeBarcode.Size = new System.Drawing.Size(171, 20);
             this.txt_LargeBarcode.TabIndex = 27;
             // 
             // labelControl6
             // 
             this.labelControl6.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl6.Appearance.Options.UseForeColor = true;
-            this.labelControl6.Location = new System.Drawing.Point(18, 43);
-            this.labelControl6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl6.Location = new System.Drawing.Point(16, 33);
             this.labelControl6.Name = "labelControl6";
-            this.labelControl6.Size = new System.Drawing.Size(75, 18);
+            this.labelControl6.Size = new System.Drawing.Size(60, 14);
             this.labelControl6.TabIndex = 26;
             this.labelControl6.Text = "大托盘码:";
             // 
@@ -137,20 +134,18 @@
             // 
             this.labelControl7.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl7.Appearance.Options.UseForeColor = true;
-            this.labelControl7.Location = new System.Drawing.Point(18, 74);
-            this.labelControl7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl7.Location = new System.Drawing.Point(16, 58);
             this.labelControl7.Name = "labelControl7";
-            this.labelControl7.Size = new System.Drawing.Size(75, 18);
+            this.labelControl7.Size = new System.Drawing.Size(60, 14);
             this.labelControl7.TabIndex = 25;
             this.labelControl7.Text = "小托盘码:";
             // 
             // txt_SmallBarcode
             // 
             this.txt_SmallBarcode.EditValue = "LKT";
-            this.txt_SmallBarcode.Location = new System.Drawing.Point(131, 72);
-            this.txt_SmallBarcode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_SmallBarcode.Location = new System.Drawing.Point(115, 56);
             this.txt_SmallBarcode.Name = "txt_SmallBarcode";
-            this.txt_SmallBarcode.Size = new System.Drawing.Size(195, 24);
+            this.txt_SmallBarcode.Size = new System.Drawing.Size(171, 20);
             this.txt_SmallBarcode.TabIndex = 28;
             // 
             // gcl_AutoGen
@@ -168,10 +163,10 @@
             this.gcl_AutoGen.Controls.Add(this.txt_MatchNum);
             this.gcl_AutoGen.Controls.Add(this.txt_requestCode);
             this.gcl_AutoGen.Controls.Add(this.txt_AbleMatch);
-            this.gcl_AutoGen.Location = new System.Drawing.Point(10, 371);
+            this.gcl_AutoGen.Location = new System.Drawing.Point(9, 289);
             this.gcl_AutoGen.Margin = new System.Windows.Forms.Padding(2);
             this.gcl_AutoGen.Name = "gcl_AutoGen";
-            this.gcl_AutoGen.Size = new System.Drawing.Size(352, 209);
+            this.gcl_AutoGen.Size = new System.Drawing.Size(311, 163);
             this.gcl_AutoGen.TabIndex = 31;
             this.gcl_AutoGen.Text = "自动生成项";
             // 
@@ -179,10 +174,9 @@
             // 
             this.labelControl15.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(31)))), ((int)(((byte)(53)))));
             this.labelControl15.Appearance.Options.UseForeColor = true;
-            this.labelControl15.Location = new System.Drawing.Point(15, 34);
-            this.labelControl15.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl15.Location = new System.Drawing.Point(13, 26);
             this.labelControl15.Name = "labelControl15";
-            this.labelControl15.Size = new System.Drawing.Size(84, 18);
+            this.labelControl15.Size = new System.Drawing.Size(68, 14);
             this.labelControl15.TabIndex = 0;
             this.labelControl15.Text = "PLC程序号:";
             // 
@@ -190,10 +184,9 @@
             // 
             this.labelControl11.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(31)))), ((int)(((byte)(53)))));
             this.labelControl11.Appearance.Options.UseForeColor = true;
-            this.labelControl11.Location = new System.Drawing.Point(15, 66);
-            this.labelControl11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl11.Location = new System.Drawing.Point(13, 51);
             this.labelControl11.Name = "labelControl11";
-            this.labelControl11.Size = new System.Drawing.Size(103, 18);
+            this.labelControl11.Size = new System.Drawing.Size(83, 14);
             this.labelControl11.TabIndex = 0;
             this.labelControl11.Text = "MES需求单号:";
             // 
@@ -201,10 +194,9 @@
             // 
             this.labelControl10.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(31)))), ((int)(((byte)(53)))));
             this.labelControl10.Appearance.Options.UseForeColor = true;
-            this.labelControl10.Location = new System.Drawing.Point(14, 143);
-            this.labelControl10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl10.Location = new System.Drawing.Point(12, 111);
             this.labelControl10.Name = "labelControl10";
-            this.labelControl10.Size = new System.Drawing.Size(75, 18);
+            this.labelControl10.Size = new System.Drawing.Size(60, 14);
             this.labelControl10.TabIndex = 0;
             this.labelControl10.Text = "抓取顺序:";
             // 
@@ -212,10 +204,9 @@
             // 
             this.labelControl17.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(31)))), ((int)(((byte)(53)))));
             this.labelControl17.Appearance.Options.UseForeColor = true;
-            this.labelControl17.Location = new System.Drawing.Point(14, 173);
-            this.labelControl17.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl17.Location = new System.Drawing.Point(12, 135);
             this.labelControl17.Name = "labelControl17";
-            this.labelControl17.Size = new System.Drawing.Size(60, 18);
+            this.labelControl17.Size = new System.Drawing.Size(48, 14);
             this.labelControl17.TabIndex = 0;
             this.labelControl17.Text = "配对号:";
             // 
@@ -223,57 +214,51 @@
             // 
             this.labelControl9.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(31)))), ((int)(((byte)(53)))));
             this.labelControl9.Appearance.Options.UseForeColor = true;
-            this.labelControl9.Location = new System.Drawing.Point(14, 111);
-            this.labelControl9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl9.Location = new System.Drawing.Point(12, 86);
             this.labelControl9.Name = "labelControl9";
-            this.labelControl9.Size = new System.Drawing.Size(75, 18);
+            this.labelControl9.Size = new System.Drawing.Size(60, 14);
             this.labelControl9.TabIndex = 0;
             this.labelControl9.Text = "能否配对:";
             // 
             // txt_plcProgramcode
             // 
             this.txt_plcProgramcode.EditValue = "";
-            this.txt_plcProgramcode.Location = new System.Drawing.Point(128, 32);
-            this.txt_plcProgramcode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_plcProgramcode.Location = new System.Drawing.Point(112, 25);
             this.txt_plcProgramcode.Name = "txt_plcProgramcode";
-            this.txt_plcProgramcode.Size = new System.Drawing.Size(195, 24);
+            this.txt_plcProgramcode.Size = new System.Drawing.Size(171, 20);
             this.txt_plcProgramcode.TabIndex = 7;
             this.txt_plcProgramcode.TabStop = false;
             // 
             // txt_GrabOrder
             // 
             this.txt_GrabOrder.EditValue = "";
-            this.txt_GrabOrder.Location = new System.Drawing.Point(127, 141);
-            this.txt_GrabOrder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_GrabOrder.Location = new System.Drawing.Point(111, 110);
             this.txt_GrabOrder.Name = "txt_GrabOrder";
-            this.txt_GrabOrder.Size = new System.Drawing.Size(195, 24);
+            this.txt_GrabOrder.Size = new System.Drawing.Size(171, 20);
             this.txt_GrabOrder.TabIndex = 16;
             // 
             // txt_MatchNum
             // 
             this.txt_MatchNum.EditValue = "";
-            this.txt_MatchNum.Location = new System.Drawing.Point(127, 170);
-            this.txt_MatchNum.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_MatchNum.Location = new System.Drawing.Point(111, 132);
             this.txt_MatchNum.Name = "txt_MatchNum";
-            this.txt_MatchNum.Size = new System.Drawing.Size(195, 24);
+            this.txt_MatchNum.Size = new System.Drawing.Size(171, 20);
             this.txt_MatchNum.TabIndex = 18;
             // 
             // txt_requestCode
             // 
             this.txt_requestCode.EditValue = "";
-            this.txt_requestCode.Location = new System.Drawing.Point(128, 64);
-            this.txt_requestCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_requestCode.Location = new System.Drawing.Point(112, 50);
             this.txt_requestCode.Name = "txt_requestCode";
-            this.txt_requestCode.Size = new System.Drawing.Size(195, 24);
+            this.txt_requestCode.Size = new System.Drawing.Size(171, 20);
             this.txt_requestCode.TabIndex = 11;
             // 
             // txt_AbleMatch
             // 
             this.txt_AbleMatch.EditValue = "";
-            this.txt_AbleMatch.Location = new System.Drawing.Point(127, 109);
-            this.txt_AbleMatch.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_AbleMatch.Location = new System.Drawing.Point(111, 85);
             this.txt_AbleMatch.Name = "txt_AbleMatch";
-            this.txt_AbleMatch.Size = new System.Drawing.Size(195, 24);
+            this.txt_AbleMatch.Size = new System.Drawing.Size(171, 20);
             this.txt_AbleMatch.TabIndex = 15;
             // 
             // gcl_Card
@@ -292,10 +277,10 @@
             this.gcl_Card.Controls.Add(this.txt_MrlCode);
             this.gcl_Card.Controls.Add(this.txt_ProductType);
             this.gcl_Card.Controls.Add(this.txt_CardRemark);
-            this.gcl_Card.Location = new System.Drawing.Point(10, 10);
+            this.gcl_Card.Location = new System.Drawing.Point(9, 8);
             this.gcl_Card.Margin = new System.Windows.Forms.Padding(2);
             this.gcl_Card.Name = "gcl_Card";
-            this.gcl_Card.Size = new System.Drawing.Size(352, 245);
+            this.gcl_Card.Size = new System.Drawing.Size(311, 191);
             this.gcl_Card.TabIndex = 31;
             this.gcl_Card.Text = "流转卡信息";
             // 
@@ -303,10 +288,9 @@
             // 
             this.labelControl3.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl3.Appearance.Options.UseForeColor = true;
-            this.labelControl3.Location = new System.Drawing.Point(18, 42);
-            this.labelControl3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl3.Location = new System.Drawing.Point(16, 33);
             this.labelControl3.Name = "labelControl3";
-            this.labelControl3.Size = new System.Drawing.Size(45, 18);
+            this.labelControl3.Size = new System.Drawing.Size(36, 14);
             this.labelControl3.TabIndex = 0;
             this.labelControl3.Text = "工位:";
             // 
@@ -314,10 +298,9 @@
             // 
             this.labelControl2.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl2.Appearance.Options.UseForeColor = true;
-            this.labelControl2.Location = new System.Drawing.Point(18, 78);
-            this.labelControl2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl2.Location = new System.Drawing.Point(16, 61);
             this.labelControl2.Name = "labelControl2";
-            this.labelControl2.Size = new System.Drawing.Size(75, 18);
+            this.labelControl2.Size = new System.Drawing.Size(60, 14);
             this.labelControl2.TabIndex = 0;
             this.labelControl2.Text = "流转卡号:";
             // 
@@ -325,29 +308,26 @@
             // 
             this.labelControl4.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl4.Appearance.Options.UseForeColor = true;
-            this.labelControl4.Location = new System.Drawing.Point(18, 182);
-            this.labelControl4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl4.Location = new System.Drawing.Point(16, 142);
             this.labelControl4.Name = "labelControl4";
-            this.labelControl4.Size = new System.Drawing.Size(75, 18);
+            this.labelControl4.Size = new System.Drawing.Size(60, 14);
             this.labelControl4.TabIndex = 0;
             this.labelControl4.Text = "物料编码:";
             // 
             // txt_WorkCode
             // 
             this.txt_WorkCode.EditValue = "测试";
-            this.txt_WorkCode.Location = new System.Drawing.Point(131, 74);
-            this.txt_WorkCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_WorkCode.Location = new System.Drawing.Point(115, 58);
             this.txt_WorkCode.Name = "txt_WorkCode";
-            this.txt_WorkCode.Size = new System.Drawing.Size(195, 24);
+            this.txt_WorkCode.Size = new System.Drawing.Size(171, 20);
             this.txt_WorkCode.TabIndex = 2;
             this.txt_WorkCode.TabStop = false;
             // 
             // btn_import
             // 
-            this.btn_import.Location = new System.Drawing.Point(98, 0);
-            this.btn_import.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btn_import.Location = new System.Drawing.Point(86, 0);
             this.btn_import.Name = "btn_import";
-            this.btn_import.Size = new System.Drawing.Size(42, 26);
+            this.btn_import.Size = new System.Drawing.Size(37, 20);
             this.btn_import.TabIndex = 21;
             this.btn_import.Text = "导入";
             // 
@@ -355,101 +335,91 @@
             // 
             this.labelControl5.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl5.Appearance.Options.UseForeColor = true;
-            this.labelControl5.Location = new System.Drawing.Point(18, 146);
-            this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl5.Location = new System.Drawing.Point(16, 114);
             this.labelControl5.Name = "labelControl5";
-            this.labelControl5.Size = new System.Drawing.Size(45, 18);
+            this.labelControl5.Size = new System.Drawing.Size(36, 14);
             this.labelControl5.TabIndex = 0;
             this.labelControl5.Text = "图号:";
             // 
             // lookUp_Line
             // 
-            this.lookUp_Line.Location = new System.Drawing.Point(131, 38);
-            this.lookUp_Line.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.lookUp_Line.Location = new System.Drawing.Point(115, 30);
             this.lookUp_Line.Name = "lookUp_Line";
             this.lookUp_Line.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.lookUp_Line.Size = new System.Drawing.Size(195, 24);
+            this.lookUp_Line.Size = new System.Drawing.Size(171, 20);
             this.lookUp_Line.TabIndex = 0;
             // 
             // labelControl14
             // 
             this.labelControl14.Appearance.ForeColor = System.Drawing.Color.Black;
             this.labelControl14.Appearance.Options.UseForeColor = true;
-            this.labelControl14.Location = new System.Drawing.Point(18, 112);
-            this.labelControl14.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.labelControl14.Location = new System.Drawing.Point(16, 87);
             this.labelControl14.Name = "labelControl14";
-            this.labelControl14.Size = new System.Drawing.Size(60, 18);
+            this.labelControl14.Size = new System.Drawing.Size(48, 14);
             this.labelControl14.TabIndex = 0;
             this.labelControl14.Text = "备注名:";
             // 
             // txt_MrlCode
             // 
             this.txt_MrlCode.EditValue = "测试";
-            this.txt_MrlCode.Location = new System.Drawing.Point(131, 178);
-            this.txt_MrlCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_MrlCode.Location = new System.Drawing.Point(115, 138);
             this.txt_MrlCode.Name = "txt_MrlCode";
-            this.txt_MrlCode.Size = new System.Drawing.Size(195, 24);
+            this.txt_MrlCode.Size = new System.Drawing.Size(171, 20);
             this.txt_MrlCode.TabIndex = 3;
             this.txt_MrlCode.TabStop = false;
             // 
             // txt_ProductType
             // 
             this.txt_ProductType.EditValue = "测试";
-            this.txt_ProductType.Location = new System.Drawing.Point(131, 144);
-            this.txt_ProductType.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_ProductType.Location = new System.Drawing.Point(115, 112);
             this.txt_ProductType.Name = "txt_ProductType";
-            this.txt_ProductType.Size = new System.Drawing.Size(195, 24);
+            this.txt_ProductType.Size = new System.Drawing.Size(171, 20);
             this.txt_ProductType.TabIndex = 11;
             // 
             // txt_CardRemark
             // 
             this.txt_CardRemark.EditValue = "测试";
-            this.txt_CardRemark.Location = new System.Drawing.Point(131, 109);
-            this.txt_CardRemark.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txt_CardRemark.Location = new System.Drawing.Point(115, 85);
             this.txt_CardRemark.Name = "txt_CardRemark";
-            this.txt_CardRemark.Size = new System.Drawing.Size(195, 24);
+            this.txt_CardRemark.Size = new System.Drawing.Size(171, 20);
             this.txt_CardRemark.TabIndex = 4;
             this.txt_CardRemark.TabStop = false;
             // 
             // btn_Cancel
             // 
-            this.btn_Cancel.Location = new System.Drawing.Point(275, 600);
-            this.btn_Cancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btn_Cancel.Location = new System.Drawing.Point(241, 467);
             this.btn_Cancel.Name = "btn_Cancel";
-            this.btn_Cancel.Size = new System.Drawing.Size(58, 30);
+            this.btn_Cancel.Size = new System.Drawing.Size(51, 23);
             this.btn_Cancel.TabIndex = 23;
             this.btn_Cancel.Text = "取消";
             this.btn_Cancel.Click += new System.EventHandler(this.btn_Cancel_Click);
             // 
             // btn_Add
             // 
-            this.btn_Add.Location = new System.Drawing.Point(48, 600);
-            this.btn_Add.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btn_Add.Location = new System.Drawing.Point(42, 467);
             this.btn_Add.Name = "btn_Add";
-            this.btn_Add.Size = new System.Drawing.Size(58, 30);
+            this.btn_Add.Size = new System.Drawing.Size(51, 23);
             this.btn_Add.TabIndex = 21;
             this.btn_Add.Text = "添加";
             this.btn_Add.Click += new System.EventHandler(this.btn_Add_Click);
             // 
             // btn_Save
             // 
-            this.btn_Save.Location = new System.Drawing.Point(164, 600);
-            this.btn_Save.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.btn_Save.Location = new System.Drawing.Point(144, 467);
             this.btn_Save.Name = "btn_Save";
-            this.btn_Save.Size = new System.Drawing.Size(58, 30);
+            this.btn_Save.Size = new System.Drawing.Size(51, 23);
             this.btn_Save.TabIndex = 22;
             this.btn_Save.Text = "保存";
             // 
             // FormEditProductTask
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(369, 659);
+            this.ClientSize = new System.Drawing.Size(326, 516);
             this.ControlBox = false;
             this.Controls.Add(this.panelControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
-            this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "FormEditProductTask";

+ 2 - 2
SIMDP/SIMDP.View/FormEditProductTask.cs

@@ -213,6 +213,8 @@ namespace SIMDP
                 modelTask.ProductType = txt_ProductType.Text.Trim();
                 modelTask.PlcProgramCode = Convert.ToInt32(txt_plcProgramcode.Text);
                 modelTask.RequireCode = txt_requestCode.Text.Trim();
+                modelTask.MrlCode = txt_MrlCode.Text.Trim();
+
                 modelTask.AbleMatch = Convert.ToInt32(txt_AbleMatch.Text);
                 modelTask.GrabOrder = Convert.ToInt32(txt_GrabOrder.Text);
                 modelTask.MatchNum = Convert.ToInt32(txt_MatchNum.Text);
@@ -301,7 +303,5 @@ namespace SIMDP
             return false;
 
         }
-
-
     }
 }