瀏覽代碼

拆解处理以及其余界面的修改

Hcsy 8 年之前
父節點
當前提交
68e4b52de4

+ 1 - 6
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -66,7 +66,7 @@ namespace UAS_MES.Make
             stw.ShowDialog();
             dh = new DataHelper();
             pa_outboxcode.Focus();
-            OperateResult.AppendText(">>请输入大箱号\n", Color.Green);
+            OperateResult.AppendText(">>请输入大箱号\n");
             printcount = 0;
             weightsum.Text = printcount + "";
         }
@@ -166,11 +166,6 @@ namespace UAS_MES.Make
 
         private void recordResult(string pa_outboxcode, string weight, string dateTime)
         {
-            if (showResult.Items.Count >= 10)
-            {
-                //如果有10行的话,则删除最前一行
-                showResult.Items.RemoveAt(0);
-            }
             //创建一个item
             ListViewItem lvi = new ListViewItem();
             //分条赋值

+ 228 - 116
UAS-MES/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -29,91 +29,45 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Decompose));
-            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.pa_makecode_label = new System.Windows.Forms.Label();
-            this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Decompose = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.Close = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
-            this.sncode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pr_name = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.LabelDataGridView = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
             this.deccount = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pr_name = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ms_sncode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.Close = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.Decompose = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.Column1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.cm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.New_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
-            // OperateResult
-            // 
-            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(12, 375);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1053, 152);
-            this.OperateResult.TabIndex = 172;
-            this.OperateResult.Text = "";
-            // 
             // pa_makecode_label
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(50, 556);
+            this.pa_makecode_label.Location = new System.Drawing.Point(33, 552);
             this.pa_makecode_label.Name = "pa_makecode_label";
             this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_makecode_label.TabIndex = 173;
             this.pa_makecode_label.Text = "序列号";
             // 
-            // sn_code
-            // 
-            this.sn_code.AllPower = null;
-            this.sn_code.BackColor = System.Drawing.Color.White;
-            this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(164, 562);
-            this.sn_code.Name = "sn_code";
-            this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(196, 21);
-            this.sn_code.Str = null;
-            this.sn_code.Str1 = null;
-            this.sn_code.Str2 = null;
-            this.sn_code.TabIndex = 174;
-            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
-            // 
-            // Decompose
-            // 
-            this.Decompose.AllPower = null;
-            this.Decompose.BackColor = System.Drawing.Color.Transparent;
-            this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
-            this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
-            this.Decompose.IsShowBorder = true;
-            this.Decompose.Location = new System.Drawing.Point(551, 560);
-            this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
-            this.Decompose.Name = "Decompose";
-            this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
-            this.Decompose.Power = null;
-            this.Decompose.Size = new System.Drawing.Size(105, 27);
-            this.Decompose.TabIndex = 175;
-            this.Decompose.Text = "确定拆解";
-            this.Decompose.UseVisualStyleBackColor = true;
-            // 
-            // Close
-            // 
-            this.Close.AllPower = null;
-            this.Close.BackColor = System.Drawing.Color.Transparent;
-            this.Close.DownImage = ((System.Drawing.Image)(resources.GetObject("Close.DownImage")));
-            this.Close.Image = ((System.Drawing.Image)(resources.GetObject("Close.Image")));
-            this.Close.IsShowBorder = true;
-            this.Close.Location = new System.Drawing.Point(887, 560);
-            this.Close.MoveImage = ((System.Drawing.Image)(resources.GetObject("Close.MoveImage")));
-            this.Close.Name = "Close";
-            this.Close.NormalImage = ((System.Drawing.Image)(resources.GetObject("Close.NormalImage")));
-            this.Close.Power = null;
-            this.Close.Size = new System.Drawing.Size(105, 27);
-            this.Close.TabIndex = 176;
-            this.Close.Text = "关闭";
-            this.Close.UseVisualStyleBackColor = true;
-            // 
             // label1
             // 
             this.label1.AutoSize = true;
@@ -128,7 +82,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(33, 92);
+            this.label2.Location = new System.Drawing.Point(33, 66);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
             this.label2.TabIndex = 178;
@@ -138,7 +92,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(433, 92);
+            this.label3.Location = new System.Drawing.Point(433, 66);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
             this.label3.TabIndex = 179;
@@ -164,41 +118,39 @@
             this.label5.TabIndex = 181;
             this.label5.Text = "已采集数";
             // 
-            // sncode
-            // 
-            this.sncode.AutoSize = true;
-            this.sncode.CutLength = null;
-            this.sncode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode.Location = new System.Drawing.Point(125, 18);
-            this.sncode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.sncode.Name = "sncode";
-            this.sncode.Size = new System.Drawing.Size(0, 27);
-            this.sncode.TabIndex = 183;
-            this.sncode.Tag = "1";
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.CutLength = null;
-            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(125, 92);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
-            this.ma_prodcode.TabIndex = 184;
-            this.ma_prodcode.Tag = "1";
+            // LabelDataGridView
+            // 
+            this.LabelDataGridView.AllowUserToAddRows = false;
+            this.LabelDataGridView.AllowUserToResizeRows = false;
+            this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Choose,
+            this.Column1,
+            this.cm_id,
+            this.pr_detail,
+            this.mb_bgcode,
+            this.mb_badcode,
+            this.AddBad,
+            this.cm_soncode,
+            this.cm_barcode,
+            this.New_BarCode});
+            this.LabelDataGridView.Location = new System.Drawing.Point(12, 105);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.Size = new System.Drawing.Size(1027, 233);
+            this.LabelDataGridView.TabIndex = 188;
             // 
-            // pr_name
+            // deccount
             // 
-            this.pr_name.AutoSize = true;
-            this.pr_name.CutLength = null;
-            this.pr_name.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_name.Location = new System.Drawing.Point(531, 92);
-            this.pr_name.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_name.Name = "pr_name";
-            this.pr_name.Size = new System.Drawing.Size(0, 27);
-            this.pr_name.TabIndex = 185;
-            this.pr_name.Tag = "1";
+            this.deccount.AutoSize = true;
+            this.deccount.CutLength = null;
+            this.deccount.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.deccount.Location = new System.Drawing.Point(907, 18);
+            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
+            this.deccount.Name = "deccount";
+            this.deccount.Size = new System.Drawing.Size(0, 27);
+            this.deccount.TabIndex = 187;
+            this.deccount.Tag = "1";
             // 
             // ms_makecode
             // 
@@ -212,28 +164,175 @@
             this.ms_makecode.TabIndex = 186;
             this.ms_makecode.Tag = "1";
             // 
-            // deccount
+            // pr_name
             // 
-            this.deccount.AutoSize = true;
-            this.deccount.CutLength = null;
-            this.deccount.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.deccount.Location = new System.Drawing.Point(907, 18);
-            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
-            this.deccount.Name = "deccount";
-            this.deccount.Size = new System.Drawing.Size(0, 27);
-            this.deccount.TabIndex = 187;
-            this.deccount.Tag = "1";
+            this.pr_name.AutoSize = true;
+            this.pr_name.CutLength = null;
+            this.pr_name.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_name.Location = new System.Drawing.Point(531, 66);
+            this.pr_name.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_name.Name = "pr_name";
+            this.pr_name.Size = new System.Drawing.Size(0, 27);
+            this.pr_name.TabIndex = 185;
+            this.pr_name.Tag = "1";
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.CutLength = null;
+            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode.Location = new System.Drawing.Point(125, 66);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ms_prodcode.TabIndex = 184;
+            this.ms_prodcode.Tag = "1";
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.AutoSize = true;
+            this.ms_sncode.CutLength = null;
+            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode.Location = new System.Drawing.Point(125, 18);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Size = new System.Drawing.Size(0, 27);
+            this.ms_sncode.TabIndex = 183;
+            this.ms_sncode.Tag = "1";
+            // 
+            // Close
+            // 
+            this.Close.AllPower = null;
+            this.Close.BackColor = System.Drawing.Color.Transparent;
+            this.Close.DownImage = ((System.Drawing.Image)(resources.GetObject("Close.DownImage")));
+            this.Close.Image = ((System.Drawing.Image)(resources.GetObject("Close.Image")));
+            this.Close.IsShowBorder = true;
+            this.Close.Location = new System.Drawing.Point(870, 556);
+            this.Close.MoveImage = ((System.Drawing.Image)(resources.GetObject("Close.MoveImage")));
+            this.Close.Name = "Close";
+            this.Close.NormalImage = ((System.Drawing.Image)(resources.GetObject("Close.NormalImage")));
+            this.Close.Power = null;
+            this.Close.Size = new System.Drawing.Size(105, 27);
+            this.Close.TabIndex = 176;
+            this.Close.Text = "关闭";
+            this.Close.UseVisualStyleBackColor = true;
+            // 
+            // Decompose
+            // 
+            this.Decompose.AllPower = null;
+            this.Decompose.BackColor = System.Drawing.Color.Transparent;
+            this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
+            this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
+            this.Decompose.IsShowBorder = true;
+            this.Decompose.Location = new System.Drawing.Point(534, 556);
+            this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
+            this.Decompose.Name = "Decompose";
+            this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
+            this.Decompose.Power = null;
+            this.Decompose.Size = new System.Drawing.Size(105, 27);
+            this.Decompose.TabIndex = 175;
+            this.Decompose.Text = "确定拆解";
+            this.Decompose.UseVisualStyleBackColor = true;
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(147, 558);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 174;
+            this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(12, 355);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1053, 152);
+            this.OperateResult.TabIndex = 172;
+            this.OperateResult.Text = "";
+            // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "拆解更料";
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 60;
+            // 
+            // Column1
+            // 
+            this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Column1.HeaderText = "拆解";
+            this.Column1.Name = "Column1";
+            this.Column1.Width = 40;
+            // 
+            // cm_id
+            // 
+            this.cm_id.DataPropertyName = "cm_id";
+            this.cm_id.HeaderText = "cm_id";
+            this.cm_id.Name = "cm_id";
+            this.cm_id.Width = 80;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "pr_detail";
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Width = 80;
+            // 
+            // mb_bgcode
+            // 
+            this.mb_bgcode.HeaderText = "不良代码组编号";
+            this.mb_bgcode.Name = "mb_bgcode";
+            // 
+            // mb_badcode
+            // 
+            this.mb_badcode.HeaderText = "不良代码编号";
+            this.mb_badcode.Name = "mb_badcode";
+            // 
+            // AddBad
+            // 
+            this.AddBad.HeaderText = "";
+            this.AddBad.Image = global::UAS_MES.Properties.Resources.plus;
+            this.AddBad.Name = "AddBad";
+            this.AddBad.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Width = 20;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.DataPropertyName = "cm_soncode";
+            this.cm_soncode.HeaderText = "子件编号";
+            this.cm_soncode.Name = "cm_soncode";
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.DataPropertyName = "cm_barcode";
+            this.cm_barcode.HeaderText = "物料批号";
+            this.cm_barcode.Name = "cm_barcode";
+            // 
+            // New_BarCode
+            // 
+            this.New_BarCode.HeaderText = "新批号";
+            this.New_BarCode.Name = "New_BarCode";
             // 
             // Make_Decompose
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1120, 625);
+            this.Controls.Add(this.LabelDataGridView);
             this.Controls.Add(this.deccount);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pr_name);
-            this.Controls.Add(this.ma_prodcode);
-            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.ms_prodcode);
+            this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.label3);
@@ -248,7 +347,9 @@
             this.Name = "Make_Decompose";
             this.Tag = "Make!Decompose";
             this.Text = "拆解处理";
+            this.Load += new System.EventHandler(this.Make_Decompose_Load);
             this.SizeChanged += new System.EventHandler(this.Make_Decompose_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -266,10 +367,21 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label label5;
-        private CustomControl.ValueLabel.ValueLabel sncode;
-        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_sncode;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
         private CustomControl.ValueLabel.ValueLabel pr_name;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.ValueLabel.ValueLabel deccount;
+        private CustomControl.DataGrid_View.DataGridViewWithSerialNum LabelDataGridView;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_bgcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mb_badcode;
+        private System.Windows.Forms.DataGridViewImageColumn AddBad;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn New_BarCode;
     }
 }

+ 43 - 3
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -20,6 +20,8 @@ namespace UAS_MES.Make
         LogStringBuilder sql = new LogStringBuilder();
 
         DataHelper dh;
+        //记录当前序列号的ms_id
+        string ms_id;
 
         //采集计数
         int count;
@@ -27,13 +29,16 @@ namespace UAS_MES.Make
         public Make_Decompose()
         {
             InitializeComponent();
+        }
+
+        private void Make_Decompose_Load(object sender, EventArgs e)
+        {
             asc.controllInitializeSize(this);
             dh = new DataHelper();
             sn_code.Focus();
-            OperateResult.AppendText(">>请输入序列号\n", Color.Green);
+            OperateResult.AppendText(">>请输入序列号\n");
             count = 0;
             deccount.Text = count + "";
-
         }
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)
@@ -41,13 +46,48 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("");
+                sql.Append("select max(ms_id) from makeserial where ms_sncode ='"+sn_code.Text+"' or  exists (select 1");
+                sql.Append(" from  makesnrelation where beforesn='"+ sn_code.Text + "'  and ms_makecode=makecode)");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                ms_id = dt.Rows[0][0].ToString();
+                if (ms_id != "")
+                {  
+                    sql.Clear();
+                    sql.Append("select ms_id,ms_status,ms_makecode,ms_prodcode,pr_detail ||',' || pr_spec pr_name ,ms_sncode from makeserial left join product on pr_code=ms_prodcode where ms_id='" + ms_id + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    sql.Clear();
+                    sql.Append("");
+                }
+                else {
+                    ms_id = null;
+                    OperateResult.AppendText(">>序列号不存在\n",Color.Red);
+                    sn_code.Text = "";
+                    BaseUtil.CleanForm(this);
+                    sn_code.Focus();
+                    return;
+                }
             }
         }
 
+
+        private void LoadData()
+        {
+           //如果没有任何筛选条件直接选取productlabel的数据
+           sql.Clear();
+           sql.Append("select la_id,pl_labelname,pl_labelurl,pl_labeltype,pl_isdefault,pl_prodcode,pl_id,pl_labelcode,pl_detno,pl_labelsoft,pr_detail,pr_spec,");
+           sql.Append("pr_code from productlabel left join product on pl_prodcode=pr_code left join label on pl_labelcode=la_code");
+           dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");         
+           BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
+           string Field = BaseUtil.GetGridViewSelectContent(LabelDataGridView);
+        }
+
+
         private void Make_Decompose_SizeChanged(object sender, EventArgs e)
         {
             asc.controlAutoSize(this);
         }
+
+     
     }
 }

+ 35 - 8
UAS-MES/FunctionCode/Make/Make_Decompose.resx

@@ -117,8 +117,35 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_bgcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mb_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="AddBad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="New_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Decompose.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Close.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +157,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Decompose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Close.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -223,7 +250,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Decompose.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Close.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -236,7 +263,7 @@
         gg==
 </value>
   </data>
-  <data name="Decompose.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Close.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -249,7 +276,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Close.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Decompose.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -261,7 +288,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Close.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Decompose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -354,7 +381,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Close.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Decompose.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -367,7 +394,7 @@
         gg==
 </value>
   </data>
-  <data name="Close.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Decompose.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

二進制
UAS-MES/Resources/pluslogo.png