瀏覽代碼

良品采集采集按钮刷新保存数量

章政 8 年之前
父節點
當前提交
abfad94347

+ 65 - 93
UAS-MES/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -71,9 +71,8 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1311, 36);
+            this.panel2.Size = new System.Drawing.Size(983, 29);
             this.panel2.TabIndex = 31;
             this.panel2.TabIndex = 31;
             // 
             // 
             // label1
             // label1
@@ -81,10 +80,9 @@
             this.label1.AutoSize = true;
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 5);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(12, 4);
             this.label1.Name = "label1";
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 0;
             this.label1.TabIndex = 0;
             this.label1.Text = "工单信息";
             this.label1.Text = "工单信息";
             // 
             // 
@@ -92,10 +90,9 @@
             // 
             // 
             this.mcd_restqty_label.AutoSize = true;
             this.mcd_restqty_label.AutoSize = true;
             this.mcd_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_restqty_label.Location = new System.Drawing.Point(797, 136);
-            this.mcd_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_restqty_label.Location = new System.Drawing.Point(598, 109);
             this.mcd_restqty_label.Name = "mcd_restqty_label";
             this.mcd_restqty_label.Name = "mcd_restqty_label";
-            this.mcd_restqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_restqty_label.TabIndex = 59;
             this.mcd_restqty_label.TabIndex = 59;
             this.mcd_restqty_label.Text = "待采集数";
             this.mcd_restqty_label.Text = "待采集数";
             // 
             // 
@@ -103,10 +100,9 @@
             // 
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(428, 136);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(321, 109);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 56;
             this.mcd_inqty_label.TabIndex = 56;
             this.mcd_inqty_label.Text = "已采集数";
             this.mcd_inqty_label.Text = "已采集数";
             // 
             // 
@@ -114,10 +110,9 @@
             // 
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(44, 136);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty_label.Location = new System.Drawing.Point(33, 109);
             this.ma_qty_label.Name = "ma_qty_label";
             this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.Size = new System.Drawing.Size(74, 21);
             this.ma_qty_label.TabIndex = 53;
             this.ma_qty_label.TabIndex = 53;
             this.ma_qty_label.Text = "工单数量";
             this.ma_qty_label.Text = "工单数量";
             // 
             // 
@@ -125,10 +120,9 @@
             // 
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(44, 74);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(33, 59);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 49;
             this.ms_makecode_label.TabIndex = 49;
             this.ms_makecode_label.Text = "归属工单";
             this.ms_makecode_label.Text = "归属工单";
             // 
             // 
@@ -136,10 +130,9 @@
             // 
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(797, 74);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(598, 59);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 50;
             this.pr_detail_label.TabIndex = 50;
             this.pr_detail_label.Text = "产品名称";
             this.pr_detail_label.Text = "产品名称";
             // 
             // 
@@ -147,10 +140,9 @@
             // 
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(428, 74);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(321, 59);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_prodcode_label.TabIndex = 51;
             this.ma_prodcode_label.TabIndex = 51;
             this.ma_prodcode_label.Text = "产品代码";
             this.ma_prodcode_label.Text = "产品代码";
             // 
             // 
@@ -160,10 +152,9 @@
             this.Loading.Checked = true;
             this.Loading.Checked = true;
             this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Loading.ForeColor = System.Drawing.Color.Blue;
             this.Loading.ForeColor = System.Drawing.Color.Blue;
-            this.Loading.Location = new System.Drawing.Point(56, 569);
-            this.Loading.Margin = new System.Windows.Forms.Padding(4);
+            this.Loading.Location = new System.Drawing.Point(42, 455);
             this.Loading.Name = "Loading";
             this.Loading.Name = "Loading";
-            this.Loading.Size = new System.Drawing.Size(73, 31);
+            this.Loading.Size = new System.Drawing.Size(60, 25);
             this.Loading.TabIndex = 62;
             this.Loading.TabIndex = 62;
             this.Loading.TabStop = true;
             this.Loading.TabStop = true;
             this.Loading.Text = "上料";
             this.Loading.Text = "上料";
@@ -174,10 +165,9 @@
             this.UnLoading.AutoSize = true;
             this.UnLoading.AutoSize = true;
             this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UnLoading.ForeColor = System.Drawing.Color.Blue;
             this.UnLoading.ForeColor = System.Drawing.Color.Blue;
-            this.UnLoading.Location = new System.Drawing.Point(163, 569);
-            this.UnLoading.Margin = new System.Windows.Forms.Padding(4);
+            this.UnLoading.Location = new System.Drawing.Point(122, 455);
             this.UnLoading.Name = "UnLoading";
             this.UnLoading.Name = "UnLoading";
-            this.UnLoading.Size = new System.Drawing.Size(73, 31);
+            this.UnLoading.Size = new System.Drawing.Size(60, 25);
             this.UnLoading.TabIndex = 63;
             this.UnLoading.TabIndex = 63;
             this.UnLoading.Text = "下料";
             this.UnLoading.Text = "下料";
             this.UnLoading.UseVisualStyleBackColor = true;
             this.UnLoading.UseVisualStyleBackColor = true;
@@ -186,10 +176,9 @@
             // 
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(51, 616);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(38, 493);
             this.sn_code_label.Name = "sn_code_label";
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 64;
             this.sn_code_label.TabIndex = 64;
             this.sn_code_label.Text = "序列号";
             this.sn_code_label.Text = "序列号";
             // 
             // 
@@ -197,10 +186,9 @@
             // 
             // 
             this.code_label.AutoSize = true;
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(51, 672);
-            this.code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.code_label.Location = new System.Drawing.Point(38, 538);
             this.code_label.Name = "code_label";
             this.code_label.Name = "code_label";
-            this.code_label.Size = new System.Drawing.Size(72, 27);
+            this.code_label.Size = new System.Drawing.Size(58, 21);
             this.code_label.TabIndex = 66;
             this.code_label.TabIndex = 66;
             this.code_label.Text = "录入框";
             this.code_label.Text = "录入框";
             // 
             // 
@@ -208,10 +196,9 @@
             // 
             // 
             this.iflastsn.AutoSize = true;
             this.iflastsn.AutoSize = true;
             this.iflastsn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.iflastsn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.iflastsn.Location = new System.Drawing.Point(417, 616);
-            this.iflastsn.Margin = new System.Windows.Forms.Padding(4);
+            this.iflastsn.Location = new System.Drawing.Point(313, 493);
             this.iflastsn.Name = "iflastsn";
             this.iflastsn.Name = "iflastsn";
-            this.iflastsn.Size = new System.Drawing.Size(142, 31);
+            this.iflastsn.Size = new System.Drawing.Size(115, 25);
             this.iflastsn.TabIndex = 72;
             this.iflastsn.TabIndex = 72;
             this.iflastsn.Text = "前一工单SN";
             this.iflastsn.Text = "前一工单SN";
             this.iflastsn.UseVisualStyleBackColor = true;
             this.iflastsn.UseVisualStyleBackColor = true;
@@ -220,10 +207,9 @@
             // 
             // 
             this.softwareversion_label.AutoSize = true;
             this.softwareversion_label.AutoSize = true;
             this.softwareversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.softwareversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.softwareversion_label.Location = new System.Drawing.Point(939, 208);
-            this.softwareversion_label.Margin = new System.Windows.Forms.Padding(4);
+            this.softwareversion_label.Location = new System.Drawing.Point(704, 166);
             this.softwareversion_label.Name = "softwareversion_label";
             this.softwareversion_label.Name = "softwareversion_label";
-            this.softwareversion_label.Size = new System.Drawing.Size(114, 31);
+            this.softwareversion_label.Size = new System.Drawing.Size(93, 25);
             this.softwareversion_label.TabIndex = 74;
             this.softwareversion_label.TabIndex = 74;
             this.softwareversion_label.Text = "软件版本";
             this.softwareversion_label.Text = "软件版本";
             this.softwareversion_label.UseVisualStyleBackColor = true;
             this.softwareversion_label.UseVisualStyleBackColor = true;
@@ -232,10 +218,9 @@
             // 
             // 
             this.ecn_label.AutoSize = true;
             this.ecn_label.AutoSize = true;
             this.ecn_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ecn_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ecn_label.Location = new System.Drawing.Point(939, 305);
-            this.ecn_label.Margin = new System.Windows.Forms.Padding(4);
+            this.ecn_label.Location = new System.Drawing.Point(704, 244);
             this.ecn_label.Name = "ecn_label";
             this.ecn_label.Name = "ecn_label";
-            this.ecn_label.Size = new System.Drawing.Size(94, 31);
+            this.ecn_label.Size = new System.Drawing.Size(78, 25);
             this.ecn_label.TabIndex = 75;
             this.ecn_label.TabIndex = 75;
             this.ecn_label.Text = "ECN号";
             this.ecn_label.Text = "ECN号";
             this.ecn_label.UseVisualStyleBackColor = true;
             this.ecn_label.UseVisualStyleBackColor = true;
@@ -244,10 +229,9 @@
             // 
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.ClearSn_code.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(383, 620);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ClearSn_code.Location = new System.Drawing.Point(287, 496);
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(21, 20);
+            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
             this.ClearSn_code.TabIndex = 138;
             this.ClearSn_code.TabIndex = 138;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
@@ -256,10 +240,9 @@
             // 
             // 
             this.CleanMa_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.CleanMa_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.CleanMa_code.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.CleanMa_code.Image = global::UAS_MES.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.CleanMa_code.Location = new System.Drawing.Point(389, 78);
-            this.CleanMa_code.Margin = new System.Windows.Forms.Padding(4);
+            this.CleanMa_code.Location = new System.Drawing.Point(292, 62);
             this.CleanMa_code.Name = "CleanMa_code";
             this.CleanMa_code.Name = "CleanMa_code";
-            this.CleanMa_code.Size = new System.Drawing.Size(21, 20);
+            this.CleanMa_code.Size = new System.Drawing.Size(16, 16);
             this.CleanMa_code.TabIndex = 139;
             this.CleanMa_code.TabIndex = 139;
             this.CleanMa_code.TabStop = false;
             this.CleanMa_code.TabStop = false;
             this.CleanMa_code.Click += new System.EventHandler(this.CleanMa_code_Click);
             this.CleanMa_code.Click += new System.EventHandler(this.CleanMa_code_Click);
@@ -268,30 +251,27 @@
             // 
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(555, 74);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(416, 59);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 99;
             this.ma_prodcode.TabIndex = 99;
             // 
             // 
             // pr_detail
             // pr_detail
             // 
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(931, 74);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.Location = new System.Drawing.Point(698, 59);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 98;
             this.pr_detail.TabIndex = 98;
             // 
             // 
             // mcd_remainqty
             // mcd_remainqty
             // 
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(929, 136);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(697, 109);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_remainqty.TabIndex = 97;
             this.mcd_remainqty.TabIndex = 97;
             this.mcd_remainqty.Tag = "mcd_remainqty";
             this.mcd_remainqty.Tag = "mcd_remainqty";
             // 
             // 
@@ -299,29 +279,26 @@
             // 
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(555, 136);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(416, 109);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_inqty.TabIndex = 96;
             this.mcd_inqty.TabIndex = 96;
             // 
             // 
             // ma_qty
             // ma_qty
             // 
             // 
             this.ma_qty.AutoSize = true;
             this.ma_qty.AutoSize = true;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(181, 136);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty.Location = new System.Drawing.Point(136, 109);
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 27);
+            this.ma_qty.Size = new System.Drawing.Size(0, 21);
             this.ma_qty.TabIndex = 95;
             this.ma_qty.TabIndex = 95;
             // 
             // 
             // OperateResult
             // OperateResult
             // 
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(49, 182);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(37, 146);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(856, 362);
+            this.OperateResult.Size = new System.Drawing.Size(643, 290);
             this.OperateResult.TabIndex = 94;
             this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             this.OperateResult.Text = "";
             // 
             // 
@@ -332,13 +309,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(821, 570);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(616, 456);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(80, 30);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 80;
             this.Clean.TabIndex = 80;
             this.Clean.Text = "清除";
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
             this.Clean.UseVisualStyleBackColor = true;
@@ -351,11 +327,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             | System.Windows.Forms.AnchorStyles.Right)));
             this.softwareversion.BackColor = System.Drawing.Color.White;
             this.softwareversion.BackColor = System.Drawing.Color.White;
             this.softwareversion.ID = null;
             this.softwareversion.ID = null;
-            this.softwareversion.Location = new System.Drawing.Point(1077, 208);
-            this.softwareversion.Margin = new System.Windows.Forms.Padding(4);
+            this.softwareversion.Location = new System.Drawing.Point(808, 166);
             this.softwareversion.Name = "softwareversion";
             this.softwareversion.Name = "softwareversion";
             this.softwareversion.Power = null;
             this.softwareversion.Power = null;
-            this.softwareversion.Size = new System.Drawing.Size(192, 25);
+            this.softwareversion.Size = new System.Drawing.Size(145, 21);
             this.softwareversion.Str = null;
             this.softwareversion.Str = null;
             this.softwareversion.Str1 = null;
             this.softwareversion.Str1 = null;
             this.softwareversion.Str2 = null;
             this.softwareversion.Str2 = null;
@@ -368,11 +343,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ecn.BackColor = System.Drawing.Color.White;
             this.ecn.BackColor = System.Drawing.Color.White;
             this.ecn.ID = null;
             this.ecn.ID = null;
-            this.ecn.Location = new System.Drawing.Point(1077, 305);
-            this.ecn.Margin = new System.Windows.Forms.Padding(4);
+            this.ecn.Location = new System.Drawing.Point(808, 244);
             this.ecn.Name = "ecn";
             this.ecn.Name = "ecn";
             this.ecn.Power = null;
             this.ecn.Power = null;
-            this.ecn.Size = new System.Drawing.Size(192, 25);
+            this.ecn.Size = new System.Drawing.Size(145, 21);
             this.ecn.Str = null;
             this.ecn.Str = null;
             this.ecn.Str1 = null;
             this.ecn.Str1 = null;
             this.ecn.Str2 = null;
             this.ecn.Str2 = null;
@@ -385,13 +359,12 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(417, 669);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
+            this.Confirm.Location = new System.Drawing.Point(313, 535);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(80, 30);
+            this.Confirm.Size = new System.Drawing.Size(60, 24);
             this.Confirm.TabIndex = 73;
             this.Confirm.TabIndex = 73;
             this.Confirm.Tag = "IfWrite";
             this.Confirm.Tag = "IfWrite";
             this.Confirm.Text = "确认";
             this.Confirm.Text = "确认";
@@ -403,11 +376,10 @@
             this.code.AllPower = "ifall";
             this.code.AllPower = "ifall";
             this.code.BackColor = System.Drawing.Color.White;
             this.code.BackColor = System.Drawing.Color.White;
             this.code.ID = null;
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(163, 672);
-            this.code.Margin = new System.Windows.Forms.Padding(4);
+            this.code.Location = new System.Drawing.Point(122, 538);
             this.code.Name = "code";
             this.code.Name = "code";
             this.code.Power = null;
             this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(212, 25);
+            this.code.Size = new System.Drawing.Size(160, 21);
             this.code.Str = null;
             this.code.Str = null;
             this.code.Str1 = null;
             this.code.Str1 = null;
             this.code.Str2 = null;
             this.code.Str2 = null;
@@ -421,11 +393,10 @@
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.Enabled = false;
             this.sn_code.Enabled = false;
             this.sn_code.ID = null;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(163, 616);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.sn_code.Location = new System.Drawing.Point(122, 493);
             this.sn_code.Name = "sn_code";
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(212, 25);
+            this.sn_code.Size = new System.Drawing.Size(160, 21);
             this.sn_code.Str = null;
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
             this.sn_code.Str2 = null;
@@ -435,9 +406,10 @@
             // 
             // 
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LockMakeCode.Location = new System.Drawing.Point(181, 46);
+            this.LockMakeCode.Location = new System.Drawing.Point(136, 37);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
+            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 140;
             this.LockMakeCode.TabIndex = 140;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
             this.LockMakeCode.UseVisualStyleBackColor = true;
@@ -449,12 +421,13 @@
             this.ma_code.Condition = null;
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(181, 76);
+            this.ma_code.Location = new System.Drawing.Point(136, 61);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ma_code.Name = "ma_code";
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(194, 25);
+            this.ma_code.Size = new System.Drawing.Size(146, 21);
             this.ma_code.TabIndex = 141;
             this.ma_code.TabIndex = 141;
             this.ma_code.TableName = null;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
             this.ma_code.Tag = "ma_code";
@@ -462,9 +435,9 @@
             // 
             // 
             // Make_FeedingCollection
             // Make_FeedingCollection
             // 
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1311, 710);
+            this.ClientSize = new System.Drawing.Size(983, 568);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.CleanMa_code);
             this.Controls.Add(this.CleanMa_code);
@@ -496,7 +469,6 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.panel2);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_FeedingCollection";
             this.Name = "Make_FeedingCollection";
             this.Tag = "Make!FeedingCollection";
             this.Tag = "Make!FeedingCollection";
             this.Text = "上料采集";
             this.Text = "上料采集";

+ 97 - 99
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -96,128 +96,126 @@ namespace UAS_MES.Make
                     if (code.Text != "" && ma_code.Text != "" && sn_code.Text == "")
                     if (code.Text != "" && ma_code.Text != "" && sn_code.Text == "")
                     {
                     {
                         string ErrorMessage = "";
                         string ErrorMessage = "";
+                        string oMakeCode = "";
+                        string oMsid = "";
                         bool ifFirst;
                         bool ifFirst;
-                        if (LogicHandler.CheckCurrentStepAndIfFirst(code.Text, ma_code.Text, User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
+                        if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, code.Text, User.UserCode, out oMakeCode, out oMsid, out ErrorMessage))
                         {
                         {
-                            //如果当前工序是第一道工序
                             #region
                             #region
-                            if (ifFirst)
+                            //根据序列号查出ma_code,ma_prodcode,stepcode
+                            dt = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_craftcode,ms_status,ms_nextstepcode,ms_prodcode,ms_code from makeserial where ms_sncode='" + code.Text + "'", "select");
+                            if (dt.Rows.Count > 0)
                             {
                             {
-                                //根据序列号查出ma_code,ma_prodcode,stepcode
-                                dt = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_craftcode,ms_status,ms_nextstepcode,ms_prodcode,ms_code from makeserial where ms_sncode='" + code.Text + "'", "select");
-                                if (dt.Rows.Count > 0)
-                                {
-                                    ms_id = dt.Rows[0]["ms_id"].ToString();
-                                    make_code = dt.Rows[0]["ms_makecode"].ToString();
-                                    ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
-                                    make_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
-                                    nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
-                                    ms_status = dt.Rows[0]["ms_status"].ToString();
-                                    ms_code = dt.Rows[0]["ms_code"].ToString();
-                                }
-                                //勾选了前一工单
-                                if (iflastsn.Checked)
+                                ms_id = dt.Rows[0]["ms_id"].ToString();
+                                make_code = dt.Rows[0]["ms_makecode"].ToString();
+                                ms_craftcode = dt.Rows[0]["ms_craftcode"].ToString();
+                                make_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                                nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                                ms_status = dt.Rows[0]["ms_status"].ToString();
+                                ms_code = dt.Rows[0]["ms_code"].ToString();
+                            }
+                            //勾选了前一工单
+                            if (iflastsn.Checked)
+                            {
+                                //判断序列号的前一工单是否已经完工
+                                if (dt.Rows[0]["ms_makecode"].ToString() != ma_code.Text && dt.Rows[0]["ms_status"].ToString() == "2")
                                 {
                                 {
-                                    //判断序列号的前一工单是否已经完工
-                                    if (dt.Rows[0]["ms_makecode"].ToString() != ma_code.Text && dt.Rows[0]["ms_status"].ToString() == "2")
+                                    sql.Clear();
+                                    sql.Append("Insert into MakeSerial (ms_id, ms_code, ms_sncode ,ms_prodcode, ms_indate,ms_wccode,ms_craftcode,ms_craftname");
+                                    sql.Append(",ms_nextstepcode,ms_status,ms_makecode) select MAKESERIAL_SEQ.NEXTVAL,'" + code.Text + "','" + code.Text + "',");
+                                    sql.Append("ma_prodcode,sysdate,ma_wccode,ma_craftcode,ma_craftname,'" + User.CurrentStepCode + "',0,ma_code from make where ma_code='" + ma_code.Text + "'");
+                                    dh.ExecuteSql(sql.GetString(), "insert");
+                                    //查询 stepproduct 中是否有采集类型为其他序列号, 并且物料号等于ms_prodcode
+                                    dt = (DataTable)dh.ExecuteSql("select sp_id from stepproduct where sp_mothercode='" + make_prodcode + "' and sp_stepcode='" + nextstepcode + "' and sp_soncode='" + make_prodcode + "'", "select");
+                                    string sp_id = dt.Rows[0]["sp_id"].ToString();
+                                    if (dt.Rows.Count > 0)
                                     {
                                     {
                                         sql.Clear();
                                         sql.Clear();
-                                        sql.Append("Insert into MakeSerial (ms_id, ms_code, ms_sncode ,ms_prodcode, ms_indate,ms_wccode,ms_craftcode,ms_craftname");
-                                        sql.Append(",ms_nextstepcode,ms_status,ms_makecode) select MAKESERIAL_SEQ.NEXTVAL,'" + code.Text + "','" + code.Text + "',");
-                                        sql.Append("ma_prodcode,sysdate,ma_wccode,ma_craftcode,ma_craftname,'" + User.CurrentStepCode + "',0,ma_code from make where ma_code='" + ma_code.Text + "'");
+                                        sql.Append("insert into Craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,");
+                                        sql.Append("cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,cm_craftcode,cm_craftname,");
+                                        sql.Append("cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid) ");
+                                        sql.Append("select Craftmaterial_seq.nextval, ma_code, ma_id, ma_prodcode, sp_soncode,");
+                                        sql.Append("'" + code.Text + "','" + code.Text + "',mcd_stepcode,mcd_stepname,ma_craftcode");
+                                        sql.Append(",ma_craftname,'" + code.Text + "',1,sysdate,'" + User.UserName + "',ma_linecode,ma_wccode,");
+                                        sql.Append("'" + User.UserSourceCode + "','" + sp_id + "' from make left join makecraftdetail on mcd_macode=ma_code");
+                                        sql.Append(" left join stepproduct on sp_stepcode=mcd_stepcode  where ma_code = '" + make_code + "'and ");
+                                        sql.Append("sp_id = " + sp_id + " and mcd_stepcode='" + nextstepcode + "'");
                                         dh.ExecuteSql(sql.GetString(), "insert");
                                         dh.ExecuteSql(sql.GetString(), "insert");
-                                        //查询 stepproduct 中是否有采集类型为其他序列号, 并且物料号等于ms_prodcode
-                                        dt = (DataTable)dh.ExecuteSql("select sp_id from stepproduct where sp_mothercode='" + make_prodcode + "' and sp_stepcode='" + nextstepcode + "' and sp_soncode='" + make_prodcode + "'", "select");
-                                        string sp_id = dt.Rows[0]["sp_id"].ToString();
-                                        if (dt.Rows.Count > 0)
+                                        if (make_code == ma_code.Text && nextstepcode == "")
                                         {
                                         {
+                                            sn_code.Text = code.Text;
                                             sql.Clear();
                                             sql.Clear();
-                                            sql.Append("insert into Craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,");
-                                            sql.Append("cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,cm_craftcode,cm_craftname,");
-                                            sql.Append("cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid) ");
-                                            sql.Append("select Craftmaterial_seq.nextval, ma_code, ma_id, ma_prodcode, sp_soncode,");
-                                            sql.Append("'" + code.Text + "','" + code.Text + "',mcd_stepcode,mcd_stepname,ma_craftcode");
-                                            sql.Append(",ma_craftname,'" + code.Text + "',1,sysdate,'" + User.UserName + "',ma_linecode,ma_wccode,");
-                                            sql.Append("'" + User.UserSourceCode + "','" + sp_id + "' from make left join makecraftdetail on mcd_macode=ma_code");
-                                            sql.Append(" left join stepproduct on sp_stepcode=mcd_stepcode  where ma_code = '" + make_code + "'and ");
-                                            sql.Append("sp_id = " + sp_id + " and mcd_stepcode='" + nextstepcode + "'");
-                                            dh.ExecuteSql(sql.GetString(), "insert");
-                                            if (make_code == ma_code.Text && nextstepcode == "")
-                                            {
-                                                sn_code.Text = code.Text;
-                                                sql.Clear();
-                                                sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left ");
-                                                sql.Append("join product on ms_prodcode=pr_code left join make on ms_makecode=ma_code ");
-                                                sql.Append("left join makecraftdetail on mcd_macode=ms_makecode where ms_sncode='" + sn_code.Text + "'");
-                                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                                BaseUtil.SetFormValue(this.Controls, dt);
-                                                //将录入框的值给序列号
-                                                OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
-                                                code.Text = "";
-                                            }
-                                            else
-                                                OperateResult.AppendText(">>序列号无前段工单\n", Color.Red);
+                                            sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left ");
+                                            sql.Append("join product on ms_prodcode=pr_code left join make on ms_makecode=ma_code ");
+                                            sql.Append("left join makecraftdetail on mcd_macode=ms_makecode where ms_sncode='" + sn_code.Text + "'");
+                                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                            BaseUtil.SetFormValue(this.Controls, dt);
+                                            //将录入框的值给序列号
+                                            OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
+                                            code.Text = "";
                                         }
                                         }
-                                    }
-                                    else if (make_code == ma_code.Text && nextstepcode == User.CurrentStepCode)
-                                    {
-                                        sn_code.Text = code.Text;
-                                        OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
-                                        code.Text = "";
+                                        else
+                                            OperateResult.AppendText(">>序列号无前段工单\n", Color.Red);
                                     }
                                     }
                                 }
                                 }
-                                //未勾选上一工序
-                                else
+                                else if (make_code == ma_code.Text && nextstepcode == User.CurrentStepCode)
                                 {
                                 {
-                                    dt = (DataTable)dh.ExecuteSql("select ms_status,ms_stepcode,ms_nextstepcode from makeserial where ms_sncode='" + code.Text + "' and ms_makecode='" + ma_code.Text + "'", "select");
-                                    if (dt.Rows.Count == 0)
-                                    {
-                                        sql.Clear();
-                                        sql.Append("Insert into MakeSerial (ms_id, ms_code, ms_sncode ,ms_prodcode, ms_indate,ms_wccode,ms_craftcode,ms_craftname");
-                                        sql.Append(",ms_nextstepcode,ms_status,ms_makecode) select MAKESERIAL_SEQ.NEXTVAL,'" + code.Text + "','" + code.Text + "',");
-                                        sql.Append("ma_prodcode,sysdate,ma_wccode,ma_craftcode,ma_craftname,'" + User.CurrentStepCode + "',0,ma_code from make where ma_code='" + ma_code.Text + "'");
-                                        dh.ExecuteSql(sql.GetString(), "insert");
-                                    }
-                                    else
-                                    {
-                                        nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
-                                        ms_status = dt.Rows[0]["ms_status"].ToString();
-                                    }
-                                    //如果尚未开始工序或者已经在产线并且当前工序和人员负责工序一致
-                                    if ((ms_status == "0" || ms_status == "1") && nextstepcode == User.CurrentStepCode)
-                                    {
-                                        sn_code.Text = code.Text;
-                                        sql.Clear();
-                                        sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
-                                        sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
-                                        sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_sncode='" + sn_code.Text + "'");
-                                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                                        BaseUtil.SetFormValue(this.Controls, dt);
-                                        OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
-                                        GetCollectItem();
-                                        code.Text = "";
-                                    }
-                                    else
-                                    {
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                                        code.Text = "";
-                                    }
+                                    sn_code.Text = code.Text;
+                                    OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
+                                    code.Text = "";
                                 }
                                 }
                             }
                             }
-                            #endregion
-                            //不是第一道工序
+                            //未勾选上一工序
                             else
                             else
                             {
                             {
-                                if (dh.CheckExist("makeserial", "ms_sncode='" + code.Text + "' and ms_status=1 and ms_nextstepcode='" + User.CurrentStepCode + "'"))
+                                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_stepcode,ms_nextstepcode from makeserial where ms_sncode='" + code.Text + "' and ms_makecode='" + ma_code.Text + "'", "select");
+                                if (dt.Rows.Count == 0)
+                                {
+                                    sql.Clear();
+                                    sql.Append("Insert into MakeSerial (ms_id, ms_code, ms_sncode ,ms_prodcode, ms_indate,ms_wccode,ms_craftcode,ms_craftname");
+                                    sql.Append(",ms_nextstepcode,ms_status,ms_makecode) select MAKESERIAL_SEQ.NEXTVAL,'" + code.Text + "','" + code.Text + "',");
+                                    sql.Append("ma_prodcode,sysdate,ma_wccode,ma_craftcode,ma_craftname,'" + User.CurrentStepCode + "',0,ma_code from make where ma_code='" + ma_code.Text + "'");
+                                    dh.ExecuteSql(sql.GetString(), "insert");
+                                }
+                                else
+                                {
+                                    nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                                    ms_status = dt.Rows[0]["ms_status"].ToString();
+                                }
+                                //如果尚未开始工序或者已经在产线并且当前工序和人员负责工序一致
+                                if ((ms_status == "0" || ms_status == "1") && nextstepcode == User.CurrentStepCode)
                                 {
                                 {
-                                    OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
                                     sn_code.Text = code.Text;
                                     sn_code.Text = code.Text;
+                                    sql.Clear();
+                                    sql.Append("select ma_code,ma_prodcode,pr_detail,ma_qty from makeserial left join product ");
+                                    sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
+                                    sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_sncode='" + sn_code.Text + "'");
+                                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                    BaseUtil.SetFormValue(this.Controls, dt);
+                                    OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
                                     GetCollectItem();
                                     GetCollectItem();
                                     code.Text = "";
                                     code.Text = "";
                                 }
                                 }
                                 else
                                 else
-                                    OperateResult.AppendText(">>序列号" + code.Text + "错误\n", Color.Red);
+                                {
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                    code.Text = "";
+                                }
                             }
                             }
+                            #endregion
+                            //不是第一道工序
+                            //else
+                            //{
+                            //    if (dh.CheckExist("makeserial", "ms_sncode='" + code.Text + "' and ms_status=1 and ms_nextstepcode='" + User.CurrentStepCode + "'"))
+                            //    {
+                            //        OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
+                            //        sn_code.Text = code.Text;
+                            //        GetCollectItem();
+                            //        code.Text = "";
+                            //    }
+                            //    else
+                            //        OperateResult.AppendText(">>序列号" + code.Text + "错误\n", Color.Red);
+                            //}
                         }
                         }
                         else
                         else
                         {
                         {
@@ -357,7 +355,7 @@ namespace UAS_MES.Make
                             string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                             string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                             string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
                             string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
                             dh.ExecuteSql("delete from Craftmaterial where cm_id=" + cm_id, "delete");
                             dh.ExecuteSql("delete from Craftmaterial where cm_id=" + cm_id, "delete");
-                            LogicHandler.InsertMakeProcess(ms_macode, sn_code.Text,"上料采集操作" ,"下料成功", User.UserName);
+                            LogicHandler.InsertMakeProcess(ms_macode, sn_code.Text, "上料采集操作", "下料成功", User.UserName);
                             int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + sn_code.Text + "'");
                             int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + sn_code.Text + "'");
                             if (count == 0)
                             if (count == 0)
                                 dh.UpdateByCondition("makecraftdetail ", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty = mcd_okqty - 1", "mcd_mccode='" + cm_mccode + "' and mcd_stepcode='" + cm_stepcode + "'");
                                 dh.UpdateByCondition("makecraftdetail ", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty = mcd_okqty - 1", "mcd_mccode='" + cm_mccode + "' and mcd_stepcode='" + cm_stepcode + "'");
@@ -486,7 +484,7 @@ namespace UAS_MES.Make
                     //上料采集成功,设置序列号栏目为空
                     //上料采集成功,设置序列号栏目为空
                     RemainIndex = 0;
                     RemainIndex = 0;
                     OperateResult.AppendText(">>上料采集完成!\n", Color.Green);
                     OperateResult.AppendText(">>上料采集完成!\n", Color.Green);
-                    if (LogicHandler.UpdateMakeMessage(sn_code.Text, ma_code,"上料采集", User.UserSourceCode, User.UserName, "上料成功", out ErrorMessage))
+                    if (LogicHandler.UpdateMakeMessage(sn_code.Text, ma_code, "上料采集", User.UserSourceCode, User.UserName, "上料成功", out ErrorMessage))
                     {
                     {
                         sn_code.Text = "";
                         sn_code.Text = "";
                         if (mcd_remainqty.Text == "0")
                         if (mcd_remainqty.Text == "0")