Browse Source

新工具提交

章政 6 năm trước cách đây
mục cha
commit
ac4616e049

+ 2 - 1
UAS-出货标签管理(贸易版)/CustomControl/BlurSearch.cs

@@ -2,12 +2,13 @@
 using System.Data;
 using System.Windows.Forms;
 using UAS_LabelMachine;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine.CustomControl
 {
     public partial class BlurSearch : UserControl
     {
-        DataHelper dh = new DataHelper();
+        DataHelper dh =SystemInf.dh;
 
         public delegate void OnTextChange(object sender, EventArgs e);
 

+ 5 - 4
UAS-出货标签管理(贸易版)/CustomControl/Pagination.cs

@@ -2,6 +2,7 @@
 using System.Data;
 using System.IO;
 using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine.CustomControl
 {
@@ -26,7 +27,7 @@ namespace UAS_LabelMachine.CustomControl
         {
             InitializeComponent();
             //鼠标经过控件的时候显示文字
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             toolTip1.SetToolTip(DownLoadTemplet, "下载模板");
             toolTip1.SetToolTip(UpLoadData, "上传数据");
             toolTip1.SetToolTip(ExportExcel, "导出数据");
@@ -170,7 +171,7 @@ namespace UAS_LabelMachine.CustomControl
         //刷新总页数
         private void RefreshTotalCount()
         {
-            DataHelper dh = new DataHelper();
+            DataHelper dh =SystemInf.dh;
             //获取记录的总行数
             if (Condition.Trim() != "")
             {
@@ -216,7 +217,7 @@ namespace UAS_LabelMachine.CustomControl
             {
                 DeleteID[i] = Dgv.SelectedRows[i].Cells[Table_ID].Value.ToString();
             }
-            DataHelper dh = new DataHelper();
+            DataHelper dh = SystemInf.dh;
             //取的配置的数据是从DataTable里面判断的,取的是固定字段的Dgv用第二种
             string tablename = TableName;
             if (TableName.Contains("join"))
@@ -245,7 +246,7 @@ namespace UAS_LabelMachine.CustomControl
         {
             //Data表示导出数据
             //Templet表示导出模板
-            DataHelper dh = new DataHelper();
+            DataHelper dh = SystemInf.dh;
             folderBrowserDialog1.Description = "选择导出的路径";
             DialogResult result = folderBrowserDialog1.ShowDialog();
             if (result == DialogResult.OK)

+ 2 - 1
UAS-出货标签管理(贸易版)/CustomControl/SearchTextBox.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Data;
 using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
 
 namespace UAS_LabelMachine.CustomControl
@@ -8,7 +9,7 @@ namespace UAS_LabelMachine.CustomControl
     public partial class SearchTextBox : UserControl
     {
 
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         #region 构造函数
         public SearchTextBox()

+ 19 - 19
UAS-出货标签管理(贸易版)/PublicMethod/DataHelper.cs

@@ -11,28 +11,28 @@ namespace UAS_LabelMachine
     public class DataHelper
     {
 
-        ////海创外网地址
-        //private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
-        ////海创ERP地址
-        //public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
-        ////海创FTP
-        //public static readonly string FTPAdress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
-        ////Oracle端口
-        //public static readonly string OraclePort = "1521";
-        ////需要显示的账套
-        //public static readonly string Masters = "HC_TEST";
-
-        //高登地址
-        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.238.39.179)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-        //高登ERP地址
-        public static readonly string ERPAddesss = "http://183.238.39.179:8099/ERP/";
-        //高登TP
-        //public static readonly string FTPAdress = "ftp://192.168.0.158:21|GOLDENMES|Admin1@#";
-        public static readonly string FTPAdress = "ftp://183.238.39.179:21|GOLDENMES|Admin1@#";
+        //海创外网地址
+        private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
+        //海创ERP地址
+        public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
+        //海创FTP
+        public static readonly string FTPAdress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
         //Oracle端口
         public static readonly string OraclePort = "1521";
         //需要显示的账套
-        public static readonly string Masters = "GOLDEN";
+        public static readonly string Masters = "HC_TEST";
+
+        ////高登地址
+        //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.238.39.179)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        ////高登ERP地址
+        //public static readonly string ERPAddesss = "http://183.238.39.179:8099/ERP/";
+        ////高登TP
+        ////public static readonly string FTPAdress = "ftp://192.168.0.158:21|GOLDENMES|Admin1@#";
+        //public static readonly string FTPAdress = "ftp://183.238.39.179:21|GOLDENMES|Admin1@#";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "GOLDEN";
 
         ////怡海能达外网地址
         //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";

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

@@ -1,15 +1,17 @@
 using System.IO;
 using System.Data;
-using System;
 using NPOI.HSSF.UserModel;
 using NPOI.SS.UserModel;
 using NPOI.HSSF.Util;
+using NPOI.XSSF.UserModel;
+using System;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine
 {
     class ExcelHandler
     {
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         /// <summary>
         /// 导出Excel,返回文件在客户端的路径
@@ -45,6 +47,119 @@ namespace UAS_LabelMachine
             }
         }
 
+        public static DataTable ExcelToDataTable(string filePath, bool isColumnName)
+        {
+            DataTable dataTable = null;
+            FileStream fs = null;
+            DataColumn column = null;
+            DataRow dataRow = null;
+            IWorkbook workbook = null;
+            ISheet sheet = null;
+            IRow row = null;
+            ICell cell = null;
+            int startRow = 0;
+            try
+            {
+                using (fs = File.OpenRead(filePath))
+                {
+                    // 2007版本
+                    if (filePath.IndexOf(".xlsx") > 0)
+                        workbook = new XSSFWorkbook(fs);
+                    // 2003版本
+                    else if (filePath.IndexOf(".xls") > 0)
+                        workbook = new HSSFWorkbook(fs);
+                    if (workbook != null)
+                    {
+                        sheet = workbook.GetSheetAt(0);//读取第一个sheet,当然也可以循环读取每个sheet
+                        dataTable = new DataTable();
+                        if (sheet != null)
+                        {
+                            int rowCount = sheet.LastRowNum;//总行数
+                            if (rowCount > 0)
+                            {
+                                IRow firstRow = sheet.GetRow(0);//第一行
+                                int cellCount = firstRow.LastCellNum;//列数
+
+                                //构建datatable的列
+                                if (isColumnName)
+                                {
+                                    startRow = 1;//如果第一行是列名,则从第二行开始读取
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        cell = firstRow.GetCell(i);
+                                        if (cell != null)
+                                        {
+                                            if (cell.StringCellValue != null)
+                                            {
+                                                column = new DataColumn(cell.StringCellValue);
+                                                dataTable.Columns.Add(column);
+                                            }
+                                        }
+                                    }
+                                }
+                                else
+                                {
+                                    for (int i = firstRow.FirstCellNum; i < cellCount; ++i)
+                                    {
+                                        column = new DataColumn("column" + (i + 1));
+                                        dataTable.Columns.Add(column);
+                                    }
+                                }
+
+                                //填充行
+                                for (int i = startRow; i <= rowCount; ++i)
+                                {
+                                    row = sheet.GetRow(i);
+                                    if (row == null) continue;
+
+                                    dataRow = dataTable.NewRow();
+                                    for (int j = row.FirstCellNum; j < cellCount; ++j)
+                                    {
+                                        cell = row.GetCell(j);
+                                        if (cell == null)
+                                        {
+                                            dataRow[j] = "";
+                                        }
+                                        else
+                                        {
+                                            //CellType(Unknown = -1,Numeric = 0,String = 1,Formula = 2,Blank = 3,Boolean = 4,Error = 5,)
+                                            switch (cell.CellType)
+                                            {
+                                                case CellType.Blank:
+                                                    dataRow[j] = "";
+                                                    break;
+                                                case CellType.Numeric:
+                                                    short format = cell.CellStyle.DataFormat;
+                                                    //对时间格式(2015.12.5、2015/12/5、2015-12-5等)的处理
+                                                    if (format == 14 || format == 31 || format == 57 || format == 58)
+                                                        dataRow[j] = cell.DateCellValue;
+                                                    else
+                                                        dataRow[j] = cell.NumericCellValue;
+                                                    break;
+                                                case CellType.String:
+                                                    dataRow[j] = cell.StringCellValue;
+                                                    break;
+                                            }
+                                        }
+                                    }
+                                    dataTable.Rows.Add(dataRow);
+                                }
+                            }
+                        }
+                    }
+                }
+                return dataTable;
+            }
+            catch (Exception)
+            {
+                if (fs != null)
+                {
+                    fs.Close();
+                }
+                return null;
+            }
+        }
+
         /// <summary>
         /// 将DataTable形式的数据转成Excel格式的,然后用字节流的形式写入文件
         /// </summary>
@@ -83,14 +198,14 @@ namespace UAS_LabelMachine
             //冻结第一行
             sheet.CreateFreezePane(0, 1, 0, 1);
             ICellStyle style = book.CreateCellStyle();
-            style.FillForegroundColor = HSSFColor.PALE_BLUE.index;
-            style.FillPattern = FillPatternType.BIG_SPOTS;
-            style.FillBackgroundColor = HSSFColor.LIGHT_GREEN.index;
+            style.FillForegroundColor = HSSFColor.PaleBlue.Index;
+            style.FillPattern = FillPattern.BigSpots;
+            style.FillBackgroundColor = HSSFColor.LightGreen.Index;
             //设置边框
-            style.BorderBottom = BorderStyle.THICK;
-            style.BorderLeft = BorderStyle.THICK;
-            style.BorderRight = BorderStyle.THICK;
-            style.BorderTop = BorderStyle.THICK;
+            style.BorderBottom = BorderStyle.Thick;
+            style.BorderLeft = BorderStyle.Thick;
+            style.BorderRight = BorderStyle.Thick;
+            style.BorderTop = BorderStyle.Thick;
             row.HeightInPoints = 20;
             //固定第一行
             //row.RowStyle.IsLocked=true;
@@ -99,8 +214,8 @@ namespace UAS_LabelMachine
             {
                 row.CreateCell(j);
                 row.Cells[j].CellStyle = style;
-                row.Cells[j].CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
-                row.Cells[j].CellStyle.Alignment = HorizontalAlignment.CENTER;
+                row.Cells[j].CellStyle.VerticalAlignment = VerticalAlignment.Center;
+                row.Cells[j].CellStyle.Alignment = HorizontalAlignment.Center;
                 row.Cells[j].SetCellValue(DataTable.Columns[j].ColumnName);
             }
             //将DataTable的值循环赋值给book,Aligment设置居中
@@ -113,7 +228,7 @@ namespace UAS_LabelMachine
                 {
                     row1.CreateCell(j);
                     row1.Cells[j].SetCellValue(DataTable.Rows[i][j].ToString());
-                    row1.GetCell(j).CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
+                    row1.GetCell(j).CellStyle.VerticalAlignment = VerticalAlignment.Center;
                 }
             }
             //将book的内容写入内存流中返回

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

@@ -13,7 +13,7 @@ namespace UAS_Labeling.PublicMethod
     /// </summary>
     class GlobalEventsHandler : IMessageFilter
     {
-        DataHelper dh;
+        DataHelper dh=SystemInf.dh;
         //鼠标左键点击
         public const int WM_LBUTTONDOWN = 0x0201;
         //键盘敲击事件
@@ -41,7 +41,6 @@ namespace UAS_Labeling.PublicMethod
         /// <returns></returns>
         private bool CheckPower(Control c)
         {
-            dh = new DataHelper();
             if (User.UserAccountType != "admin")
             {
                 if (dh.getRowCount("labelprintpower") > 0)

+ 12 - 0
UAS-出货标签管理(贸易版)/UAS-出货标签管理(贸易版).csproj

@@ -100,9 +100,21 @@
     <Reference Include="Analysis">
       <HintPath>tool\Analysis.dll</HintPath>
     </Reference>
+    <Reference Include="ICSharpCode.SharpZipLib">
+      <HintPath>tool\ICSharpCode.SharpZipLib.dll</HintPath>
+    </Reference>
     <Reference Include="NPOI">
       <HintPath>tool\NPOI.dll</HintPath>
     </Reference>
+    <Reference Include="NPOI.OOXML">
+      <HintPath>tool\NPOI.OOXML.dll</HintPath>
+    </Reference>
+    <Reference Include="NPOI.OpenXml4Net">
+      <HintPath>tool\NPOI.OpenXml4Net.dll</HintPath>
+    </Reference>
+    <Reference Include="NPOI.OpenXmlFormats">
+      <HintPath>tool\NPOI.OpenXmlFormats.dll</HintPath>
+    </Reference>
     <Reference Include="Oracle.ManagedDataAccess">
       <HintPath>tool\Oracle.ManagedDataAccess.dll</HintPath>
     </Reference>

+ 371 - 356
UAS-出货标签管理(贸易版)/UAS_出货标签管理.Designer.cs

@@ -90,6 +90,16 @@
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.pi_date = new System.Windows.Forms.Label();
             this.CleanBarCode = new System.Windows.Forms.Button();
+            this.MenuSetting = new System.Windows.Forms.Button();
+            this.Menu = new System.Windows.Forms.ContextMenuStrip(this.components);
+            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
+            this.ImportExcel = new System.Windows.Forms.OpenFileDialog();
+            this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem();
+            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label18 = new System.Windows.Forms.Label();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -118,29 +128,6 @@
             this.sg_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label8 = new System.Windows.Forms.Label();
@@ -174,16 +161,32 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
-            this.MenuSetting = new System.Windows.Forms.Button();
-            this.Menu = new System.Windows.Forms.ContextMenuStrip(this.components);
-            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
+            this.Menu.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             this.CollectionProcess.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
@@ -192,7 +195,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).BeginInit();
             this.OutBoxLabel.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).BeginInit();
-            this.Menu.SuspendLayout();
             this.SuspendLayout();
             // 
             // pi_inoutno_label
@@ -737,6 +739,90 @@
             this.CleanBarCode.UseVisualStyleBackColor = true;
             this.CleanBarCode.Click += new System.EventHandler(this.CleanBarCode_Click);
             // 
+            // MenuSetting
+            // 
+            this.MenuSetting.Location = new System.Drawing.Point(230, 112);
+            this.MenuSetting.Name = "MenuSetting";
+            this.MenuSetting.Size = new System.Drawing.Size(88, 23);
+            this.MenuSetting.TabIndex = 89;
+            this.MenuSetting.Text = "后台管理";
+            this.MenuSetting.UseVisualStyleBackColor = true;
+            this.MenuSetting.Click += new System.EventHandler(this.MenuSetting_Click);
+            // 
+            // Menu
+            // 
+            this.Menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripMenuItem1,
+            this.toolStripMenuItem2,
+            this.toolStripMenuItem3,
+            this.toolStripMenuItem4,
+            this.toolStripMenuItem5,
+            this.toolStripMenuItem6});
+            this.Menu.Name = "Menu";
+            this.Menu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
+            this.Menu.Size = new System.Drawing.Size(149, 136);
+            this.Menu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.Menu_ItemClicked);
+            // 
+            // toolStripMenuItem1
+            // 
+            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+            this.toolStripMenuItem1.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem1.Text = "采集策略设置";
+            // 
+            // toolStripMenuItem2
+            // 
+            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
+            this.toolStripMenuItem2.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem2.Text = "附加信息设置";
+            // 
+            // toolStripMenuItem3
+            // 
+            this.toolStripMenuItem3.Name = "toolStripMenuItem3";
+            this.toolStripMenuItem3.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem3.Text = "导出数据";
+            // 
+            // toolStripMenuItem4
+            // 
+            this.toolStripMenuItem4.Name = "toolStripMenuItem4";
+            this.toolStripMenuItem4.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem4.Text = "权限设置";
+            // 
+            // toolStripMenuItem5
+            // 
+            this.toolStripMenuItem5.Name = "toolStripMenuItem5";
+            this.toolStripMenuItem5.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem5.Text = "标签维护";
+            // 
+            // ImportExcel
+            // 
+            this.ImportExcel.FileName = "ImportExcel";
+            // 
+            // toolStripMenuItem6
+            // 
+            this.toolStripMenuItem6.Name = "toolStripMenuItem6";
+            this.toolStripMenuItem6.Size = new System.Drawing.Size(148, 22);
+            this.toolStripMenuItem6.Text = "条码导入生成";
+            // 
+            // cu_code
+            // 
+            this.cu_code.AllPower = null;
+            this.cu_code.Caller = null;
+            this.cu_code.Condition = null;
+            this.cu_code.DBTitle = null;
+            this.cu_code.FormName = null;
+            this.cu_code.Location = new System.Drawing.Point(76, 38);
+            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(149, 21);
+            this.cu_code.TabIndex = 88;
+            this.cu_code.TableName = null;
+            this.cu_code.TextBoxEnable = false;
+            this.cu_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.cu_code_UserControlTextChanged);
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Controls.Add(this.label18);
@@ -1079,7 +1165,7 @@
             this.pib_id1,
             this.pib_pdno,
             this.pib_prodcode,
-            this.pr_vendprodcode,
+            this.pr_orispeccode,
             this.pib_brand,
             this.pib_madein,
             this.pr_zxbzs,
@@ -1107,277 +1193,94 @@
             this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.Choose.Width = 55;
+            // pi_inoutno
             // 
-            // pib_ifpick
+            this.pi_inoutno.ID = null;
+            this.pi_inoutno.Location = new System.Drawing.Point(76, 10);
+            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pi_inoutno.Name = "pi_inoutno";
+            this.pi_inoutno.Size = new System.Drawing.Size(150, 21);
+            this.pi_inoutno.Str = null;
+            this.pi_inoutno.Str1 = null;
+            this.pi_inoutno.Str2 = null;
+            this.pi_inoutno.TabIndex = 2;
+            this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pi_inoutno_KeyDown);
             // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
+            // SingleLabel
             // 
-            // pib_ifprint
+            this.SingleLabel.Controls.Add(this.label8);
+            this.SingleLabel.Controls.Add(this.SingleDocRefresh);
+            this.SingleLabel.Controls.Add(this.SingleLabelPrinter);
+            this.SingleLabel.Controls.Add(this.SingleLabelPrint);
+            this.SingleLabel.Controls.Add(this.SingleLabelAutoPrint);
+            this.SingleLabel.Controls.Add(this.SingleLabelCombox);
+            this.SingleLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SingleLabel.Location = new System.Drawing.Point(754, 6);
+            this.SingleLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.SingleLabel.Name = "SingleLabel";
+            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2);
+            this.SingleLabel.Size = new System.Drawing.Size(156, 238);
+            this.SingleLabel.TabIndex = 77;
+            this.SingleLabel.TabStop = false;
+            this.SingleLabel.Text = "单盘标签";
             // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Width = 60;
+            // label8
             // 
-            // pib_id1
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.label8.Location = new System.Drawing.Point(5, 24);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(55, 20);
+            this.label8.TabIndex = 116;
+            this.label8.Text = "格式(T)";
             // 
-            this.pib_id1.DataPropertyName = "pib_id";
-            this.pib_id1.HeaderText = "pib_id";
-            this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Visible = false;
-            this.pib_id1.Width = 66;
+            // SingleDocRefresh
             // 
-            // pib_pdno
+            this.SingleDocRefresh.AutoSize = true;
+            this.SingleDocRefresh.Location = new System.Drawing.Point(58, 24);
+            this.SingleDocRefresh.Name = "SingleDocRefresh";
+            this.SingleDocRefresh.Size = new System.Drawing.Size(42, 21);
+            this.SingleDocRefresh.TabIndex = 89;
+            this.SingleDocRefresh.TabStop = true;
+            this.SingleDocRefresh.Text = "刷新";
+            this.SingleDocRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.DocRefresh_LinkClicked);
             // 
-            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_pdno.DataPropertyName = "pib_pdno";
-            this.pib_pdno.HeaderText = "明细序号";
-            this.pib_pdno.Name = "pib_pdno";
-            this.pib_pdno.ReadOnly = true;
-            this.pib_pdno.Width = 96;
+            // SingleLabelPrinter
             // 
-            // pib_prodcode
+            this.SingleLabelPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SingleLabelPrinter.Location = new System.Drawing.Point(6, 78);
+            this.SingleLabelPrinter.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.SingleLabelPrinter.Name = "SingleLabelPrinter";
+            this.SingleLabelPrinter.Size = new System.Drawing.Size(142, 25);
+            this.SingleLabelPrinter.TabIndex = 40;
+            this.SingleLabelPrinter.UserOnSelectIndexChange += new UAS_LabelMachine.CustomControl.PrinterCombox.OnSelectIndexChange(this.LabelPrinter_UserOnSelectIndexChange);
             // 
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
-            this.pib_prodcode.Width = 78;
+            // SingleLabelPrint
             // 
-            // pr_vendprodcode
+            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(80, 202);
+            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);
+            this.SingleLabelPrint.TabIndex = 36;
+            this.SingleLabelPrint.Text = "打印盘标";
+            this.SingleLabelPrint.UseVisualStyleBackColor = true;
+            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
             // 
-            this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
-            this.pr_vendprodcode.HeaderText = "MPN";
-            this.pr_vendprodcode.Name = "pr_vendprodcode";
-            this.pr_vendprodcode.ReadOnly = true;
-            this.pr_vendprodcode.Width = 48;
+            // SingleLabelAutoPrint
             // 
-            // pib_brand
+            this.SingleLabelAutoPrint.AutoSize = true;
+            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(10, 109);
+            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);
+            this.SingleLabelAutoPrint.TabIndex = 30;
+            this.SingleLabelAutoPrint.Text = "自动打印";
+            this.SingleLabelAutoPrint.UseVisualStyleBackColor = true;
             // 
-            this.pib_brand.DataPropertyName = "pib_brand";
-            this.pib_brand.HeaderText = "品牌";
-            this.pib_brand.Name = "pib_brand";
-            this.pib_brand.ReadOnly = true;
-            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 = 54;
-            // 
-            // pr_zxbzs
-            // 
-            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
-            this.pr_zxbzs.HeaderText = "最小包装数";
-            this.pr_zxbzs.Name = "pr_zxbzs";
-            this.pr_zxbzs.Visible = false;
-            this.pr_zxbzs.Width = 90;
-            // 
-            // pr_unit
-            // 
-            this.pr_unit.DataPropertyName = "pr_unit";
-            this.pr_unit.HeaderText = "单位";
-            this.pr_unit.Name = "pr_unit";
-            this.pr_unit.Visible = false;
-            this.pr_unit.Width = 54;
-            // 
-            // pib_lotno
-            // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 60;
-            // 
-            // pib_datecode
-            // 
-            this.pib_datecode.DataPropertyName = "pib_datecode";
-            this.pib_datecode.HeaderText = "DateCode";
-            this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 78;
-            // 
-            // pib_datecode1
-            // 
-            this.pib_datecode1.DataPropertyName = "pib_datecode1";
-            this.pib_datecode1.HeaderText = "DateCode1";
-            this.pib_datecode1.Name = "pib_datecode1";
-            this.pib_datecode1.Visible = false;
-            this.pib_datecode1.Width = 84;
-            // 
-            // pib_qty
-            // 
-            this.pib_qty.DataPropertyName = "pib_qty";
-            this.pib_qty.HeaderText = "数量";
-            this.pib_qty.Name = "pib_qty";
-            this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 54;
-            // 
-            // pib_barcode
-            // 
-            this.pib_barcode.DataPropertyName = "pib_barcode";
-            this.pib_barcode.HeaderText = "唯一条码";
-            this.pib_barcode.Name = "pib_barcode";
-            this.pib_barcode.ReadOnly = true;
-            this.pib_barcode.Width = 78;
-            // 
-            // pib_custbarcode
-            // 
-            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
-            this.pib_custbarcode.HeaderText = "客户条码";
-            this.pib_custbarcode.Name = "pib_custbarcode";
-            this.pib_custbarcode.ReadOnly = true;
-            this.pib_custbarcode.Width = 78;
-            // 
-            // pd_pocode
-            // 
-            this.pd_pocode.DataPropertyName = "pd_pocode";
-            this.pd_pocode.HeaderText = "客户PO";
-            this.pd_pocode.Name = "pd_pocode";
-            this.pd_pocode.ReadOnly = true;
-            this.pd_pocode.Width = 66;
-            // 
-            // pd_custprodcode
-            // 
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "客户料号";
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.ReadOnly = true;
-            this.pd_custprodcode.Width = 78;
-            // 
-            // pd_custprodspec
-            // 
-            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
-            this.pd_custprodspec.HeaderText = "客户型号";
-            this.pd_custprodspec.Name = "pd_custprodspec";
-            this.pd_custprodspec.ReadOnly = true;
-            this.pd_custprodspec.Width = 78;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.Visible = false;
-            this.pr_spec.Width = 54;
-            // 
-            // pib_outboxcode1
-            // 
-            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
-            this.pib_outboxcode1.HeaderText = "中盒号";
-            this.pib_outboxcode1.Name = "pib_outboxcode1";
-            this.pib_outboxcode1.Width = 90;
-            // 
-            // pib_outboxcode2
-            // 
-            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
-            this.pib_outboxcode2.HeaderText = "外箱号";
-            this.pib_outboxcode2.Name = "pib_outboxcode2";
-            this.pib_outboxcode2.Width = 90;
-            // 
-            // pi_inoutno
-            // 
-            this.pi_inoutno.ID = null;
-            this.pi_inoutno.Location = new System.Drawing.Point(76, 10);
-            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.pi_inoutno.Name = "pi_inoutno";
-            this.pi_inoutno.Size = new System.Drawing.Size(150, 21);
-            this.pi_inoutno.Str = null;
-            this.pi_inoutno.Str1 = null;
-            this.pi_inoutno.Str2 = null;
-            this.pi_inoutno.TabIndex = 2;
-            this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pi_inoutno_KeyDown);
-            // 
-            // SingleLabel
-            // 
-            this.SingleLabel.Controls.Add(this.label8);
-            this.SingleLabel.Controls.Add(this.SingleDocRefresh);
-            this.SingleLabel.Controls.Add(this.SingleLabelPrinter);
-            this.SingleLabel.Controls.Add(this.SingleLabelPrint);
-            this.SingleLabel.Controls.Add(this.SingleLabelAutoPrint);
-            this.SingleLabel.Controls.Add(this.SingleLabelCombox);
-            this.SingleLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabel.Location = new System.Drawing.Point(754, 6);
-            this.SingleLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.SingleLabel.Name = "SingleLabel";
-            this.SingleLabel.Padding = new System.Windows.Forms.Padding(2);
-            this.SingleLabel.Size = new System.Drawing.Size(156, 238);
-            this.SingleLabel.TabIndex = 77;
-            this.SingleLabel.TabStop = false;
-            this.SingleLabel.Text = "单盘标签";
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.label8.Location = new System.Drawing.Point(5, 24);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(55, 20);
-            this.label8.TabIndex = 116;
-            this.label8.Text = "格式(T)";
-            // 
-            // SingleDocRefresh
-            // 
-            this.SingleDocRefresh.AutoSize = true;
-            this.SingleDocRefresh.Location = new System.Drawing.Point(58, 24);
-            this.SingleDocRefresh.Name = "SingleDocRefresh";
-            this.SingleDocRefresh.Size = new System.Drawing.Size(42, 21);
-            this.SingleDocRefresh.TabIndex = 89;
-            this.SingleDocRefresh.TabStop = true;
-            this.SingleDocRefresh.Text = "刷新";
-            this.SingleDocRefresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.DocRefresh_LinkClicked);
-            // 
-            // SingleLabelPrinter
-            // 
-            this.SingleLabelPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SingleLabelPrinter.Location = new System.Drawing.Point(6, 78);
-            this.SingleLabelPrinter.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
-            this.SingleLabelPrinter.Name = "SingleLabelPrinter";
-            this.SingleLabelPrinter.Size = new System.Drawing.Size(142, 25);
-            this.SingleLabelPrinter.TabIndex = 40;
-            this.SingleLabelPrinter.UserOnSelectIndexChange += new UAS_LabelMachine.CustomControl.PrinterCombox.OnSelectIndexChange(this.LabelPrinter_UserOnSelectIndexChange);
-            // 
-            // SingleLabelPrint
-            // 
-            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(80, 202);
-            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);
-            this.SingleLabelPrint.TabIndex = 36;
-            this.SingleLabelPrint.Text = "打印盘标";
-            this.SingleLabelPrint.UseVisualStyleBackColor = true;
-            this.SingleLabelPrint.Click += new System.EventHandler(this.SingleLabelPrint_Click);
-            // 
-            // SingleLabelAutoPrint
-            // 
-            this.SingleLabelAutoPrint.AutoSize = true;
-            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(10, 109);
-            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);
-            this.SingleLabelAutoPrint.TabIndex = 30;
-            this.SingleLabelAutoPrint.Text = "自动打印";
-            this.SingleLabelAutoPrint.UseVisualStyleBackColor = true;
-            // 
-            // SingleLabelCombox
+            // SingleLabelCombox
             // 
             this.SingleLabelCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.SingleLabelCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1694,78 +1597,188 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // cu_code
+            // Choose
             // 
-            this.cu_code.AllPower = null;
-            this.cu_code.Caller = null;
-            this.cu_code.Condition = null;
-            this.cu_code.DBTitle = null;
-            this.cu_code.FormName = null;
-            this.cu_code.Location = new System.Drawing.Point(76, 38);
-            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(149, 21);
-            this.cu_code.TabIndex = 88;
-            this.cu_code.TableName = null;
-            this.cu_code.TextBoxEnable = false;
-            this.cu_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.cu_code_UserControlTextChanged);
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.Choose.Width = 55;
             // 
-            // MenuSetting
+            // pib_ifpick
             // 
-            this.MenuSetting.Location = new System.Drawing.Point(230, 112);
-            this.MenuSetting.Name = "MenuSetting";
-            this.MenuSetting.Size = new System.Drawing.Size(88, 23);
-            this.MenuSetting.TabIndex = 89;
-            this.MenuSetting.Text = "后台管理";
-            this.MenuSetting.UseVisualStyleBackColor = true;
-            this.MenuSetting.Click += new System.EventHandler(this.MenuSetting_Click);
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
             // 
-            // Menu
+            // pib_ifprint
             // 
-            this.Menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.toolStripMenuItem1,
-            this.toolStripMenuItem2,
-            this.toolStripMenuItem3,
-            this.toolStripMenuItem4,
-            this.toolStripMenuItem5});
-            this.Menu.Name = "Menu";
-            this.Menu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
-            this.Menu.Size = new System.Drawing.Size(149, 114);
-            this.Menu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.Menu_ItemClicked);
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Width = 60;
             // 
-            // toolStripMenuItem1
+            // pib_id1
             // 
-            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(148, 22);
-            this.toolStripMenuItem1.Text = "采集策略设置";
+            this.pib_id1.DataPropertyName = "pib_id";
+            this.pib_id1.HeaderText = "pib_id";
+            this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
+            this.pib_id1.Width = 66;
             // 
-            // toolStripMenuItem2
+            // pib_pdno
             // 
-            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
-            this.toolStripMenuItem2.Size = new System.Drawing.Size(148, 22);
-            this.toolStripMenuItem2.Text = "附加信息设置";
+            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_pdno.DataPropertyName = "pib_pdno";
+            this.pib_pdno.HeaderText = "明细序号";
+            this.pib_pdno.Name = "pib_pdno";
+            this.pib_pdno.ReadOnly = true;
+            this.pib_pdno.Width = 96;
             // 
-            // toolStripMenuItem3
+            // pib_prodcode
             // 
-            this.toolStripMenuItem3.Name = "toolStripMenuItem3";
-            this.toolStripMenuItem3.Size = new System.Drawing.Size(148, 22);
-            this.toolStripMenuItem3.Text = "导出数据";
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
+            this.pib_prodcode.Width = 78;
             // 
-            // toolStripMenuItem4
+            // pr_orispeccode
             // 
-            this.toolStripMenuItem4.Name = "toolStripMenuItem4";
-            this.toolStripMenuItem4.Size = new System.Drawing.Size(148, 22);
-            this.toolStripMenuItem4.Text = "权限设置";
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "MPN";
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.ReadOnly = true;
+            this.pr_orispeccode.Width = 48;
             // 
-            // toolStripMenuItem5
+            // pib_brand
             // 
-            this.toolStripMenuItem5.Name = "toolStripMenuItem5";
-            this.toolStripMenuItem5.Size = new System.Drawing.Size(148, 22);
-            this.toolStripMenuItem5.Text = "标签维护";
+            this.pib_brand.DataPropertyName = "pib_brand";
+            this.pib_brand.HeaderText = "品牌";
+            this.pib_brand.Name = "pib_brand";
+            this.pib_brand.ReadOnly = true;
+            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 = 54;
+            // 
+            // pr_zxbzs
+            // 
+            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
+            this.pr_zxbzs.HeaderText = "最小包装数";
+            this.pr_zxbzs.Name = "pr_zxbzs";
+            this.pr_zxbzs.Visible = false;
+            this.pr_zxbzs.Width = 90;
+            // 
+            // pr_unit
+            // 
+            this.pr_unit.DataPropertyName = "pr_unit";
+            this.pr_unit.HeaderText = "单位";
+            this.pr_unit.Name = "pr_unit";
+            this.pr_unit.Visible = false;
+            this.pr_unit.Width = 54;
+            // 
+            // pib_lotno
+            // 
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.Width = 60;
+            // 
+            // pib_datecode
+            // 
+            this.pib_datecode.DataPropertyName = "pib_datecode";
+            this.pib_datecode.HeaderText = "DateCode";
+            this.pib_datecode.Name = "pib_datecode";
+            this.pib_datecode.Width = 78;
+            // 
+            // pib_datecode1
+            // 
+            this.pib_datecode1.DataPropertyName = "pib_datecode1";
+            this.pib_datecode1.HeaderText = "DateCode1";
+            this.pib_datecode1.Name = "pib_datecode1";
+            this.pib_datecode1.Visible = false;
+            this.pib_datecode1.Width = 84;
+            // 
+            // pib_qty
+            // 
+            this.pib_qty.DataPropertyName = "pib_qty";
+            this.pib_qty.HeaderText = "数量";
+            this.pib_qty.Name = "pib_qty";
+            this.pib_qty.ReadOnly = true;
+            this.pib_qty.Width = 54;
+            // 
+            // pib_barcode
+            // 
+            this.pib_barcode.DataPropertyName = "pib_barcode";
+            this.pib_barcode.HeaderText = "唯一条码";
+            this.pib_barcode.Name = "pib_barcode";
+            this.pib_barcode.ReadOnly = true;
+            this.pib_barcode.Width = 78;
+            // 
+            // pib_custbarcode
+            // 
+            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
+            this.pib_custbarcode.HeaderText = "客户条码";
+            this.pib_custbarcode.Name = "pib_custbarcode";
+            this.pib_custbarcode.ReadOnly = true;
+            this.pib_custbarcode.Width = 78;
+            // 
+            // pd_pocode
+            // 
+            this.pd_pocode.DataPropertyName = "pd_pocode";
+            this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.Name = "pd_pocode";
+            this.pd_pocode.ReadOnly = true;
+            this.pd_pocode.Width = 66;
+            // 
+            // pd_custprodcode
+            // 
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "客户料号";
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.ReadOnly = true;
+            this.pd_custprodcode.Width = 78;
+            // 
+            // pd_custprodspec
+            // 
+            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
+            this.pd_custprodspec.HeaderText = "客户型号";
+            this.pd_custprodspec.Name = "pd_custprodspec";
+            this.pd_custprodspec.ReadOnly = true;
+            this.pd_custprodspec.Width = 78;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Visible = false;
+            this.pr_spec.Width = 54;
+            // 
+            // pib_outboxcode1
+            // 
+            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
+            this.pib_outboxcode1.HeaderText = "中盒号";
+            this.pib_outboxcode1.Name = "pib_outboxcode1";
+            this.pib_outboxcode1.Width = 90;
+            // 
+            // pib_outboxcode2
+            // 
+            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
+            this.pib_outboxcode2.HeaderText = "外箱号";
+            this.pib_outboxcode2.Name = "pib_outboxcode2";
+            this.pib_outboxcode2.Width = 90;
             // 
             // UAS_出货标签打印
             // 
@@ -1823,6 +1836,7 @@
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
+            this.Menu.ResumeLayout(false);
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             this.CollectionProcess.ResumeLayout(false);
@@ -1836,7 +1850,6 @@
             this.OutBoxLabel.ResumeLayout(false);
             this.OutBoxLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
-            this.Menu.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1965,13 +1978,22 @@
         private System.Windows.Forms.Label label8;
         private System.Windows.Forms.Label label9;
         private System.Windows.Forms.Label label19;
+        private System.Windows.Forms.Button MenuSetting;
+        private System.Windows.Forms.ContextMenuStrip Menu;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
+        private System.Windows.Forms.OpenFileDialog ImportExcel;
+        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifpick;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_id1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_pdno;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn pr_vendprodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_orispeccode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_brand;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_madein;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_zxbzs;
@@ -1988,12 +2010,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.Button MenuSetting;
-        private System.Windows.Forms.ContextMenuStrip Menu;
-        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
-        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
-        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
-        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
-        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
     }
 }

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

@@ -2111,6 +2111,8 @@ namespace UAS_LabelMachine
 
         private void Menu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
         {
+            DataTable dt;
+            DialogResult result;
             switch (e.ClickedItem.Text)
             {
                 case "采集策略设置":
@@ -2147,11 +2149,11 @@ namespace UAS_LabelMachine
                     break;
                 case "导出数据":
                     ExportFileDialog.Description = "选择导出的路径";
-                    DialogResult result = ExportFileDialog.ShowDialog();
+                    result = ExportFileDialog.ShowDialog();
                     if (result == DialogResult.OK)
                     {
                         ExcelHandler eh = new ExcelHandler();
-                        DataTable dt = ((DataTable)LabelInf.DataSource).Copy();
+                        dt = ((DataTable)LabelInf.DataSource).Copy();
                         for (int i = dt.Columns.Count - 1; i >= 0; i--)
                         {
                             for (int j = 0; j < LabelInf.Columns.Count; j++)
@@ -2194,6 +2196,47 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(pw);
                     pw.ShowDialog();
                     break;
+                case "条码导入生成":
+                    ImportExcel.Filter = "(*.xls)|*.xlsx;*.xls";
+                    result = ImportExcel.ShowDialog();
+                    if (result == DialogResult.OK)
+                    {
+                        dt = ExcelHandler.ExcelToDataTable(ImportExcel.FileName, true);
+                        DataTable dt1 = (DataTable)dh.ExecuteSql("select pr_orispeccode,pr_zxbzs from prodiodetail left join product on pd_prodcode=pr_code where pd_inoutno='" + pi_inoutno.Text + "'", "select");
+                        ArrayList<string> midcode = new ArrayList<string>();
+                        ArrayList<string> barcode = new ArrayList<string>();
+                        ArrayList<string> custbarcode = new ArrayList<string>();
+                        for (int i = 0; i < dt.Rows.Count; i++)
+                        {
+                            string pr_orispeccode = dt.Rows[i]["原厂型号"].ToString();
+                            string qty = dt.Rows[i]["数量"].ToString();
+                            string DateCode = dt.Rows[i]["DateCode"].ToString();
+                            string LotNO = dt.Rows[i]["LotNO"].ToString();
+                            string pib_outboxcode2 = dt.Rows[i]["箱号"].ToString();
+                            DataRow[] dr = dt1.Select("pr_orispeccode='" + pr_orispeccode + "'");
+                            if (dr.Length > 0)
+                            {
+                                decimal zxbzs = decimal.Parse(dr[0]["pr_zxbzs"].ToString());
+                                decimal outqty = decimal.Parse(qty);
+                                decimal barcodenum = 0;
+                                if (outqty / zxbzs != 0)
+                                {
+                                    barcodenum = outqty / zxbzs + 1;
+                                }
+                                else
+                                {
+                                    barcodenum = outqty / zxbzs;
+                                }
+                            }
+                            sql.Clear();
+                            sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,pib_inman,PIB_INDATE,PIB_INOUTNO,PIB_PIID,pib_brand,PIB_BARCODE,PIB_CUSTBARCODE,PIB_PDNO,");
+                            sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO,pib_orderdetno)");
+                            sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "','" + User.UserName + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",'" + pr_brand + "',:barcode,:custbarcode,'" + pd_pdno + "','" + pd_id + "',");
+                            sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','','" + pd_orderdetno + "')");
+                            dh.BatchInsert(sql.ToString(), new string[] { "barcode", "custbarcode", "pib_inqty", "midcode" }, barcode.ToArray(), custbarcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
+                        }
+                    }
+                    break;
                 default:
                     break;
             }

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

@@ -147,6 +147,12 @@
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
+  <metadata name="Menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>442, 17</value>
+  </metadata>
+  <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="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -171,9 +177,6 @@
   <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>442, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

BIN
UAS-出货标签管理(贸易版)/tool/ICSharpCode.SharpZipLib.dll


BIN
UAS-出货标签管理(贸易版)/tool/NPOI.OOXML.dll


BIN
UAS-出货标签管理(贸易版)/tool/NPOI.OpenXml4Net.dll


BIN
UAS-出货标签管理(贸易版)/tool/NPOI.OpenXmlFormats.dll


BIN
UAS-出货标签管理(贸易版)/tool/NPOI.dll