Browse Source

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

Hcsy 7 years ago
parent
commit
99f28c883c

+ 329 - 0
UAS-出货标签管理(吉利通)/CustomerRule.Designer.cs

@@ -0,0 +1,329 @@
+namespace UAS_LabelMachine
+{
+    partial class CustomerRule
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CustomerRule));
+            this.cu_print_midlotno = new System.Windows.Forms.CheckBox();
+            this.cu_print_midprod = new System.Windows.Forms.CheckBox();
+            this.cu_print_midspec = new System.Windows.Forms.CheckBox();
+            this.cu_print_midpo = new System.Windows.Forms.CheckBox();
+            this.cu_print_regexpression = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
+            this.CustomerTreeView = new System.Windows.Forms.TreeView();
+            this.ButtonSaveScanGroup = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.Customer = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.cu_print_outprod = new System.Windows.Forms.CheckBox();
+            this.cu_print_outpo = new System.Windows.Forms.CheckBox();
+            this.cu_print_outspec = new System.Windows.Forms.CheckBox();
+            this.cu_print_outlotno = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.cu_print_papercount = new System.Windows.Forms.NumericUpDown();
+            this.cu_print_checkonly = new System.Windows.Forms.CheckBox();
+            this.Expression = new System.Windows.Forms.RadioButton();
+            this.Equal = new System.Windows.Forms.RadioButton();
+            ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // cu_print_midlotno
+            // 
+            this.cu_print_midlotno.AutoSize = true;
+            this.cu_print_midlotno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_midlotno.Location = new System.Drawing.Point(301, 332);
+            this.cu_print_midlotno.Name = "cu_print_midlotno";
+            this.cu_print_midlotno.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_midlotno.TabIndex = 1;
+            this.cu_print_midlotno.Tag = "Order";
+            this.cu_print_midlotno.Text = "合并批号";
+            this.cu_print_midlotno.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midprod
+            // 
+            this.cu_print_midprod.AutoSize = true;
+            this.cu_print_midprod.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_midprod.Location = new System.Drawing.Point(746, 332);
+            this.cu_print_midprod.Name = "cu_print_midprod";
+            this.cu_print_midprod.Size = new System.Drawing.Size(125, 25);
+            this.cu_print_midprod.TabIndex = 2;
+            this.cu_print_midprod.Tag = "DateCode";
+            this.cu_print_midprod.Text = "合并客户料号";
+            this.cu_print_midprod.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midspec
+            // 
+            this.cu_print_midspec.AutoSize = true;
+            this.cu_print_midspec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_midspec.Location = new System.Drawing.Point(467, 332);
+            this.cu_print_midspec.Name = "cu_print_midspec";
+            this.cu_print_midspec.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_midspec.TabIndex = 3;
+            this.cu_print_midspec.Tag = "QTY";
+            this.cu_print_midspec.Text = "合并型号";
+            this.cu_print_midspec.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midpo
+            // 
+            this.cu_print_midpo.AutoSize = true;
+            this.cu_print_midpo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_midpo.Location = new System.Drawing.Point(610, 332);
+            this.cu_print_midpo.Name = "cu_print_midpo";
+            this.cu_print_midpo.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_midpo.TabIndex = 4;
+            this.cu_print_midpo.Tag = "PN";
+            this.cu_print_midpo.Text = "合并订单";
+            this.cu_print_midpo.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_regexpression
+            // 
+            this.cu_print_regexpression.Enabled = false;
+            this.cu_print_regexpression.Location = new System.Drawing.Point(410, 73);
+            this.cu_print_regexpression.Name = "cu_print_regexpression";
+            this.cu_print_regexpression.Size = new System.Drawing.Size(434, 96);
+            this.cu_print_regexpression.TabIndex = 31;
+            this.cu_print_regexpression.Text = "";
+            // 
+            // CustomerTreeView
+            // 
+            this.CustomerTreeView.Location = new System.Drawing.Point(0, 24);
+            this.CustomerTreeView.Name = "CustomerTreeView";
+            this.CustomerTreeView.Size = new System.Drawing.Size(251, 610);
+            this.CustomerTreeView.TabIndex = 0;
+            this.CustomerTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.CustomerTreeView_NodeMouseClick);
+            // 
+            // ButtonSaveScanGroup
+            // 
+            this.ButtonSaveScanGroup.Image = ((System.Drawing.Image)(resources.GetObject("ButtonSaveScanGroup.Image")));
+            this.ButtonSaveScanGroup.Location = new System.Drawing.Point(254, 4);
+            this.ButtonSaveScanGroup.Name = "ButtonSaveScanGroup";
+            this.ButtonSaveScanGroup.Size = new System.Drawing.Size(64, 23);
+            this.ButtonSaveScanGroup.TabIndex = 42;
+            this.ButtonSaveScanGroup.Text = "保存";
+            this.ButtonSaveScanGroup.UseVisualStyleBackColor = true;
+            this.ButtonSaveScanGroup.Click += new System.EventHandler(this.ButtonSaveScanGroup_Click);
+            // 
+            // Customer
+            // 
+            this.Customer.Location = new System.Drawing.Point(85, 1);
+            this.Customer.Name = "Customer";
+            this.Customer.Size = new System.Drawing.Size(166, 21);
+            this.Customer.TabIndex = 43;
+            this.Customer.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Brand_KeyDown);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(3, 2);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.TabIndex = 44;
+            this.label1.Text = "客户搜索";
+            // 
+            // cu_print_outprod
+            // 
+            this.cu_print_outprod.AutoSize = true;
+            this.cu_print_outprod.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_outprod.Location = new System.Drawing.Point(746, 442);
+            this.cu_print_outprod.Name = "cu_print_outprod";
+            this.cu_print_outprod.Size = new System.Drawing.Size(125, 25);
+            this.cu_print_outprod.TabIndex = 47;
+            this.cu_print_outprod.Tag = "Order";
+            this.cu_print_outprod.Text = "合并客户料号";
+            this.cu_print_outprod.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outpo
+            // 
+            this.cu_print_outpo.AutoSize = true;
+            this.cu_print_outpo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_outpo.Location = new System.Drawing.Point(610, 442);
+            this.cu_print_outpo.Name = "cu_print_outpo";
+            this.cu_print_outpo.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_outpo.TabIndex = 48;
+            this.cu_print_outpo.Tag = "Order";
+            this.cu_print_outpo.Text = "合并订单";
+            this.cu_print_outpo.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outspec
+            // 
+            this.cu_print_outspec.AutoSize = true;
+            this.cu_print_outspec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_outspec.Location = new System.Drawing.Point(467, 442);
+            this.cu_print_outspec.Name = "cu_print_outspec";
+            this.cu_print_outspec.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_outspec.TabIndex = 49;
+            this.cu_print_outspec.Tag = "Order";
+            this.cu_print_outspec.Text = "合并型号";
+            this.cu_print_outspec.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outlotno
+            // 
+            this.cu_print_outlotno.AutoSize = true;
+            this.cu_print_outlotno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_outlotno.Location = new System.Drawing.Point(301, 442);
+            this.cu_print_outlotno.Name = "cu_print_outlotno";
+            this.cu_print_outlotno.Size = new System.Drawing.Size(93, 25);
+            this.cu_print_outlotno.TabIndex = 50;
+            this.cu_print_outlotno.Tag = "Order";
+            this.cu_print_outlotno.Text = "合并批号";
+            this.cu_print_outlotno.UseVisualStyleBackColor = true;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(297, 287);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(106, 21);
+            this.label2.TabIndex = 51;
+            this.label2.Text = "中盒合并规则";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(297, 402);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(106, 21);
+            this.label3.TabIndex = 52;
+            this.label3.Text = "外箱合并规则";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(297, 220);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(42, 21);
+            this.label4.TabIndex = 53;
+            this.label4.Text = "纸型";
+            // 
+            // cu_print_papercount
+            // 
+            this.cu_print_papercount.Location = new System.Drawing.Point(360, 220);
+            this.cu_print_papercount.Name = "cu_print_papercount";
+            this.cu_print_papercount.Size = new System.Drawing.Size(55, 21);
+            this.cu_print_papercount.TabIndex = 54;
+            // 
+            // cu_print_checkonly
+            // 
+            this.cu_print_checkonly.AutoSize = true;
+            this.cu_print_checkonly.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_checkonly.Location = new System.Drawing.Point(483, 216);
+            this.cu_print_checkonly.Name = "cu_print_checkonly";
+            this.cu_print_checkonly.Size = new System.Drawing.Size(77, 25);
+            this.cu_print_checkonly.TabIndex = 56;
+            this.cu_print_checkonly.Tag = "QTY";
+            this.cu_print_checkonly.Text = "仅复核";
+            this.cu_print_checkonly.UseVisualStyleBackColor = true;
+            // 
+            // Expression
+            // 
+            this.Expression.AutoSize = true;
+            this.Expression.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Expression.Location = new System.Drawing.Point(301, 110);
+            this.Expression.Name = "Expression";
+            this.Expression.Size = new System.Drawing.Size(62, 21);
+            this.Expression.TabIndex = 57;
+            this.Expression.TabStop = true;
+            this.Expression.Text = "表达式";
+            this.Expression.UseVisualStyleBackColor = true;
+            // 
+            // Equal
+            // 
+            this.Equal.AutoSize = true;
+            this.Equal.Checked = true;
+            this.Equal.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Equal.Location = new System.Drawing.Point(301, 73);
+            this.Equal.Name = "Equal";
+            this.Equal.Size = new System.Drawing.Size(50, 21);
+            this.Equal.TabIndex = 58;
+            this.Equal.TabStop = true;
+            this.Equal.Text = "相等";
+            this.Equal.UseVisualStyleBackColor = true;
+            this.Equal.CheckedChanged += new System.EventHandler(this.Equal_CheckedChanged);
+            // 
+            // CustomerRule
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1082, 634);
+            this.Controls.Add(this.Equal);
+            this.Controls.Add(this.Expression);
+            this.Controls.Add(this.cu_print_checkonly);
+            this.Controls.Add(this.cu_print_papercount);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.cu_print_outlotno);
+            this.Controls.Add(this.cu_print_outspec);
+            this.Controls.Add(this.cu_print_outpo);
+            this.Controls.Add(this.cu_print_outprod);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Customer);
+            this.Controls.Add(this.ButtonSaveScanGroup);
+            this.Controls.Add(this.cu_print_regexpression);
+            this.Controls.Add(this.cu_print_midpo);
+            this.Controls.Add(this.cu_print_midspec);
+            this.Controls.Add(this.cu_print_midprod);
+            this.Controls.Add(this.cu_print_midlotno);
+            this.Controls.Add(this.CustomerTreeView);
+            this.Name = "CustomerRule";
+            this.Text = "客户规则";
+            this.Load += new System.EventHandler(this.CustomerRule_Load);
+            this.SizeChanged += new System.EventHandler(this.CustomerRule_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.CheckBox cu_print_midlotno;
+        private System.Windows.Forms.CheckBox cu_print_midprod;
+        private System.Windows.Forms.CheckBox cu_print_midspec;
+        private System.Windows.Forms.CheckBox cu_print_midpo;
+        private CustomControl.RichText.RichTextAutoBottom cu_print_regexpression;
+        private System.Windows.Forms.TreeView CustomerTreeView;
+        private CustomControl.NormalButton ButtonSaveScanGroup;
+        private System.Windows.Forms.TextBox Customer;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.CheckBox cu_print_outprod;
+        private System.Windows.Forms.CheckBox cu_print_outpo;
+        private System.Windows.Forms.CheckBox cu_print_outspec;
+        private System.Windows.Forms.CheckBox cu_print_outlotno;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.NumericUpDown cu_print_papercount;
+        private System.Windows.Forms.CheckBox cu_print_checkonly;
+        private System.Windows.Forms.RadioButton Expression;
+        private System.Windows.Forms.RadioButton Equal;
+    }
+}

+ 124 - 0
UAS-出货标签管理(吉利通)/CustomerRule.cs

@@ -0,0 +1,124 @@
+using System;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_LabelMachine
+{
+    public partial class CustomerRule : Form
+    {
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        StringBuilder sql = new StringBuilder();
+
+        DataTable dt;
+
+        string CUCODE = "";
+
+        public CustomerRule()
+        {
+            InitializeComponent();
+        }
+
+        private void CustomerRule_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            dt = (DataTable)dh.ExecuteSql("select cu_name,cu_code from customer where rownum<500 and cu_auditstatuscode<>'DISABLE'", "select");
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                TreeNode node = new TreeNode(dt.Rows[i]["cu_name"].ToString());
+                node.Tag = dt.Rows[i]["cu_code"].ToString();
+                CustomerTreeView.Nodes.Add(node);
+            }
+        }
+
+        private void CustomerRule_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void CustomerTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+        {
+            //点中根节点的时候查询品牌下的采集方案
+            if (e.Node.Level == 0)
+            {
+                CUCODE = e.Node.Tag.ToString();
+                sql.Clear();
+                sql.Append("select cu_print_midlotno,cu_print_midspec,cu_print_midpo,cu_print_midprod,nvl(cu_print_custprodmatchmodel,'Equal')cu_print_custprodmatchmodel,cu_print_outlotno,cu_print_outspec,cu_print_outpo");
+                sql.Append(",cu_print_outprod,cu_print_checkonly,nvl(cu_print_papercount,0)cu_print_papercount,cu_print_regexpression from customer where cu_code='" + e.Node.Tag + "'");
+                dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    BaseUtil.SetFormValue(this.Controls, dt);
+                    switch (dt.Rows[0]["cu_print_custprodmatchmodel"].ToString())
+                    {
+                        case "Equal":
+                            Equal.Checked = true;
+                            break;
+                        case "Expression":
+                            Expression.Checked = true;
+                            break;
+                        default:
+                            break;
+                    }
+                }
+            }
+        }
+
+        private void ButtonSaveScanGroup_Click(object sender, EventArgs e)
+        {
+            sql.Clear();
+            sql.Append("update customer set cu_print_midlotno='" + (cu_print_midlotno.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_midspec='" + (cu_print_midspec.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_midpo='" + (cu_print_midpo.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_midprod='" + (cu_print_midprod.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_outlotno='" + (cu_print_outlotno.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_outspec='" + (cu_print_outspec.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_outpo='" + (cu_print_outpo.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_outprod='" + (cu_print_outprod.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_checkonly='" + (cu_print_checkonly.Checked ? -1 : 0) + "',");
+            sql.Append("cu_print_papercount='" + cu_print_papercount.Value + "',");
+            sql.Append("cu_print_custprodmatchmodel='" + (Equal.Checked ? "Equal" : "Expression") + "',");
+            sql.Append("cu_print_regexpression=:cu_print_regexpression where cu_code='" + CUCODE + "'");
+            dh.ExecuteSql(sql.ToString(), "update", cu_print_regexpression.Text);
+            MessageBox.Show("保存成功!", "提示");
+        }
+
+        /// <summary>
+        /// 模糊搜索功能
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Brand_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (Customer.Text != "")
+                    dt = (DataTable)dh.ExecuteSql("select cu_name,cu_code   from customer where (cu_name like '%" + Customer.Text + "%' or cu_code like '%" + Customer.Text + "%') and cu_auditstatuscode<>'DISABLE'", "select");
+                else
+                    dt = (DataTable)dh.ExecuteSql("select cu_name,cu_code from customer where rownum<500 and cu_auditstatuscode<>'DISABLE'", "select");
+                CustomerTreeView.Nodes.Clear();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    TreeNode node = new TreeNode(dt.Rows[i]["cu_name"].ToString());
+                    node.Tag = dt.Rows[i]["cu_code"].ToString();
+                    CustomerTreeView.Nodes.Add(node);
+                }
+            }
+        }
+
+        private void Equal_CheckedChanged(object sender, EventArgs e)
+        {
+            if (Equal.Checked)
+                cu_print_regexpression.Enabled = false;
+            else
+                cu_print_regexpression.Enabled = true;
+        }
+    }
+}

+ 133 - 0
UAS-出货标签管理(吉利通)/CustomerRule.resx

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="ButtonSaveScanGroup.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhUgAXAIQAAK/G1qjB1dzn6bTK2MfZ46rE1arD1/D4+/n//d/o7/X6/ez1/K7D1tLj6+Pt9ubx
+        877S3fT09DxZeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
+        Mi4wAwEBAAAh+QQAAAAAACwAAAAAUgAXAAAI/wAlCBxIsKDBgwgTKlzIsGCEhxAjSpxIsaLFixgzPhQY
+        AYHHjyBDihxJsqTJkygjcFTAsqXLlzBjypxJs6ZNlRIiHNjJs6fPn0CDCh1KtCjOCAuSKl3KtKnTp1Cj
+        Sp169IHVq1izat3KtavXr2Crgh1LtqzZrUcdqF3Ltq3bt3Djyp1L92iCu3jz6t3Lt6/fv4ADHxVAuLDh
+        w4gTK17MuLHjow0iS55MubLly5gza958lIHnz6BDix5NurTp06iPGljNurXr17Bjy55Nu/bRALhz697N
+        u7fv38CDCz9aoLjx48iTK1/OvLnz50cBSJ9Ovbr169iza9/O/eiA7+DDi0EfT768+fPo0x+FwL69+/fw
+        48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
+</value>
+  </data>
+</root>

+ 16 - 2
UAS-出货标签管理(吉利通)/PublicMethod/BaseUtil.cs

@@ -8,6 +8,7 @@ using UAS_LabelMachine.CustomControl;
 using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 using static System.Windows.Forms.Control;
 using System.Text.RegularExpressions;
+using UAS_LabelMachine.CustomControl.RichText;
 
 namespace UAS_LabelMachine
 {
@@ -152,9 +153,11 @@ namespace UAS_LabelMachine
             {
                 for (int i = 0; i < collection.Count; i++)
                 {
+                    if (collection[i].Controls.Count > 0)
+                        SetFormValue(collection[i].Controls, dt);
                     string controlName = collection[i].Name;
                     //默认给TextBox和Label赋值
-                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox)
+                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox || collection[i] is NumericUpDown || collection[i] is CheckBox || collection[i] is RichTextAutoBottom)
                     {
                         for (int j = 0; j < dt.Columns.Count; j++)
                         {
@@ -197,7 +200,18 @@ namespace UAS_LabelMachine
                                 }
                                 else
                                 {
-                                    collection[i].Text = dt.Rows[0][j].ToString();
+                                    if (collection[i] is CheckBox)
+                                    {
+                                        (collection[i] as CheckBox).Checked = dt.Rows[0][j].ToString() == "-1" ? true : false;
+                                    }
+                                   else if (collection[i] is NumericUpDown)
+                                    {
+                                        (collection[i] as NumericUpDown).Value = int.Parse(dt.Rows[0][j].ToString());
+                                    }
+                                    else
+                                    {
+                                        collection[i].Text = dt.Rows[0][j].ToString();
+                                    }
                                 }
                             }
                         }

+ 9 - 0
UAS-出货标签管理(吉利通)/UAS-出货标签管理(吉利通).csproj

@@ -290,6 +290,12 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="CustomerRule.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="CustomerRule.Designer.cs">
+      <DependentUpon>CustomerRule.cs</DependentUpon>
+    </Compile>
     <Compile Include="采集策略_NEW.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -369,6 +375,9 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
     </Compile>
+    <EmbeddedResource Include="CustomerRule.resx">
+      <DependentUpon>CustomerRule.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="采集策略_NEW.resx">
       <DependentUpon>采集策略_NEW.cs</DependentUpon>
     </EmbeddedResource>

+ 347 - 209
UAS-出货标签管理(吉利通)/UAS_出货标签管理.Designer.cs

@@ -28,27 +28,24 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UAS_出货标签打印));
             this.pi_inoutno_label = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label22 = new System.Windows.Forms.Label();
             this.AutoMatch = new System.Windows.Forms.CheckBox();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.后端复核 = new System.Windows.Forms.Label();
-            this.CollectionUnit = new System.Windows.Forms.ComboBox();
-            this.CollectionUnit_label = new System.Windows.Forms.Label();
             this.sg_separator_label = new System.Windows.Forms.Label();
-            this.Si_ItemDGV = new System.Windows.Forms.DataGridView();
             this.pib_id = new System.Windows.Forms.Label();
             this.pi_cardcode = new System.Windows.Forms.Label();
             this.pi_cardcode_label = new System.Windows.Forms.Label();
             this.Fresh = new System.Windows.Forms.LinkLabel();
             this.label3 = new System.Windows.Forms.Label();
             this.AllCollected = new System.Windows.Forms.Button();
-            this.RefreshDBConnect = new System.Windows.Forms.Timer();
+            this.RefreshDBConnect = new System.Windows.Forms.Timer(this.components);
             this.GetGridOnly = new System.Windows.Forms.CheckBox();
-            this.MidSource = new System.Windows.Forms.BindingSource();
+            this.MidSource = new System.Windows.Forms.BindingSource(this.components);
             this.ChooseAll = new System.Windows.Forms.Button();
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.pi_date = new System.Windows.Forms.Label();
@@ -89,13 +86,6 @@
             this.dataGridViewTextBoxColumn26 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn27 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn28 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_index = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_indexstring = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_expression = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.si_expressionitem = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.FrontCollect = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ExportData = new System.Windows.Forms.Button();
@@ -122,7 +112,6 @@
             this.sg_separator = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.BackCheck = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.griddetno = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            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();
@@ -153,11 +142,24 @@
             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.groupBoxWithBorder5 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.Expression = new System.Windows.Forms.RadioButton();
+            this.Equal = new System.Windows.Forms.RadioButton();
+            this.groupBoxWithBorder4 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.label20 = new System.Windows.Forms.Label();
+            this.BackCombo = new System.Windows.Forms.ComboBox();
+            this.label19 = new System.Windows.Forms.Label();
+            this.FrontCombo = new System.Windows.Forms.ComboBox();
             this.SingleLabelPrinter = new UAS_LabelMachine.CustomControl.PrinterCombox();
             this.SingleLabelPrint = new System.Windows.Forms.Button();
             this.SingleLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.SingleLabelCombox = new System.Windows.Forms.ComboBox();
             this.MidLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.groupBoxWithBorder2 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.cu_print_midprod = new System.Windows.Forms.CheckBox();
+            this.cu_print_midpo = new System.Windows.Forms.CheckBox();
+            this.cu_print_midspec = new System.Windows.Forms.CheckBox();
+            this.cu_print_midlotno = new System.Windows.Forms.CheckBox();
             this.MidLabelNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label5 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
@@ -168,6 +170,13 @@
             this.MidLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.MidLabelCombox = new System.Windows.Forms.ComboBox();
             this.OutBoxLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.label9 = new System.Windows.Forms.Label();
+            this.cu_print_papercount = new System.Windows.Forms.NumericUpDown();
+            this.groupBoxWithBorder3 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.cu_print_outprod = new System.Windows.Forms.CheckBox();
+            this.cu_print_outpo = new System.Windows.Forms.CheckBox();
+            this.cu_print_outspec = new System.Windows.Forms.CheckBox();
+            this.cu_print_outlotno = new System.Windows.Forms.CheckBox();
             this.LogingOut = new System.Windows.Forms.LinkLabel();
             this.OutBoxNum = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.label10 = new System.Windows.Forms.Label();
@@ -179,15 +188,19 @@
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             this.FrontendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
             this.BackendCheck = new UAS_LabelMachine.CustomControl.SerialPortWithTag();
-            ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.CollectionProcess.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
             this.SingleLabel.SuspendLayout();
+            this.groupBoxWithBorder5.SuspendLayout();
+            this.groupBoxWithBorder4.SuspendLayout();
             this.MidLabel.SuspendLayout();
+            this.groupBoxWithBorder2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).BeginInit();
             this.OutBoxLabel.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).BeginInit();
+            this.groupBoxWithBorder3.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).BeginInit();
             this.SuspendLayout();
             // 
@@ -201,16 +214,6 @@
             this.pi_inoutno_label.TabIndex = 3;
             this.pi_inoutno_label.Text = "出货单号";
             // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(3, 66);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(65, 20);
-            this.label1.TabIndex = 31;
-            this.label1.Text = "采集策略";
-            // 
             // label2
             // 
             this.label2.AutoSize = true;
@@ -263,31 +266,6 @@
             this.后端复核.TabIndex = 55;
             this.后端复核.Text = "后端复核";
             // 
-            // CollectionUnit
-            // 
-            this.CollectionUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.CollectionUnit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectionUnit.FormattingEnabled = true;
-            this.CollectionUnit.Items.AddRange(new object[] {
-            "盘",
-            "盒",
-            "全部"});
-            this.CollectionUnit.Location = new System.Drawing.Point(296, 180);
-            this.CollectionUnit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.CollectionUnit.Name = "CollectionUnit";
-            this.CollectionUnit.Size = new System.Drawing.Size(54, 25);
-            this.CollectionUnit.TabIndex = 41;
-            // 
-            // CollectionUnit_label
-            // 
-            this.CollectionUnit_label.AutoSize = true;
-            this.CollectionUnit_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CollectionUnit_label.Location = new System.Drawing.Point(228, 182);
-            this.CollectionUnit_label.Name = "CollectionUnit_label";
-            this.CollectionUnit_label.Size = new System.Drawing.Size(65, 20);
-            this.CollectionUnit_label.TabIndex = 56;
-            this.CollectionUnit_label.Text = "采集单位";
-            // 
             // sg_separator_label
             // 
             this.sg_separator_label.AutoSize = true;
@@ -298,27 +276,6 @@
             this.sg_separator_label.TabIndex = 61;
             this.sg_separator_label.Text = "分隔符";
             // 
-            // Si_ItemDGV
-            // 
-            this.Si_ItemDGV.AllowUserToAddRows = false;
-            this.Si_ItemDGV.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.Si_ItemDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.Si_ItemDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.si_detno,
-            this.si_index,
-            this.si_kind,
-            this.si_indexstring,
-            this.si_length,
-            this.si_expression,
-            this.si_expressionitem});
-            this.Si_ItemDGV.Location = new System.Drawing.Point(1250, 273);
-            this.Si_ItemDGV.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.Si_ItemDGV.Name = "Si_ItemDGV";
-            this.Si_ItemDGV.RowTemplate.Height = 23;
-            this.Si_ItemDGV.Size = new System.Drawing.Size(134, 144);
-            this.Si_ItemDGV.TabIndex = 65;
-            this.Si_ItemDGV.Visible = false;
-            // 
             // pib_id
             // 
             this.pib_id.AutoSize = true;
@@ -363,7 +320,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(5, 587);
+            this.label3.Location = new System.Drawing.Point(5, 607);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 29;
@@ -372,7 +329,7 @@
             // AllCollected
             // 
             this.AllCollected.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AllCollected.Location = new System.Drawing.Point(282, 222);
+            this.AllCollected.Location = new System.Drawing.Point(232, 218);
             this.AllCollected.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.AllCollected.Name = "AllCollected";
             this.AllCollected.Size = new System.Drawing.Size(68, 26);
@@ -399,7 +356,7 @@
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(4, 252);
+            this.ChooseAll.Location = new System.Drawing.Point(4, 278);
             this.ChooseAll.Margin = new System.Windows.Forms.Padding(2);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(38, 22);
@@ -427,8 +384,9 @@
             "采集策略设置",
             "附加信息设置",
             "客户标签维护",
+            "客户采集规则",
             "参数配置"});
-            this.ListButtonMenu.Location = new System.Drawing.Point(270, 129);
+            this.ListButtonMenu.Location = new System.Drawing.Point(232, 128);
             this.ListButtonMenu.Name = "ListButtonMenu";
             this.ListButtonMenu.Size = new System.Drawing.Size(97, 84);
             this.ListButtonMenu.TabIndex = 88;
@@ -745,59 +703,6 @@
             this.dataGridViewTextBoxColumn28.Name = "dataGridViewTextBoxColumn28";
             this.dataGridViewTextBoxColumn28.Visible = false;
             // 
-            // si_detno
-            // 
-            this.si_detno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.si_detno.DataPropertyName = "si_detno";
-            this.si_detno.Frozen = true;
-            this.si_detno.HeaderText = "顺序";
-            this.si_detno.Name = "si_detno";
-            this.si_detno.ReadOnly = true;
-            this.si_detno.Width = 60;
-            // 
-            // si_index
-            // 
-            this.si_index.DataPropertyName = "si_index";
-            this.si_index.HeaderText = "起始位置";
-            this.si_index.Name = "si_index";
-            this.si_index.Visible = false;
-            // 
-            // si_kind
-            // 
-            this.si_kind.DataPropertyName = "si_kind";
-            this.si_kind.HeaderText = "解析方式";
-            this.si_kind.Name = "si_kind";
-            this.si_kind.Visible = false;
-            // 
-            // si_indexstring
-            // 
-            this.si_indexstring.DataPropertyName = "si_indexstring";
-            this.si_indexstring.HeaderText = "索引字符";
-            this.si_indexstring.Name = "si_indexstring";
-            this.si_indexstring.Visible = false;
-            // 
-            // si_length
-            // 
-            this.si_length.DataPropertyName = "si_length";
-            this.si_length.HeaderText = "长度";
-            this.si_length.Name = "si_length";
-            this.si_length.Visible = false;
-            // 
-            // si_expression
-            // 
-            this.si_expression.DataPropertyName = "si_expression";
-            this.si_expression.HeaderText = "正则表达式";
-            this.si_expression.Name = "si_expression";
-            this.si_expression.Visible = false;
-            // 
-            // si_expressionitem
-            // 
-            this.si_expressionitem.DataPropertyName = "si_expressionitem";
-            this.si_expressionitem.Frozen = true;
-            this.si_expressionitem.HeaderText = "正则项次";
-            this.si_expressionitem.Name = "si_expressionitem";
-            this.si_expressionitem.Visible = false;
-            // 
             // FrontCollect
             // 
             this.FrontCollect.Enabled = false;
@@ -822,11 +727,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.SingleBoxBegin);
             this.groupBoxWithBorder1.Controls.Add(this.label12);
             this.groupBoxWithBorder1.Controls.Add(this.label7);
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(599, 6);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(468, 6);
             this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
             this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(151, 238);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(151, 269);
             this.groupBoxWithBorder1.TabIndex = 81;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = " 打印参数设置";
@@ -945,7 +850,7 @@
             this.CollectionProcess.Controls.Add(this.label13);
             this.CollectionProcess.Controls.Add(this.Installed);
             this.CollectionProcess.Controls.Add(this.Process);
-            this.CollectionProcess.Location = new System.Drawing.Point(464, 10);
+            this.CollectionProcess.Location = new System.Drawing.Point(334, 9);
             this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2);
             this.CollectionProcess.Name = "CollectionProcess";
             this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2);
@@ -1104,29 +1009,10 @@
             this.griddetno.TabIndex = 50;
             this.griddetno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.griddetno_KeyDown);
             // 
-            // sg_code
-            // 
-            this.sg_code.AllPower = null;
-            this.sg_code.Caller = null;
-            this.sg_code.Condition = null;
-            this.sg_code.DBTitle = null;
-            this.sg_code.FormName = null;
-            this.sg_code.Location = new System.Drawing.Point(76, 66);
-            this.sg_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.sg_code.Name = "sg_code";
-            this.sg_code.Power = null;
-            this.sg_code.ReturnData = null;
-            this.sg_code.SelectField = null;
-            this.sg_code.SetValueField = null;
-            this.sg_code.Size = new System.Drawing.Size(149, 24);
-            this.sg_code.TabIndex = 32;
-            this.sg_code.TableName = null;
-            this.sg_code.TextBoxEnable = false;
-            // 
             // MessageLog
             // 
             this.MessageLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MessageLog.Location = new System.Drawing.Point(4, 610);
+            this.MessageLog.Location = new System.Drawing.Point(4, 631);
             this.MessageLog.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MessageLog.Name = "MessageLog";
             this.MessageLog.Size = new System.Drawing.Size(1383, 97);
@@ -1166,15 +1052,13 @@
             this.pr_spec,
             this.pib_outboxcode1,
             this.pib_outboxcode2});
-            this.LabelInf.Location = new System.Drawing.Point(2, 252);
+            this.LabelInf.Location = new System.Drawing.Point(2, 279);
             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(1385, 326);
             this.LabelInf.TabIndex = 27;
-            this.LabelInf.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellEndEdit);
             this.LabelInf.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.LabelInf_CellPainting);
-            this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
             // Choose
@@ -1403,34 +1287,126 @@
             // 
             // SingleLabel
             // 
+            this.SingleLabel.Controls.Add(this.groupBoxWithBorder5);
+            this.SingleLabel.Controls.Add(this.groupBoxWithBorder4);
             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(753, 6);
+            this.SingleLabel.Location = new System.Drawing.Point(624, 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.Size = new System.Drawing.Size(194, 269);
             this.SingleLabel.TabIndex = 77;
             this.SingleLabel.TabStop = false;
             this.SingleLabel.Text = "单盘标签";
             // 
+            // groupBoxWithBorder5
+            // 
+            this.groupBoxWithBorder5.Controls.Add(this.Expression);
+            this.groupBoxWithBorder5.Controls.Add(this.Equal);
+            this.groupBoxWithBorder5.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.groupBoxWithBorder5.Location = new System.Drawing.Point(10, 120);
+            this.groupBoxWithBorder5.Name = "groupBoxWithBorder5";
+            this.groupBoxWithBorder5.Size = new System.Drawing.Size(176, 64);
+            this.groupBoxWithBorder5.TabIndex = 95;
+            this.groupBoxWithBorder5.TabStop = false;
+            this.groupBoxWithBorder5.Text = "客户料号匹配模式";
+            // 
+            // Expression
+            // 
+            this.Expression.AutoSize = true;
+            this.Expression.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Expression.Location = new System.Drawing.Point(87, 32);
+            this.Expression.Name = "Expression";
+            this.Expression.Size = new System.Drawing.Size(62, 21);
+            this.Expression.TabIndex = 1;
+            this.Expression.TabStop = true;
+            this.Expression.Text = "表达式";
+            this.Expression.UseVisualStyleBackColor = true;
+            // 
+            // Equal
+            // 
+            this.Equal.AutoSize = true;
+            this.Equal.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Equal.Location = new System.Drawing.Point(20, 32);
+            this.Equal.Name = "Equal";
+            this.Equal.Size = new System.Drawing.Size(50, 21);
+            this.Equal.TabIndex = 0;
+            this.Equal.TabStop = true;
+            this.Equal.Text = "相等";
+            this.Equal.UseVisualStyleBackColor = true;
+            // 
+            // groupBoxWithBorder4
+            // 
+            this.groupBoxWithBorder4.Controls.Add(this.label20);
+            this.groupBoxWithBorder4.Controls.Add(this.BackCombo);
+            this.groupBoxWithBorder4.Controls.Add(this.label19);
+            this.groupBoxWithBorder4.Controls.Add(this.FrontCombo);
+            this.groupBoxWithBorder4.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.groupBoxWithBorder4.Location = new System.Drawing.Point(10, 186);
+            this.groupBoxWithBorder4.Name = "groupBoxWithBorder4";
+            this.groupBoxWithBorder4.Size = new System.Drawing.Size(176, 78);
+            this.groupBoxWithBorder4.TabIndex = 41;
+            this.groupBoxWithBorder4.TabStop = false;
+            this.groupBoxWithBorder4.Text = "扫描区域";
+            // 
+            // label20
+            // 
+            this.label20.AutoSize = true;
+            this.label20.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.label20.Location = new System.Drawing.Point(11, 49);
+            this.label20.Name = "label20";
+            this.label20.Size = new System.Drawing.Size(37, 20);
+            this.label20.TabIndex = 94;
+            this.label20.Text = "后端";
+            // 
+            // BackCombo
+            // 
+            this.BackCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.BackCombo.Font = new System.Drawing.Font("微软雅黑", 8F);
+            this.BackCombo.FormattingEnabled = true;
+            this.BackCombo.Location = new System.Drawing.Point(55, 48);
+            this.BackCombo.Name = "BackCombo";
+            this.BackCombo.Size = new System.Drawing.Size(109, 24);
+            this.BackCombo.TabIndex = 93;
+            // 
+            // label19
+            // 
+            this.label19.AutoSize = true;
+            this.label19.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.label19.Location = new System.Drawing.Point(11, 24);
+            this.label19.Name = "label19";
+            this.label19.Size = new System.Drawing.Size(37, 20);
+            this.label19.TabIndex = 92;
+            this.label19.Text = "前端";
+            // 
+            // FrontCombo
+            // 
+            this.FrontCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.FrontCombo.Font = new System.Drawing.Font("微软雅黑", 8F);
+            this.FrontCombo.FormattingEnabled = true;
+            this.FrontCombo.Location = new System.Drawing.Point(55, 22);
+            this.FrontCombo.Name = "FrontCombo";
+            this.FrontCombo.Size = new System.Drawing.Size(109, 24);
+            this.FrontCombo.TabIndex = 0;
+            // 
             // 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.Location = new System.Drawing.Point(6, 59);
             this.SingleLabelPrinter.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
             this.SingleLabelPrinter.Name = "SingleLabelPrinter";
-            this.SingleLabelPrinter.Size = new System.Drawing.Size(142, 30);
+            this.SingleLabelPrinter.Size = new System.Drawing.Size(180, 25);
             this.SingleLabelPrinter.TabIndex = 40;
             // 
             // 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.Location = new System.Drawing.Point(118, 89);
             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);
@@ -1443,7 +1419,7 @@
             // 
             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.Location = new System.Drawing.Point(10, 90);
             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);
@@ -1456,15 +1432,16 @@
             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)));
             this.SingleLabelCombox.FormattingEnabled = true;
-            this.SingleLabelCombox.Location = new System.Drawing.Point(7, 46);
+            this.SingleLabelCombox.Location = new System.Drawing.Point(7, 27);
             this.SingleLabelCombox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SingleLabelCombox.Name = "SingleLabelCombox";
-            this.SingleLabelCombox.Size = new System.Drawing.Size(143, 25);
+            this.SingleLabelCombox.Size = new System.Drawing.Size(179, 25);
             this.SingleLabelCombox.TabIndex = 0;
             this.SingleLabelCombox.SelectedIndexChanged += new System.EventHandler(this.SingleLabelCombox_SelectedIndexChanged);
             // 
             // MidLabel
             // 
+            this.MidLabel.Controls.Add(this.groupBoxWithBorder2);
             this.MidLabel.Controls.Add(this.MidLabelNum);
             this.MidLabel.Controls.Add(this.label5);
             this.MidLabel.Controls.Add(this.label4);
@@ -1475,23 +1452,87 @@
             this.MidLabel.Controls.Add(this.MidLabelAutoPrint);
             this.MidLabel.Controls.Add(this.MidLabelCombox);
             this.MidLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabel.Location = new System.Drawing.Point(914, 6);
+            this.MidLabel.Location = new System.Drawing.Point(824, 6);
             this.MidLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabel.Name = "MidLabel";
             this.MidLabel.Padding = new System.Windows.Forms.Padding(2);
-            this.MidLabel.Size = new System.Drawing.Size(293, 238);
+            this.MidLabel.Size = new System.Drawing.Size(279, 269);
             this.MidLabel.TabIndex = 78;
             this.MidLabel.TabStop = false;
             this.MidLabel.Text = "中盒标签";
             // 
+            // groupBoxWithBorder2
+            // 
+            this.groupBoxWithBorder2.Controls.Add(this.cu_print_midprod);
+            this.groupBoxWithBorder2.Controls.Add(this.cu_print_midpo);
+            this.groupBoxWithBorder2.Controls.Add(this.cu_print_midspec);
+            this.groupBoxWithBorder2.Controls.Add(this.cu_print_midlotno);
+            this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(168, 143);
+            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(103, 121);
+            this.groupBoxWithBorder2.TabIndex = 81;
+            this.groupBoxWithBorder2.TabStop = false;
+            this.groupBoxWithBorder2.Text = "合并条件";
+            // 
+            // cu_print_midprod
+            // 
+            this.cu_print_midprod.AutoSize = true;
+            this.cu_print_midprod.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midprod.Location = new System.Drawing.Point(14, 94);
+            this.cu_print_midprod.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_midprod.Name = "cu_print_midprod";
+            this.cu_print_midprod.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_midprod.TabIndex = 92;
+            this.cu_print_midprod.Text = "客户料号";
+            this.cu_print_midprod.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midpo
+            // 
+            this.cu_print_midpo.AutoSize = true;
+            this.cu_print_midpo.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midpo.Location = new System.Drawing.Point(14, 70);
+            this.cu_print_midpo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_midpo.Name = "cu_print_midpo";
+            this.cu_print_midpo.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_midpo.TabIndex = 93;
+            this.cu_print_midpo.Text = "客户合同";
+            this.cu_print_midpo.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midspec
+            // 
+            this.cu_print_midspec.AutoSize = true;
+            this.cu_print_midspec.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midspec.Location = new System.Drawing.Point(14, 47);
+            this.cu_print_midspec.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_midspec.Name = "cu_print_midspec";
+            this.cu_print_midspec.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_midspec.TabIndex = 94;
+            this.cu_print_midspec.Text = "出库型号";
+            this.cu_print_midspec.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_midlotno
+            // 
+            this.cu_print_midlotno.AutoSize = true;
+            this.cu_print_midlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_midlotno.Location = new System.Drawing.Point(14, 21);
+            this.cu_print_midlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_midlotno.Name = "cu_print_midlotno";
+            this.cu_print_midlotno.Size = new System.Drawing.Size(63, 21);
+            this.cu_print_midlotno.TabIndex = 95;
+            this.cu_print_midlotno.Text = "LotNo";
+            this.cu_print_midlotno.UseVisualStyleBackColor = true;
+            // 
             // MidLabelNum
             // 
             this.MidLabelNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelNum.ID = null;
-            this.MidLabelNum.Location = new System.Drawing.Point(52, 169);
+            this.MidLabelNum.Location = new System.Drawing.Point(201, 60);
             this.MidLabelNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelNum.Name = "MidLabelNum";
-            this.MidLabelNum.Size = new System.Drawing.Size(64, 23);
+            this.MidLabelNum.Size = new System.Drawing.Size(44, 23);
             this.MidLabelNum.Str = null;
             this.MidLabelNum.Str1 = null;
             this.MidLabelNum.Str2 = null;
@@ -1501,7 +1542,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(6, 174);
+            this.label5.Location = new System.Drawing.Point(165, 64);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(32, 17);
             this.label5.TabIndex = 50;
@@ -1511,7 +1552,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(6, 142);
+            this.label4.Location = new System.Drawing.Point(165, 33);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(32, 17);
             this.label4.TabIndex = 49;
@@ -1520,17 +1561,17 @@
             // MidLabelPrinter
             // 
             this.MidLabelPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelPrinter.Location = new System.Drawing.Point(6, 78);
+            this.MidLabelPrinter.Location = new System.Drawing.Point(9, 59);
             this.MidLabelPrinter.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
             this.MidLabelPrinter.Name = "MidLabelPrinter";
-            this.MidLabelPrinter.Size = new System.Drawing.Size(142, 30);
+            this.MidLabelPrinter.Size = new System.Drawing.Size(150, 25);
             this.MidLabelPrinter.TabIndex = 41;
             // 
             // label15
             // 
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(101, 138);
+            this.label15.Location = new System.Drawing.Point(251, 32);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(20, 17);
             this.label15.TabIndex = 40;
@@ -1539,7 +1580,7 @@
             // MidBoxCapacity
             // 
             this.MidBoxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidBoxCapacity.Location = new System.Drawing.Point(52, 135);
+            this.MidBoxCapacity.Location = new System.Drawing.Point(201, 29);
             this.MidBoxCapacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidBoxCapacity.Name = "MidBoxCapacity";
             this.MidBoxCapacity.Size = new System.Drawing.Size(44, 23);
@@ -1549,7 +1590,7 @@
             // MidLabelPrint
             // 
             this.MidLabelPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidLabelPrint.Location = new System.Drawing.Point(80, 202);
+            this.MidLabelPrint.Location = new System.Drawing.Point(93, 88);
             this.MidLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelPrint.Name = "MidLabelPrint";
             this.MidLabelPrint.Size = new System.Drawing.Size(68, 26);
@@ -1562,7 +1603,7 @@
             // 
             this.MidLabelAutoPrint.AutoSize = true;
             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(9, 109);
+            this.MidLabelAutoPrint.Location = new System.Drawing.Point(10, 91);
             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);
@@ -1575,15 +1616,18 @@
             this.MidLabelCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.MidLabelCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MidLabelCombox.FormattingEnabled = true;
-            this.MidLabelCombox.Location = new System.Drawing.Point(7, 46);
+            this.MidLabelCombox.Location = new System.Drawing.Point(10, 27);
             this.MidLabelCombox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MidLabelCombox.Name = "MidLabelCombox";
-            this.MidLabelCombox.Size = new System.Drawing.Size(141, 25);
+            this.MidLabelCombox.Size = new System.Drawing.Size(149, 25);
             this.MidLabelCombox.TabIndex = 40;
             this.MidLabelCombox.SelectedIndexChanged += new System.EventHandler(this.MidLabelCombox_SelectedIndexChanged);
             // 
             // OutBoxLabel
             // 
+            this.OutBoxLabel.Controls.Add(this.label9);
+            this.OutBoxLabel.Controls.Add(this.cu_print_papercount);
+            this.OutBoxLabel.Controls.Add(this.groupBoxWithBorder3);
             this.OutBoxLabel.Controls.Add(this.LogingOut);
             this.OutBoxLabel.Controls.Add(this.OutBoxNum);
             this.OutBoxLabel.Controls.Add(this.label10);
@@ -1594,19 +1638,102 @@
             this.OutBoxLabel.Controls.Add(this.OutBoxLabelAutoPrint);
             this.OutBoxLabel.Controls.Add(this.OutBoxCombox);
             this.OutBoxLabel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabel.Location = new System.Drawing.Point(1212, 6);
+            this.OutBoxLabel.Location = new System.Drawing.Point(1106, 6);
             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(172, 238);
+            this.OutBoxLabel.Size = new System.Drawing.Size(278, 269);
             this.OutBoxLabel.TabIndex = 79;
             this.OutBoxLabel.TabStop = false;
             this.OutBoxLabel.Text = "外箱标签";
             // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(170, 44);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(32, 17);
+            this.label9.TabIndex = 98;
+            this.label9.Text = "纸型";
+            // 
+            // cu_print_papercount
+            // 
+            this.cu_print_papercount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_papercount.Location = new System.Drawing.Point(210, 40);
+            this.cu_print_papercount.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_papercount.Name = "cu_print_papercount";
+            this.cu_print_papercount.Size = new System.Drawing.Size(38, 23);
+            this.cu_print_papercount.TabIndex = 97;
+            // 
+            // groupBoxWithBorder3
+            // 
+            this.groupBoxWithBorder3.Controls.Add(this.cu_print_outprod);
+            this.groupBoxWithBorder3.Controls.Add(this.cu_print_outpo);
+            this.groupBoxWithBorder3.Controls.Add(this.cu_print_outspec);
+            this.groupBoxWithBorder3.Controls.Add(this.cu_print_outlotno);
+            this.groupBoxWithBorder3.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.groupBoxWithBorder3.Location = new System.Drawing.Point(171, 143);
+            this.groupBoxWithBorder3.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder3.Name = "groupBoxWithBorder3";
+            this.groupBoxWithBorder3.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder3.Size = new System.Drawing.Size(103, 121);
+            this.groupBoxWithBorder3.TabIndex = 96;
+            this.groupBoxWithBorder3.TabStop = false;
+            this.groupBoxWithBorder3.Text = "合并条件";
+            // 
+            // cu_print_outprod
+            // 
+            this.cu_print_outprod.AutoSize = true;
+            this.cu_print_outprod.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outprod.Location = new System.Drawing.Point(14, 94);
+            this.cu_print_outprod.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_outprod.Name = "cu_print_outprod";
+            this.cu_print_outprod.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_outprod.TabIndex = 92;
+            this.cu_print_outprod.Text = "客户料号";
+            this.cu_print_outprod.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outpo
+            // 
+            this.cu_print_outpo.AutoSize = true;
+            this.cu_print_outpo.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outpo.Location = new System.Drawing.Point(14, 70);
+            this.cu_print_outpo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_outpo.Name = "cu_print_outpo";
+            this.cu_print_outpo.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_outpo.TabIndex = 93;
+            this.cu_print_outpo.Text = "客户合同";
+            this.cu_print_outpo.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outspec
+            // 
+            this.cu_print_outspec.AutoSize = true;
+            this.cu_print_outspec.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outspec.Location = new System.Drawing.Point(14, 47);
+            this.cu_print_outspec.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_outspec.Name = "cu_print_outspec";
+            this.cu_print_outspec.Size = new System.Drawing.Size(75, 21);
+            this.cu_print_outspec.TabIndex = 94;
+            this.cu_print_outspec.Text = "出库型号";
+            this.cu_print_outspec.UseVisualStyleBackColor = true;
+            // 
+            // cu_print_outlotno
+            // 
+            this.cu_print_outlotno.AutoSize = true;
+            this.cu_print_outlotno.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cu_print_outlotno.Location = new System.Drawing.Point(14, 21);
+            this.cu_print_outlotno.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cu_print_outlotno.Name = "cu_print_outlotno";
+            this.cu_print_outlotno.Size = new System.Drawing.Size(63, 21);
+            this.cu_print_outlotno.TabIndex = 95;
+            this.cu_print_outlotno.Text = "LotNo";
+            this.cu_print_outlotno.UseVisualStyleBackColor = true;
+            // 
             // LogingOut
             // 
             this.LogingOut.AutoSize = true;
-            this.LogingOut.Location = new System.Drawing.Point(112, 13);
+            this.LogingOut.Location = new System.Drawing.Point(229, 14);
             this.LogingOut.Name = "LogingOut";
             this.LogingOut.Size = new System.Drawing.Size(42, 21);
             this.LogingOut.TabIndex = 77;
@@ -1618,10 +1745,10 @@
             // 
             this.OutBoxNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxNum.ID = null;
-            this.OutBoxNum.Location = new System.Drawing.Point(47, 169);
+            this.OutBoxNum.Location = new System.Drawing.Point(211, 100);
             this.OutBoxNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxNum.Name = "OutBoxNum";
-            this.OutBoxNum.Size = new System.Drawing.Size(56, 23);
+            this.OutBoxNum.Size = new System.Drawing.Size(37, 23);
             this.OutBoxNum.Str = null;
             this.OutBoxNum.Str1 = null;
             this.OutBoxNum.Str2 = null;
@@ -1631,7 +1758,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(6, 172);
+            this.label10.Location = new System.Drawing.Point(170, 103);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(32, 17);
             this.label10.TabIndex = 90;
@@ -1641,7 +1768,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(6, 142);
+            this.label6.Location = new System.Drawing.Point(170, 73);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(32, 17);
             this.label6.TabIndex = 87;
@@ -1650,16 +1777,16 @@
             // OutBoxPrinter
             // 
             this.OutBoxPrinter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxPrinter.Location = new System.Drawing.Point(8, 78);
+            this.OutBoxPrinter.Location = new System.Drawing.Point(8, 60);
             this.OutBoxPrinter.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
             this.OutBoxPrinter.Name = "OutBoxPrinter";
-            this.OutBoxPrinter.Size = new System.Drawing.Size(158, 30);
+            this.OutBoxPrinter.Size = new System.Drawing.Size(158, 25);
             this.OutBoxPrinter.TabIndex = 82;
             // 
             // OutboxCapacity
             // 
             this.OutboxCapacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutboxCapacity.Location = new System.Drawing.Point(46, 138);
+            this.OutboxCapacity.Location = new System.Drawing.Point(210, 69);
             this.OutboxCapacity.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutboxCapacity.Name = "OutboxCapacity";
             this.OutboxCapacity.Size = new System.Drawing.Size(38, 23);
@@ -1674,7 +1801,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(91, 202);
+            this.OutBoxLabelPrint.Location = new System.Drawing.Point(90, 89);
             this.OutBoxLabelPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelPrint.Name = "OutBoxLabelPrint";
             this.OutBoxLabelPrint.Size = new System.Drawing.Size(76, 26);
@@ -1687,7 +1814,7 @@
             // 
             this.OutBoxLabelAutoPrint.AutoSize = true;
             this.OutBoxLabelAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(9, 109);
+            this.OutBoxLabelAutoPrint.Location = new System.Drawing.Point(9, 91);
             this.OutBoxLabelAutoPrint.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxLabelAutoPrint.Name = "OutBoxLabelAutoPrint";
             this.OutBoxLabelAutoPrint.Size = new System.Drawing.Size(75, 21);
@@ -1700,10 +1827,10 @@
             this.OutBoxCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.OutBoxCombox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxCombox.FormattingEnabled = true;
-            this.OutBoxCombox.Location = new System.Drawing.Point(8, 44);
+            this.OutBoxCombox.Location = new System.Drawing.Point(9, 29);
             this.OutBoxCombox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OutBoxCombox.Name = "OutBoxCombox";
-            this.OutBoxCombox.Size = new System.Drawing.Size(158, 25);
+            this.OutBoxCombox.Size = new System.Drawing.Size(157, 25);
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
@@ -1720,7 +1847,7 @@
             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(1389, 711);
+            this.ClientSize = new System.Drawing.Size(1389, 729);
             this.Controls.Add(this.label8);
             this.Controls.Add(this.FrontCollect);
             this.Controls.Add(this.ButtonSetting);
@@ -1734,12 +1861,9 @@
             this.Controls.Add(this.pi_cardcode_label);
             this.Controls.Add(this.pi_cardcode);
             this.Controls.Add(this.pib_id);
-            this.Controls.Add(this.Si_ItemDGV);
             this.Controls.Add(this.CollectionProcess);
             this.Controls.Add(this.sg_separator);
             this.Controls.Add(this.sg_separator_label);
-            this.Controls.Add(this.CollectionUnit_label);
-            this.Controls.Add(this.CollectionUnit);
             this.Controls.Add(this.后端复核);
             this.Controls.Add(this.BackCheck);
             this.Controls.Add(this.pr_code_label);
@@ -1747,8 +1871,6 @@
             this.Controls.Add(this.AutoMatch);
             this.Controls.Add(this.label22);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.sg_code);
-            this.Controls.Add(this.label1);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.MessageLog);
             this.Controls.Add(this.LabelInf);
@@ -1766,7 +1888,6 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.贴标机条码打印_FormClosing);
             this.Load += new System.EventHandler(this.贴标机条码打印_Load);
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
-            ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
@@ -1775,11 +1896,20 @@
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
             this.SingleLabel.ResumeLayout(false);
             this.SingleLabel.PerformLayout();
+            this.groupBoxWithBorder5.ResumeLayout(false);
+            this.groupBoxWithBorder5.PerformLayout();
+            this.groupBoxWithBorder4.ResumeLayout(false);
+            this.groupBoxWithBorder4.PerformLayout();
             this.MidLabel.ResumeLayout(false);
             this.MidLabel.PerformLayout();
+            this.groupBoxWithBorder2.ResumeLayout(false);
+            this.groupBoxWithBorder2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).EndInit();
             this.OutBoxLabel.ResumeLayout(false);
             this.OutBoxLabel.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).EndInit();
+            this.groupBoxWithBorder3.ResumeLayout(false);
+            this.groupBoxWithBorder3.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -1833,7 +1963,6 @@
         private System.Windows.Forms.Label pi_inoutno_label;
         private CustomControl.DataGridViewWithSerialNum LabelInf;
         private CustomControl.RichText.RichTextAutoBottom MessageLog;
-        private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label22;
         private System.Windows.Forms.CheckBox AutoMatch;
@@ -1841,8 +1970,6 @@
         private System.Windows.Forms.Label pr_code_label;
         private CustomControl.EnterTextBox BackCheck;
         private System.Windows.Forms.Label 后端复核;
-        private System.Windows.Forms.ComboBox CollectionUnit;
-        private System.Windows.Forms.Label CollectionUnit_label;
         private System.Windows.Forms.Label sg_separator_label;
         private CustomControl.EnterTextBox sg_separator;
         private System.Windows.Forms.Label Process;
@@ -1854,8 +1981,6 @@
         private System.Windows.Forms.Label label17;
         private System.Windows.Forms.Label TotalCount;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder CollectionProcess;
-        private System.Windows.Forms.DataGridView Si_ItemDGV;
-        private CustomControl.SearchTextBox sg_code;
         private System.Windows.Forms.Label pib_id;
         private System.Windows.Forms.Label Process_midboxcode;
         private System.Windows.Forms.Label Process_outboxcode;
@@ -1889,14 +2014,7 @@
         private CustomControl.EnterTextBox MidBoxBegin;
         private System.Windows.Forms.Button ExportData;
         private System.Windows.Forms.FolderBrowserDialog ExportFileDialog;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_detno;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_index;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_kind;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_indexstring;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_length;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_expression;
         private System.Windows.Forms.DataGridViewTextBoxColumn si_item;
-        private System.Windows.Forms.DataGridViewTextBoxColumn si_expressionitem;
         private System.Windows.Forms.Label pi_date;
         private System.Windows.Forms.ListBox ListButtonMenu;
         private System.Windows.Forms.Button ButtonSetting;
@@ -1938,5 +2056,25 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn26;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn27;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn28;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder2;
+        private System.Windows.Forms.CheckBox cu_print_midprod;
+        private System.Windows.Forms.CheckBox cu_print_midpo;
+        private System.Windows.Forms.CheckBox cu_print_midspec;
+        private System.Windows.Forms.CheckBox cu_print_midlotno;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder3;
+        private System.Windows.Forms.CheckBox cu_print_outprod;
+        private System.Windows.Forms.CheckBox cu_print_outpo;
+        private System.Windows.Forms.CheckBox cu_print_outspec;
+        private System.Windows.Forms.CheckBox cu_print_outlotno;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.NumericUpDown cu_print_papercount;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder4;
+        private System.Windows.Forms.ComboBox FrontCombo;
+        private System.Windows.Forms.Label label19;
+        private System.Windows.Forms.Label label20;
+        private System.Windows.Forms.ComboBox BackCombo;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder5;
+        private System.Windows.Forms.RadioButton Equal;
+        private System.Windows.Forms.RadioButton Expression;
     }
 }

+ 63 - 159
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

@@ -158,13 +158,7 @@ namespace UAS_LabelMachine
             adh = SystemInf.adh;
             CheckForIllegalCrossThreadCalls = false;
             pi_inoutno.Focus();
-            sg_code.FormName = Name;
-            sg_code.SetValueField = new string[] { "sg_code" };
-            sg_code.SelectField = "sg_code # 策略编号 ,sg_name # 策略名称,sg_brand # 品牌,sg_separator # 分隔符";
-            sg_code.TableName = "scangroup";
-            sg_code.DbChange += Sg_code_DbChange;
 
-            CollectionUnit.Text = "盘";
             Point pt = new Point();
             //禁止所有列的排序
             foreach (DataGridViewColumn dgv in LabelInf.Columns)
@@ -265,7 +259,7 @@ namespace UAS_LabelMachine
                             }
                             index = index + 1;
                         }
-                        adh.ExecuteSql("update prodiobarcode set pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "' where pib_id=" + pib_id , "update");
+                        adh.ExecuteSql("update prodiobarcode set pib_lotno='" + LotNo + "',pib_datecode='" + DateCode + "' where pib_id=" + pib_id, "update");
                         break;
                     case "BackendCheck":
                         BackCheck.Text = msg;
@@ -280,12 +274,6 @@ namespace UAS_LabelMachine
             }
         }
 
-        private void Sg_code_DbChange(object sender, EventArgs e)
-        {
-            DataTable dt = sg_code.ReturnData;
-            BaseUtil.SetFormValue(this.Controls, dt);
-        }
-
         //只执行一次窗体自适应
         bool AutoSized = false;
         private void 贴标机条码打印_SizeChanged(object sender, EventArgs e)
@@ -333,11 +321,6 @@ namespace UAS_LabelMachine
                     MessageBox.Show("采集的数据不能为空");
                     return;
                 }
-                if (Si_ItemDGV.Rows.Count == 0)
-                {
-                    MessageBox.Show("未维护采集策略");
-                    return;
-                }
                 CollectInputData();
             }
         }
@@ -347,110 +330,41 @@ namespace UAS_LabelMachine
         /// </summary>
         private void CollectInputData()
         {
-            LogManager.DoLog("采集数据【" + BackCheck.Text + "】,使用采集策略编号【" + sg_code.Text + "】");
+            //数据校验均已通过则勾选上已采集
+            if (CollectVeProdCodePass && CollectQTYPass)
             {
-                //数据校验均已通过则勾选上已采集
-                if (CollectVeProdCodePass && CollectQTYPass)
+                //如果按盒号采集,所有的此盒的均更新为
+                DataTable dt = (DataTable)MidSource.DataSource;
+                LabelInf.Rows[CurrentRowIndex].Cells["pib_ifpick"].Value = true;
+                LogicHandler.UpdateRowPicked(LabelInf.Rows[CurrentRowIndex].Cells["pib_id"].Value);
+                LabelInf.Rows[CurrentRowIndex].Cells["Choose"].Value = true;
+                //勾选了单盘自动打印
+                if (SingleLabelAutoPrint.Checked)
                 {
-                    //如果按盒号采集,所有的此盒的均更新为
-                    DataTable dt = (DataTable)MidSource.DataSource;
-                    if (CollectionUnit.Text == "盒")
+                    if (SingleLabelCombox.SelectedValue != null)
                     {
-                        string la_id = "";
-                        if (SingleLabelCombox.SelectedValue != null)
-                        {
-                            la_id = SingleLabelCombox.SelectedValue.ToString().Split('#')[0];
-                        }
-                        for (int i = 0; i < LabelInf.RowCount; i++)
-                        {
-                            if (LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() == LabelInf.Rows[CurrentRowIndex].Cells["pib_outboxcode1"].Value.ToString())
-                            {
-                                dt.Rows[i]["pib_lotno"] = LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value;
-                                dt.Rows[i]["pib_datecode"] = LabelInf.Rows[CurrentRowIndex].Cells["pib_datecode"].Value;
-                                //将采集数据正确的Cell添加到键值对中
-                                if (PaintCell.ContainsKey(LabelInf.Rows[i].Cells["pr_vendprodcode"]))
-                                {
-                                    PaintCell.Remove(LabelInf.Rows[i].Cells["pr_vendprodcode"]);
-                                }
-                                PaintCell.Add(LabelInf.Rows[i].Cells["pr_vendprodcode"], true);
-                                if (PaintCell.ContainsKey(LabelInf.Rows[i].Cells["pib_qty"]))
-                                {
-                                    PaintCell.Remove(LabelInf.Rows[i].Cells["pib_qty"]);
-                                }
-                                PaintCell.Add(LabelInf.Rows[i].Cells["pib_qty"], true);
-                                LabelInf.Refresh();
-                                LabelInf.Rows[i].Cells["pib_ifpick"].Value = true;
-                                LabelInf.Rows[i].Cells["Choose"].Value = true;
-                                //当前行的索引随循环增长
-                                CurrentRowIndex = i;
-                                if (SingleLabelAutoPrint.Checked)
-                                {
-                                    AutoPrintSingleLabel();
-                                }
-                                if (MidLabelAutoPrint.Checked)
-                                    AutoPrintMidLabel();
-                                SetOutBoxCode2(true);
-                            }
-                        }
-                    }
-                    else if (CollectionUnit.Text == "全部")
-                    {
-                        for (int i = 0; i < LabelInf.RowCount; i++)
-                        {
-                            dt.Rows[i]["pib_lotno"] = LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value;
-                            dt.Rows[i]["pib_datecode"] = LabelInf.Rows[CurrentRowIndex].Cells["pib_datecode"].Value;
-                            CurrentRowIndex = i;
-                            //将采集数据正确的Cell添加到键值对中
-                            if (PaintCell.ContainsKey(LabelInf.Rows[i].Cells["pr_vendprodcode"]))
-                            {
-                                PaintCell.Remove(LabelInf.Rows[i].Cells["pr_vendprodcode"]);
-                            }
-                            PaintCell.Add(LabelInf.Rows[i].Cells["pr_vendprodcode"], true);
-                            if (PaintCell.ContainsKey(LabelInf.Rows[i].Cells["pib_qty"]))
-                            {
-                                PaintCell.Remove(LabelInf.Rows[i].Cells["pib_qty"]);
-                            }
-                            PaintCell.Add(LabelInf.Rows[i].Cells["pib_qty"], true);
-                            LabelInf.Refresh();
-                            LabelInf.Rows[i].Cells["pib_ifpick"].Value = true;
-                            LabelInf.Rows[i].Cells["Choose"].Value = true;
-                            SetOutBoxCode2(true);
-                        }
+                        AutoPrintSingleLabel();
                     }
                     else
                     {
-                        LabelInf.Rows[CurrentRowIndex].Cells["pib_ifpick"].Value = true;
-                        LogicHandler.UpdateRowPicked(LabelInf.Rows[CurrentRowIndex].Cells["pib_id"].Value);
-                        LabelInf.Rows[CurrentRowIndex].Cells["Choose"].Value = true;
-                        //勾选了单盘自动打印
-                        if (SingleLabelAutoPrint.Checked)
-                        {
-                            if (SingleLabelCombox.SelectedValue != null)
-                            {
-                                AutoPrintSingleLabel();
-                            }
-                            else
-                            {
-                                MessageBox.Show("未维护单盘标签");
-                                return;
-                            }
-                        }
-                        //勾选了中盒自动打印
-                        if (MidLabelAutoPrint.Checked)
-                            AutoPrintMidLabel();
+                        MessageBox.Show("未维护单盘标签");
+                        return;
                     }
                 }
-                //采集未通过的时候
-                else
-                {
-                    //如果自动采集采集未成功需要移动到下一行
-                    if (!AutoMatch.Checked)
-                        SetRowIndexToCollectRow();
-                }
-                //未勾选自动匹配,设置到下一个未采集的
+                //勾选了中盒自动打印
+                if (MidLabelAutoPrint.Checked)
+                    AutoPrintMidLabel();
+            }
+            //采集未通过的时候
+            else
+            {
+                //如果自动采集采集未成功需要移动到下一行
                 if (!AutoMatch.Checked)
                     SetRowIndexToCollectRow();
             }
+            //未勾选自动匹配,设置到下一个未采集的行
+            if (!AutoMatch.Checked)
+                SetRowIndexToCollectRow();
             //提醒用户需要采集的数据
             RemindUser();
             RefreshProcessData();
@@ -695,6 +609,7 @@ namespace UAS_LabelMachine
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {
+
                     pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
                     pi_date.Text = dt.Rows[0]["pi_date"].ToString();
                     PI_ID = dt.Rows[0]["pi_id"].ToString();
@@ -703,6 +618,36 @@ namespace UAS_LabelMachine
                         string[] param = new string[] { PI_ID, "", "" };
                         dh.CallProcedure("GetCustBarcode", param);
                     }
+                    //获取客户自定义设置
+                    sql.Clear();
+                    sql.Append("select cu_print_midlotno,nvl(cu_print_custprodmatchmodel,'Equal')cu_print_custprodmatchmodel,cu_print_midspec,cu_print_midpo,cu_print_midprod,cu_print_outlotno,cu_print_outspec,cu_print_outpo");
+                    sql.Append(",cu_print_outprod,cu_print_checkonly,nvl(cu_print_papercount,0)cu_print_papercount,cu_print_regexpression from customer where cu_code='" + pi_cardcode.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        switch (dt.Rows[0]["cu_print_custprodmatchmodel"].ToString())
+                        {
+                            case "Equal":
+                                Equal.Checked = true;
+                                break;
+                            case "Expression":
+                                Expression.Checked = true;
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    dt = (DataTable)dh.ExecuteSql("select distinct sg_brand from prodiodetail left join product on pd_prodcode=pr_code left join scangroup on nvl(pd_brand,pr_brand)=sg_brand where pd_inoutno='" + pi_inoutno.Text + "' and sg_brand is not null", "select");
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        FrontCombo.DataSource = dt;
+                        FrontCombo.DisplayMember = "sg_brand";
+                        FrontCombo.ValueMember = "sg_brand";
+                        BackCombo.DataSource = dt;
+                        BackCombo.DisplayMember = "sg_brand";
+                        BackCombo.ValueMember = "sg_brand";
+                    }
                     LoadGridData(sender, e);
                     //重新输入单号后清除缓存
                     MidBoxArgument.Clear();
@@ -1388,42 +1333,18 @@ namespace UAS_LabelMachine
             }
         }
 
-        /// <summary>
-        /// 勾选的时候自动打印
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void LabelInf_CellValueChanged(object sender, DataGridViewCellEventArgs e)
-        {
-            if (LabelInf.Columns[e.ColumnIndex].Name == "pib_datecode")
-            {
-                string datecode = LabelInf.Rows[e.RowIndex].Cells["pib_datecode"].Value.ToString();
-                try
-                {
-                    System.DateTime dt = System.DateTime.ParseExact(datecode, "yyyyMMdd", CultureInfo.CurrentCulture);
-                    GregorianCalendar gc = new GregorianCalendar();
-                    int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
-                    if (weekOfYear < 10)
-                        LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + "0" + weekOfYear;
-                    else
-                        LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
-                }
-                catch (Exception) { }
-            }
-        }
-
         private void AllCollected_Click(object sender, EventArgs e)
         {
             if (AllCollect == false)
             {
                 foreach (DataGridViewRow dr in LabelInf.Rows)
-                    dr.Cells[1].Value = true;
+                    dr.Cells["pib_ifpick"].Value = true;
                 AllCollect = true;
             }
             else
             {
                 foreach (DataGridViewRow dr in LabelInf.Rows)
-                    dr.Cells[1].Value = false;
+                    dr.Cells["pib_ifpick"].Value = false;
                 AllCollect = false;
             }
         }
@@ -1531,28 +1452,6 @@ namespace UAS_LabelMachine
             }
         }
 
-        private void LabelInf_CellEndEdit(object sender, DataGridViewCellEventArgs e)
-        {
-            if (LabelInf.Columns[e.ColumnIndex].Name == "pib_madein" && CollectionUnit.Text == "盒")
-            {
-                string madein = LabelInf.Rows[e.RowIndex].Cells["pib_madein"].Value.ToString();
-                string midbox = LabelInf.Rows[e.RowIndex].Cells["pib_outboxcode1"].Value.ToString();
-                for (int i = 0; i < LabelInf.Rows.Count; i++)
-                {
-                    if (midbox == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
-                        LabelInf.Rows[i].Cells["pib_madein"].Value = madein;
-                }
-            }
-            if (LabelInf.Columns[e.ColumnIndex].Name == "pib_madein" && CollectionUnit.Text == "全部")
-            {
-                string madein = LabelInf.Rows[e.RowIndex].Cells["pib_madein"].Value.ToString();
-                for (int i = 0; i < LabelInf.Rows.Count; i++)
-                {
-                    LabelInf.Rows[i].Cells["pib_madein"].Value = madein;
-                }
-            }
-        }
-
         private void ExportData_Click(object sender, EventArgs e)
         {
             ExportFileDialog.Description = "选择导出的路径";
@@ -1658,6 +1557,11 @@ namespace UAS_LabelMachine
                     form1.FormClosed += LabelFormClose;
                     form1.ShowDialog();
                     break;
+                case "客户采集规则":
+                    CustomerRule cust = new CustomerRule();
+                    BaseUtil.SetFormCenter(cust);
+                    cust.ShowDialog();
+                    break;
                 case "参数配置":
                     ParamSetting form2 = new ParamSetting();
                     BaseUtil.SetFormCenter(form2);

+ 0 - 75
UAS-出货标签管理(吉利通)/UAS_出货标签管理.resx

@@ -117,27 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="si_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_kind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_indexstring.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_length.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_expression.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_expressionitem.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="RefreshDBConnect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
@@ -147,60 +126,6 @@
   <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="si_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_kind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_indexstring.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_length.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_expression.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="si_expressionitem.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_ifmodify.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_ifupload.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_zxbzs.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_ifrecheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_datecode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pib_custbarcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_custprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_custprodspec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="pib_ifmodify.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

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

@@ -119,6 +119,27 @@
             this.label7 = new System.Windows.Forms.Label();
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_midifprint = 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.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pjd_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DateCode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custmidboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = 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.SingleLabelPrinter = new UAS_LabelMachine.CustomControl.PrinterCombox();
@@ -143,27 +164,7 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_midifprint = 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.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pjd_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.DateCode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custmidboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = 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.Reset = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
@@ -626,7 +627,7 @@
             // PackMidBox
             // 
             this.PackMidBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PackMidBox.Location = new System.Drawing.Point(388, 71);
+            this.PackMidBox.Location = new System.Drawing.Point(485, 99);
             this.PackMidBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PackMidBox.Name = "PackMidBox";
             this.PackMidBox.Size = new System.Drawing.Size(64, 26);
@@ -1063,6 +1064,187 @@
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             this.LabelInf.SelectionChanged += new System.EventHandler(this.LabelInf_SelectionChanged);
             // 
+            // 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;
+            // 
+            // pib_ifprint
+            // 
+            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;
+            // 
+            // pib_midifprint
+            // 
+            this.pib_midifprint.DataPropertyName = "pib_midifprint";
+            this.pib_midifprint.HeaderText = "中盒已打印";
+            this.pib_midifprint.Name = "pib_midifprint";
+            this.pib_midifprint.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.pib_midifprint.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.pib_midifprint.Visible = false;
+            this.pib_midifprint.Width = 90;
+            // 
+            // pib_id1
+            // 
+            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;
+            // 
+            // pib_pdno
+            // 
+            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 = 55;
+            // 
+            // pib_prodcode
+            // 
+            this.pib_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.MinimumWidth = 120;
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
+            this.pib_prodcode.Width = 120;
+            // 
+            // pd_custprodcode
+            // 
+            this.pd_custprodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "CPN";
+            this.pd_custprodcode.MinimumWidth = 120;
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.Width = 120;
+            // 
+            // pjd_orispeccode
+            // 
+            this.pjd_orispeccode.DataPropertyName = "pjd_orispeccode";
+            this.pjd_orispeccode.HeaderText = "MPN";
+            this.pjd_orispeccode.Name = "pjd_orispeccode";
+            this.pjd_orispeccode.ReadOnly = true;
+            this.pjd_orispeccode.Visible = false;
+            this.pjd_orispeccode.Width = 48;
+            // 
+            // pib_brand
+            // 
+            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;
+            // 
+            // pr_zxbzs
+            // 
+            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
+            this.pr_zxbzs.HeaderText = "最小包装数";
+            this.pr_zxbzs.Name = "pr_zxbzs";
+            this.pr_zxbzs.ReadOnly = true;
+            this.pr_zxbzs.Visible = false;
+            this.pr_zxbzs.Width = 90;
+            // 
+            // pib_lotno
+            // 
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.ReadOnly = true;
+            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.ReadOnly = true;
+            this.pib_datecode.Width = 78;
+            // 
+            // DateCode1
+            // 
+            this.DateCode1.DataPropertyName = "DateCode1";
+            this.DateCode1.HeaderText = "DateCode1";
+            this.DateCode1.Name = "DateCode1";
+            this.DateCode1.Visible = false;
+            this.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_custbarcode
+            // 
+            this.pib_custbarcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
+            this.pib_custbarcode.HeaderText = "料盘条码";
+            this.pib_custbarcode.MinimumWidth = 100;
+            this.pib_custbarcode.Name = "pib_custbarcode";
+            this.pib_custbarcode.ReadOnly = true;
+            // 
+            // pib_custmidboxcode
+            // 
+            this.pib_custmidboxcode.DataPropertyName = "pib_custmidboxcode";
+            this.pib_custmidboxcode.HeaderText = "中盒条码";
+            this.pib_custmidboxcode.Name = "pib_custmidboxcode";
+            this.pib_custmidboxcode.ReadOnly = true;
+            this.pib_custmidboxcode.Width = 78;
+            // 
+            // pib_custoutboxcode
+            // 
+            this.pib_custoutboxcode.DataPropertyName = "pib_custoutboxcode";
+            this.pib_custoutboxcode.HeaderText = "外箱条码";
+            this.pib_custoutboxcode.Name = "pib_custoutboxcode";
+            this.pib_custoutboxcode.ReadOnly = true;
+            this.pib_custoutboxcode.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;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.ReadOnly = true;
+            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.ReadOnly = true;
+            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.ReadOnly = true;
+            this.pib_outboxcode2.Width = 90;
+            // 
             // pi_inoutno
             // 
             this.pi_inoutno.ID = null;
@@ -1368,186 +1550,17 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // 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;
-            // 
-            // pib_ifprint
-            // 
-            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;
-            // 
-            // pib_midifprint
-            // 
-            this.pib_midifprint.DataPropertyName = "pib_midifprint";
-            this.pib_midifprint.HeaderText = "中盒已打印";
-            this.pib_midifprint.Name = "pib_midifprint";
-            this.pib_midifprint.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.pib_midifprint.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.pib_midifprint.Visible = false;
-            this.pib_midifprint.Width = 90;
-            // 
-            // pib_id1
-            // 
-            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;
-            // 
-            // pib_pdno
-            // 
-            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 = 55;
-            // 
-            // pib_prodcode
-            // 
-            this.pib_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.MinimumWidth = 120;
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
-            this.pib_prodcode.Width = 120;
-            // 
-            // pd_custprodcode
-            // 
-            this.pd_custprodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "CPN";
-            this.pd_custprodcode.MinimumWidth = 120;
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.Width = 120;
-            // 
-            // pjd_orispeccode
-            // 
-            this.pjd_orispeccode.DataPropertyName = "pjd_orispeccode";
-            this.pjd_orispeccode.HeaderText = "MPN";
-            this.pjd_orispeccode.Name = "pjd_orispeccode";
-            this.pjd_orispeccode.ReadOnly = true;
-            this.pjd_orispeccode.Visible = false;
-            this.pjd_orispeccode.Width = 48;
-            // 
-            // pib_brand
-            // 
-            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;
+            // Reset
             // 
-            // pr_zxbzs
-            // 
-            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
-            this.pr_zxbzs.HeaderText = "最小包装数";
-            this.pr_zxbzs.Name = "pr_zxbzs";
-            this.pr_zxbzs.ReadOnly = true;
-            this.pr_zxbzs.Visible = false;
-            this.pr_zxbzs.Width = 90;
-            // 
-            // pib_lotno
-            // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.ReadOnly = true;
-            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.ReadOnly = true;
-            this.pib_datecode.Width = 78;
-            // 
-            // DateCode1
-            // 
-            this.DateCode1.DataPropertyName = "DateCode1";
-            this.DateCode1.HeaderText = "DateCode1";
-            this.DateCode1.Name = "DateCode1";
-            this.DateCode1.Visible = false;
-            this.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_custbarcode
-            // 
-            this.pib_custbarcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
-            this.pib_custbarcode.HeaderText = "料盘条码";
-            this.pib_custbarcode.MinimumWidth = 100;
-            this.pib_custbarcode.Name = "pib_custbarcode";
-            this.pib_custbarcode.ReadOnly = true;
-            // 
-            // pib_custmidboxcode
-            // 
-            this.pib_custmidboxcode.DataPropertyName = "pib_custmidboxcode";
-            this.pib_custmidboxcode.HeaderText = "中盒条码";
-            this.pib_custmidboxcode.Name = "pib_custmidboxcode";
-            this.pib_custmidboxcode.ReadOnly = true;
-            this.pib_custmidboxcode.Width = 78;
-            // 
-            // pib_custoutboxcode
-            // 
-            this.pib_custoutboxcode.DataPropertyName = "pib_custoutboxcode";
-            this.pib_custoutboxcode.HeaderText = "外箱条码";
-            this.pib_custoutboxcode.Name = "pib_custoutboxcode";
-            this.pib_custoutboxcode.ReadOnly = true;
-            this.pib_custoutboxcode.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;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.ReadOnly = true;
-            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.ReadOnly = true;
-            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.ReadOnly = true;
-            this.pib_outboxcode2.Width = 90;
+            this.Reset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Reset.Location = new System.Drawing.Point(388, 72);
+            this.Reset.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Reset.Name = "Reset";
+            this.Reset.Size = new System.Drawing.Size(64, 26);
+            this.Reset.TabIndex = 110;
+            this.Reset.Text = "重置单据";
+            this.Reset.UseVisualStyleBackColor = true;
+            this.Reset.Click += new System.EventHandler(this.Reset_Click);
             // 
             // UAS_出货标签打印
             // 
@@ -1555,6 +1568,7 @@
             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(1259, 729);
+            this.Controls.Add(this.Reset);
             this.Controls.Add(this.CombindetailTwo);
             this.Controls.Add(this.ProcessCount);
             this.Controls.Add(this.label9);
@@ -1756,5 +1770,6 @@
         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 Reset;
     }
 }

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

@@ -1835,5 +1835,16 @@ namespace UAS_LabelMachine
                 }
             OutBoxNum1 = OutBoxNum.Text;
         }
+
+        private void Reset_Click(object sender, EventArgs e)
+        {
+            string close = MessageBox.Show(this.ParentForm, "清除当前已采集数据,刷新待采集数据", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+            if (close.ToString() == "Yes")
+            {
+                dh.ExecuteSql("delete from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'", "delete");
+                dh.ExecuteSql("delete from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "'", "delete");
+                pi_inoutno_KeyDown(sender, new KeyEventArgs(Keys.Enter));
+            }
+        }
     }
 }