Browse Source

添加按照客户维护外箱中盒合并规则设置

章政 6 years ago
parent
commit
15647db485

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

@@ -0,0 +1,309 @@
+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.label13 = new System.Windows.Forms.Label();
+            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();
+            ((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, 312);
+            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, 312);
+            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, 312);
+            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, 312);
+            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;
+            // 
+            // label13
+            // 
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label13.Location = new System.Drawing.Point(295, 43);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(74, 21);
+            this.label13.TabIndex = 32;
+            this.label13.Text = "匹配模式";
+            // 
+            // cu_print_regexpression
+            // 
+            this.cu_print_regexpression.Location = new System.Drawing.Point(410, 47);
+            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, 422);
+            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, 422);
+            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, 422);
+            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, 422);
+            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, 267);
+            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, 382);
+            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, 200);
+            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, 200);
+            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, 200);
+            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;
+            // 
+            // 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.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.label13);
+            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.Label label13;
+        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;
+    }
+}

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

@@ -0,0 +1,104 @@
+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,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);
+                }
+            }
+        }
+
+        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_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);
+                }
+            }
+        }
+    }
+}

+ 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>

+ 14 - 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
 {
@@ -154,7 +155,7 @@ namespace UAS_LabelMachine
                 {
                     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 +198,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>

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

@@ -28,6 +28,7 @@
         /// </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();
@@ -36,19 +37,24 @@
             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.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.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 +95,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();
@@ -263,31 +262,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;
@@ -319,6 +293,59 @@
             this.Si_ItemDGV.TabIndex = 65;
             this.Si_ItemDGV.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;
+            // 
             // pib_id
             // 
             this.pib_id.AutoSize = true;
@@ -427,8 +454,9 @@
             "采集策略设置",
             "附加信息设置",
             "客户标签维护",
+            "客户采集规则",
             "参数配置"});
-            this.ListButtonMenu.Location = new System.Drawing.Point(270, 129);
+            this.ListButtonMenu.Location = new System.Drawing.Point(282, 99);
             this.ListButtonMenu.Name = "ListButtonMenu";
             this.ListButtonMenu.Size = new System.Drawing.Size(97, 84);
             this.ListButtonMenu.TabIndex = 88;
@@ -745,59 +773,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,7 +797,7 @@
             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(521, 6);
             this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
             this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
@@ -945,7 +920,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(387, 9);
             this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2);
             this.CollectionProcess.Name = "CollectionProcess";
             this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2);
@@ -1172,7 +1147,6 @@
             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);
@@ -1408,7 +1382,7 @@
             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(677, 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);
@@ -1475,7 +1449,7 @@
             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(839, 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);
@@ -1594,7 +1568,7 @@
             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(1137, 6);
             this.OutBoxLabel.Margin = new System.Windows.Forms.Padding(2);
             this.OutBoxLabel.Name = "OutBoxLabel";
             this.OutBoxLabel.Padding = new System.Windows.Forms.Padding(2);
@@ -1738,8 +1712,6 @@
             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);
@@ -1841,8 +1813,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;

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

@@ -164,7 +164,6 @@ namespace UAS_LabelMachine
             sg_code.TableName = "scangroup";
             sg_code.DbChange += Sg_code_DbChange;
 
-            CollectionUnit.Text = "盘";
             Point pt = new Point();
             //禁止所有列的排序
             foreach (DataGridViewColumn dgv in LabelInf.Columns)
@@ -265,7 +264,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;
@@ -354,91 +353,25 @@ namespace UAS_LabelMachine
                 {
                     //如果按盒号采集,所有的此盒的均更新为
                     DataTable dt = (DataTable)MidSource.DataSource;
-                    if (CollectionUnit.Text == "盒")
+                    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)
                     {
-                        string la_id = "";
                         if (SingleLabelCombox.SelectedValue != null)
                         {
-                            la_id = SingleLabelCombox.SelectedValue.ToString().Split('#')[0];
+                            AutoPrintSingleLabel();
                         }
-                        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);
-                        }
-                    }
-                    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)
+                        else
                         {
-                            if (SingleLabelCombox.SelectedValue != null)
-                            {
-                                AutoPrintSingleLabel();
-                            }
-                            else
-                            {
-                                MessageBox.Show("未维护单盘标签");
-                                return;
-                            }
+                            MessageBox.Show("未维护单盘标签");
+                            return;
                         }
-                        //勾选了中盒自动打印
-                        if (MidLabelAutoPrint.Checked)
-                            AutoPrintMidLabel();
                     }
+                    //勾选了中盒自动打印
+                    if (MidLabelAutoPrint.Checked)
+                        AutoPrintMidLabel();
                 }
                 //采集未通过的时候
                 else
@@ -1531,28 +1464,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 +1569,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 - 54
UAS-出货标签管理(吉利通)/UAS_出货标签管理.resx

@@ -147,60 +147,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>