فهرست منبع

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

caosy 6 سال پیش
والد
کامیت
6c03cb0036

+ 51 - 36
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -94,6 +94,7 @@
             this.GetPDdata = new System.Windows.Forms.Button();
             this.Com = new System.IO.Ports.SerialPort(this.components);
             this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.CloseSerialPort = new System.Windows.Forms.Button();
             this.ConnectCom = new System.Windows.Forms.Button();
             this.ButtonWeigh = new System.Windows.Forms.Button();
             this.Weight = new System.Windows.Forms.Label();
@@ -181,7 +182,7 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.CloseSerialPort = new System.Windows.Forms.Button();
+            this.DiffCPN = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -767,11 +768,23 @@
             this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
             this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(134, 155);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(148, 155);
             this.groupBoxWithBorder2.TabIndex = 113;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "称重";
             // 
+            // CloseSerialPort
+            // 
+            this.CloseSerialPort.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CloseSerialPort.Location = new System.Drawing.Point(74, 123);
+            this.CloseSerialPort.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CloseSerialPort.Name = "CloseSerialPort";
+            this.CloseSerialPort.Size = new System.Drawing.Size(55, 26);
+            this.CloseSerialPort.TabIndex = 115;
+            this.CloseSerialPort.Text = "关闭";
+            this.CloseSerialPort.UseVisualStyleBackColor = true;
+            this.CloseSerialPort.Click += new System.EventHandler(this.CloseSerialPort_Click);
+            // 
             // ConnectCom
             // 
             this.ConnectCom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -801,7 +814,7 @@
             this.Weight.AutoSize = true;
             this.Weight.Font = new System.Drawing.Font("微软雅黑", 30F);
             this.Weight.ForeColor = System.Drawing.Color.Red;
-            this.Weight.Location = new System.Drawing.Point(8, 33);
+            this.Weight.Location = new System.Drawing.Point(7, 32);
             this.Weight.Name = "Weight";
             this.Weight.Size = new System.Drawing.Size(0, 52);
             this.Weight.TabIndex = 113;
@@ -1036,7 +1049,7 @@
             // 
             this.label18.AutoSize = true;
             this.label18.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label18.Location = new System.Drawing.Point(67, 125);
+            this.label18.Location = new System.Drawing.Point(66, 124);
             this.label18.Name = "label18";
             this.label18.Size = new System.Drawing.Size(13, 17);
             this.label18.TabIndex = 90;
@@ -1070,7 +1083,7 @@
             // 
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label16.Location = new System.Drawing.Point(65, 61);
+            this.label16.Location = new System.Drawing.Point(64, 60);
             this.label16.Name = "label16";
             this.label16.Size = new System.Drawing.Size(13, 17);
             this.label16.TabIndex = 87;
@@ -1104,7 +1117,7 @@
             // 
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.Location = new System.Drawing.Point(9, 91);
+            this.label12.Location = new System.Drawing.Point(8, 90);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(56, 17);
             this.label12.TabIndex = 77;
@@ -1114,7 +1127,7 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(7, 29);
+            this.label7.Location = new System.Drawing.Point(6, 28);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(56, 17);
             this.label7.TabIndex = 76;
@@ -1169,7 +1182,7 @@
             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(1258, 346);
+            this.LabelInf.Size = new System.Drawing.Size(1272, 346);
             this.LabelInf.TabIndex = 27;
             this.LabelInf.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellClick);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
@@ -1421,7 +1434,7 @@
             // 
             this.SingleLabelPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.SingleLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrint.Location = new System.Drawing.Point(55, 177);
+            this.SingleLabelPrint.Location = new System.Drawing.Point(26, 176);
             this.SingleLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelPrint.Name = "SingleLabelPrint";
             this.SingleLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1436,7 +1449,7 @@
             this.SingleLabelAutoPrint.Checked = true;
             this.SingleLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.SingleLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(13, 97);
+            this.SingleLabelAutoPrint.Location = new System.Drawing.Point(12, 96);
             this.SingleLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelAutoPrint.Name = "SingleLabelAutoPrint";
             this.SingleLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1483,7 +1496,7 @@
             this.CurrentRowOnly.Checked = true;
             this.CurrentRowOnly.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CurrentRowOnly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CurrentRowOnly.Location = new System.Drawing.Point(85, 98);
+            this.CurrentRowOnly.Location = new System.Drawing.Point(84, 97);
             this.CurrentRowOnly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CurrentRowOnly.Name = "CurrentRowOnly";
             this.CurrentRowOnly.Size = new System.Drawing.Size(87, 21);
@@ -1509,7 +1522,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(9, 125);
+            this.label2.Location = new System.Drawing.Point(8, 124);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(32, 17);
             this.label2.TabIndex = 92;
@@ -1532,7 +1545,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(9, 157);
+            this.label5.Location = new System.Drawing.Point(8, 156);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1565,7 +1578,7 @@
             this.MidLabelAutoPrint.Checked = true;
             this.MidLabelAutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.MidLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelAutoPrint.Location = new System.Drawing.Point(7, 97);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(6, 96);
             this.MidLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelAutoPrint.Name = "MidLabelAutoPrint";
             this.MidLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1587,6 +1600,7 @@
             // 
             // OutBoxLabel
             // 
+            this.OutBoxLabel.Controls.Add(this.DiffCPN);
             this.OutBoxLabel.Controls.Add(this.BoxCount);
             this.OutBoxLabel.Controls.Add(this.DiffLotNo);
             this.OutBoxLabel.Controls.Add(this.DiffDC);
@@ -1606,7 +1620,7 @@
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2);
-            this.OutBoxLabel.Size = new System.Drawing.Size(188, 211);
+            this.OutBoxLabel.Size = new System.Drawing.Size(202, 211);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
@@ -1615,7 +1629,7 @@
             // 
             this.BoxCount.AutoSize = true;
             this.BoxCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BoxCount.Location = new System.Drawing.Point(8, 183);
+            this.BoxCount.Location = new System.Drawing.Point(7, 182);
             this.BoxCount.Name = "BoxCount";
             this.BoxCount.Size = new System.Drawing.Size(0, 17);
             this.BoxCount.TabIndex = 97;
@@ -1624,7 +1638,7 @@
             // 
             this.DiffLotNo.AutoSize = true;
             this.DiffLotNo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffLotNo.Location = new System.Drawing.Point(117, 149);
+            this.DiffLotNo.Location = new System.Drawing.Point(125, 148);
             this.DiffLotNo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffLotNo.Name = "DiffLotNo";
             this.DiffLotNo.Size = new System.Drawing.Size(67, 21);
@@ -1636,7 +1650,7 @@
             // 
             this.DiffDC.AutoSize = true;
             this.DiffDC.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.DiffDC.Location = new System.Drawing.Point(117, 122);
+            this.DiffDC.Location = new System.Drawing.Point(125, 121);
             this.DiffDC.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.DiffDC.Name = "DiffDC";
             this.DiffDC.Size = new System.Drawing.Size(68, 21);
@@ -1648,7 +1662,7 @@
             // 
             this.OnlyOneRow.AutoSize = true;
             this.OnlyOneRow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OnlyOneRow.Location = new System.Drawing.Point(117, 97);
+            this.OnlyOneRow.Location = new System.Drawing.Point(125, 96);
             this.OnlyOneRow.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OnlyOneRow.Name = "OnlyOneRow";
             this.OnlyOneRow.Size = new System.Drawing.Size(63, 21);
@@ -1660,7 +1674,7 @@
             // 
             this.AllLabel.AutoSize = true;
             this.AllLabel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllLabel.Location = new System.Drawing.Point(11, 97);
+            this.AllLabel.Location = new System.Drawing.Point(10, 96);
             this.AllLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllLabel.Name = "AllLabel";
             this.AllLabel.Size = new System.Drawing.Size(99, 21);
@@ -1671,7 +1685,7 @@
             // AddNewOutBox
             // 
             this.AddNewOutBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AddNewOutBox.Location = new System.Drawing.Point(61, 178);
+            this.AddNewOutBox.Location = new System.Drawing.Point(3, 178);
             this.AddNewOutBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AddNewOutBox.Name = "AddNewOutBox";
             this.AddNewOutBox.Size = new System.Drawing.Size(51, 26);
@@ -1683,7 +1697,7 @@
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(115, 9);
+            this.LogingOut.Location = new System.Drawing.Point(114, 8);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1710,7 +1724,7 @@
             // 
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(17, 154);
+            this.label10.Location = new System.Drawing.Point(16, 153);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1720,7 +1734,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(17, 125);
+            this.label6.Location = new System.Drawing.Point(16, 124);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1753,7 +1767,7 @@
             // OutBoxLabelPrint
             // 
             this.OutBoxLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelPrint.Location = new System.Drawing.Point(118, 178);
+            this.OutBoxLabelPrint.Location = new System.Drawing.Point(57, 178);
             this.OutBoxLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelPrint.Name = "OutBoxLabelPrint";
             this.OutBoxLabelPrint.Size = new System.Drawing.Size(67, 26);
@@ -1774,24 +1788,24 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // CloseSerialPort
+            // DiffCPN
             // 
-            this.CloseSerialPort.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CloseSerialPort.Location = new System.Drawing.Point(74, 123);
-            this.CloseSerialPort.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.CloseSerialPort.Name = "CloseSerialPort";
-            this.CloseSerialPort.Size = new System.Drawing.Size(55, 26);
-            this.CloseSerialPort.TabIndex = 115;
-            this.CloseSerialPort.Text = "关闭";
-            this.CloseSerialPort.UseVisualStyleBackColor = true;
-            this.CloseSerialPort.Click += new System.EventHandler(this.CloseSerialPort_Click);
+            this.DiffCPN.AutoSize = true;
+            this.DiffCPN.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DiffCPN.Location = new System.Drawing.Point(125, 177);
+            this.DiffCPN.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.DiffCPN.Name = "DiffCPN";
+            this.DiffCPN.Size = new System.Drawing.Size(76, 21);
+            this.DiffCPN.TabIndex = 98;
+            this.DiffCPN.Text = "区分CPN";
+            this.DiffCPN.UseVisualStyleBackColor = true;
             // 
             // UAS_出货标签打印
             // 
             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(1261, 731);
+            this.ClientSize = new System.Drawing.Size(1275, 731);
             this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.GetPDdata);
             this.Controls.Add(this.Reset);
@@ -2016,5 +2030,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec1;
         private System.Windows.Forms.Label BoxCount;
         private System.Windows.Forms.Button CloseSerialPort;
+        private System.Windows.Forms.CheckBox DiffCPN;
     }
 }

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

@@ -1932,12 +1932,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 ((DiffCPN.Checked && FPDCustProdCode != BPDCustProdCode) || FPrcode != BPrcode || FPocode != BPocode || FWhcode != BWhcode || (DiffDC.Checked && FDC != BDC) || (DiffLotNo.Checked && FLOTNO != BLOTNO))
                             {
                                 MaxNum = MaxNum + 1;
                             }

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

@@ -14,6 +14,26 @@ namespace UAS_LabelMachine
     {
         DataHelper dh = SystemInf.dh;
 
+        /// <summary>
+        /// 导出Excel,返回文件在客户端的路径
+        /// </summary>
+        public string ExportExcel(DataTable dt, string FolderPath, string FileName)
+        {
+            //创建一个内存流,用来接收转换成Excel的内容
+            MemoryStream ms;
+            ms = DataTableToExcel(dt);
+            //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
+            string filePath = @FolderPath + "\\" + FileName + ".xls";
+            FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
+            byte[] data = ms.ToArray();
+            fs.Write(data, 0, data.Length);
+            fs.Flush();
+            //释放当前Excel文件,否则打开文件的时候会显示文件被占用
+            ms.Dispose();
+            fs.Dispose();
+            return filePath;
+        }
+
         /// <summary>
         /// 导出Excel,返回文件在客户端的路径
         /// </summary>
@@ -361,7 +381,7 @@ namespace UAS_LabelMachine
                             First_Batch += DataTable.Rows[i]["扩散批号"].ToString() + " ";
                         }
                         //不包含Wafer_id
-                        if (DataTable.Columns.Contains("Wafer_ID") &&!First_WID.Contains(DataTable.Rows[i]["Wafer_ID"].ToString()))
+                        if (DataTable.Columns.Contains("Wafer_ID") && !First_WID.Contains(DataTable.Rows[i]["Wafer_ID"].ToString()))
                         {
                             First_WID.Add(DataTable.Rows[i]["Wafer_ID"].ToString());
                         }
@@ -375,7 +395,7 @@ namespace UAS_LabelMachine
                             dr["pd_ordercode"] = First_OrderCode;
                             dr["pr_spec"] = First_Prspec;
                             dr["ch_splitbatch"] = First_Batch;
-                            dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID," ");
+                            dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
                             dr["num"] = PageSize;
                             dr["io_qty"] = sumCount;
                             FirstDT.Rows.Add(dr);

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

@@ -91,7 +91,6 @@ namespace UAS_LabelMachine.PublicMethod
 
         public static void ImportExcel(string iMaster, string iFileName, string iPiID, string iInOutNo, string iCustCode)
         {
-
             switch (iMaster)
             {
                 //海创
@@ -101,6 +100,9 @@ namespace UAS_LabelMachine.PublicMethod
                 case "SZSI_TEST":
                     ImportExcel_SZSI(iFileName, iPiID, iInOutNo, iCustCode);
                     break;
+                case "SZSI":
+                    ImportExcel_SZSI(iFileName, iPiID, iInOutNo, iCustCode);
+                    break;
                 default:
                     break;
             }
@@ -180,7 +182,7 @@ namespace UAS_LabelMachine.PublicMethod
             Dictionary<string, Dictionary<string, decimal>> outsumqty = new Dictionary<string, Dictionary<string, decimal>>();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim();
+                string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim().ToUpper();
                 if (pr_spec.Trim() == "")
                 {
                     break;

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

@@ -2326,50 +2326,61 @@ namespace UAS_LabelMachine
                     break;
                 case "导出数据":
                     ExportExcel ex = new ExportExcel(pi_inoutno.Text);
-                    ex.StartPosition = FormStartPosition.CenterScreen;
-                    ex.ShowDialog();
-                    //ExportFileDialog.Description = "选择导出的路径";
-                    //result = ExportFileDialog.ShowDialog();
-                    //if (result == DialogResult.OK)
-                    //{
-                    //    ExcelHandler eh = new ExcelHandler();
-                    //    dt = ((DataTable)LabelInf.DataSource).Copy();
-                    //    for (int i = dt.Columns.Count - 1; i >= 0; i--)
-                    //    {
-                    //        for (int j = 0; j < LabelInf.Columns.Count; j++)
-                    //        {
-                    //            //去除ID列
-                    //            if (dt.Columns[i].ColumnName.ToLower().Contains("id") || dt.Columns[i].ColumnName.ToLower() == "pib_barcode" || dt.Columns[i].ColumnName.ToLower() == "pib_pdno" || dt.Columns[i].ColumnName.ToLower() == "pib_ifpick" || dt.Columns[i].ColumnName.ToLower() == "pib_ifprint" || dt.Columns[i].ColumnName.ToLower() == "pib_datecode1" || dt.Columns[i].ColumnName.ToLower() == "pr_vendprodcode")
-                    //            {
-                    //                dt.Columns.RemoveAt(i);
-                    //                break;
-                    //            }
-                    //            switch (dt.Columns[i].ColumnName.ToLower())
-                    //            {
-                    //                case "pib_lotno":
-                    //                    dt.Columns[i].ColumnName = "批次号";
-                    //                    break;
-                    //                case "pib_datecode":
-                    //                    dt.Columns[i].ColumnName = "生产日期";
-                    //                    break;
-                    //                case "pib_custbarcode":
-                    //                    dt.Columns[i].ColumnName = "最小产品包装条码";
-                    //                    break;
-                    //                default:
-                    //                    break;
-                    //            }
-                    //            if (dt.Columns[i].ColumnName.ToLower() == LabelInf.Columns[j].DataPropertyName.ToLower())
-                    //            {
-                    //                dt.Columns[i].ColumnName = LabelInf.Columns[j].HeaderText;
-                    //                break;
-                    //            }
-                    //        }
-                    //    }
-                    //    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_inoutno.Text + ".xls");
-                    //}
+                    switch (SystemInf.Master)
+                    {
+                        case "SZSI_TEST":
+                            ex.StartPosition = FormStartPosition.CenterScreen;
+                            ex.ShowDialog();
+                            break;
+                        case "SZSI":
+                            ex.StartPosition = FormStartPosition.CenterScreen;
+                            ex.ShowDialog();
+                            break;
+                        default:
+                            ExportFileDialog.Description = "选择导出的路径";
+                            result = ExportFileDialog.ShowDialog();
+                            if (result == DialogResult.OK)
+                            {
+                                ExcelHandler eh = new ExcelHandler();
+                                dt = ((DataTable)LabelInf.DataSource).Copy();
+                                for (int i = dt.Columns.Count - 1; i >= 0; i--)
+                                {
+                                    for (int j = 0; j < LabelInf.Columns.Count; j++)
+                                    {
+                                        //去除ID列
+                                        if (dt.Columns[i].ColumnName.ToLower().Contains("id") || dt.Columns[i].ColumnName.ToLower() == "pib_barcode" || dt.Columns[i].ColumnName.ToLower() == "pib_pdno" || dt.Columns[i].ColumnName.ToLower() == "pib_ifpick" || dt.Columns[i].ColumnName.ToLower() == "pib_ifprint" || dt.Columns[i].ColumnName.ToLower() == "pib_datecode1" || dt.Columns[i].ColumnName.ToLower() == "pr_vendprodcode")
+                                        {
+                                            dt.Columns.RemoveAt(i);
+                                            break;
+                                        }
+                                        switch (dt.Columns[i].ColumnName.ToLower())
+                                        {
+                                            case "pib_lotno":
+                                                dt.Columns[i].ColumnName = "批次号";
+                                                break;
+                                            case "pib_datecode":
+                                                dt.Columns[i].ColumnName = "生产日期";
+                                                break;
+                                            case "pib_custbarcode":
+                                                dt.Columns[i].ColumnName = "最小产品包装条码";
+                                                break;
+                                            default:
+                                                break;
+                                        }
+                                        if (dt.Columns[i].ColumnName.ToLower() == LabelInf.Columns[j].DataPropertyName.ToLower())
+                                        {
+                                            dt.Columns[i].ColumnName = LabelInf.Columns[j].HeaderText;
+                                            break;
+                                        }
+                                    }
+                                }
+                                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_inoutno.Text + ".xls");
+                            }
+                            break;
+                    }
                     break;
                 case "权限设置":
                     PowerSetting pw = new PowerSetting();