Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

caosy 5 years ago
parent
commit
cd6d5732ed

+ 1 - 1
UAS-MES/Login.cs

@@ -108,7 +108,7 @@ namespace UAS_MES
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+Address+")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 133 - 164
UAS-出货标签管理(标签复核)/UAS_出货标签管理.Designer.cs

@@ -145,10 +145,9 @@
             // 
             this.pi_inoutno_label.AutoSize = true;
             this.pi_inoutno_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_inoutno_label.Location = new System.Drawing.Point(6, 20);
-            this.pi_inoutno_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pi_inoutno_label.Location = new System.Drawing.Point(3, 10);
             this.pi_inoutno_label.Name = "pi_inoutno_label";
-            this.pi_inoutno_label.Size = new System.Drawing.Size(99, 36);
+            this.pi_inoutno_label.Size = new System.Drawing.Size(51, 20);
             this.pi_inoutno_label.TabIndex = 3;
             this.pi_inoutno_label.Text = "发票号";
             // 
@@ -156,10 +155,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(6, 190);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Location = new System.Drawing.Point(3, 95);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(127, 36);
+            this.label1.Size = new System.Drawing.Size(65, 20);
             this.label1.TabIndex = 31;
             this.label1.Text = "采集策略";
             // 
@@ -167,10 +165,9 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(10, 270);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(5, 135);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(127, 36);
+            this.label2.Size = new System.Drawing.Size(65, 20);
             this.label2.TabIndex = 33;
             this.label2.Text = "当前采集";
             // 
@@ -178,10 +175,9 @@
             // 
             this.label22.AutoSize = true;
             this.label22.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label22.Location = new System.Drawing.Point(144, 270);
-            this.label22.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label22.Location = new System.Drawing.Point(72, 135);
             this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(127, 36);
+            this.label22.Size = new System.Drawing.Size(65, 20);
             this.label22.TabIndex = 34;
             this.label22.Text = "明细序号";
             // 
@@ -189,10 +185,10 @@
             // 
             this.AutoMatch.AutoSize = true;
             this.AutoMatch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoMatch.Location = new System.Drawing.Point(288, 270);
-            this.AutoMatch.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.AutoMatch.Location = new System.Drawing.Point(144, 135);
+            this.AutoMatch.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AutoMatch.Name = "AutoMatch";
-            this.AutoMatch.Size = new System.Drawing.Size(159, 40);
+            this.AutoMatch.Size = new System.Drawing.Size(84, 24);
             this.AutoMatch.TabIndex = 49;
             this.AutoMatch.Text = "自动匹配";
             this.AutoMatch.UseVisualStyleBackColor = true;
@@ -201,10 +197,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(18, 374);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(9, 187);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(127, 36);
+            this.pr_code_label.Size = new System.Drawing.Size(65, 20);
             this.pr_code_label.TabIndex = 51;
             this.pr_code_label.Text = "物料编号";
             // 
@@ -212,20 +207,19 @@
             // 
             this.label24.AutoSize = true;
             this.label24.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label24.Location = new System.Drawing.Point(18, 447);
-            this.label24.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label24.Location = new System.Drawing.Point(9, 224);
             this.label24.Name = "label24";
-            this.label24.Size = new System.Drawing.Size(99, 36);
+            this.label24.Size = new System.Drawing.Size(51, 20);
             this.label24.TabIndex = 55;
             this.label24.Text = "输入框";
             // 
             // GenerateBarCode
             // 
             this.GenerateBarCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GenerateBarCode.Location = new System.Drawing.Point(748, 371);
-            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.GenerateBarCode.Location = new System.Drawing.Point(374, 186);
+            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.GenerateBarCode.Name = "GenerateBarCode";
-            this.GenerateBarCode.Size = new System.Drawing.Size(136, 52);
+            this.GenerateBarCode.Size = new System.Drawing.Size(68, 26);
             this.GenerateBarCode.TabIndex = 41;
             this.GenerateBarCode.Text = "生成条码";
             this.GenerateBarCode.UseVisualStyleBackColor = true;
@@ -234,10 +228,10 @@
             // SaveGrid
             // 
             this.SaveGrid.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SaveGrid.Location = new System.Drawing.Point(896, 443);
-            this.SaveGrid.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.SaveGrid.Location = new System.Drawing.Point(448, 222);
+            this.SaveGrid.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SaveGrid.Name = "SaveGrid";
-            this.SaveGrid.Size = new System.Drawing.Size(136, 52);
+            this.SaveGrid.Size = new System.Drawing.Size(68, 26);
             this.SaveGrid.TabIndex = 59;
             this.SaveGrid.Text = "保存明细";
             this.SaveGrid.UseVisualStyleBackColor = true;
@@ -247,20 +241,19 @@
             // 
             this.sg_separator_label.AutoSize = true;
             this.sg_separator_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_separator_label.Location = new System.Drawing.Point(486, 196);
-            this.sg_separator_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sg_separator_label.Location = new System.Drawing.Point(243, 98);
             this.sg_separator_label.Name = "sg_separator_label";
-            this.sg_separator_label.Size = new System.Drawing.Size(99, 36);
+            this.sg_separator_label.Size = new System.Drawing.Size(51, 20);
             this.sg_separator_label.TabIndex = 61;
             this.sg_separator_label.Text = "分隔符";
             // 
             // CollectionSetting
             // 
             this.CollectionSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectionSetting.Location = new System.Drawing.Point(492, 266);
-            this.CollectionSetting.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.CollectionSetting.Location = new System.Drawing.Point(246, 133);
+            this.CollectionSetting.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CollectionSetting.Name = "CollectionSetting";
-            this.CollectionSetting.Size = new System.Drawing.Size(176, 52);
+            this.CollectionSetting.Size = new System.Drawing.Size(88, 26);
             this.CollectionSetting.TabIndex = 63;
             this.CollectionSetting.Text = "采集策略设置";
             this.CollectionSetting.UseVisualStyleBackColor = true;
@@ -280,11 +273,11 @@
             this.si_expression,
             this.si_item,
             this.si_expressionitem});
-            this.Si_ItemDGV.Location = new System.Drawing.Point(680, 28);
-            this.Si_ItemDGV.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Si_ItemDGV.Location = new System.Drawing.Point(340, 14);
+            this.Si_ItemDGV.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Si_ItemDGV.Name = "Si_ItemDGV";
             this.Si_ItemDGV.RowTemplate.Height = 23;
-            this.Si_ItemDGV.Size = new System.Drawing.Size(268, 292);
+            this.Si_ItemDGV.Size = new System.Drawing.Size(134, 146);
             this.Si_ItemDGV.TabIndex = 65;
             // 
             // si_detno
@@ -352,10 +345,10 @@
             // CleanDetail
             // 
             this.CleanDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CleanDetail.Location = new System.Drawing.Point(748, 443);
-            this.CleanDetail.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.CleanDetail.Location = new System.Drawing.Point(374, 222);
+            this.CleanDetail.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CleanDetail.Name = "CleanDetail";
-            this.CleanDetail.Size = new System.Drawing.Size(136, 52);
+            this.CleanDetail.Size = new System.Drawing.Size(68, 26);
             this.CleanDetail.TabIndex = 66;
             this.CleanDetail.Text = "清除明细";
             this.CleanDetail.UseVisualStyleBackColor = true;
@@ -365,10 +358,9 @@
             // 
             this.pib_id.AutoSize = true;
             this.pib_id.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pib_id.Location = new System.Drawing.Point(284, 331);
-            this.pib_id.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pib_id.Location = new System.Drawing.Point(142, 166);
             this.pib_id.Name = "pib_id";
-            this.pib_id.Size = new System.Drawing.Size(0, 36);
+            this.pib_id.Size = new System.Drawing.Size(0, 20);
             this.pib_id.TabIndex = 69;
             this.pib_id.Visible = false;
             // 
@@ -376,20 +368,18 @@
             // 
             this.pi_cardcode_label.AutoSize = true;
             this.pi_cardcode_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_cardcode_label.Location = new System.Drawing.Point(6, 134);
-            this.pi_cardcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pi_cardcode_label.Location = new System.Drawing.Point(3, 67);
             this.pi_cardcode_label.Name = "pi_cardcode_label";
-            this.pi_cardcode_label.Size = new System.Drawing.Size(127, 36);
+            this.pi_cardcode_label.Size = new System.Drawing.Size(65, 20);
             this.pi_cardcode_label.TabIndex = 72;
             this.pi_cardcode_label.Text = "客户编号";
             // 
             // Fresh
             // 
             this.Fresh.AutoSize = true;
-            this.Fresh.Location = new System.Drawing.Point(456, 28);
-            this.Fresh.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Fresh.Location = new System.Drawing.Point(228, 14);
             this.Fresh.Name = "Fresh";
-            this.Fresh.Size = new System.Drawing.Size(58, 24);
+            this.Fresh.Size = new System.Drawing.Size(29, 12);
             this.Fresh.TabIndex = 73;
             this.Fresh.TabStop = true;
             this.Fresh.Text = "刷新";
@@ -399,10 +389,9 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(10, 1174);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Location = new System.Drawing.Point(5, 587);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 29;
             this.label3.Text = "输出日志";
             // 
@@ -412,10 +401,10 @@
             this.CleanInputAfterCollect.Checked = true;
             this.CleanInputAfterCollect.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CleanInputAfterCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CleanInputAfterCollect.Location = new System.Drawing.Point(464, 449);
-            this.CleanInputAfterCollect.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.CleanInputAfterCollect.Location = new System.Drawing.Point(232, 224);
+            this.CleanInputAfterCollect.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CleanInputAfterCollect.Name = "CleanInputAfterCollect";
-            this.CleanInputAfterCollect.Size = new System.Drawing.Size(238, 35);
+            this.CleanInputAfterCollect.Size = new System.Drawing.Size(123, 21);
             this.CleanInputAfterCollect.TabIndex = 74;
             this.CleanInputAfterCollect.Text = "采集后清除输入框";
             this.CleanInputAfterCollect.UseVisualStyleBackColor = true;
@@ -628,10 +617,10 @@
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(8, 504);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseAll.Location = new System.Drawing.Point(4, 252);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(76, 44);
+            this.ChooseAll.Size = new System.Drawing.Size(38, 22);
             this.ChooseAll.TabIndex = 84;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -641,20 +630,19 @@
             // 
             this.pi_date.AutoSize = true;
             this.pi_date.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_date.Location = new System.Drawing.Point(10, 316);
-            this.pi_date.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pi_date.Location = new System.Drawing.Point(5, 158);
             this.pi_date.Name = "pi_date";
-            this.pi_date.Size = new System.Drawing.Size(0, 36);
+            this.pi_date.Size = new System.Drawing.Size(0, 20);
             this.pi_date.TabIndex = 86;
             this.pi_date.Visible = false;
             // 
             // CleanBarCode
             // 
             this.CleanBarCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CleanBarCode.Location = new System.Drawing.Point(896, 371);
-            this.CleanBarCode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.CleanBarCode.Location = new System.Drawing.Point(448, 186);
+            this.CleanBarCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CleanBarCode.Name = "CleanBarCode";
-            this.CleanBarCode.Size = new System.Drawing.Size(136, 52);
+            this.CleanBarCode.Size = new System.Drawing.Size(68, 26);
             this.CleanBarCode.TabIndex = 87;
             this.CleanBarCode.Text = "清空条码";
             this.CleanBarCode.UseVisualStyleBackColor = true;
@@ -663,10 +651,10 @@
             // ExportData
             // 
             this.ExportData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ExportData.Location = new System.Drawing.Point(1044, 371);
-            this.ExportData.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.ExportData.Location = new System.Drawing.Point(522, 186);
+            this.ExportData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ExportData.Name = "ExportData";
-            this.ExportData.Size = new System.Drawing.Size(136, 52);
+            this.ExportData.Size = new System.Drawing.Size(68, 26);
             this.ExportData.TabIndex = 91;
             this.ExportData.Text = "导出数据";
             this.ExportData.UseVisualStyleBackColor = true;
@@ -676,10 +664,9 @@
             // 
             this.sg_code.AutoSize = true;
             this.sg_code.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_code.Location = new System.Drawing.Point(649, 136);
-            this.sg_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sg_code.Location = new System.Drawing.Point(324, 68);
             this.sg_code.Name = "sg_code";
-            this.sg_code.Size = new System.Drawing.Size(0, 36);
+            this.sg_code.Size = new System.Drawing.Size(0, 20);
             this.sg_code.TabIndex = 92;
             this.sg_code.TextChanged += new System.EventHandler(this.sg_brand_UserControlTextChanged);
             // 
@@ -687,23 +674,21 @@
             // 
             this.pi_inoutno.AutoSize = true;
             this.pi_inoutno.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_inoutno.Location = new System.Drawing.Point(146, 80);
-            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pi_inoutno.Location = new System.Drawing.Point(73, 40);
             this.pi_inoutno.Name = "pi_inoutno";
-            this.pi_inoutno.Size = new System.Drawing.Size(0, 36);
+            this.pi_inoutno.Size = new System.Drawing.Size(0, 20);
             this.pi_inoutno.TabIndex = 93;
             // 
             // AllCollect
             // 
             this.AllCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllCollect.Location = new System.Drawing.Point(1044, 443);
-            this.AllCollect.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.AllCollect.Location = new System.Drawing.Point(522, 222);
+            this.AllCollect.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllCollect.Name = "AllCollect";
-            this.AllCollect.Size = new System.Drawing.Size(136, 52);
+            this.AllCollect.Size = new System.Drawing.Size(68, 26);
             this.AllCollect.TabIndex = 94;
             this.AllCollect.Text = "全部采集";
             this.AllCollect.UseVisualStyleBackColor = true;
-            this.AllCollect.Click += new System.EventHandler(this.AllCollect_Click);
             // 
             // cu_code
             // 
@@ -712,14 +697,14 @@
             this.cu_code.Condition = null;
             this.cu_code.DBTitle = null;
             this.cu_code.FormName = null;
-            this.cu_code.Location = new System.Drawing.Point(150, 134);
-            this.cu_code.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.cu_code.Location = new System.Drawing.Point(75, 67);
+            this.cu_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.cu_code.Name = "cu_code";
             this.cu_code.Power = null;
             this.cu_code.ReturnData = null;
             this.cu_code.SelectField = null;
             this.cu_code.SetValueField = null;
-            this.cu_code.Size = new System.Drawing.Size(298, 35);
+            this.cu_code.Size = new System.Drawing.Size(149, 18);
             this.cu_code.TabIndex = 88;
             this.cu_code.TableName = null;
             this.cu_code.TextBoxEnable = false;
@@ -731,14 +716,14 @@
             this.pr_code.Condition = null;
             this.pr_code.DBTitle = null;
             this.pr_code.FormName = null;
-            this.pr_code.Location = new System.Drawing.Point(152, 375);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pr_code.Location = new System.Drawing.Point(76, 188);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(298, 44);
+            this.pr_code.Size = new System.Drawing.Size(148, 22);
             this.pr_code.TabIndex = 68;
             this.pr_code.TableName = null;
             this.pr_code.TextBoxEnable = false;
@@ -758,11 +743,11 @@
             this.CollectionProcess.Controls.Add(this.label13);
             this.CollectionProcess.Controls.Add(this.Installed);
             this.CollectionProcess.Controls.Add(this.Process);
-            this.CollectionProcess.Location = new System.Drawing.Point(960, 20);
-            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(4);
+            this.CollectionProcess.Location = new System.Drawing.Point(480, 10);
+            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CollectionProcess.Name = "CollectionProcess";
-            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(4);
-            this.CollectionProcess.Size = new System.Drawing.Size(260, 304);
+            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CollectionProcess.Size = new System.Drawing.Size(130, 152);
             this.CollectionProcess.TabIndex = 80;
             this.CollectionProcess.TabStop = false;
             this.CollectionProcess.Text = " ";
@@ -771,20 +756,18 @@
             // 
             this.Capacity.AutoSize = true;
             this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(125, 133);
-            this.Capacity.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Capacity.Location = new System.Drawing.Point(63, 67);
             this.Capacity.Name = "Capacity";
-            this.Capacity.Size = new System.Drawing.Size(0, 31);
+            this.Capacity.Size = new System.Drawing.Size(0, 17);
             this.Capacity.TabIndex = 75;
             // 
             // Process_midboxcode
             // 
             this.Process_midboxcode.AutoSize = true;
             this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(125, 225);
-            this.Process_midboxcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Process_midboxcode.Location = new System.Drawing.Point(63, 113);
             this.Process_midboxcode.Name = "Process_midboxcode";
-            this.Process_midboxcode.Size = new System.Drawing.Size(28, 31);
+            this.Process_midboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_midboxcode.TabIndex = 74;
             this.Process_midboxcode.Text = "0";
             // 
@@ -792,10 +775,9 @@
             // 
             this.Process_outboxcode.AutoSize = true;
             this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(125, 177);
-            this.Process_outboxcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Process_outboxcode.Location = new System.Drawing.Point(63, 89);
             this.Process_outboxcode.Name = "Process_outboxcode";
-            this.Process_outboxcode.Size = new System.Drawing.Size(28, 31);
+            this.Process_outboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_outboxcode.TabIndex = 73;
             this.Process_outboxcode.Text = "0";
             // 
@@ -804,10 +786,9 @@
             this.TotalCount.AutoSize = true;
             this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(193, 37);
-            this.TotalCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.TotalCount.Location = new System.Drawing.Point(97, 19);
             this.TotalCount.Name = "TotalCount";
-            this.TotalCount.Size = new System.Drawing.Size(28, 31);
+            this.TotalCount.Size = new System.Drawing.Size(15, 17);
             this.TotalCount.TabIndex = 72;
             this.TotalCount.Text = "0";
             // 
@@ -815,10 +796,9 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(169, 37);
-            this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label17.Location = new System.Drawing.Point(85, 19);
             this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(24, 31);
+            this.label17.Size = new System.Drawing.Size(13, 17);
             this.label17.TabIndex = 71;
             this.label17.Text = "/";
             // 
@@ -827,10 +807,9 @@
             this.CollectedCount.AutoSize = true;
             this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(133, 37);
-            this.CollectedCount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.CollectedCount.Location = new System.Drawing.Point(67, 19);
             this.CollectedCount.Name = "CollectedCount";
-            this.CollectedCount.Size = new System.Drawing.Size(28, 31);
+            this.CollectedCount.Size = new System.Drawing.Size(15, 17);
             this.CollectedCount.TabIndex = 70;
             this.CollectedCount.Text = "0";
             // 
@@ -838,10 +817,9 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(25, 177);
-            this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label14.Location = new System.Drawing.Point(13, 89);
             this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(62, 31);
+            this.label14.Size = new System.Drawing.Size(32, 17);
             this.label14.TabIndex = 69;
             this.label14.Text = "箱号";
             // 
@@ -849,10 +827,9 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(25, 225);
-            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label11.Location = new System.Drawing.Point(13, 113);
             this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(62, 31);
+            this.label11.Size = new System.Drawing.Size(32, 17);
             this.label11.TabIndex = 68;
             this.label11.Text = "盒号";
             // 
@@ -860,10 +837,9 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(25, 97);
-            this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label13.Location = new System.Drawing.Point(13, 49);
             this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(86, 31);
+            this.label13.Size = new System.Drawing.Size(44, 17);
             this.label13.TabIndex = 67;
             this.label13.Text = "当前盒";
             // 
@@ -871,20 +847,18 @@
             // 
             this.Installed.AutoSize = true;
             this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(125, 97);
-            this.Installed.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Installed.Location = new System.Drawing.Point(63, 49);
             this.Installed.Name = "Installed";
-            this.Installed.Size = new System.Drawing.Size(0, 31);
+            this.Installed.Size = new System.Drawing.Size(0, 17);
             this.Installed.TabIndex = 66;
             // 
             // Process
             // 
             this.Process.AutoSize = true;
             this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(25, 37);
-            this.Process.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Process.Location = new System.Drawing.Point(13, 19);
             this.Process.Name = "Process";
-            this.Process.Size = new System.Drawing.Size(86, 31);
+            this.Process.Size = new System.Drawing.Size(44, 17);
             this.Process.TabIndex = 65;
             this.Process.Text = "总进度";
             // 
@@ -892,10 +866,10 @@
             // 
             this.sg_separator.Enabled = false;
             this.sg_separator.ID = null;
-            this.sg_separator.Location = new System.Drawing.Point(608, 197);
-            this.sg_separator.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.sg_separator.Location = new System.Drawing.Point(304, 98);
+            this.sg_separator.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sg_separator.Name = "sg_separator";
-            this.sg_separator.Size = new System.Drawing.Size(52, 35);
+            this.sg_separator.Size = new System.Drawing.Size(28, 21);
             this.sg_separator.Str = null;
             this.sg_separator.Str1 = null;
             this.sg_separator.Str2 = null;
@@ -904,10 +878,10 @@
             // Input
             // 
             this.Input.ID = null;
-            this.Input.Location = new System.Drawing.Point(152, 447);
-            this.Input.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Input.Location = new System.Drawing.Point(76, 224);
+            this.Input.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Input.Name = "Input";
-            this.Input.Size = new System.Drawing.Size(296, 35);
+            this.Input.Size = new System.Drawing.Size(150, 21);
             this.Input.Str = null;
             this.Input.Str1 = null;
             this.Input.Str2 = null;
@@ -917,10 +891,10 @@
             // griddetno
             // 
             this.griddetno.ID = null;
-            this.griddetno.Location = new System.Drawing.Point(152, 322);
-            this.griddetno.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.griddetno.Location = new System.Drawing.Point(76, 161);
+            this.griddetno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.griddetno.Name = "griddetno";
-            this.griddetno.Size = new System.Drawing.Size(200, 35);
+            this.griddetno.Size = new System.Drawing.Size(102, 21);
             this.griddetno.Str = null;
             this.griddetno.Str1 = null;
             this.griddetno.Str2 = null;
@@ -934,14 +908,14 @@
             this.sg_brand.Condition = null;
             this.sg_brand.DBTitle = null;
             this.sg_brand.FormName = null;
-            this.sg_brand.Location = new System.Drawing.Point(150, 193);
-            this.sg_brand.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.sg_brand.Location = new System.Drawing.Point(75, 96);
+            this.sg_brand.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sg_brand.Name = "sg_brand";
             this.sg_brand.Power = null;
             this.sg_brand.ReturnData = null;
             this.sg_brand.SelectField = null;
             this.sg_brand.SetValueField = null;
-            this.sg_brand.Size = new System.Drawing.Size(298, 35);
+            this.sg_brand.Size = new System.Drawing.Size(149, 18);
             this.sg_brand.TabIndex = 32;
             this.sg_brand.TableName = null;
             this.sg_brand.TextBoxEnable = false;
@@ -949,20 +923,20 @@
             // 
             // MessageLog
             // 
-            this.MessageLog.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            this.MessageLog.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.MessageLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MessageLog.Location = new System.Drawing.Point(8, 1220);
-            this.MessageLog.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.MessageLog.Location = new System.Drawing.Point(4, 610);
+            this.MessageLog.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MessageLog.Name = "MessageLog";
-            this.MessageLog.Size = new System.Drawing.Size(2594, 190);
+            this.MessageLog.Size = new System.Drawing.Size(1642, 97);
             this.MessageLog.TabIndex = 28;
             this.MessageLog.Text = "";
             // 
             // LabelInf
             // 
             this.LabelInf.AllowUserToAddRows = false;
-            this.LabelInf.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            this.LabelInf.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.LabelInf.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
             this.LabelInf.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
@@ -987,11 +961,11 @@
             this.pib_lotno,
             this.pib_datecode,
             this.pib_qty});
-            this.LabelInf.Location = new System.Drawing.Point(4, 504);
-            this.LabelInf.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.LabelInf.Location = new System.Drawing.Point(2, 252);
+            this.LabelInf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.LabelInf.Name = "LabelInf";
             this.LabelInf.RowTemplate.Height = 23;
-            this.LabelInf.Size = new System.Drawing.Size(2018, 652);
+            this.LabelInf.Size = new System.Drawing.Size(1304, 326);
             this.LabelInf.TabIndex = 27;
             this.LabelInf.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.LabelInf_CellPainting);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
@@ -1055,7 +1029,7 @@
             this.pr_detail.DataPropertyName = "pr_detail";
             this.pr_detail.HeaderText = "物料名称";
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Width = 151;
+            this.pr_detail.Width = 78;
             // 
             // pr_spec
             // 
@@ -1100,7 +1074,7 @@
             this.pd_custprodspec.HeaderText = "客户型号";
             this.pd_custprodspec.Name = "pd_custprodspec";
             this.pd_custprodspec.ReadOnly = true;
-            this.pd_custprodspec.Width = 151;
+            this.pd_custprodspec.Width = 78;
             // 
             // pib_brand
             // 
@@ -1108,14 +1082,14 @@
             this.pib_brand.HeaderText = "品牌";
             this.pib_brand.Name = "pib_brand";
             this.pib_brand.ReadOnly = true;
-            this.pib_brand.Width = 103;
+            this.pib_brand.Width = 54;
             // 
             // pib_madein
             // 
             this.pib_madein.DataPropertyName = "pib_madein";
             this.pib_madein.HeaderText = "产地";
             this.pib_madein.Name = "pib_madein";
-            this.pib_madein.Width = 103;
+            this.pib_madein.Width = 54;
             // 
             // pr_zxbzs
             // 
@@ -1138,14 +1112,14 @@
             this.pib_lotno.DataPropertyName = "pib_lotno";
             this.pib_lotno.HeaderText = "LotNo";
             this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 115;
+            this.pib_lotno.Width = 60;
             // 
             // pib_datecode
             // 
             this.pib_datecode.DataPropertyName = "pib_datecode";
             this.pib_datecode.HeaderText = "DC";
             this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 79;
+            this.pib_datecode.Width = 42;
             // 
             // pib_qty
             // 
@@ -1154,15 +1128,14 @@
             this.pib_qty.MinimumWidth = 100;
             this.pib_qty.Name = "pib_qty";
             this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 103;
             // 
             // pi_invoicecode
             // 
             this.pi_invoicecode.ID = null;
-            this.pi_invoicecode.Location = new System.Drawing.Point(152, 20);
-            this.pi_invoicecode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.pi_invoicecode.Location = new System.Drawing.Point(76, 10);
+            this.pi_invoicecode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pi_invoicecode.Name = "pi_invoicecode";
-            this.pi_invoicecode.Size = new System.Drawing.Size(296, 35);
+            this.pi_invoicecode.Size = new System.Drawing.Size(150, 21);
             this.pi_invoicecode.Str = null;
             this.pi_invoicecode.Str1 = null;
             this.pi_invoicecode.Str2 = null;
@@ -1173,10 +1146,9 @@
             // 
             this.cu_needrecheck.AutoSize = true;
             this.cu_needrecheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cu_needrecheck.Location = new System.Drawing.Point(1407, 240);
-            this.cu_needrecheck.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.cu_needrecheck.Location = new System.Drawing.Point(704, 120);
             this.cu_needrecheck.Name = "cu_needrecheck";
-            this.cu_needrecheck.Size = new System.Drawing.Size(0, 36);
+            this.cu_needrecheck.Size = new System.Drawing.Size(0, 20);
             this.cu_needrecheck.TabIndex = 95;
             this.cu_needrecheck.Visible = false;
             // 
@@ -1184,10 +1156,9 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(6, 80);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Location = new System.Drawing.Point(3, 40);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(127, 36);
+            this.label4.Size = new System.Drawing.Size(65, 20);
             this.label4.TabIndex = 96;
             this.label4.Text = "出货单号";
             // 
@@ -1195,10 +1166,9 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(486, 134);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Location = new System.Drawing.Point(243, 67);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(127, 36);
+            this.label5.Size = new System.Drawing.Size(65, 20);
             this.label5.TabIndex = 97;
             this.label5.Text = "是否复核";
             // 
@@ -1206,18 +1176,17 @@
             // 
             this.needcheck.AutoSize = true;
             this.needcheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.needcheck.Location = new System.Drawing.Point(612, 134);
-            this.needcheck.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.needcheck.Location = new System.Drawing.Point(306, 67);
             this.needcheck.Name = "needcheck";
-            this.needcheck.Size = new System.Drawing.Size(0, 36);
+            this.needcheck.Size = new System.Drawing.Size(0, 20);
             this.needcheck.TabIndex = 98;
             // 
             // UAS_出货标签打印
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
-            this.ClientSize = new System.Drawing.Size(2024, 1418);
+            this.ClientSize = new System.Drawing.Size(1305, 710);
             this.Controls.Add(this.needcheck);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.label4);
@@ -1259,7 +1228,7 @@
             this.Controls.Add(this.pi_invoicecode);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "UAS_出货标签打印";
             this.Text = " UAS-出货标签管理";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;

+ 27 - 47
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -97,10 +97,10 @@ namespace UAS_LabelMachine
             dh = SystemInf.dh;
             CheckForIllegalCrossThreadCalls = false;
             CloumnCount = LabelInf.Columns.Count;
-            pi_invoicecode.Focus();
+            pi_inoutno.Focus();
             //将本地读取的打印机设置进Combox,并选中默认打印机
             sg_brand.FormName = Name;
-            sg_brand.SetValueField = new string[] { "sg_brand", "sg_code" };
+            sg_brand.SetValueField = new string[] { "sg_brand" };
             sg_brand.SelectField = "sg_code # 策略编号 ,sg_name # 策略名称,sg_brand # 品牌,sg_separator # 分隔符";
             sg_brand.TableName = "scangroup";
             sg_brand.DbChange += Sg_brand_DbChange;
@@ -170,26 +170,6 @@ namespace UAS_LabelMachine
         {
         }
 
-        /// <summary>
-        /// 刷新采集进度
-        /// </summary>
-        private void RefreshProcessData()
-        {
-            if (LabelInf.Rows.Count > 0)
-            {
-                //设置初始化的采集进度
-                int Count = 0;
-                //未超出当前范围的时候
-                for (int i = 0; i < LabelInf.RowCount; i++)
-                {
-                    if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() == "True")
-                        Count++;
-                }
-                //设置当前的箱号和盒号
-                CollectedCount.Text = Count.ToString();
-            }
-        }
-
         /// <summary>
         /// 保存明细
         /// </summary>
@@ -202,6 +182,7 @@ namespace UAS_LabelMachine
             {
                 MidSource.EndEdit();
                 dh.SaveDataTable(savedt.GetChanges(), "ProdioBarCode", "pib_id");
+                CheckRecheckStatus();
                 MessageBox.Show("保存成功!");
             }
         }
@@ -213,7 +194,7 @@ namespace UAS_LabelMachine
             DataTable dt = (DataTable)dh.ExecuteSql("select si_item,si_detno,sg_separator,si_kind,si_expression,si_expressionitem,si_index,si_indexstring,si_length from scanitem left join scangroup on si_sgid=sg_id where sg_brand='" + sg_brand.Text + "' and si_enable<>0 order by si_detno,si_innerdetno", "select");
             if (dt.Rows.Count == 0)
             {
-                dt = (DataTable)dh.ExecuteSql("select si_item,si_detno,sg_separator,si_kind,si_expression,si_expressionitem,si_index,si_indexstring,si_length from scanitem left join scangroup on si_sgid=sg_id where nvl(sg_brand,' ')=' ' and sg_code='" + sg_code.Text + "' and si_enable<>0 order by si_detno,si_innerdetno", "select");
+                dt = (DataTable)dh.ExecuteSql("select si_item,si_detno,sg_separator,si_kind,si_expression,si_expressionitem,si_index,si_indexstring,si_length from scanitem left join scangroup on si_sgid=sg_id where nvl(sg_brand,' ')=' ' and si_enable<>0 order by si_detno,si_innerdetno", "select");
             }
             BaseUtil.FillDgvWithDataTable(Si_ItemDGV, dt);
             if (dt.Rows.Count > 0)
@@ -311,6 +292,8 @@ namespace UAS_LabelMachine
                 for (int j = 0; j < arr.Length; j++)
                 {
                     string orispeccode = LabelInf.Rows[i].Cells["pr_orispeccode"].Value.ToString();
+                    Console.WriteLine((MatchStr(arr[j].ToString(), "MPN")));
+                    Console.WriteLine(MatchStr(arr[j].ToString(), "MPN").Trim().Replace(" ", ""));
                     if ((MatchStr(arr[j].ToString(), "MPN").Contains(orispeccode) || MatchStr(arr[j].ToString(), "MPN").Trim().Replace(" ", "").Contains(orispeccode) || orispeccode == MatchStr(arr[j].ToString(), "MPN") || LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString() == MatchStr(arr[j].ToString(), "CPN")) && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
                     {
                         CurrentRowIndex = i;
@@ -434,8 +417,7 @@ namespace UAS_LabelMachine
                     string pib_id = LabelInf.Rows[CurrentRowIndex].Cells["pib_id1"].Value.ToString();
                     ErrorType.Clear();
                     dh.ExecuteSql("update prodiobarcode set pib_datecode='" + datecode + "',pib_lotno='" + lotno + "',pib_ifpick=-1 where pib_id='" + pib_id + "'", "update");
-                    UpdateCustomer();
-                    RefreshProcessData();
+                    CheckRecheckStatus();
                     LabelInf.Invalidate();
                 }
                 //采集未通过的时候
@@ -541,6 +523,7 @@ namespace UAS_LabelMachine
                             if (cell.Value.ToString() == Matchstr || Matchstr.Trim().Replace(" ", "").Contains(cell.Value.ToString()) || Matchstr.Contains(cell.Value.ToString()))
                             {
                                 ErrorType.Add("OK_MPN");
+                                BaseUtil.PlaySound("OK.wav");
                                 LabelInf.Refresh();
                                 CollectVeProdCodePass = true;
                             }
@@ -548,6 +531,7 @@ namespace UAS_LabelMachine
                             {
                                 ErrorType.Add("NG_MPN");
                                 CollectVeProdCodePass = false;
+                                BaseUtil.PlaySound("NG.wav");
                                 //添加需要重绘的Cell
                                 LabelInf.Refresh();
                                 MessageLog.AppendText(">>供应商物料编号不匹配\n", Color.Red);
@@ -580,6 +564,7 @@ namespace UAS_LabelMachine
                             if (cell.Value.ToString() != Matchstr)
                             {
                                 ErrorType.Add("NG_CPN");
+                                BaseUtil.PlaySound("NG.wav");
                                 CollectQTYPass = false;
                                 LabelInf.Refresh();
                                 MessageLog.AppendText(">>CPN不匹配\n", Color.Red);
@@ -587,6 +572,7 @@ namespace UAS_LabelMachine
                             else
                             {
                                 ErrorType.Add("OK_CPN");
+                                BaseUtil.PlaySound("OK.wav");
                                 LabelInf.Refresh();
                                 CollectQTYPass = true;
                             }
@@ -727,15 +713,13 @@ namespace UAS_LabelMachine
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date,pi_inoutno,case when nvl(cu_needrecheck,0)=0 then '否' else '是' end needcheck,nvl(cu_needrecheck,0)cu_needrecheck from prodinout left join customer on pi_cardcode=cu_code where pi_invoicecode='" + pi_invoicecode.Text + "' ");
+                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date,nvl(cu_needrecheck,0)cu_needrecheck from prodinout left join customer on cu_code=pi_cardcode where pi_inoutno='" + pi_inoutno.Text + "' ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 ErrorType.Clear();
                 if (dt.Rows.Count > 0)
                 {
-                    needcheck.Text = dt.Rows[0]["needcheck"].ToString();
                     cu_code.Text = dt.Rows[0]["pi_cardcode"].ToString();
                     cu_needrecheck.Text = dt.Rows[0]["cu_needrecheck"].ToString();
-                    pi_inoutno.Text = dt.Rows[0]["pi_inoutno"].ToString();
                     pi_date.Text = dt.Rows[0]["pi_date"].ToString();
                     PI_ID = dt.Rows[0]["pi_id"].ToString();
                     dt = (DataTable)dh.ExecuteSql("select 1 from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'", "select");
@@ -746,7 +730,6 @@ namespace UAS_LabelMachine
                         dh.CallProcedure("GetCustBarcode", param);
                     }
                     LoadGridData(sender, e);
-                    RefreshProcessData();
                     //设置当前的最大箱号
                     CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
@@ -1040,10 +1023,10 @@ namespace UAS_LabelMachine
                         }
                     }
                 }
-                eh.ExportExcel(dt, ExportFileDialog.SelectedPath, pi_date.Text + "-" + pi_invoicecode.Text);
+                eh.ExportExcel(dt, ExportFileDialog.SelectedPath, pi_date.Text + "-" + pi_inoutno.Text);
                 string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close.ToString() == "Yes")
-                    System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_date.Text + "-" + pi_invoicecode.Text + ".xls");
+                    System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_date.Text + "-" + pi_inoutno.Text + ".xls");
             }
         }
 
@@ -1057,42 +1040,39 @@ namespace UAS_LabelMachine
             }
         }
 
-        private void AllCollect_Click(object sender, EventArgs e)
+        private void CollectAll_Click(object sender, EventArgs e)
         {
-            int Count = 0;
+            int PickedCount = 0;
             for (int i = 0; i < LabelInf.Rows.Count; i++)
             {
                 if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
                 {
-                    for (int j = 0; j < LabelInf.Rows.Count; j++)
-                    {
-                        LabelInf.Rows[j].Cells["pib_ifpick"].Value = true;
-                    }
-                    break;
+                    LabelInf.Rows[i].Cells["pib_ifpick"].Value = true;
                 }
                 else
                 {
-                    Count = Count + 1;
+                    PickedCount = PickedCount + 1;
                 }
             }
-            if (Count == LabelInf.Rows.Count)
+            if (PickedCount == LabelInf.Rows.Count)
             {
-                for (int j = 0; j < LabelInf.Rows.Count; j++)
+                for (int i = 0; i < LabelInf.Rows.Count; i++)
                 {
-                    LabelInf.Rows[j].Cells["pib_ifpick"].Value = false;
+                    LabelInf.Rows[i].Cells["pib_ifpick"].Value = false;
                 }
             }
-            RefreshProcessData();
         }
 
-        private void UpdateCustomer()
+        private void CheckRecheckStatus()
         {
             if (cu_needrecheck.Text == "0")
             {
                 dh.ExecuteSql("update customer set cu_needrecheck=-1 where cu_code='" + cu_code.Text + "'", "update");
-                cu_needrecheck.Text = "-1";
-                needcheck.Text = "是";
-;            }
+            }
+            if (dh.getRowCount("prodiobarcode", "nvl(pib_ifpick,0)<>0 and pib_inoutno='" + pi_inoutno.Text + "'") == LabelInf.Rows.Count)
+            {
+                dh.ExecuteSql("update prodinout set pi_recheckstatus='已复核' where pi_inoutno='" + pi_inoutno.Text + "'", "update");
+            }
         }
     }
 }

+ 72 - 11
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -88,6 +88,7 @@ namespace UAS_LabelMachine
         //当前的物料品牌
         string CurrentBrand = "";
 
+        string NrCode = "";
         string Prefix = "";
         string Suffix = "";
         int MaxNum = 0;
@@ -404,7 +405,7 @@ namespace UAS_LabelMachine
             }
             catch (Exception)
             {
-                dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + 1) + "'", "rmn_nrcode='" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "' and rmn_prefix='" + Prefix + "'");
+                dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + 1) + "'", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and rmn_prefix='" + Prefix + "' and rmn_type='" + ReSetType + "'");
                 CollectInputData();
                 return;
             }
@@ -601,7 +602,7 @@ namespace UAS_LabelMachine
                 LoadCheck = true;
                 Input.Clear();
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,pi_combine_user,pi_title,to_char(pi_date,'yyyymmdd')pi_date,nvl(pi_combine_user,0)pi_combine_user from prodinout where pi_inoutno='" + pi_inoutno.Text + "' /*and pi_invostatuscode='AUDITED'*/");
+                sql.Append("select pi_id,pi_cardcode,pi_combine_user,pi_title,to_char(pi_date,'yyyymmdd')pi_date,nvl(pi_combine_user,0)pi_combine_user from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_invostatuscode='AUDITED'");
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -1261,7 +1262,7 @@ namespace UAS_LabelMachine
             }
             sql.Append(" order by to_number(pib_outboxcode2),pib_id,pd_prodcode");
             LabelInfDataTable = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            BoxCount.Text = LabelInfDataTable.Compute("sum(pib_qty)", "1=1").ToString()+"KPCS";
+            BoxCount.Text = LabelInfDataTable.Compute("sum(pib_qty)", "1=1").ToString() + "KPCS";
             bindingsource(LabelInf, LabelInfDataTable);
             if (LabelInf.Rows.Count > 0)
             {
@@ -1582,6 +1583,7 @@ namespace UAS_LabelMachine
                 OutBoxNum.Text = OutBox;
         }
 
+        string ReSetType = "";
         /// <summary>
         /// 获取条码规则
         /// </summary>
@@ -1596,22 +1598,70 @@ namespace UAS_LabelMachine
             //获取编码规则
             Prefix = "";
             Suffix = "";
+            NrCode = "";
             MaxNum = 0;
             SerialNumLength = 0;
             Radix = 0;
-            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode='" + pi_cardcode.Text + "'  order by nrd_detno", "select");
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nvl(nr_resettype,' ')nr_resettype,nr_sharerule,nr_code,nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode='" + pi_cardcode.Text + "'  order by nrd_detno", "select");
             //如果没有则取公共规则
             if (Nr.Rows.Count == 0)
-                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode is null  and nr_isdefault <> 0 order by nrd_detno", "select");
+                Nr = (DataTable)dh.ExecuteSql("select nvl(nr_resettype,' ')nr_resettype,nr_sharerule,nr_code,nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode is null  and nr_isdefault <> 0 order by nrd_detno", "select");
             //用于过滤参数的正则表达式
+            ReSetType = "";
+            if (Nr.Rows.Count > 0)
+            {
+                string ShareRule = Nr.Rows[0]["nr_sharerule"].ToString();
+                DataTable dt1 = (DataTable)dh.ExecuteSql("select nvl(nr_resettype,' ')nr_resettype,nr_sharerule,nr_code,nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + ShareRule + "' order by nrd_detno", "select");
+                if (dt1.Rows.Count > 0)
+                {
+                    Nr = dt1;
+                }
+                else
+                {
+                    if (ShareRule != "")
+                    {
+                        MessageBox.Show("共享规则" + ShareRule + "不存在");
+                        return;
+                    }
+                }
+            }
+            if (Nr.Rows.Count > 0)
+            {
+                switch (Nr.Rows[0]["nr_resettype"].ToString())
+                {
+                    case "Year":
+                        sql.Clear();
+                        sql.Append("to_char(sysdate,'yyyy')");
+                        break;
+                    case "Month":
+                        sql.Clear();
+                        sql.Append("to_char(sysdate,'yyyyMM')");
+                        break;
+                    case "Week":
+                        sql.Clear();
+                        sql.Append("to_char(sysdate,'yyyyiw')");
+                        break;
+                    case "Day":
+                        sql.Clear();
+                        sql.Append("to_char(sysdate,'yyyyMMdd')");
+                        break;
+                    case " ":
+                        sql.Clear();
+                        sql.Append("' '");
+                        break;
+                    default:
+                        break;
+                }
+                ReSetType = dh.getFieldDataByCondition("dual", sql.ToString(), "1=1").ToString();
+            }
             Regex match = new Regex("{\\w+}");
             //用于存放每一项的明细的数据
             string[] NrData = new string[Nr.Rows.Count];
             //流水长度
             Dictionary<int, string> NrDic = new Dictionary<int, string>();
-            Prefix = "";
             for (int m = 0; m < Nr.Rows.Count; m++)
             {
+                NrCode = Nr.Rows[m]["nr_code"].ToString();
                 switch (Nr.Rows[m]["nrd_type"].ToString())
                 {
                     //常量直接进行拼接
@@ -1645,17 +1695,26 @@ namespace UAS_LabelMachine
                         break;
                     //流水需要通过MaxNumber去取
                     case "流水":
-                        string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "' and rmn_prefix='" + Prefix + "'").ToString();
+                        string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and rmn_prefix='" + Prefix + "' and nvl(rmn_type,' ')='" + ReSetType + "'").ToString();
                         //设置当前流水
                         if (maxnum == "")
                         {
-                            dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "','" + Prefix + "','" + Count + "')", "insert");
-                            MaxNum = 1;
+                            maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and nvl(rmn_type,' ')='" + ReSetType + "'").ToString();
+                            if (maxnum != "")
+                            {
+                                Count = int.Parse(maxnum) + Count;
+                            }
+                            else
+                            {
+                                maxnum = "1";
+                            }
+                            dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber,rmn_type) values(RuleMaxNum_seq.nextval,'" + (NrCode == "" ? "Default" : NrCode) + "','" + Prefix + "','" + Count + "','" + ReSetType + "')", "insert");
+                            MaxNum = int.Parse(maxnum);
                         }
                         else
                         {
                             MaxNum = int.Parse(maxnum);
-                            dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + Count) + "'", "rmn_nrcode='" + (pi_cardcode.Text == "" ? "Default" : pi_cardcode.Text) + "' and rmn_prefix='" + Prefix + "'");
+                            dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + Count) + "'", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and rmn_prefix='" + Prefix + "' and rmn_type='" + ReSetType + "'");
                         }
                         SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
                         Radix = int.Parse(Nr.Rows[m]["nrd_radix"].ToString());
@@ -1838,12 +1897,14 @@ namespace UAS_LabelMachine
                             string FWhcode = LabelInf.Rows[i].Cells["pib_brand"].Value.ToString();
                             string FDC = LabelInf.Rows[i].Cells["pib_datecode"].Value.ToString();
                             string FLOTNO = LabelInf.Rows[i].Cells["pib_lotno"].Value.ToString();
+                            string FPDCustProdCode = LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString();
                             string BPrcode = LabelInf.Rows[i + 1].Cells["pib_prodcode"].Value.ToString();
                             string BPocode = LabelInf.Rows[i + 1].Cells["pd_pocode"].Value.ToString();
                             string BWhcode = LabelInf.Rows[i + 1].Cells["pib_brand"].Value.ToString();
                             string BDC = LabelInf.Rows[i + 1].Cells["pib_datecode"].Value.ToString();
                             string BLOTNO = LabelInf.Rows[i + 1].Cells["pib_lotno"].Value.ToString();
-                            if (FPrcode != BPrcode || FPocode != BPocode || FWhcode != BWhcode || (DiffDC.Checked && FDC != BDC) || (DiffLotNo.Checked && FLOTNO != BLOTNO))
+                            string BPDCustProdCode = LabelInf.Rows[i + 1].Cells["pd_custprodcode"].Value.ToString();
+                            if (FPDCustProdCode != BPDCustProdCode || FPrcode != BPrcode || FPocode != BPocode || FWhcode != BWhcode || (DiffDC.Checked && FDC != BDC) || (DiffLotNo.Checked && FLOTNO != BLOTNO))
                             {
                                 GetNumCount = GetNumCount + 1;
                             }

+ 10 - 2
UAS-出货标签管理(贸易版)/PublicMethod/Print.cs

@@ -109,7 +109,7 @@ namespace UAS_LabelMachine.PublicMethod
                 MidDoc.PrintDocument();
             }
 
-            public static void OutPrint(Document OutBoxDoc, DataTable OutLabelParam, string pi_inoutno, string pib_id, string pib_outboxcode2, bool iCustProdCode, bool iCustPo, bool iDC, bool iLotNo)
+            public static void OutPrint(Document OutBoxDoc, DataTable OutLabelParam, string pi_inoutno, string pib_id, string pib_outboxcode2, bool iCustProdCode, bool iCustPo, bool iDC, bool iLotNo, bool iOrderCode)
             {
                 StringBuilder sql = new StringBuilder();
                 sql.Clear();
@@ -139,6 +139,10 @@ namespace UAS_LabelMachine.PublicMethod
                 {
                     GroupByCondition += "pib_lotno,";
                 }
+                if (iOrderCode)
+                {
+                    GroupByCondition += "pd_ordercode,";
+                }
                 if (iCustProdCode || iCustPo || iDC || iLotNo)
                 {
                     GroupByCondition = " group by " + (GroupByCondition.Substring(0, GroupByCondition.Length - 1));
@@ -322,7 +326,7 @@ namespace UAS_LabelMachine.PublicMethod
                 MidFormat.Print();
             }
 
-            public static void OutPrint(LabelFormatDocument OutFormat, DataTable OutLabelParam, string pi_inoutno, string pib_id, string pib_outboxcode2, bool iCustProdCode, bool iCustPo, bool iDC, bool iLotNo)
+            public static void OutPrint(LabelFormatDocument OutFormat, DataTable OutLabelParam, string pi_inoutno, string pib_id, string pib_outboxcode2, bool iCustProdCode, bool iCustPo, bool iDC, bool iLotNo, bool iOrderCode)
             {
                 StringBuilder sql = new StringBuilder();
                 sql.Clear();
@@ -352,6 +356,10 @@ namespace UAS_LabelMachine.PublicMethod
                 {
                     GroupByCondition += "pib_lotno,";
                 }
+                if (iOrderCode)
+                {
+                    GroupByCondition += "pd_ordercode,";
+                }
                 if (iCustProdCode || iCustPo || iDC || iLotNo)
                 {
                     GroupByCondition = " group by " + (GroupByCondition.Substring(0, GroupByCondition.Length - 1));

File diff suppressed because it is too large
+ 334 - 287
UAS-出货标签管理(贸易版)/UAS_出货标签管理.Designer.cs


+ 92 - 21
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -1127,6 +1127,8 @@ namespace UAS_LabelMachine
                         string[] param = new string[] { PI_ID, "" };
                         dh.CallProcedure("GetCustBarcode", ref param);
                     }
+                    CurrentItemIndex = 0;
+                    CurrentRowIndex = 0;
                     LoadGridData(sender, e);
                     //重新输入单号后清除缓存
                     MidBoxArgument.Clear();
@@ -1152,7 +1154,6 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(stw);
                     stw.ShowDialog();
                     //重置采集项次
-                    CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
                 else
@@ -1300,7 +1301,6 @@ namespace UAS_LabelMachine
 
         private void MidBoxLabelPrint()
         {
-            //未输入内容打印全部中盒
             if (MidLabelNum.Text == "")
             {
                 int begin = 0;
@@ -1318,13 +1318,17 @@ namespace UAS_LabelMachine
                             //设置中盒打印范围的行号
                             for (int i = 0; i < LabelInf.Rows.Count; i++)
                             {
-                                if (int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()) == begin)
+                                string outboxcode1 = LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString();
+                                if (outboxcode1 != "")
                                 {
-                                    begin = i;
-                                }
-                                if (int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()) == end)
-                                {
-                                    end = i;
+                                    if (int.Parse(outboxcode1) == begin)
+                                    {
+                                        begin = i;
+                                    }
+                                    if (int.Parse(outboxcode1) == end)
+                                    {
+                                        end = i;
+                                    }
                                 }
                             }
                         }
@@ -1349,12 +1353,16 @@ namespace UAS_LabelMachine
                 List<int> MidOutBoxCodeIndex = new List<int>();
                 for (int i = (begin == 0 ? 0 : begin); i <= (end - begin); i++)
                 {
-                    if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
-                        MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                    if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
+                    string outboxcode1 = LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString();
+                    if (outboxcode1 != "")
                     {
-                        MidOutBoxCode.Add(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()));
-                        MidOutBoxCodeIndex.Add(i);
+                        if (!MidIDAndOutboxcode.ContainsValue(outboxcode1))
+                            MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), outboxcode1);
+                        if (!MidOutBoxCode.Contains(int.Parse(outboxcode1)))
+                        {
+                            MidOutBoxCode.Add(int.Parse(outboxcode1));
+                            MidOutBoxCodeIndex.Add(i);
+                        }
                     }
                 }
                 for (int i = 0; i < MidOutBoxCodeIndex.Count; i++)
@@ -1492,9 +1500,9 @@ namespace UAS_LabelMachine
             string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
             string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
             if (PrintMethod == "CodeSoft")
-                Print.CodeSoft.OutPrint(OutBoxDoc, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked);
+                Print.CodeSoft.OutPrint(OutBoxDoc, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked, cu_print_ordercode.Checked);
             else
-                Print.BarTender.OutPrint(OutFormat, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked);
+                Print.BarTender.OutPrint(OutFormat, OutLabelParam, pi_inoutno.Text, pib_id, pib_outboxcode2, cu_print_outprod.Checked, cu_print_outpo.Checked, cu_print_outdc.Checked, cu_print_outlotno.Checked, cu_print_ordercode.Checked);
         }
 
         private void CleanDetail_Click(object sender, EventArgs e)
@@ -2515,6 +2523,10 @@ namespace UAS_LabelMachine
                 ArrayList<string> pib_custoutboxcode = new ArrayList<string>();
                 ArrayList<string> brand = new ArrayList<string>();
                 ArrayList<string> madein = new ArrayList<string>();
+                ArrayList<string> prdetail = new ArrayList<string>();
+                ArrayList<string> ordercode = new ArrayList<string>();
+                ArrayList<string> size = new ArrayList<string>();
+                ArrayList<string> weight = new ArrayList<string>();
                 //用于数量的校验
                 Dictionary<string, decimal> sumqty = new Dictionary<string, decimal>();
                 Dictionary<string, Dictionary<string, decimal>> outsumqty = new Dictionary<string, Dictionary<string, decimal>>();
@@ -2557,6 +2569,10 @@ namespace UAS_LabelMachine
                     string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim();
                     string 品牌 = dt.Rows[i]["品牌"].ToString().Trim();
                     string 产地 = dt.Rows[i]["产地"].ToString().Trim();
+                    string 尺寸 = dt.Rows[i]["尺寸"].ToString().Trim();
+                    string 重量 = dt.Rows[i]["重量"].ToString().Trim();
+                    string 产品名称 = dt.Rows[i]["产品名称"].ToString().Trim();
+                    string 订单编号 = dt.Rows[i]["订单编号"].ToString().Trim();
                     if (pr_spec.Trim() == "")
                     {
                         break;
@@ -2596,6 +2612,11 @@ namespace UAS_LabelMachine
                     {
                         LogicHandler.FilterData(cu_code.Text, dr[0]["pr_brand"].ToString(), pr_spec, qty, DateCode, LotNo, out pr_spec, out qty, out DateCode, out LotNo);
                     }
+                    if (dr.Length == 0)
+                    {
+                        MessageBox.Show("出货单" + pi_inoutno.Text + "不包含型号" + pr_spec);
+                        return;
+                    }
                     decimal outqty = decimal.Parse(Regex.Replace(qty, @"[^\d]*", ""));
                     for (int k = 0; k < dr.Length; k++)
                     {
@@ -2642,12 +2663,16 @@ namespace UAS_LabelMachine
                                 pib_inqty.Add(zxbzs);
                                 datecode.Add(DateCode);
                                 lotno.Add(LotNo);
-                                pdordercode.Add(pd_ordercode);
+                                pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                                 pdorderdetno.Add(pd_orderdetno);
                                 pdpdno.Add(pd_pdno);
                                 pdid.Add(pd_id);
                                 prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                                 madein.Add(产地 == "" ? pr_madein : 产地);
+                                size.Add(尺寸);
+                                weight.Add(重量);
+                                prdetail.Add(产品名称);
+                                ordercode.Add(订单编号);
                                 pdprodcode.Add(pd_prodcode);
                             }
                             custbarcode.Add(BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix));
@@ -2657,12 +2682,16 @@ namespace UAS_LabelMachine
                             piboutboxcode2.Add(pib_outboxcode2);
                             datecode.Add(DateCode);
                             lotno.Add(LotNo);
-                            pdordercode.Add(pd_ordercode);
+                            pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                             pdorderdetno.Add(pd_orderdetno);
                             pdpdno.Add(pd_pdno);
                             pdid.Add(pd_id);
                             prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                             madein.Add(产地 == "" ? pr_madein : 产地);
+                            size.Add(尺寸);
+                            weight.Add(重量);
+                            prdetail.Add(产品名称);
+                            ordercode.Add(订单编号);
                             pdprodcode.Add(pd_prodcode);
                         }
                         else
@@ -2677,12 +2706,15 @@ namespace UAS_LabelMachine
                                 piboutboxcode2.Add(pib_outboxcode2);
                                 datecode.Add(DateCode);
                                 lotno.Add(LotNo);
-                                pdordercode.Add(pd_ordercode);
+                                pdordercode.Add(订单编号 == "" ? pd_ordercode : 订单编号);
                                 pdorderdetno.Add(pd_orderdetno);
                                 pdpdno.Add(pd_pdno);
                                 pdid.Add(pd_id);
                                 prbrand.Add(品牌 == "" ? pr_brand : 品牌);
                                 madein.Add(产地 == "" ? pr_madein : 产地);
+                                size.Add(尺寸);
+                                weight.Add(重量);
+                                prdetail.Add(产品名称);
                                 pdprodcode.Add(pd_prodcode);
                             }
                         }
@@ -2738,10 +2770,10 @@ namespace UAS_LabelMachine
                         sql.Clear();
                         sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,pib_inman,PIB_INDATE,PIB_INOUTNO,PIB_PIID,pib_brand,PIB_BARCODE,PIB_PDNO,");
                         sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,pib_datecode,pib_lotno,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,pib_orderdetno,");
-                        sql.Append("pib_outboxcode2,pib_custbarcode,pib_custoutboxcode,pib_madein)values(prodiobarcode_seq.nextval,:pd_prodcode,'" + User.UserName + "',sysdate,");
+                        sql.Append("pib_outboxcode2,pib_custbarcode,pib_custoutboxcode,pib_madein,pib_size,pib_weight,pib_prdetail)values(prodiobarcode_seq.nextval,:pd_prodcode,'" + User.UserName + "',sysdate,");
                         sql.Append("'" + pi_inoutno.Text + "'," + PI_ID + ",:pr_brand,:barcode,:pd_pdno,:pd_id,'" + pi_class.Text + "',:pib_inqty,");
-                        sql.Append(":pib_datecode,:pib_lotno,0,-1,:pd_ordercode,:pd_orderdetno,:outboxcode,:custbarcode,:pib_custoutboxcode,:pib_madein)");
-                        dh.BatchInsert(sql.ToString(), new string[] { "pd_prodcode", "pr_brand", "barcode", "pd_pdno", "pd_id", "pib_inqty", "pib_datecode", "pib_lotno", "pd_ordercode", "pd_orderdetno", "outboxcode", "custbarcode", "pib_custoutboxcode", "pib_madein" }, pdprodcode.ToArray(), prbrand.ToArray(), barcode.ToArray(), pdpdno.ToArray(), pdid.ToArray(), pib_inqty.ToArray(), datecode.ToArray(), lotno.ToArray(), pdordercode.ToArray(), pdorderdetno.ToArray(), piboutboxcode2.ToArray(), custbarcode.ToArray(), custoutboxcode.ToArray(), madein.ToArray());
+                        sql.Append(":pib_datecode,:pib_lotno,0,-1,:pd_ordercode,:pd_orderdetno,:outboxcode,:custbarcode,:pib_custoutboxcode,:pib_madein,:pib_size,:pib_weight,:pib_prdetail)");
+                        dh.BatchInsert(sql.ToString(), new string[] { "pd_prodcode", "pr_brand", "barcode", "pd_pdno", "pd_id", "pib_inqty", "pib_datecode", "pib_lotno", "pd_ordercode", "pd_orderdetno", "outboxcode", "custbarcode", "pib_custoutboxcode", "pib_madein", "pib_size", "pib_weight", "pib_prdetail" }, pdprodcode.ToArray(), prbrand.ToArray(), barcode.ToArray(), pdpdno.ToArray(), pdid.ToArray(), pib_inqty.ToArray(), datecode.ToArray(), lotno.ToArray(), pdordercode.ToArray(), pdorderdetno.ToArray(), piboutboxcode2.ToArray(), custbarcode.ToArray(), custoutboxcode.ToArray(), madein.ToArray(), size.ToArray(), weight.ToArray(), prdetail.ToArray());
                         //更新流水
                         dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + NrCode + "' and rmn_prefix='" + Prefix + "'");
                         LoadGridData();
@@ -2870,5 +2902,44 @@ namespace UAS_LabelMachine
             sdh.ExecuteSql(SQL, "update");
             LoadGridData();
         }
+
+        private void GetMidBoxCode_Click(object sender, EventArgs e)
+        {
+            int BoxCode = 1;
+            int innerboxcount = 1;
+            for (int i = 0; i < LabelInf.Rows.Count; i++)
+            {
+                string midcapa = LabelInf.Rows[i].Cells["pr_midboxcapacity_user"].Value.ToString();
+                if (!(midcapa == "" || midcapa == "0"))
+                {
+                    //如果出现值为空或者0默认界面上填写的值
+                    MidBoxCapacity.Value = decimal.Parse((midcapa == "" || midcapa == "0") ? MidBoxCapacity.Value.ToString() : midcapa);
+                    LabelInf.Rows[i].Cells["pib_outboxcode1"].Value = BoxCode;
+                    if (i + 1 < LabelInf.Rows.Count)
+                    {
+                        if (innerboxcount == MidBoxCapacity.Value)
+                        {
+                            BoxCode = BoxCode + 1;
+                            innerboxcount = 1;
+                        }
+                        else if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() != LabelInf.Rows[i + 1].Cells["pib_prodcode"].Value.ToString())
+                        {
+                            BoxCode = BoxCode + 1;
+                            innerboxcount = 1;
+                        }
+                        else
+                        {
+                            innerboxcount = innerboxcount + 1;
+                        }
+                    }
+                }
+            }
+            sdh.BatchInsert("prodiobarcode", LabelInf.DataSource as DataTable);
+            DataTable dt1 = (DataTable)sdh.ExecuteSql("select pib_id,pib_outboxcode1,pib_outboxcode2,pib_custmidboxcode,pib_custoutboxcode,pib_lotno,pib_datecode,pib_ifupload,pib_ifpick,pib_ifprint from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' ", "select");
+            if (dt1.Rows.Count > 0)
+            {
+                dh.CallProcedure("sp_uploadbarcode", dt1);
+            }
+        }
     }
 }

+ 6 - 0
UAS-出货标签管理(贸易版)/UAS_出货标签管理.resx

@@ -153,6 +153,12 @@
   <metadata name="ImportExcel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>528, 17</value>
   </metadata>
+  <metadata name="pr_midboxcapacity_user.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_ordercode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 2 - 2
UAS-特殊解析规则/Analysis.cs → UAS_Analysis/Analysis.cs

@@ -1,10 +1,10 @@
 using System;
 
-namespace UAS_特殊解析规则
+namespace UAS_Analysis
 {
     public class Analysis
     {
-        /// <summary>
+        /// <summary> 
         /// Brand对应品牌,item对应DateCode,LotNo等,Data对应具体解析的数据
         /// </summary>
         /// <param name="Brand"></param>

+ 0 - 0
UAS-特殊解析规则/Properties/AssemblyInfo.cs → UAS_Analysis/Properties/AssemblyInfo.cs


+ 0 - 0
UAS-特殊解析规则/UAS-特殊解析规则.csproj → UAS_Analysis/UAS-Analysis.csproj


Some files were not shown because too many files changed in this diff