Przeglądaj źródła

修改彩盒称量和卡通箱称量BUG

章政 8 lat temu
rodzic
commit
0f692312c8

+ 86 - 177
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.Designer.cs

@@ -45,14 +45,13 @@
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ma_salecode_label = new System.Windows.Forms.Label();
-            this.PriLabel = new System.Windows.Forms.RadioButton();
-            this.SupPriLabel = new System.Windows.Forms.RadioButton();
             this.PrintLabel = new System.Windows.Forms.ComboBox();
             this.Printer_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.BaudRate = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
+            this.ComList = new UAS_MES.CustomControl.ComBoxWithFocus.SerialPortCombox();
+            this.PrinterList = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.StartWeight = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.Cancel = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pd_barcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.StopWeight = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -64,18 +63,12 @@
             this.normalButton1 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
-            this.ComList = new UAS_MES.CustomControl.ComBoxWithFocus.SerialPortCombox();
-            this.BaudRate = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
-            this.Search_label = new System.Windows.Forms.Label();
-            this.Search = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.user = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.weight_time = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pa_weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pa_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewWithSerialNum1 = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.AutoPrint = new System.Windows.Forms.CheckBox();
+            this.PrintNum = new System.Windows.Forms.NumericUpDown();
+            this.label2 = new System.Windows.Forms.Label();
             this.panel6.SuspendLayout();
             this.panel4.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             this.SuspendLayout();
             // 
             // ma_code_label
@@ -252,35 +245,11 @@
             this.ma_salecode_label.TabIndex = 83;
             this.ma_salecode_label.Text = "订单编号";
             // 
-            // PriLabel
-            // 
-            this.PriLabel.AutoSize = true;
-            this.PriLabel.Checked = true;
-            this.PriLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PriLabel.Location = new System.Drawing.Point(874, 170);
-            this.PriLabel.Name = "PriLabel";
-            this.PriLabel.Size = new System.Drawing.Size(92, 25);
-            this.PriLabel.TabIndex = 154;
-            this.PriLabel.TabStop = true;
-            this.PriLabel.Text = "打印标签";
-            this.PriLabel.UseVisualStyleBackColor = true;
-            // 
-            // SupPriLabel
-            // 
-            this.SupPriLabel.AutoSize = true;
-            this.SupPriLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SupPriLabel.Location = new System.Drawing.Point(972, 170);
-            this.SupPriLabel.Name = "SupPriLabel";
-            this.SupPriLabel.Size = new System.Drawing.Size(92, 25);
-            this.SupPriLabel.TabIndex = 155;
-            this.SupPriLabel.Text = "补打标签";
-            this.SupPriLabel.UseVisualStyleBackColor = true;
-            // 
             // PrintLabel
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(936, 133);
+            this.PrintLabel.Location = new System.Drawing.Point(936, 145);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(121, 20);
             this.PrintLabel.TabIndex = 157;
@@ -289,7 +258,7 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Printer_label.Location = new System.Drawing.Point(835, 99);
+            this.Printer_label.Location = new System.Drawing.Point(839, 111);
             this.Printer_label.Name = "Printer_label";
             this.Printer_label.Size = new System.Drawing.Size(84, 20);
             this.Printer_label.TabIndex = 159;
@@ -299,19 +268,42 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(849, 131);
+            this.label1.Location = new System.Drawing.Point(839, 145);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(69, 20);
             this.label1.TabIndex = 161;
             this.label1.Text = "打印标签";
             // 
-            // Printer
+            // BaudRate
             // 
-            this.Printer.Location = new System.Drawing.Point(936, 99);
-            this.Printer.Margin = new System.Windows.Forms.Padding(4);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(120, 22);
-            this.Printer.TabIndex = 158;
+            this.BaudRate.AllPower = null;
+            this.BaudRate.BackColor = System.Drawing.Color.White;
+            this.BaudRate.ID = null;
+            this.BaudRate.Location = new System.Drawing.Point(937, 29);
+            this.BaudRate.Name = "BaudRate";
+            this.BaudRate.Negative = false;
+            this.BaudRate.Power = null;
+            this.BaudRate.Size = new System.Drawing.Size(120, 21);
+            this.BaudRate.Str = null;
+            this.BaudRate.Str1 = null;
+            this.BaudRate.Str2 = null;
+            this.BaudRate.TabIndex = 168;
+            // 
+            // ComList
+            // 
+            this.ComList.Location = new System.Drawing.Point(935, 4);
+            this.ComList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ComList.Name = "ComList";
+            this.ComList.Size = new System.Drawing.Size(121, 20);
+            this.ComList.TabIndex = 162;
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Location = new System.Drawing.Point(936, 111);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(120, 22);
+            this.PrinterList.TabIndex = 158;
             // 
             // StartWeight
             // 
@@ -320,7 +312,7 @@
             this.StartWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.DownImage")));
             this.StartWeight.Image = ((System.Drawing.Image)(resources.GetObject("StartWeight.Image")));
             this.StartWeight.IsShowBorder = true;
-            this.StartWeight.Location = new System.Drawing.Point(658, 29);
+            this.StartWeight.Location = new System.Drawing.Point(658, 26);
             this.StartWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.MoveImage")));
             this.StartWeight.Name = "StartWeight";
             this.StartWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StartWeight.NormalImage")));
@@ -331,24 +323,6 @@
             this.StartWeight.UseVisualStyleBackColor = true;
             this.StartWeight.Click += new System.EventHandler(this.StartWeight_Click);
             // 
-            // Cancel
-            // 
-            this.Cancel.AllPower = null;
-            this.Cancel.BackColor = System.Drawing.Color.Transparent;
-            this.Cancel.DownImage = ((System.Drawing.Image)(resources.GetObject("Cancel.DownImage")));
-            this.Cancel.Image = ((System.Drawing.Image)(resources.GetObject("Cancel.Image")));
-            this.Cancel.IsShowBorder = true;
-            this.Cancel.Location = new System.Drawing.Point(982, 215);
-            this.Cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("Cancel.MoveImage")));
-            this.Cancel.Name = "Cancel";
-            this.Cancel.NormalImage = ((System.Drawing.Image)(resources.GetObject("Cancel.NormalImage")));
-            this.Cancel.Power = null;
-            this.Cancel.Size = new System.Drawing.Size(75, 23);
-            this.Cancel.TabIndex = 153;
-            this.Cancel.Text = "取消";
-            this.Cancel.UseVisualStyleBackColor = true;
-            this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
-            // 
             // Confirm
             // 
             this.Confirm.AllPower = null;
@@ -356,7 +330,7 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(874, 214);
+            this.Confirm.Location = new System.Drawing.Point(919, 210);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
@@ -386,7 +360,7 @@
             this.StopWeight.DownImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.DownImage")));
             this.StopWeight.Image = ((System.Drawing.Image)(resources.GetObject("StopWeight.Image")));
             this.StopWeight.IsShowBorder = true;
-            this.StopWeight.Location = new System.Drawing.Point(753, 29);
+            this.StopWeight.Location = new System.Drawing.Point(753, 26);
             this.StopWeight.MoveImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.MoveImage")));
             this.StopWeight.Name = "StopWeight";
             this.StopWeight.NormalImage = ((System.Drawing.Image)(resources.GetObject("StopWeight.NormalImage")));
@@ -501,114 +475,56 @@
             this.OperateResult.TabIndex = 87;
             this.OperateResult.Text = "";
             // 
-            // ComList
-            // 
-            this.ComList.Location = new System.Drawing.Point(936, 64);
-            this.ComList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.ComList.Name = "ComList";
-            this.ComList.Size = new System.Drawing.Size(121, 20);
-            this.ComList.TabIndex = 162;
-            this.ComList.Visible = false;
-            // 
-            // BaudRate
-            // 
-            this.BaudRate.AllPower = null;
-            this.BaudRate.BackColor = System.Drawing.Color.White;
-            this.BaudRate.ID = null;
-            this.BaudRate.Location = new System.Drawing.Point(937, 29);
-            this.BaudRate.Name = "BaudRate";
-            this.BaudRate.Negative = false;
-            this.BaudRate.Power = null;
-            this.BaudRate.Size = new System.Drawing.Size(120, 21);
-            this.BaudRate.Str = null;
-            this.BaudRate.Str1 = null;
-            this.BaudRate.Str2 = null;
-            this.BaudRate.TabIndex = 168;
-            this.BaudRate.Visible = false;
-            // 
-            // Search_label
-            // 
-            this.Search_label.AutoSize = true;
-            this.Search_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Search_label.Location = new System.Drawing.Point(515, 217);
-            this.Search_label.Name = "Search_label";
-            this.Search_label.Size = new System.Drawing.Size(74, 21);
-            this.Search_label.TabIndex = 105;
-            this.Search_label.Text = "查找历史";
-            // 
-            // Search
-            // 
-            this.Search.AllPower = null;
-            this.Search.Caller = null;
-            this.Search.Condition = null;
-            this.Search.DBTitle = "查找历史";
-            this.Search.FormName = null;
-            this.Search.Location = new System.Drawing.Point(608, 217);
-            this.Search.Name = "Search";
-            this.Search.Power = null;
-            this.Search.ReturnData = null;
-            this.Search.SelectField = null;
-            this.Search.SetValueField = null;
-            this.Search.Size = new System.Drawing.Size(216, 21);
-            this.Search.TabIndex = 104;
-            this.Search.TableName = null;
-            this.Search.TextBoxEnable = false;
-            // 
-            // user
-            // 
-            this.user.HeaderText = "操作员";
-            this.user.Name = "user";
-            // 
-            // weight_time
-            // 
-            this.weight_time.HeaderText = "称量时间";
-            this.weight_time.Name = "weight_time";
-            // 
-            // pa_weight
-            // 
-            this.pa_weight.HeaderText = "重量";
-            this.pa_weight.Name = "pa_weight";
-            // 
-            // pa_outboxcode
-            // 
-            this.pa_outboxcode.HeaderText = "箱号";
-            this.pa_outboxcode.Name = "pa_outboxcode";
-            // 
-            // dataGridViewWithSerialNum1
-            // 
-            this.dataGridViewWithSerialNum1.AllowUserToAddRows = false;
-            this.dataGridViewWithSerialNum1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.dataGridViewWithSerialNum1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.pa_outboxcode,
-            this.pa_weight,
-            this.weight_time,
-            this.user});
-            this.dataGridViewWithSerialNum1.Location = new System.Drawing.Point(422, 253);
-            this.dataGridViewWithSerialNum1.Name = "dataGridViewWithSerialNum1";
-            this.dataGridViewWithSerialNum1.RowTemplate.Height = 23;
-            this.dataGridViewWithSerialNum1.Size = new System.Drawing.Size(403, 266);
-            this.dataGridViewWithSerialNum1.TabIndex = 103;
+            // AutoPrint
+            // 
+            this.AutoPrint.AutoSize = true;
+            this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 10.8F);
+            this.AutoPrint.Location = new System.Drawing.Point(839, 46);
+            this.AutoPrint.Name = "AutoPrint";
+            this.AutoPrint.Size = new System.Drawing.Size(88, 24);
+            this.AutoPrint.TabIndex = 169;
+            this.AutoPrint.Text = "自动打印";
+            this.AutoPrint.UseVisualStyleBackColor = true;
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.Location = new System.Drawing.Point(937, 76);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Size = new System.Drawing.Size(120, 21);
+            this.PrintNum.TabIndex = 170;
+            this.PrintNum.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(839, 77);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(84, 20);
+            this.label2.TabIndex = 171;
+            this.label2.Text = "打印机列表";
             // 
             // Make_CartonBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1072, 608);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.BaudRate);
             this.Controls.Add(this.ComList);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.Printer_label);
-            this.Controls.Add(this.Printer);
+            this.Controls.Add(this.PrinterList);
             this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.StartWeight);
-            this.Controls.Add(this.SupPriLabel);
-            this.Controls.Add(this.PriLabel);
-            this.Controls.Add(this.Cancel);
             this.Controls.Add(this.Confirm);
             this.Controls.Add(this.pd_barcode);
-            this.Controls.Add(this.Search_label);
-            this.Controls.Add(this.Search);
-            this.Controls.Add(this.dataGridViewWithSerialNum1);
             this.Controls.Add(this.StopWeight);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ma_qty);
@@ -634,12 +550,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.卡通箱称重_FormClosing);
             this.Load += new System.EventHandler(this.卡通箱称重_Load);
             this.SizeChanged += new System.EventHandler(this.卡通箱称重_SizeChanged);
-            this.panel6.ResumeLayout(true);
+            this.panel6.ResumeLayout(false);
             this.panel6.PerformLayout();
-            this.panel4.ResumeLayout(true);
+            this.panel4.ResumeLayout(false);
             this.panel4.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewWithSerialNum1)).EndInit();
-            this.ResumeLayout(true);
+            ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).EndInit();
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -673,22 +589,15 @@
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.ValueLabel.ValueLabel pd_barcode;
         private CustomControl.ButtonUtil.NormalButton Confirm;
-        private System.Windows.Forms.RadioButton PriLabel;
-        private System.Windows.Forms.RadioButton SupPriLabel;
         private CustomControl.ButtonUtil.NormalButton StartWeight;
         private System.Windows.Forms.ComboBox PrintLabel;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
         private System.Windows.Forms.Label Printer_label;
         private System.Windows.Forms.Label label1;
-        private CustomControl.ButtonUtil.NormalButton Cancel;
         private CustomControl.ComBoxWithFocus.SerialPortCombox ComList;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox BaudRate;
-        private System.Windows.Forms.Label Search_label;
-        private CustomControl.TextBoxWithIcon.SearchTextBox Search;
-        private System.Windows.Forms.DataGridViewTextBoxColumn user;
-        private System.Windows.Forms.DataGridViewTextBoxColumn weight_time;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pa_weight;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pa_outboxcode;
-        private CustomControl.DataGrid_View.DataGridViewWithSerialNum dataGridViewWithSerialNum1;
+        private System.Windows.Forms.CheckBox AutoPrint;
+        private System.Windows.Forms.NumericUpDown PrintNum;
+        private System.Windows.Forms.Label label2;
     }
 }

+ 31 - 66
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -43,6 +43,7 @@ namespace UAS_MES.Make
         int MinWeight;
 
         DataTable ListC = new DataTable();
+        private System.DateTime[] indate;
 
         public Make_CartonBoxWeigh()
         {
@@ -72,7 +73,7 @@ namespace UAS_MES.Make
                 pd_barcode.Text = dh.getFieldDataByCondition("makeserial left join package on ms_prodcode=pa_prodcode", "ms_sncode", "pa_outboxcode='" + outboxcode.Text + "'").ToString();
                 sql.Clear();
                 sql.Append("select pa_totalqty,pd_barcode,ma_code,mcd_okqty,ma_qty,ma_qty-mcd_okqty as mcd_waitqty,ma_salecode,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
-                sql.Append("pr_cartonmaxw,pr_cartonminw from  package left join product on pr_code=pa_prodcode left join make on ma_prodcode=pr_code left join makecraftdetail ");
+                sql.Append("pr_cartonmaxw,pr_cartonminw from package left join product on pr_code=pa_prodcode left join make on ma_prodcode=pr_code left join makecraftdetail ");
                 sql.Append("on mcd_macode=ma_code left join  packagedetail on pd_outboxcode=pa_outboxcode where pa_outboxcode='" + outboxcode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 //填充Form的值
@@ -83,50 +84,30 @@ namespace UAS_MES.Make
                     string ErrorMessage;
                     //重量的临时变量
                     string _weight = dt.Rows[0]["pr_cartongw"].ToString();
-                    string _maxweight = dt.Rows[0]["pr_cartonminw"].ToString();
-                    string _minweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
-
+                    string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
+                    string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
                     Weight = int.Parse(_weight == "" ? "0" : _weight);
                     MaxWeight = int.Parse(_maxweight == "" ? "0" : _maxweight);
                     MinWeight = int.Parse(_minweight == "" ? "0" : _minweight);
                     pa_totalqty = int.Parse(dt.Rows[0]["pa_totalqty"].ToString());
-                    bool ifFirst;
-                    if (LogicHandler.CheckCurrentStepAndIfFirst(pd_barcode.Text, ma_code.Text, User.UserSourceCode, Tag.ToString(), out ifFirst, out ErrorMessage))
+                    if (Weight - MinWeight == MaxWeight - Weight)
+                        pr_cartongw.Text = Weight + "±" + (MaxWeight - Weight);
+                    else
+                        pr_cartongw.Text = MinWeight + "-" + MaxWeight;
+                    int ActualWeight = int.Parse(weight.Text == "" ? "0" : weight.Text);
+                    if (ActualWeight >= MinWeight && ActualWeight <= MaxWeight)
                     {
-                        sql.Clear();
-                        sql.Append("select count(1) cn from MES_PACKAGE_VIEW  left join makeserial on v_prodcode=ms_prodcode where (ms_sncode=");
-                        sql.Append("v_barcode or ms_psn=v_barcode)  and v_outboxcode='" + outboxcode.Text + "'");
-                        int ActualWeight = int.Parse(weight.Text == "" ? "0" : weight.Text);
-                        if (ActualWeight > MinWeight && ActualWeight < MaxWeight)
+                        OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
+                        if (AutoPrint.Checked)
                         {
-                            if (PriLabel.Checked)
-                            {
-                                Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pd_barcode.Text);
-                                AfterWeighPass();
-                            }
-                            else if (SupPriLabel.Checked)
-                            {
-                                Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pd_barcode.Text);
-                                dh.ExecuteSql("update package set pa_printcount= pa_printcount+1 where pa_outboxcode='" + outboxcode.Text + "'", "update");
-                                AfterWeighPass();
-                            }
-                            OperateResult.AppendText(">>检测合格\n", Color.Green);
+                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
+                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                         }
-                        else
-                        {
-                            OperateResult.AppendText(">>检测未通过\n", Color.Red);
-                        }
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                        AfterWeighPass();
                     }
+                    else OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red, outboxcode);
                 }
-                else
-                {
-                    OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red);
-                }
-                outboxcode.Text = "";
+                else OperateResult.AppendText(">>箱号" + outboxcode.Text + "不存在\n", Color.Red, outboxcode);
             }
         }
 
@@ -152,10 +133,9 @@ namespace UAS_MES.Make
                             }
                         }
                     }
-                    catch (IOException ex) { MessageBox.Show(ex.Message); }
+                    catch (IOException ex) { OperateResult.AppendText(">>" + ex.Message + "\n", Color.Red, outboxcode); }
                 }
-                else
-                    MessageBox.Show("端口已被占用,请关闭其他窗口");
+                else OperateResult.AppendText(">>端口已被占用,请关闭其他窗口\n", Color.Red, outboxcode);
             }
         }
 
@@ -163,20 +143,13 @@ namespace UAS_MES.Make
         {
             string ErrorMessage;
             dh.ExecuteSql("update package set pa_weight=" + weight.Text + ", pa_printcount= nvl(pa_printcount,0)+1 where pa_outboxcode='" + outboxcode.Text + "'", "update");
-            if (!LogicHandler.UpdateMakeMessage(pd_barcode.Text, ma_code.Text, "卡通箱称重", User.UserSourceCode, User.UserName, "称量合格", out ErrorMessage))
-                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+            outboxcode.Text = "";
         }
 
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-
-        }
-
-        //取消调整
-        private void Cancel_Click(object sender, EventArgs e)
-        {
-
+            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
         }
 
         //停止进程,关闭串口
@@ -187,22 +160,6 @@ namespace UAS_MES.Make
             serialPort1.Close();
         }
 
-        //只能默认勾选一个复选框
-        private void PrintLabel_CellClick(object sender, DataGridViewCellEventArgs e)
-        {
-            //if (PrintLabel.Columns[e.ColumnIndex].Name == "pl_isdefault")
-            //{
-            //    for (int i = 0; i < PrintLabel.Rows.Count; i++)
-            //    {
-            //        if (i != e.RowIndex && PrintLabel.CurrentCell.ColumnIndex == 0)
-            //        {
-            //            DataGridViewCheckBoxCell cell = (DataGridViewCheckBoxCell)PrintLabel.Rows[i].Cells[0];
-            //            cell.Value = false;
-            //        }
-            //    }
-            //}
-        }
-
         //关闭窗口的时候停止进程,不再读取串口数据
         private void 卡通箱称重_FormClosing(object sender, FormClosingEventArgs e)
         {
@@ -238,9 +195,17 @@ namespace UAS_MES.Make
 
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
-            PrintLabel.DataSource = dh.ExecuteSql("select pl_labelcode,pl_labelname from  productlabel  where pl_prodcode='" + pr_code.Text + "'", "select");
-            PrintLabel.DisplayMember = "pl_labelname";
+            DataTable dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' order by pl_isdefault desc ", "select");
+            PrintLabel.DataSource = dt;
+            PrintLabel.DisplayMember = "pl_laname";
             PrintLabel.ValueMember = "pl_labelcode";
+            ftpOperater ftp = new ftpOperater();
+            indate = new System.DateTime[dt.Rows.Count];
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                BaseUtil.GetPrintLabel(dt.Rows[i]["pl_labelname"].ToString(), dt.Rows[i]["pl_labelurl"].ToString(), dt.Rows[i]["pl_indate"].ToString());
+                indate[i] = Convert.ToDateTime(dt.Rows[i]["pl_indate"].ToString());
+            }
         }
     }
 }

+ 0 - 143
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.resx

@@ -247,137 +247,6 @@
         2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
         zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="Cancel.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
-        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
-        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
-        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
-        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
-        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
-        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="Cancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        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
-</value>
-  </data>
-  <data name="Cancel.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
-        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
-        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
-        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
-        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
-        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
-        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
-        gg==
-</value>
-  </data>
-  <data name="Cancel.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
-        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
-        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
-        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
-        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
-        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
-        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
-        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
   <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -904,16 +773,4 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="user.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="weight_time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pa_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 0 - 4
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -84,13 +84,9 @@ namespace UAS_MES.Make
                     MinWeight = int.Parse(_minweight == "" ? "0" : _minweight);
                     BaseUtil.SetFormValue(this.Controls, dt);
                     if (Weight - MinWeight == MaxWeight - Weight)
-                    {
                         pr_colorboxgw.Text = Weight + "±" + (MaxWeight - Weight);
-                    }
                     else
-                    {
                         pr_colorboxgw.Text = MinWeight + "-" + MaxWeight;
-                    }
                     string ErrorMessage;
                     string oMakeCode = "";
                     string oMsID = "";

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -115,6 +115,7 @@ namespace UAS_MES.Make
                 sql.Append("select packagedetail_seq.nextval,pa_id,pa_outboxcode,pa_totalqty,'" + barcode.Text + "' from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
                 dh.ExecuteSql(sql.GetString(), "insert");
                 dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty+1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                dh.UpdateByCondition("makeserial", "ms_outboxcode='"+pa_outboxcode.Text+"'", "ms_sncode='"+barcode.Text+"'");
                 if (LogicHandler.UpdateMakeMessage(barcode.Text, ma_code.Text, "包装采集", User.UserSourceCode, User.UserCode, "装箱成功", out ErrorMessage))
                 {
                     OperateResult.AppendText(">>序列号" + barcode.Text + "采集成功!\n", Color.Green);