Browse Source

修改界面提示采集数量视图

callm 4 years ago
parent
commit
ee608261ed

+ 4 - 4
UAS_MES_PW/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -89,8 +89,8 @@ namespace UAS_MES_NEW.Make
             BaseUtil.SetFormValue(this.Controls, Dbfind);
             //获取工单的其他信息
             sql.Clear();
-            sql.Append("select ma_code,nvl(mcd_okqty,0) mcd_okqty,ma_prodcode as pr_code ,pr_spec,");
-            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
+            sql.Append("select ma_code,ma_prodcode as pr_code , pr_detail as pr_spec,");
+            sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail_view on ");
             sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
@@ -129,7 +129,7 @@ namespace UAS_MES_NEW.Make
                         //    return;
                         //}
                         sql.Clear();
-                        sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
+                        sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_detail pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
                         sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
                         sql.Append("pr_sendchecktype from makeserial left join make on ms_makecode=ma_code left join product on ");
                         sql.Append("ms_prodcode=pr_code where ms_sncode='" + sncode.Text + "' order by ms_id desc");
@@ -534,7 +534,7 @@ namespace UAS_MES_NEW.Make
 
         private void LoadCollectedNum()
         {
-            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail_view on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
     }

+ 3 - 3
UAS_MES_PW/FunctionCode/Make/Make_FeedingCollection.cs

@@ -236,7 +236,7 @@ namespace UAS_MES_NEW.Make
                                 //刷新界面值
                                 sql.Clear();
                                 sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
-                                sql.Append("from make left join makecraftdetail on mcd_macode=ma_code where ");
+                                sql.Append("from make left join makecraftdetail_view on mcd_macode=ma_code where ");
                                 sql.Append("ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 BaseUtil.SetFormValue(Controls, dt);
@@ -349,7 +349,7 @@ namespace UAS_MES_NEW.Make
                         sql.Clear();
                         sql.Append("select ma_code,ma_softversion,ma_ecncode,ma_prodcode,pr_spec,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_id='" + oMsid + "'");
+                        sql.Append("makecraftdetail_view on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         BaseUtil.SetFormValue(this.Controls, dt);
                         OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
@@ -536,7 +536,7 @@ namespace UAS_MES_NEW.Make
                     mcd_remainqty.Text = "";
                     sql.Clear();
                     sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
-                    sql.Append("from make left join makecraftdetail on mcd_macode=ma_code where ");
+                    sql.Append("from make left join makecraftdetail_view on mcd_macode=ma_code where ");
                     sql.Append("ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                     DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)

+ 138 - 121
UAS_MES_PW/FunctionCode/Make/Make_SeqTransform.Designer.cs

@@ -44,8 +44,6 @@
             this.remain_qty_label = new System.Windows.Forms.Label();
             this.ClearSn_code = new System.Windows.Forms.PictureBox();
             this.sn_code_label = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.ma_softversion = new System.Windows.Forms.Label();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ChangeResult = new UAS_MES_NEW.CustomControl.CustomCheckBox.CustomCheckBox();
             this.show_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -65,6 +63,8 @@
             this.CollectRemark = new System.Windows.Forms.CheckBox();
             this.label4 = new System.Windows.Forms.Label();
             this.ma_salecode = new System.Windows.Forms.Label();
+            this.mcd_inqty = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
             // 
@@ -72,18 +72,20 @@
             // 
             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.Location = new System.Drawing.Point(15, 17);
+            this.ms_makecode_label.Location = new System.Drawing.Point(30, 34);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode_label.Size = new System.Drawing.Size(0, 41);
             this.ms_makecode_label.TabIndex = 61;
             // 
             // pr_detail_label
             // 
             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.Location = new System.Drawing.Point(550, 15);
+            this.pr_detail_label.Location = new System.Drawing.Point(1100, 30);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
             this.pr_detail_label.TabIndex = 62;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -91,9 +93,10 @@
             // 
             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.Location = new System.Drawing.Point(307, 15);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(614, 30);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
             this.ma_prodcode_label.TabIndex = 63;
             this.ma_prodcode_label.Text = "产品编号";
             // 
@@ -101,9 +104,10 @@
             // 
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(17, 431);
+            this.sncode_label.Location = new System.Drawing.Point(34, 862);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.sncode_label.Size = new System.Drawing.Size(114, 41);
             this.sncode_label.TabIndex = 68;
             this.sncode_label.Text = "录入框";
             // 
@@ -111,10 +115,10 @@
             // 
             this.beforeTransSNLength_checkBox.AutoSize = true;
             this.beforeTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.beforeTransSNLength_checkBox.Location = new System.Drawing.Point(19, 81);
-            this.beforeTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.beforeTransSNLength_checkBox.Location = new System.Drawing.Point(38, 162);
+            this.beforeTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.beforeTransSNLength_checkBox.Name = "beforeTransSNLength_checkBox";
-            this.beforeTransSNLength_checkBox.Size = new System.Drawing.Size(83, 24);
+            this.beforeTransSNLength_checkBox.Size = new System.Drawing.Size(154, 39);
             this.beforeTransSNLength_checkBox.TabIndex = 81;
             this.beforeTransSNLength_checkBox.Text = "TSN长度";
             this.beforeTransSNLength_checkBox.UseVisualStyleBackColor = true;
@@ -123,10 +127,10 @@
             // 
             this.afterTransSNLength_checkBox.AutoSize = true;
             this.afterTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(19, 113);
-            this.afterTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(38, 226);
+            this.afterTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.afterTransSNLength_checkBox.Name = "afterTransSNLength_checkBox";
-            this.afterTransSNLength_checkBox.Size = new System.Drawing.Size(75, 24);
+            this.afterTransSNLength_checkBox.Size = new System.Drawing.Size(139, 39);
             this.afterTransSNLength_checkBox.TabIndex = 82;
             this.afterTransSNLength_checkBox.Text = "SN长度";
             this.afterTransSNLength_checkBox.UseVisualStyleBackColor = true;
@@ -135,10 +139,10 @@
             // 
             this.beforeTransSNPre_checkBox.AutoSize = true;
             this.beforeTransSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.beforeTransSNPre_checkBox.Location = new System.Drawing.Point(421, 81);
-            this.beforeTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.beforeTransSNPre_checkBox.Location = new System.Drawing.Point(842, 162);
+            this.beforeTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.beforeTransSNPre_checkBox.Name = "beforeTransSNPre_checkBox";
-            this.beforeTransSNPre_checkBox.Size = new System.Drawing.Size(83, 24);
+            this.beforeTransSNPre_checkBox.Size = new System.Drawing.Size(154, 39);
             this.beforeTransSNPre_checkBox.TabIndex = 83;
             this.beforeTransSNPre_checkBox.Text = "TSN前缀";
             this.beforeTransSNPre_checkBox.UseVisualStyleBackColor = true;
@@ -147,10 +151,10 @@
             // 
             this.afterTransSNPre_checkBox.AutoSize = true;
             this.afterTransSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.afterTransSNPre_checkBox.Location = new System.Drawing.Point(421, 114);
-            this.afterTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.afterTransSNPre_checkBox.Location = new System.Drawing.Point(842, 228);
+            this.afterTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.afterTransSNPre_checkBox.Name = "afterTransSNPre_checkBox";
-            this.afterTransSNPre_checkBox.Size = new System.Drawing.Size(75, 24);
+            this.afterTransSNPre_checkBox.Size = new System.Drawing.Size(139, 39);
             this.afterTransSNPre_checkBox.TabIndex = 84;
             this.afterTransSNPre_checkBox.Text = "SN前缀";
             this.afterTransSNPre_checkBox.UseVisualStyleBackColor = true;
@@ -159,10 +163,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label1.Location = new System.Drawing.Point(15, 15);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(30, 30);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(146, 41);
             this.label1.TabIndex = 93;
             this.label1.Text = "工单编号";
             // 
@@ -170,10 +174,10 @@
             // 
             this.ma_code.AutoSize = true;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_code.Location = new System.Drawing.Point(91, 15);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_code.Location = new System.Drawing.Point(182, 30);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 21);
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
             this.ma_code.TabIndex = 95;
             this.ma_code.TextChanged += new System.EventHandler(this.ms_makecode_UserControlTextChanged);
             // 
@@ -181,10 +185,10 @@
             // 
             this.changenum.AutoSize = true;
             this.changenum.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.changenum.Location = new System.Drawing.Point(751, 427);
-            this.changenum.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.changenum.Location = new System.Drawing.Point(1502, 854);
+            this.changenum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.changenum.Name = "changenum";
-            this.changenum.Size = new System.Drawing.Size(19, 21);
+            this.changenum.Size = new System.Drawing.Size(37, 41);
             this.changenum.TabIndex = 100;
             this.changenum.Text = "0";
             this.changenum.Visible = false;
@@ -193,20 +197,20 @@
             // 
             this.remain_qty.AutoSize = true;
             this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty.Location = new System.Drawing.Point(93, 51);
-            this.remain_qty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.remain_qty.Location = new System.Drawing.Point(186, 102);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.remain_qty.Name = "remain_qty";
-            this.remain_qty.Size = new System.Drawing.Size(0, 21);
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
             this.remain_qty.TabIndex = 99;
             // 
             // PrintNum_label
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.PrintNum_label.Location = new System.Drawing.Point(677, 427);
-            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.PrintNum_label.Location = new System.Drawing.Point(1354, 854);
+            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintNum_label.Name = "PrintNum_label";
-            this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
+            this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
             this.PrintNum_label.TabIndex = 98;
             this.PrintNum_label.Text = "计数";
             this.PrintNum_label.Visible = false;
@@ -215,10 +219,10 @@
             // 
             this.remain_qty_label.AutoSize = true;
             this.remain_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.remain_qty_label.Location = new System.Drawing.Point(18, 51);
-            this.remain_qty_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.remain_qty_label.Location = new System.Drawing.Point(36, 102);
+            this.remain_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.remain_qty_label.Name = "remain_qty_label";
-            this.remain_qty_label.Size = new System.Drawing.Size(58, 21);
+            this.remain_qty_label.Size = new System.Drawing.Size(114, 41);
             this.remain_qty_label.TabIndex = 97;
             this.remain_qty_label.Text = "剩余数";
             // 
@@ -226,9 +230,10 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(280, 399);
+            this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
+            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.TabIndex = 141;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ReCall_Click);
@@ -237,39 +242,20 @@
             // 
             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.Location = new System.Drawing.Point(17, 396);
+            this.sn_code_label.Location = new System.Drawing.Point(34, 792);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
+            this.sn_code_label.Size = new System.Drawing.Size(114, 41);
             this.sn_code_label.TabIndex = 139;
             this.sn_code_label.Text = "序列号";
             // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(550, 51);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(74, 21);
-            this.label2.TabIndex = 147;
-            this.label2.Text = "软件版本";
-            // 
-            // ma_softversion
-            // 
-            this.ma_softversion.AutoSize = true;
-            this.ma_softversion.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_softversion.Location = new System.Drawing.Point(623, 51);
-            this.ma_softversion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.ma_softversion.Name = "ma_softversion";
-            this.ma_softversion.Size = new System.Drawing.Size(0, 21);
-            this.ma_softversion.TabIndex = 148;
-            // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(698, 113);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(1396, 226);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(88, 22);
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 196;
@@ -279,11 +265,11 @@
             this.ChangeResult.AllPower = "ifall";
             this.ChangeResult.AutoSize = true;
             this.ChangeResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChangeResult.Location = new System.Drawing.Point(280, 427);
-            this.ChangeResult.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.ChangeResult.Location = new System.Drawing.Point(560, 854);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.ChangeResult.Name = "ChangeResult";
             this.ChangeResult.Power = "ifspecial";
-            this.ChangeResult.Size = new System.Drawing.Size(93, 25);
+            this.ChangeResult.Size = new System.Drawing.Size(178, 45);
             this.ChangeResult.TabIndex = 146;
             this.ChangeResult.Text = "重新转换";
             this.ChangeResult.UseVisualStyleBackColor = true;
@@ -296,10 +282,11 @@
             this.show_sncode.Enabled = false;
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.ID = null;
-            this.show_sncode.Location = new System.Drawing.Point(97, 396);
+            this.show_sncode.Location = new System.Drawing.Point(194, 792);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Power = null;
-            this.show_sncode.Size = new System.Drawing.Size(160, 25);
+            this.show_sncode.Size = new System.Drawing.Size(316, 43);
             this.show_sncode.Str = null;
             this.show_sncode.Str1 = null;
             this.show_sncode.Str2 = null;
@@ -310,11 +297,11 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.pr_detail.Location = new System.Drawing.Point(623, 15);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(133, 0);
+            this.pr_detail.Location = new System.Drawing.Point(1246, 30);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(266, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
             this.pr_detail.TabIndex = 96;
             // 
             // ma_prodcode
@@ -322,30 +309,30 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_prodcode.Location = new System.Drawing.Point(384, 17);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(1, 0, 1, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(133, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(768, 34);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(266, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
             this.ma_prodcode.TabIndex = 94;
             // 
             // afterTransSNLength
             // 
             this.afterTransSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.afterTransSNLength.Location = new System.Drawing.Point(111, 115);
-            this.afterTransSNLength.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.afterTransSNLength.Location = new System.Drawing.Point(222, 230);
+            this.afterTransSNLength.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.afterTransSNLength.Name = "afterTransSNLength";
-            this.afterTransSNLength.Size = new System.Drawing.Size(168, 25);
+            this.afterTransSNLength.Size = new System.Drawing.Size(332, 43);
             this.afterTransSNLength.TabIndex = 90;
             this.afterTransSNLength.Text = "0";
             // 
             // beforeTransSNLength
             // 
             this.beforeTransSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.beforeTransSNLength.Location = new System.Drawing.Point(111, 81);
-            this.beforeTransSNLength.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.beforeTransSNLength.Location = new System.Drawing.Point(222, 162);
+            this.beforeTransSNLength.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.beforeTransSNLength.Name = "beforeTransSNLength";
-            this.beforeTransSNLength.Size = new System.Drawing.Size(168, 25);
+            this.beforeTransSNLength.Size = new System.Drawing.Size(332, 43);
             this.beforeTransSNLength.TabIndex = 89;
             this.beforeTransSNLength.Text = "0";
             // 
@@ -355,11 +342,11 @@
             this.afterTransSNPre.BackColor = System.Drawing.Color.White;
             this.afterTransSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.afterTransSNPre.ID = null;
-            this.afterTransSNPre.Location = new System.Drawing.Point(513, 113);
-            this.afterTransSNPre.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.afterTransSNPre.Location = new System.Drawing.Point(1026, 226);
+            this.afterTransSNPre.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.afterTransSNPre.Name = "afterTransSNPre";
             this.afterTransSNPre.Power = null;
-            this.afterTransSNPre.Size = new System.Drawing.Size(168, 25);
+            this.afterTransSNPre.Size = new System.Drawing.Size(332, 43);
             this.afterTransSNPre.Str = null;
             this.afterTransSNPre.Str1 = null;
             this.afterTransSNPre.Str2 = null;
@@ -371,11 +358,11 @@
             this.beforeTransSNPre.BackColor = System.Drawing.Color.White;
             this.beforeTransSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.beforeTransSNPre.ID = null;
-            this.beforeTransSNPre.Location = new System.Drawing.Point(513, 79);
-            this.beforeTransSNPre.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.beforeTransSNPre.Location = new System.Drawing.Point(1026, 158);
+            this.beforeTransSNPre.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.beforeTransSNPre.Name = "beforeTransSNPre";
             this.beforeTransSNPre.Power = null;
-            this.beforeTransSNPre.Size = new System.Drawing.Size(168, 25);
+            this.beforeTransSNPre.Size = new System.Drawing.Size(332, 43);
             this.beforeTransSNPre.Str = null;
             this.beforeTransSNPre.Str1 = null;
             this.beforeTransSNPre.Str2 = null;
@@ -384,9 +371,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.OperateResult.Location = new System.Drawing.Point(19, 147);
+            this.OperateResult.Location = new System.Drawing.Point(38, 294);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(812, 231);
+            this.OperateResult.Size = new System.Drawing.Size(1620, 458);
             this.OperateResult.TabIndex = 78;
             this.OperateResult.Text = "";
             // 
@@ -396,10 +384,11 @@
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(97, 429);
+            this.sncode.Location = new System.Drawing.Point(194, 858);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.sncode.Name = "sncode";
             this.sncode.Power = "ifread";
-            this.sncode.Size = new System.Drawing.Size(160, 25);
+            this.sncode.Size = new System.Drawing.Size(316, 43);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -412,11 +401,12 @@
             this.Remark.AllPower = null;
             this.Remark.BackColor = System.Drawing.Color.White;
             this.Remark.ID = null;
-            this.Remark.Location = new System.Drawing.Point(464, 384);
+            this.Remark.Location = new System.Drawing.Point(928, 768);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Remark.Multiline = true;
             this.Remark.Name = "Remark";
             this.Remark.Power = null;
-            this.Remark.Size = new System.Drawing.Size(159, 50);
+            this.Remark.Size = new System.Drawing.Size(314, 96);
             this.Remark.Str = null;
             this.Remark.Str1 = null;
             this.Remark.Str2 = null;
@@ -430,10 +420,11 @@
             this.Seq_Remark_PreFix.AllPower = null;
             this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Seq_Remark_PreFix.ID = null;
-            this.Seq_Remark_PreFix.Location = new System.Drawing.Point(414, 408);
+            this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
+            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
             this.Seq_Remark_PreFix.Power = null;
-            this.Seq_Remark_PreFix.Size = new System.Drawing.Size(44, 21);
+            this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
             this.Seq_Remark_PreFix.Str = null;
             this.Seq_Remark_PreFix.Str1 = null;
             this.Seq_Remark_PreFix.Str2 = null;
@@ -443,9 +434,10 @@
             // SameReamrk
             // 
             this.SameReamrk.AutoSize = true;
-            this.SameReamrk.Location = new System.Drawing.Point(464, 440);
+            this.SameReamrk.Location = new System.Drawing.Point(928, 880);
+            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.SameReamrk.Name = "SameReamrk";
-            this.SameReamrk.Size = new System.Drawing.Size(96, 16);
+            this.SameReamrk.Size = new System.Drawing.Size(186, 28);
             this.SameReamrk.TabIndex = 224;
             this.SameReamrk.Text = "固定录入备注";
             this.SameReamrk.UseVisualStyleBackColor = true;
@@ -455,18 +447,20 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(371, 409);
+            this.label3.Location = new System.Drawing.Point(742, 818);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(37, 20);
+            this.label3.Size = new System.Drawing.Size(71, 36);
             this.label3.TabIndex = 223;
             this.label3.Text = "前缀";
             // 
             // IFONLY
             // 
             this.IFONLY.AutoSize = true;
-            this.IFONLY.Location = new System.Drawing.Point(374, 440);
+            this.IFONLY.Location = new System.Drawing.Point(748, 880);
+            this.IFONLY.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.IFONLY.Name = "IFONLY";
-            this.IFONLY.Size = new System.Drawing.Size(84, 16);
+            this.IFONLY.Size = new System.Drawing.Size(162, 28);
             this.IFONLY.TabIndex = 222;
             this.IFONLY.Text = "不允许重复";
             this.IFONLY.UseVisualStyleBackColor = true;
@@ -476,9 +470,10 @@
             // 
             this.CollectRemark.AutoSize = true;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectRemark.Location = new System.Drawing.Point(566, 440);
+            this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.CollectRemark.Name = "CollectRemark";
-            this.CollectRemark.Size = new System.Drawing.Size(72, 16);
+            this.CollectRemark.Size = new System.Drawing.Size(138, 28);
             this.CollectRemark.TabIndex = 221;
             this.CollectRemark.Text = "采集备注";
             this.CollectRemark.UseVisualStyleBackColor = true;
@@ -488,10 +483,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label4.Location = new System.Drawing.Point(307, 51);
-            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Location = new System.Drawing.Point(1100, 102);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(58, 21);
+            this.label4.Size = new System.Drawing.Size(114, 41);
             this.label4.TabIndex = 227;
             this.label4.Text = "合同号";
             // 
@@ -499,17 +494,40 @@
             // 
             this.ma_salecode.AutoSize = true;
             this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_salecode.Location = new System.Drawing.Point(381, 51);
-            this.ma_salecode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_salecode.Location = new System.Drawing.Point(1248, 102);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_salecode.Name = "ma_salecode";
-            this.ma_salecode.Size = new System.Drawing.Size(0, 21);
+            this.ma_salecode.Size = new System.Drawing.Size(0, 41);
             this.ma_salecode.TabIndex = 228;
             // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.mcd_inqty.Location = new System.Drawing.Point(764, 102);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 230;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label5.Location = new System.Drawing.Point(614, 102);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(114, 41);
+            this.label5.TabIndex = 229;
+            this.label5.Text = "采集数";
+            // 
             // Make_SeqTransform
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(849, 467);
+            this.ClientSize = new System.Drawing.Size(1698, 934);
+            this.Controls.Add(this.mcd_inqty);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.ma_salecode);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.Remark);
@@ -519,8 +537,6 @@
             this.Controls.Add(this.IFONLY);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.StepCount);
-            this.Controls.Add(this.ma_softversion);
-            this.Controls.Add(this.label2);
             this.Controls.Add(this.ChangeResult);
             this.Controls.Add(this.ClearSn_code);
             this.Controls.Add(this.show_sncode);
@@ -548,13 +564,14 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "Make_SeqTransform";
             this.Tag = "Make!SeqTransform";
             this.Text = " ";
             this.Load += new System.EventHandler(this.Make_SeqTransform_Load);
             this.SizeChanged += new System.EventHandler(this.Make_SeqTransform_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -586,8 +603,6 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox show_sncode;
         private System.Windows.Forms.Label sn_code_label;
         private CustomControl.CustomCheckBox.CustomCheckBox ChangeResult;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label ma_softversion;
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
         private CustomControl.TextBoxWithIcon.EnterTextBox Remark;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Seq_Remark_PreFix;
@@ -597,5 +612,7 @@
         private System.Windows.Forms.CheckBox CollectRemark;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label ma_salecode;
+        private System.Windows.Forms.Label mcd_inqty;
+        private System.Windows.Forms.Label label5;
     }
 }

+ 3 - 2
UAS_MES_PW/FunctionCode/Make/Make_SeqTransform.cs

@@ -113,7 +113,7 @@ namespace UAS_MES_NEW.Make
                                 sql.Clear();
                                 sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail,ma_salecode,ma_qty,ma_qty-mcd_inqty as remain_qty ");
                                 sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
-                                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                sql.Append("ms_prodcode=pr_code left join makecraftdetail_view on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {
@@ -323,10 +323,11 @@ namespace UAS_MES_NEW.Make
                                 show_sncode.Text = "";
                                 //获取剩余数,刷新页面
                                 sql.Clear();
-                                sql.Append("select mcd_inqty from makecraftdetail where mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                sql.Append("select mcd_inqty from makecraftdetail_view where mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {
+                                    BaseUtil.SetFormValue(this.Controls, dt);
                                     remain_qty.Text = ma_qty - int.Parse(dt.Rows[0]["mcd_inqty"].ToString()) + "";
                                 }
                                 //更新数量

+ 41 - 14
UAS_MES_PW/FunctionCode/Make/Make_SeqTransformPrint.Designer.cs

@@ -72,6 +72,8 @@
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.label7 = new System.Windows.Forms.Label();
+            this.mcd_inqty = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             this.SuspendLayout();
             // 
@@ -238,7 +240,7 @@
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
             this.ClearSn_code.Name = "ClearSn_code";
             this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.TabIndex = 141;
@@ -260,7 +262,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(1100, 102);
+            this.label2.Location = new System.Drawing.Point(1276, 594);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(146, 41);
@@ -271,7 +273,7 @@
             // 
             this.ma_softversion.AutoSize = true;
             this.ma_softversion.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_softversion.Location = new System.Drawing.Point(1246, 102);
+            this.ma_softversion.Location = new System.Drawing.Point(1422, 594);
             this.ma_softversion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_softversion.Name = "ma_softversion";
             this.ma_softversion.Size = new System.Drawing.Size(0, 41);
@@ -311,7 +313,7 @@
             this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.show_sncode.ID = null;
             this.show_sncode.Location = new System.Drawing.Point(194, 792);
-            this.show_sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(6);
             this.show_sncode.Name = "show_sncode";
             this.show_sncode.Power = null;
             this.show_sncode.Size = new System.Drawing.Size(316, 43);
@@ -401,7 +403,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
             this.OperateResult.Location = new System.Drawing.Point(38, 294);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(1208, 458);
             this.OperateResult.TabIndex = 78;
@@ -414,7 +416,7 @@
             this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
             this.sncode.ID = null;
             this.sncode.Location = new System.Drawing.Point(194, 858);
-            this.sncode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
             this.sncode.Name = "sncode";
             this.sncode.Power = "ifread";
             this.sncode.Size = new System.Drawing.Size(316, 43);
@@ -431,7 +433,7 @@
             this.Remark.BackColor = System.Drawing.Color.White;
             this.Remark.ID = null;
             this.Remark.Location = new System.Drawing.Point(928, 768);
-            this.Remark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6);
             this.Remark.Multiline = true;
             this.Remark.Name = "Remark";
             this.Remark.Power = null;
@@ -450,7 +452,7 @@
             this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
             this.Seq_Remark_PreFix.ID = null;
             this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
-            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6);
             this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
             this.Seq_Remark_PreFix.Power = null;
             this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
@@ -464,7 +466,7 @@
             // 
             this.SameReamrk.AutoSize = true;
             this.SameReamrk.Location = new System.Drawing.Point(928, 880);
-            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6);
             this.SameReamrk.Name = "SameReamrk";
             this.SameReamrk.Size = new System.Drawing.Size(186, 28);
             this.SameReamrk.TabIndex = 224;
@@ -487,7 +489,7 @@
             // 
             this.IFONLY.AutoSize = true;
             this.IFONLY.Location = new System.Drawing.Point(748, 880);
-            this.IFONLY.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.IFONLY.Margin = new System.Windows.Forms.Padding(6);
             this.IFONLY.Name = "IFONLY";
             this.IFONLY.Size = new System.Drawing.Size(162, 28);
             this.IFONLY.TabIndex = 222;
@@ -500,7 +502,7 @@
             this.CollectRemark.AutoSize = true;
             this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
-            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
             this.CollectRemark.Name = "CollectRemark";
             this.CollectRemark.Size = new System.Drawing.Size(138, 28);
             this.CollectRemark.TabIndex = 221;
@@ -512,7 +514,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label4.Location = new System.Drawing.Point(614, 102);
+            this.label4.Location = new System.Drawing.Point(1100, 102);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(114, 41);
@@ -523,7 +525,7 @@
             // 
             this.ma_salecode.AutoSize = true;
             this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_salecode.Location = new System.Drawing.Point(762, 102);
+            this.ma_salecode.Location = new System.Drawing.Point(1248, 102);
             this.ma_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_salecode.Name = "ma_salecode";
             this.ma_salecode.Size = new System.Drawing.Size(0, 41);
@@ -598,11 +600,34 @@
             this.label7.TabIndex = 233;
             this.label7.Text = "打印张数";
             // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.mcd_inqty.Location = new System.Drawing.Point(764, 102);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 236;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label9.Location = new System.Drawing.Point(614, 102);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(114, 41);
+            this.label9.TabIndex = 235;
+            this.label9.Text = "采集数";
+            // 
             // Make_SeqTransformPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1698, 934);
+            this.Controls.Add(this.mcd_inqty);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.label7);
             this.Controls.Add(this.PrintLabel);
@@ -647,7 +672,7 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_SeqTransformPrint";
             this.Tag = "Make!SeqTransform";
             this.Text = " ";
@@ -703,5 +728,7 @@
         private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox PrintNum;
         private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label mcd_inqty;
+        private System.Windows.Forms.Label label9;
     }
 }

+ 4 - 3
UAS_MES_PW/FunctionCode/Make/Make_SeqTransformPrint.cs

@@ -130,9 +130,9 @@ namespace UAS_MES_NEW.Make
                             {
                                 //按照out出的工单号查出工单相关信息,并赋值到相关控件
                                 sql.Clear();
-                                sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail,ma_salecode,ma_qty,ma_qty-mcd_inqty as remain_qty ");
+                                sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail,ma_salecode,ma_qty,mcd_inqty,ma_qty-mcd_inqty as remain_qty ");
                                 sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
-                                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                sql.Append("ms_prodcode=pr_code left join makecraftdetail_view on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {
@@ -354,10 +354,11 @@ namespace UAS_MES_NEW.Make
                                 show_sncode.Text = "";
                                 //获取剩余数,刷新页面
                                 sql.Clear();
-                                sql.Append("select mcd_inqty from makecraftdetail where mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                sql.Append("select mcd_inqty from makecraftdetail_view where mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dt.Rows.Count > 0)
                                 {
+                                    BaseUtil.SetFormValue(this.Controls, dt);
                                     remain_qty.Text = ma_qty - int.Parse(dt.Rows[0]["mcd_inqty"].ToString()) + "";
                                 }
                                 //更新数量

+ 1 - 1
UAS_MES_PW/FunctionCode/Make/Make_TestCollection.cs

@@ -413,7 +413,7 @@ namespace UAS_MES_NEW.Make
 
         private void LoadCollectedNum()
         {
-            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail_view on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
 

+ 9 - 9
UAS_MES_PW/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -58,7 +58,7 @@ namespace UAS_MES_NEW.Packing
 
         private void PackCollection_Load(object sender, EventArgs e)
         {
-           // 杀死之前全部未关闭的进程
+            // 杀死之前全部未关闭的进程
             Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
             Process[] processes1 = System.Diagnostics.Process.GetProcessesByName("bartend");
             for (int i = 0; i < processes1.Length; i++)
@@ -189,15 +189,15 @@ namespace UAS_MES_NEW.Packing
         {
             //try
             //{
-                if (e.KeyCode == Keys.Enter)
+            if (e.KeyCode == Keys.Enter)
+            {
+                LoadData();
+                LoadGridData();
+                if (CheckOutBoxLength())
                 {
-                    LoadData();
-                    LoadGridData();
-                    if (CheckOutBoxLength())
-                    {
-                        sn_code.Focus();
-                    }
+                    sn_code.Focus();
                 }
+            }
             //}
             //catch (Exception ex)
             //{
@@ -932,7 +932,7 @@ namespace UAS_MES_NEW.Packing
 
         private void LoadCollectedNum()
         {
-            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail_view on mcd_macode=ma_code where ma_code='" + ms_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
             BaseUtil.SetFormValue(Controls, dt);
         }
 

+ 36 - 5
UAS_MES_PW/FunctionCode/Packing/Packing_PalletWightCollection.Designer.cs

@@ -96,6 +96,8 @@
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pa_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label1 = new System.Windows.Forms.Label();
             this.panel4.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
@@ -347,14 +349,12 @@
             // 
             // weight
             // 
-            this.weight.AutoSize = true;
             this.weight.Font = new System.Drawing.Font("微软雅黑", 40F);
             this.weight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
             this.weight.Location = new System.Drawing.Point(181, 101);
             this.weight.Name = "weight";
-            this.weight.Size = new System.Drawing.Size(367, 140);
+            this.weight.Size = new System.Drawing.Size(367, 148);
             this.weight.TabIndex = 43;
-            this.weight.Text = "";
             // 
             // pr_colorboxunit
             // 
@@ -362,7 +362,7 @@
             this.pr_colorboxunit.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.pr_colorboxunit.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_colorboxunit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.pr_colorboxunit.Location = new System.Drawing.Point(35, 199);
+            this.pr_colorboxunit.Location = new System.Drawing.Point(38, 202);
             this.pr_colorboxunit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_colorboxunit.Name = "pr_colorboxunit";
             this.pr_colorboxunit.Size = new System.Drawing.Size(60, 50);
@@ -376,7 +376,7 @@
             this.weight_label.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.weight_label.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.weight_label.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.weight_label.Location = new System.Drawing.Point(35, 101);
+            this.weight_label.Location = new System.Drawing.Point(38, 104);
             this.weight_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.weight_label.Name = "weight_label";
             this.weight_label.Size = new System.Drawing.Size(98, 50);
@@ -863,11 +863,40 @@
             this.pa_totalqty.TabIndex = 105;
             this.pa_totalqty.Tag = "1";
             // 
+            // pa_remark
+            // 
+            this.pa_remark.AllPower = "ifall";
+            this.pa_remark.BackColor = System.Drawing.Color.White;
+            this.pa_remark.ID = null;
+            this.pa_remark.Location = new System.Drawing.Point(1304, 1044);
+            this.pa_remark.Margin = new System.Windows.Forms.Padding(6);
+            this.pa_remark.Name = "pa_remark";
+            this.pa_remark.Power = "ifread";
+            this.pa_remark.Size = new System.Drawing.Size(260, 35);
+            this.pa_remark.Str = null;
+            this.pa_remark.Str1 = null;
+            this.pa_remark.Str2 = null;
+            this.pa_remark.TabIndex = 207;
+            this.pa_remark.Tag = "NoAuto";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(1177, 1039);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.TabIndex = 208;
+            this.label1.Text = "备注";
+            // 
             // Packing_PalletWightCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1988, 1104);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pa_remark);
             this.Controls.Add(this.RefreshWeigh);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.ma_code);
@@ -995,5 +1024,7 @@
         private CustomControl.ValueLabel.ValueLabel pr_code;
         private CustomControl.ButtonUtil.NormalButton RefreshWeigh;
         private System.Windows.Forms.TextBox weight;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox pa_remark;
+        private System.Windows.Forms.Label label1;
     }
 }

+ 8 - 1
UAS_MES_PW/FunctionCode/Packing/Packing_PalletWightCollection.cs

@@ -140,13 +140,19 @@ namespace UAS_MES_NEW.Packing
                         OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
                         return;
                     }
+                    //如果使用的是序列号
+                    DataTable dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_sncode='"+outboxcode.Text+"'", "select");
+                    if (dt.Rows.Count>0)
+                    {
+                        outboxcode.Text = dt.Rows[0]["ms_outboxcode"].ToString();
+                    }
                     //根据箱号查询表单数据
                     sql.Clear();
                     sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,pa_prodcode,PA_STANDARDQTY PA_STANDARDQTYCARTON,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
                     sql.Append("pr_cartonmaxw,pr_cartonminw,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype from package left join packagedetail ");
                     sql.Append("on pa_id=pd_paid left join makeserial on ms_sncode=pd_barcode and ms_makecode=pa_makecode left join product on pr_code=pd_prodcode left join make on ma_code=pd_makecode ");
                     sql.Append(" where pa_outboxcode='" + outboxcode.Text + "' and pa_nextstep='" + User.CurrentStepCode + "'");
-                    DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     //填充打印文件选项的DataGridView
                     if (dt.Rows.Count > 0)
                     {
@@ -372,6 +378,7 @@ namespace UAS_MES_NEW.Packing
                                         dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                     }
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板" + pa_outboxcode.Text + "采集箱" + outboxcode.Text + "成功", pa_outboxcode.Text, "");
+                                    dh.ExecuteSql("update package set pa_remark='" + pa_remark.Text + "' where pa_outboxcode='" + outboxcode.Text + "'", "update");
                                     OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                                     LoadCollectNum();
                                     palletcode_KeyDown(sender, e);