فهرست منبع

彩盒上料打印修改,MAC导出

callm 5 سال پیش
والد
کامیت
66425a52fb

+ 643 - 315
UAS_MES_ODLF/FunctionCode/Make/Make_ColorBoxLoadPrint.Designer.cs

@@ -29,220 +29,370 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_ColorBoxLoadPrint));
+            this.mcd_restqty_label = new System.Windows.Forms.Label();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            this.ma_qty_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
-            this.pr_code_label = new System.Windows.Forms.Label();
-            this.mcd_okqty_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty_label = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.ms_sncode_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
-            this.PrintLabel_label = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
-            this.ms_sncode = new System.Windows.Forms.Label();
-            this.load = new System.Windows.Forms.RadioButton();
-            this.unload = new System.Windows.Forms.RadioButton();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.Loading = new System.Windows.Forms.RadioButton();
+            this.UnLoading = new System.Windows.Forms.RadioButton();
+            this.sn_code_label = new System.Windows.Forms.Label();
             this.code_label = new System.Windows.Forms.Label();
-            this.ms_craftcode = new System.Windows.Forms.Label();
+            this.iflastsn = new System.Windows.Forms.CheckBox();
             this.ClearSn_code = new System.Windows.Forms.PictureBox();
-            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.ms_craftcode = new System.Windows.Forms.Label();
+            this.ma_craftcode = new System.Windows.Forms.Label();
+            this.NoteForChange = new System.Windows.Forms.CheckBox();
+            this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.ma_bomversion = new System.Windows.Forms.Label();
+            this.ma_bomversion_label = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.PrintLabel_label = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Lock = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
-            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
-            this.ma_bomversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueNumLabel(this.components);
-            this.pr_code = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_qty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
+            // mcd_restqty_label
+            // 
+            this.mcd_restqty_label.AutoSize = true;
+            this.mcd_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_restqty_label.Location = new System.Drawing.Point(1170, 122);
+            this.mcd_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_restqty_label.Name = "mcd_restqty_label";
+            this.mcd_restqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_restqty_label.TabIndex = 59;
+            this.mcd_restqty_label.Text = "待采集数";
+            // 
+            // mcd_inqty_label
+            // 
+            this.mcd_inqty_label.AutoSize = true;
+            this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty_label.Location = new System.Drawing.Point(622, 122);
+            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Name = "mcd_inqty_label";
+            this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_inqty_label.TabIndex = 56;
+            this.mcd_inqty_label.Text = "已采集数";
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(18, 122);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_qty_label.TabIndex = 53;
+            this.ma_qty_label.Text = "工单数量";
+            // 
             // ms_makecode_label
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(19, 16);
+            this.ms_makecode_label.Location = new System.Drawing.Point(18, 24);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
-            this.ms_makecode_label.TabIndex = 125;
-            this.ms_makecode_label.Text = "工单号";
-            // 
-            // pr_code_label
-            // 
-            this.pr_code_label.AutoSize = true;
-            this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(259, 16);
-            this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
-            this.pr_code_label.TabIndex = 126;
-            this.pr_code_label.Text = "产品编号";
-            // 
-            // mcd_okqty_label
-            // 
-            this.mcd_okqty_label.AutoSize = true;
-            this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(259, 63);
-            this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
-            this.mcd_okqty_label.TabIndex = 127;
-            this.mcd_okqty_label.Text = "打印计数";
-            // 
-            // mcd_remainqty_label
-            // 
-            this.mcd_remainqty_label.AutoSize = true;
-            this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(471, 63);
-            this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(58, 21);
-            this.mcd_remainqty_label.TabIndex = 128;
-            this.mcd_remainqty_label.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(730, 112);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(42, 21);
-            this.label4.TabIndex = 129;
-            this.label4.Text = "份数";
-            // 
-            // ms_sncode_label
-            // 
-            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left)));
-            this.ms_sncode_label.AutoSize = true;
-            this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(19, 63);
-            this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
-            this.ms_sncode_label.TabIndex = 145;
-            this.ms_sncode_label.Text = "序列号";
+            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.TabIndex = 49;
+            this.ms_makecode_label.Text = "归属工单";
             // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(471, 16);
+            this.pr_detail_label.Location = new System.Drawing.Point(1170, 24);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
-            this.pr_detail_label.TabIndex = 146;
-            this.pr_detail_label.Text = "产品名称";
-            // 
-            // PrintLabel_label
-            // 
-            this.PrintLabel_label.AutoSize = true;
-            this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(730, 63);
-            this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(42, 21);
-            this.PrintLabel_label.TabIndex = 160;
-            this.PrintLabel_label.Text = "标签";
-            // 
-            // 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(730, 15);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(58, 21);
-            this.label2.TabIndex = 161;
-            this.label2.Text = "打印机";
-            // 
-            // PrintLabel
-            // 
-            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(808, 63);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(132, 20);
-            this.PrintLabel.TabIndex = 162;
-            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
-            // 
-            // ms_sncode
-            // 
-            this.ms_sncode.AutoSize = true;
-            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_sncode.Location = new System.Drawing.Point(81, 63);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
-            this.ms_sncode.TabIndex = 163;
-            // 
-            // load
-            // 
-            this.load.AutoSize = true;
-            this.load.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.load.ForeColor = System.Drawing.Color.Blue;
-            this.load.Location = new System.Drawing.Point(22, 421);
-            this.load.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.load.Name = "load";
-            this.load.Size = new System.Drawing.Size(60, 25);
-            this.load.TabIndex = 164;
-            this.load.TabStop = true;
-            this.load.Text = "上料";
-            this.load.UseVisualStyleBackColor = true;
-            // 
-            // unload
-            // 
-            this.unload.AutoSize = true;
-            this.unload.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.unload.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
-            this.unload.Location = new System.Drawing.Point(126, 421);
-            this.unload.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.unload.Name = "unload";
-            this.unload.Size = new System.Drawing.Size(60, 25);
-            this.unload.TabIndex = 165;
-            this.unload.TabStop = true;
-            this.unload.Text = "下料";
-            this.unload.UseVisualStyleBackColor = true;
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 50;
+            this.pr_detail_label.Text = "产品规格";
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(622, 24);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.TabIndex = 51;
+            this.ma_prodcode_label.Text = "产品代码";
+            // 
+            // Loading
+            // 
+            this.Loading.AutoSize = true;
+            this.Loading.Checked = true;
+            this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Loading.ForeColor = System.Drawing.Color.Blue;
+            this.Loading.Location = new System.Drawing.Point(36, 720);
+            this.Loading.Margin = new System.Windows.Forms.Padding(6);
+            this.Loading.Name = "Loading";
+            this.Loading.Size = new System.Drawing.Size(113, 45);
+            this.Loading.TabIndex = 62;
+            this.Loading.TabStop = true;
+            this.Loading.Text = "上料";
+            this.Loading.UseVisualStyleBackColor = true;
+            // 
+            // UnLoading
+            // 
+            this.UnLoading.AutoSize = true;
+            this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.UnLoading.ForeColor = System.Drawing.Color.Blue;
+            this.UnLoading.Location = new System.Drawing.Point(196, 720);
+            this.UnLoading.Margin = new System.Windows.Forms.Padding(6);
+            this.UnLoading.Name = "UnLoading";
+            this.UnLoading.Size = new System.Drawing.Size(113, 45);
+            this.UnLoading.TabIndex = 63;
+            this.UnLoading.Text = "下料";
+            this.UnLoading.UseVisualStyleBackColor = true;
+            // 
+            // sn_code_label
+            // 
+            this.sn_code_label.AutoSize = true;
+            this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sn_code_label.Location = new System.Drawing.Point(28, 796);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sn_code_label.Name = "sn_code_label";
+            this.sn_code_label.Size = new System.Drawing.Size(114, 41);
+            this.sn_code_label.TabIndex = 64;
+            this.sn_code_label.Text = "序列号";
             // 
             // code_label
             // 
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(230, 423);
-            this.code_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.code_label.Location = new System.Drawing.Point(28, 884);
+            this.code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.code_label.Name = "code_label";
-            this.code_label.Size = new System.Drawing.Size(58, 21);
-            this.code_label.TabIndex = 167;
+            this.code_label.Size = new System.Drawing.Size(114, 41);
+            this.code_label.TabIndex = 66;
             this.code_label.Text = "录入框";
             // 
-            // ms_craftcode
+            // iflastsn
             // 
-            this.ms_craftcode.AutoSize = true;
-            this.ms_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_craftcode.Location = new System.Drawing.Point(733, 167);
-            this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 21);
-            this.ms_craftcode.TabIndex = 170;
-            this.ms_craftcode.Visible = false;
+            this.iflastsn.AutoSize = true;
+            this.iflastsn.Enabled = false;
+            this.iflastsn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.iflastsn.Location = new System.Drawing.Point(578, 796);
+            this.iflastsn.Margin = new System.Windows.Forms.Padding(6);
+            this.iflastsn.Name = "iflastsn";
+            this.iflastsn.Size = new System.Drawing.Size(222, 45);
+            this.iflastsn.TabIndex = 72;
+            this.iflastsn.Text = "前一工单SN";
+            this.iflastsn.UseVisualStyleBackColor = true;
             // 
             // ClearSn_code
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(437, 428);
+            this.ClearSn_code.Location = new System.Drawing.Point(526, 802);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
-            this.ClearSn_code.TabIndex = 173;
+            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
+            this.ClearSn_code.TabIndex = 138;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
             // 
-            // StepCount
+            // ms_craftcode
             // 
-            this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(734, 167);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
-            this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(79, 23);
-            this.StepCount.Source = null;
-            this.StepCount.StepCode = null;
-            this.StepCount.TabIndex = 189;
+            this.ms_craftcode.AutoSize = true;
+            this.ms_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_craftcode.Location = new System.Drawing.Point(1536, 30);
+            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_craftcode.Name = "ms_craftcode";
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ms_craftcode.TabIndex = 142;
+            this.ms_craftcode.Visible = false;
+            // 
+            // ma_craftcode
+            // 
+            this.ma_craftcode.AutoSize = true;
+            this.ma_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_craftcode.Location = new System.Drawing.Point(1508, 122);
+            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_craftcode.Name = "ma_craftcode";
+            this.ma_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_craftcode.TabIndex = 145;
+            this.ma_craftcode.Visible = false;
+            // 
+            // NoteForChange
+            // 
+            this.NoteForChange.AutoSize = true;
+            this.NoteForChange.Checked = true;
+            this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.NoteForChange.Location = new System.Drawing.Point(22, 78);
+            this.NoteForChange.Margin = new System.Windows.Forms.Padding(4);
+            this.NoteForChange.Name = "NoteForChange";
+            this.NoteForChange.Size = new System.Drawing.Size(190, 35);
+            this.NoteForChange.TabIndex = 192;
+            this.NoteForChange.Text = "切换工单提示";
+            this.NoteForChange.UseVisualStyleBackColor = true;
+            // 
+            // LabelDataGridView
+            // 
+            this.LabelDataGridView.AllowUserToAddRows = false;
+            this.LabelDataGridView.AllowUserToResizeRows = false;
+            this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.序号,
+            this.cm_makecode,
+            this.pr_detail_,
+            this.cm_soncode,
+            this.cm_barcode,
+            this.BarCode});
+            this.LabelDataGridView.Location = new System.Drawing.Point(36, 216);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(6);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.Size = new System.Drawing.Size(1282, 454);
+            this.LabelDataGridView.TabIndex = 193;
+            // 
+            // ma_bomversion
+            // 
+            this.ma_bomversion.AutoSize = true;
+            this.ma_bomversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_bomversion.Location = new System.Drawing.Point(1528, 242);
+            this.ma_bomversion.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_bomversion.Name = "ma_bomversion";
+            this.ma_bomversion.Size = new System.Drawing.Size(0, 41);
+            this.ma_bomversion.TabIndex = 143;
+            // 
+            // ma_bomversion_label
+            // 
+            this.ma_bomversion_label.AutoSize = true;
+            this.ma_bomversion_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_bomversion_label.Location = new System.Drawing.Point(1356, 242);
+            this.ma_bomversion_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_bomversion_label.Name = "ma_bomversion_label";
+            this.ma_bomversion_label.Size = new System.Drawing.Size(152, 41);
+            this.ma_bomversion_label.TabIndex = 144;
+            this.ma_bomversion_label.Text = "Bom版本";
+            // 
+            // 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(1359, 326);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.TabIndex = 196;
+            this.label2.Text = "打印机";
+            // 
+            // PrintLabel_label
+            // 
+            this.PrintLabel_label.AutoSize = true;
+            this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintLabel_label.Location = new System.Drawing.Point(1359, 413);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.PrintLabel_label.Name = "PrintLabel_label";
+            this.PrintLabel_label.Size = new System.Drawing.Size(82, 41);
+            this.PrintLabel_label.TabIndex = 195;
+            this.PrintLabel_label.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(1359, 498);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(82, 41);
+            this.label4.TabIndex = 198;
+            this.label4.Text = "份数";
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn1.HeaderText = "上料料号";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn1.Width = 50;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
+            this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 5;
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "cm_soncode";
+            this.dataGridViewTextBoxColumn3.HeaderText = "前缀";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn3.Width = 5;
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "cm_barcode";
+            this.dataGridViewTextBoxColumn4.HeaderText = "长度";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn4.Width = 5;
+            // 
+            // dataGridViewTextBoxColumn5
+            // 
+            this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.dataGridViewTextBoxColumn5.DataPropertyName = "sp_length";
+            this.dataGridViewTextBoxColumn5.HeaderText = "条码号";
+            this.dataGridViewTextBoxColumn5.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
+            this.dataGridViewTextBoxColumn5.ReadOnly = true;
+            this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn5.Width = 64;
+            // 
+            // dataGridViewTextBoxColumn6
+            // 
+            this.dataGridViewTextBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.dataGridViewTextBoxColumn6.HeaderText = "条码号";
+            this.dataGridViewTextBoxColumn6.MinimumWidth = 300;
+            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
+            this.dataGridViewTextBoxColumn6.ReadOnly = true;
+            this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.dataGridViewTextBoxColumn6.Width = 300;
             // 
             // PrintNum
             // 
@@ -250,27 +400,103 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(808, 112);
+            this.PrintNum.Location = new System.Drawing.Point(1515, 498);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(132, 21);
+            this.PrintNum.Size = new System.Drawing.Size(260, 35);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
-            this.PrintNum.TabIndex = 174;
+            this.PrintNum.TabIndex = 199;
             // 
-            // Lock
+            // PrintLabel
             // 
-            this.Lock.AutoSize = true;
-            this.Lock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Lock.LeaveEvent = false;
-            this.Lock.Location = new System.Drawing.Point(202, 17);
-            this.Lock.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.Lock.Name = "Lock";
-            this.Lock.Size = new System.Drawing.Size(51, 21);
-            this.Lock.TabIndex = 172;
-            this.Lock.Text = "锁定";
-            this.Lock.UseVisualStyleBackColor = true;
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(1515, 422);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(260, 32);
+            this.PrintLabel.TabIndex = 197;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1515, 326);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(262, 50);
+            this.Printer.TabIndex = 194;
+            // 
+            // 序号
+            // 
+            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.序号.DataPropertyName = "sp_detno";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 70;
+            // 
+            // cm_makecode
+            // 
+            this.cm_makecode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.cm_makecode.DataPropertyName = "sp_fsoncode";
+            this.cm_makecode.HeaderText = "上料料号";
+            this.cm_makecode.Name = "cm_makecode";
+            this.cm_makecode.ReadOnly = true;
+            this.cm_makecode.Width = 5;
+            // 
+            // pr_detail_
+            // 
+            this.pr_detail_.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.pr_detail_.DataPropertyName = "pr_spec";
+            this.pr_detail_.HeaderText = "上料名称";
+            this.pr_detail_.Name = "pr_detail_";
+            this.pr_detail_.ReadOnly = true;
+            this.pr_detail_.Width = 5;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.cm_soncode.DataPropertyName = "sp_prefix";
+            this.cm_soncode.HeaderText = "前缀";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_soncode.Width = 5;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.cm_barcode.DataPropertyName = "sp_length";
+            this.cm_barcode.HeaderText = "长度";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_barcode.Width = 64;
+            // 
+            // BarCode
+            // 
+            this.BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.BarCode.HeaderText = "条码号";
+            this.BarCode.MinimumWidth = 300;
+            this.BarCode.Name = "BarCode";
+            this.BarCode.ReadOnly = true;
+            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.BarCode.Width = 300;
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(920, 688);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(160, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 189;
             // 
             // ma_code
             // 
@@ -279,180 +505,282 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(85, 17);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.ma_code.Location = new System.Drawing.Point(192, 26);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(109, 20);
-            this.ma_code.TabIndex = 171;
+            this.ma_code.Size = new System.Drawing.Size(296, 42);
+            this.ma_code.TabIndex = 141;
             this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
             this.ma_code.TextBoxEnable = true;
+            this.ma_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox.OnTextChange(this.ma_code_UserControlTextChanged);
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(496, 30);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 140;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(802, 24);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 99;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
             // 
-            // ma_bomversion
-            // 
-            this.ma_bomversion.AutoSize = true;
-            this.ma_bomversion.CutLength = null;
-            this.ma_bomversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_bomversion.Location = new System.Drawing.Point(772, 187);
-            this.ma_bomversion.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ma_bomversion.Name = "ma_bomversion";
-            this.ma_bomversion.Size = new System.Drawing.Size(0, 21);
-            this.ma_bomversion.TabIndex = 169;
-            this.ma_bomversion.Visible = false;
-            // 
-            // code
-            // 
-            this.code.AllPower = null;
-            this.code.BackColor = System.Drawing.Color.White;
-            this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(301, 425);
-            this.code.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.code.Name = "code";
-            this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(132, 21);
-            this.code.Str = null;
-            this.code.Str1 = null;
-            this.code.Str2 = null;
-            this.code.TabIndex = 166;
-            this.code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
-            // 
-            // Printer
+            // pr_detail
             // 
-            this.Printer.Location = new System.Drawing.Point(808, 15);
-            this.Printer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(131, 25);
-            this.Printer.TabIndex = 159;
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(1350, 24);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 98;
             // 
             // mcd_remainqty
             // 
             this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(559, 63);
+            this.mcd_remainqty.Location = new System.Drawing.Point(1348, 122);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
-            this.mcd_remainqty.TabIndex = 158;
-            this.mcd_remainqty.Text = "0";
-            // 
-            // mcd_okqty
-            // 
-            this.mcd_okqty.AutoSize = true;
-            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(347, 63);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
-            this.mcd_okqty.TabIndex = 157;
-            this.mcd_okqty.Text = "0";
-            // 
-            // pr_code
-            // 
-            this.pr_code.AutoSize = true;
-            this.pr_code.CutLength = null;
-            this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(347, 16);
-            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 21);
-            this.pr_code.TabIndex = 156;
-            this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSize = true;
-            this.pr_detail.CutLength = null;
-            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(559, 16);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
-            this.pr_detail.TabIndex = 154;
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_remainqty.TabIndex = 97;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(802, 122);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 96;
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.CutLength = null;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(192, 122);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 95;
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(22, 105);
+            this.OperateResult.Location = new System.Drawing.Point(1090, 688);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(691, 305);
-            this.OperateResult.TabIndex = 143;
+            this.OperateResult.Size = new System.Drawing.Size(696, 238);
+            this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             // 
+            // Clean
+            // 
+            this.Clean.AllPower = null;
+            this.Clean.BackColor = System.Drawing.Color.Transparent;
+            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
+            this.Clean.Image = null;
+            this.Clean.IsShowBorder = true;
+            this.Clean.Location = new System.Drawing.Point(920, 878);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6);
+            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
+            this.Clean.Name = "Clean";
+            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
+            this.Clean.Power = null;
+            this.Clean.Size = new System.Drawing.Size(120, 48);
+            this.Clean.TabIndex = 80;
+            this.Clean.Text = "清除";
+            this.Clean.UseVisualStyleBackColor = true;
+            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // 
+            // Confirm
+            // 
+            this.Confirm.AllPower = "ifall";
+            this.Confirm.BackColor = System.Drawing.Color.Transparent;
+            this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
+            this.Confirm.Image = null;
+            this.Confirm.IsShowBorder = true;
+            this.Confirm.Location = new System.Drawing.Point(578, 880);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(6);
+            this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
+            this.Confirm.Name = "Confirm";
+            this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
+            this.Confirm.Power = null;
+            this.Confirm.Size = new System.Drawing.Size(120, 48);
+            this.Confirm.TabIndex = 73;
+            this.Confirm.Tag = "IfRead";
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // code
+            // 
+            this.code.AllPower = "ifall";
+            this.code.BackColor = System.Drawing.Color.White;
+            this.code.ID = null;
+            this.code.Location = new System.Drawing.Point(196, 884);
+            this.code.Margin = new System.Windows.Forms.Padding(6);
+            this.code.Name = "code";
+            this.code.Power = null;
+            this.code.Size = new System.Drawing.Size(316, 35);
+            this.code.Str = null;
+            this.code.Str1 = null;
+            this.code.Str2 = null;
+            this.code.TabIndex = 0;
+            this.code.Tag = "IfRead";
+            this.code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.code_KeyDown);
+            // 
+            // sn_code
+            // 
+            this.sn_code.AllPower = null;
+            this.sn_code.BackColor = System.Drawing.Color.White;
+            this.sn_code.Enabled = false;
+            this.sn_code.ID = null;
+            this.sn_code.Location = new System.Drawing.Point(196, 796);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.sn_code.Name = "sn_code";
+            this.sn_code.Power = null;
+            this.sn_code.Size = new System.Drawing.Size(316, 35);
+            this.sn_code.Str = null;
+            this.sn_code.Str1 = null;
+            this.sn_code.Str2 = null;
+            this.sn_code.TabIndex = 65;
+            // 
             // Make_ColorBoxLoadPrint
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(969, 452);
-            this.Controls.Add(this.StepCount);
+            this.ClientSize = new System.Drawing.Size(1796, 974);
             this.Controls.Add(this.PrintNum);
-            this.Controls.Add(this.ClearSn_code);
-            this.Controls.Add(this.Lock);
-            this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.ms_craftcode);
-            this.Controls.Add(this.ma_bomversion);
-            this.Controls.Add(this.code_label);
-            this.Controls.Add(this.code);
-            this.Controls.Add(this.unload);
-            this.Controls.Add(this.load);
-            this.Controls.Add(this.ms_sncode);
+            this.Controls.Add(this.label4);
             this.Controls.Add(this.PrintLabel);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.PrintLabel_label);
             this.Controls.Add(this.Printer);
-            this.Controls.Add(this.mcd_remainqty);
-            this.Controls.Add(this.mcd_okqty);
-            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.LabelDataGridView);
+            this.Controls.Add(this.NoteForChange);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.ma_craftcode);
+            this.Controls.Add(this.ma_bomversion_label);
+            this.Controls.Add(this.ma_bomversion);
+            this.Controls.Add(this.ms_craftcode);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.ClearSn_code);
+            this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.pr_detail);
-            this.Controls.Add(this.pr_detail_label);
-            this.Controls.Add(this.ms_sncode_label);
+            this.Controls.Add(this.mcd_remainqty);
+            this.Controls.Add(this.mcd_inqty);
+            this.Controls.Add(this.ma_qty);
             this.Controls.Add(this.OperateResult);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.mcd_remainqty_label);
-            this.Controls.Add(this.mcd_okqty_label);
-            this.Controls.Add(this.pr_code_label);
+            this.Controls.Add(this.Clean);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.iflastsn);
+            this.Controls.Add(this.code);
+            this.Controls.Add(this.code_label);
+            this.Controls.Add(this.sn_code);
+            this.Controls.Add(this.sn_code_label);
+            this.Controls.Add(this.UnLoading);
+            this.Controls.Add(this.Loading);
+            this.Controls.Add(this.mcd_restqty_label);
+            this.Controls.Add(this.mcd_inqty_label);
+            this.Controls.Add(this.ma_qty_label);
             this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_ColorBoxLoadPrint";
-            this.Tag = "Make!ColorBoxLoadPrint";
-            this.Text = "    ";
-            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_ColorBoxLoadPrint_FormClosing);
-            this.Load += new System.EventHandler(this.Make_ColorBoxLoadPrint_Load);
-            this.SizeChanged += new System.EventHandler(this.Make_ColorBoxLoadPrint_SizeChanged);
+            this.Tag = "Make!FeedingCollection";
+            this.Text = "上料采集";
+            this.Load += new System.EventHandler(this.Make_FeedingCollection_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
+        private System.Windows.Forms.Label mcd_restqty_label;
+        private System.Windows.Forms.Label mcd_inqty_label;
+        private System.Windows.Forms.Label ma_qty_label;
         private System.Windows.Forms.Label ms_makecode_label;
-        private System.Windows.Forms.Label pr_code_label;
-        private System.Windows.Forms.Label mcd_okqty_label;
-        private System.Windows.Forms.Label mcd_remainqty_label;
-        private System.Windows.Forms.Label label4;
-        private CustomControl.RichText.RichTextAutoBottom OperateResult;
-        private System.Windows.Forms.Label ms_sncode_label;
         private System.Windows.Forms.Label pr_detail_label;
-        private CustomControl.ValueLabel.ValueLabel pr_detail;
-        private CustomControl.ValueLabel.ValueLabel pr_code;
-        private CustomControl.ValueLabel.ValueNumLabel mcd_okqty;
-        private CustomControl.ValueLabel.ValueNumLabel mcd_remainqty;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
-        private System.Windows.Forms.Label PrintLabel_label;
-        private System.Windows.Forms.Label label2;
-        private UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
-        private System.Windows.Forms.Label ms_sncode;
-        private System.Windows.Forms.RadioButton load;
-        private System.Windows.Forms.RadioButton unload;
-        private CustomControl.TextBoxWithIcon.SnCollectionBox code;
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.RadioButton Loading;
+        private System.Windows.Forms.RadioButton UnLoading;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sn_code;
+        private System.Windows.Forms.Label sn_code_label;
         private System.Windows.Forms.Label code_label;
-        private CustomControl.ValueLabel.ValueLabel ma_bomversion;
-        private System.Windows.Forms.Label ms_craftcode;
-        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
-        private CustomControl.CustomCheckBox.LockCheckBox Lock;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox code;
+        private System.Windows.Forms.CheckBox iflastsn;
+        private CustomControl.ButtonUtil.NormalButton Confirm;
+        private CustomControl.ButtonUtil.NormalButton Clean;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private CustomControl.ValueLabel.ValueLabel ma_qty;
+        private CustomControl.ValueLabel.ValueLabel mcd_inqty;
+        private CustomControl.ValueLabel.ValueLabel mcd_remainqty;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private System.Windows.Forms.PictureBox ClearSn_code;
-        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private System.Windows.Forms.Label ms_craftcode;
+        private System.Windows.Forms.Label ma_craftcode;
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private System.Windows.Forms.CheckBox NoteForChange;
+        private System.Windows.Forms.DataGridView LabelDataGridView;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 序号;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail_;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn BarCode;
+        private System.Windows.Forms.Label ma_bomversion;
+        private System.Windows.Forms.Label ma_bomversion_label;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label PrintLabel_label;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
+        private System.Windows.Forms.Label label4;
     }
 }

+ 432 - 234
UAS_MES_ODLF/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -1,49 +1,63 @@
 using System;
 using System.Data;
-using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
 using UAS_MES_NEW.DataOperate;
-using UAS_MES_NEW.PublicMethod;
 using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using System.Drawing;
+using System.Text.RegularExpressions;
+using System.Collections.Generic;
+using UAS_MES_NEW.PublicForm;
 using LabelManager2;
 using System.Threading;
-using UAS_MES_NEW.PublicForm;
-using System.Collections.Generic;
 
 namespace UAS_MES_NEW.Make
 {
     public partial class Make_ColorBoxLoadPrint : Form
     {
-        DataHelper dh;
-        DataTable dt;
-        LogStringBuilder sql = new LogStringBuilder();
-        AutoSizeFormClass asc = new AutoSizeFormClass();
-        //保存StepProduct查询出来的数据
-        DataTable ListA = new DataTable();
-        //制造单号
-        string macode;
-        //当前工单的序列号
-        //string sn_code;
-        //当前提示的索引
-        int RemainIndex = 0;
-
-        Dictionary<string, string> CheckBarcode = new Dictionary<string, string>();
+        ApplicationClass lbl;
+        //MakeSerial表主键
+        string ms_id;
+        //制造单号                                                                             
+        string make_code;
+        //产品编号
+        string make_prodcode;
+        //工序编号
+        string nextstepcode;
+        //完工状态
+        string ms_status;
+        //工艺路线编号
+        //Bom版本
+        string mabomversion;
+        string ErrorMessage = "";
 
         List<string> TSN = new List<string>();
 
-        string ErrorMessage = "";
+        Dictionary<string, string> CheckBarcode = new Dictionary<string, string>();
 
-        System.DateTime[] indate;
+        //用于提醒的序列B
+        string[] RemainList = new string[0];
+        //提醒序列的索引
+        int RemainIndex = 0;
 
-        string ms_firstsn = "";
+        string oMakeCode = "";
+        string oMsid = "";
 
-        ApplicationClass lbl;
+        string ms_firstsn = "";
 
-        Document doc;
+        DataHelper dh;
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable DBFind;
+        DataTable dt;
+        //保存ListB中的数据
+        DataTable dt1;
 
         Thread InitPrint;
 
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
         List<string> CollectData = new List<string>();
 
         List<string> CollectDataSonCode = new List<string>();
@@ -53,26 +67,38 @@ namespace UAS_MES_NEW.Make
         public Make_ColorBoxLoadPrint()
         {
             InitializeComponent();
-            load.Checked = true;
         }
 
-        private void Make_ColorBoxLoadPrint_Load(object sender, EventArgs e)
+        private void InPrint()
+        {
+            try
+            {
+                lbl = new ApplicationClass();
+                BaseUtil.WriteLbl();
+            }
+            catch (Exception)
+            {
+                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
+            }
+        }
+
+        private void Make_FeedingCollection_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
             InitPrint = new Thread(InPrint);
             SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_detail # 产品名称,ma_bomversion # Bom版本";
+            ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,ma_craftcode # 途程编号,pr_spec # 产品名称,ma_bomversion # Bom版本,ma_softversion # 软件版本,ma_ecncode # ECN号";
             ma_code.FormName = Name;
             ma_code.DBTitle = "工单查询";
-            ma_code.SetValueField = new string[] { "ma_code", "pr_code", "ma_qty", "pr_detail", "ma_craftcode", "ma_bomversion" };
-            ma_code.Condition = "ma_statuscode='STARTED' order by ma_updatedate desc";
-            ma_code.DbChange += Ms_makecode_DbChange;
-            Lock.GetMakeCodeCtl(ma_code);
-            ma_code.SetLockCheckBox(Lock);
+            ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_spec", "ma_craftcode", "ma_bomversion", "ma_softversion", "ma_ecncode" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
             dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
@@ -82,287 +108,459 @@ namespace UAS_MES_NEW.Make
             StepCount.Start();
         }
 
-        private void Ms_makecode_DbChange(object sender, EventArgs e)
+        private void Ma_code_DBChange(object sender, EventArgs e)
         {
-            dt = ma_code.ReturnData;
-            BaseUtil.SetFormValue(this.Controls, dt);
+            DBFind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, DBFind);
         }
 
-        private void InPrint()
+        private void Make_FeedingCollection_SizeChanged(object sender, EventArgs e)
         {
-            try
-            {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
-            }
-            catch (Exception ex)
-            {
-                OperateResult.AppendText("未正确安装CodeSoft软件\n", Color.Red);
-            }
+            asc.controlAutoSize(this);
+        }
+
+        private void Clean_Click(object sender, EventArgs e)
+        {
+            OperateResult.Clear();
         }
 
-        private void sn_code_KeyDown(object sender, KeyEventArgs e)
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            KeyEventArgs e2 = new KeyEventArgs(Keys.Enter);
+            code_KeyDown(sender, e2);
+        }
+
+        private void code_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (code.Text == "")
-                {
-                    OperateResult.AppendText(">>输入内容不能为空\n", Color.Red);
-                    return;
-                }
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                    string Msid;
-                    if (ListA.Rows.Count == 0 && load.Checked)
+                    if (Loading.Checked)
                     {
-                        if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, code.Text, User.UserCode, out macode, out Msid, out ErrorMessage) || ListA.Rows.Count > 0)
+                        if (code.Text.Replace(" ", "") == "")
                         {
-                            sql.Clear();
-                            sql.Append("select ma_code,ms_craftcode,ms_sncode,ma_qty,pr_detail,pr_code,ma_bomversion,ms_firstsn from makeserial left join make on ");
-                            sql.Append("ms_makecode=ma_code left join product on ms_prodcode=pr_code where ms_id='" + Msid + "'");
-                            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            if (dt.Rows.Count > 0)
+                            OperateResult.AppendText(">>采集数据不可为空\n", Color.Red);
+                            return;
+                        }
+                        //如果录入框和工单号均有输入
+                        if (code.Text != "" && ma_code.Text != "" && sn_code.Text == "")
+                        {
+                            GetCollectItem();
+                            BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
+                        }
+                        //输入框有值但未选择工单号
+                        else if (code.Text != "" && ma_code.Text == "" && sn_code.Text == "")
+                        {
+                            GetCollectItem();
+                            BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt1);
+                        }
+                        else if (sn_code.Text != "")
+                        {
+                            //索引超出长度表示内容均已提醒
+                            if (RemainIndex >= RemainList.Length)
                             {
-                                BaseUtil.SetFormValue(this.Controls, dt);
-                                ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
-                                Lock.Checked = true;
-                                LoadCollectNum();
-                                OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
-                                if (PrintLabel.SelectedValue == null)
-                                {
-                                    OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护彩盒标签\n", Color.Red, code);
-                                    return;
-                                }
-                                ms_sncode.Text = code.Text;
+                                OperateResult.AppendText(">>当前序列号" + sn_code.Text + "不在本道工序,请采集其它序列号\n", Color.Black);
+                                sn_code.Text = "";
                                 code.Text = "";
+                                return;
                             }
-                            sql.Clear();
-                            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,sp_fsoncode,max(sp_barcoderule)");
-                            sql.Append("sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
-                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
-                            sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
-                            sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
-                            sql.Append("And sp_mothercode ='" + pr_code.Text + "' and sp_tracekind=1 and not exists(select 1 from craftmaterial where  ");
-                            sql.Append("cm_sncode in (select '" + ms_firstsn + "' from dual union select sn from makesnrelation where firstsn='" + ms_firstsn + "') and cm_makecode='" + ma_code.Text + "' and cm_soncode=");
-                            sql.Append("sp_soncode and cm_status=0) group by sp_fsoncode order by SP_DETNO asc");
-                            ListA = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                            //获取对应 产品的机身标的打印模板
-                            if (ListA.Rows.Count > 0)
+                            string sp_soncode = dt1.Rows[RemainIndex]["sp_soncode"].ToString();
+                            string sp_fsoncode = dt1.Rows[RemainIndex]["sp_fsoncode"].ToString();
+                            string sp_prefix = dt1.Rows[RemainIndex]["sp_prefix"].ToString();
+                            string sp_regex = dt1.Rows[RemainIndex]["sp_regex"].ToString();
+                            string length = dt1.Rows[RemainIndex]["sp_length"].ToString();
+                            string sp_id = dt1.Rows[RemainIndex]["sp_id"].ToString();
+                            string sp_ifrepeat = dt1.Rows[RemainIndex]["sp_ifrepeat"].ToString();
+                            string sp_ifforsn = dt1.Rows[RemainIndex]["sp_ifforsn"].ToString();
+                            string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
+                            string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
+                            string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
                             {
-                                string soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
-                                string prdetail = ListA.Rows[RemainIndex]["pr_detail"].ToString();
-                                OperateResult.AppendText("<<请采集" + soncode + "(" + prdetail + ")的物料数据\n", Color.Black);
-                                code.Clear();
+                                //判断采集的条码和本次采集的也不能重复
+                                if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")
+                                {
+                                    OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
+                                    return;
+                                }
+                                if (sp_checkbarcode != "")
+                                {
+                                    if (CheckBarcode.ContainsKey(sp_checkbarcode))
+                                    {
+                                        if (CheckBarcode[sp_checkbarcode] != code.Text)
+                                        {
+                                            OperateResult.AppendText(">>条码" + code.Text + "需要检查物料,未匹配到之前上料数据\n", Color.Red, code);
+                                            return;
+                                        }
+                                    }
+                                    else
+                                    {
+                                        OperateResult.AppendText(">>条码" + code.Text + "需要检查物料,未匹配到之前上料数据\n", Color.Red, code);
+                                        return;
+                                    }
+                                }
+                                TSN.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+                                if (sp_barcoderule == "BARCODE")
+                                {
+                                    sp_soncode = ErrorMessage;
+                                }
+                                Save_OtherCode(sp_fsoncode, sp_soncode, make_code, sn_code.Text, sp_id);
                             }
                             else
                             {
-                                OperateResult.AppendText(">>当前序列号" + ms_sncode.Text + "不在本道工序,请采集其它序列号\n", Color.Black);
-                                if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, ms_sncode.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
-                                else
-                                {
-                                    //提示正确返回时传递的信息
-                                    if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    OperateResult.AppendText(">>序列号" + ms_sncode.Text + "上料采集完成!\n", Color.Green);
-                                }
-                                return;
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                                SetCheck set = new SetCheck("NG", Color.Red);
+                                BaseUtil.SetFormCenter(set);
+                                set.ShowDialog();
                             }
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
                     }
-                    else if (unload.Checked == true)
+                    //勾选了下料的时候
+                    else if (UnLoading.Checked)
                     {
-                        if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, code.Text, User.UserCode, out macode, out Msid, out ErrorMessage))
+                        if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, code.Text, User.UserCode, out oMakeCode, out oMsid, out ErrorMessage))
                         {
-                            dt = (DataTable)dh.ExecuteSql("select ms_firstsn,cm_id,cm_stepcode,ms_makecode,cm_mccode,cm_makecode,cm_craftcode from craftmaterial left join makeserial on cm_makecode=ms_makecode and cm_sncode=ms_sncode where cm_sncode='" + code.Text + "' and cm_makecode='" + macode + "' and cm_materialtype=1", "select");
+                            sql.Clear();
+                            sql.Append("select ms_firstsn,cm_makecode,cm_craftcode,nvl(cm_status,0)cm_status,cm_id,cm_stepcode,");
+                            sql.Append("ms_makecode,cm_mccode,cm_materialtype from craftmaterial left join makeserial on cm_makecode");
+                            sql.Append("=ms_makecode and cm_sncode=ms_sncode where cm_sncode='" + code.Text + "' and cm_makecode='" + oMakeCode + "'");
+                            sql.Append("and cm_materialtype=1");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                             if (dt.Rows.Count > 0)
                             {
                                 string ms_macode = dt.Rows[0]["ms_makecode"].ToString();
-                                ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                                string ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
                                 string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                                 string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
+                                string cm_materialtype = dt.Rows[0]["cm_materialtype"].ToString();
+                                string cm_status = dt.Rows[0]["cm_status"].ToString();
                                 string cm_makecode = dt.Rows[0]["cm_makecode"].ToString();
                                 string cm_craftcode = dt.Rows[0]["cm_craftcode"].ToString();
+                                //清除已被使用的序列号
                                 sql.Clear();
                                 sql.Append("update makeserial set ms_nextmacode='' where ms_sncode in(select cm_barcode from craftmaterial where ");
                                 sql.Append("cm_makecode='" + cm_makecode + "' and cm_sncode='" + code.Text + "' and cm_stepcode='" + cm_stepcode + "' and cm_craftcode='" + cm_craftcode + "' ");
-                                sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + macode + "'");
+                                sql.Append("and cm_materialtype=1 and nvl(cm_status,0) =0) and ms_nextmacode='" + oMakeCode + "'");
                                 dh.ExecuteSql(sql.GetString(), "update");
                                 //进行下料
                                 sql.Clear();
                                 sql.Append("delete from craftmaterial where (cm_sncode in (select sn from makesnrelation where firstsn");
-                                sql.Append("='" + ms_firstsn + "') or cm_sncode = '" + ms_firstsn + "') and cm_makecode = '" + macode + "' ");
+                                sql.Append("='" + ms_firstsn + "') or cm_sncode = '" + ms_firstsn + "') and cm_makecode = '" + oMakeCode + "' ");
                                 sql.Append("and cm_status = 0 and cm_stepcode='" + User.CurrentStepCode + "' and cm_materialtype=1");
                                 dh.ExecuteSql(sql.GetString(), "delete");
-                                LogicHandler.InsertMakeProcess(macode, code.Text, User.UserSourceCode, "上料采集操作", "下料成功", User.UserCode);
-                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "上料采集", "下料成功", code.Text, "");
+                                LogicHandler.InsertMakeProcess(ms_macode, code.Text, User.UserSourceCode, "上料采集操作", "下料成功", User.UserCode);
+                                //刷新界面值
+                                sql.Clear();
+                                sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
+                                sql.Append("from make left join makecraftdetail on mcd_macode=ma_code where ");
+                                sql.Append("ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                BaseUtil.SetFormValue(Controls, dt);
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "上料采集", "下料成功", code.Text, "");
                                 OperateResult.AppendText(">>序列号" + code.Text + "下料成功\n", Color.Green, code);
                             }
-                            else OperateResult.AppendText(">>该序列号未上料,无需下料\n", Color.Red, code);
+                            else OperateResult.AppendText(">>序列号" + code.Text + "未上料,无需下料\n", Color.Red, code);
                         }
                         else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
                     }
-                    else
+                }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+            }
+        }
+
+        //获取采集的项目
+        private void GetCollectItem()
+        {
+            bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(code.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
+            if (!NoteAlready)
+            {
+                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                return;
+            }
+            if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, code.Text, User.UserCode, out oMakeCode, out oMsid, out ErrorMessage))
+            {
+                if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(code.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
+                {
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                    return;
+                }
+                //将录入框的值给序列号
+                sn_code.Text = code.Text;
+                sql.Clear();
+                sql.Append("select ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
+                sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
+                sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    ms_id = dt.Rows[0]["ms_id"].ToString();
+                    make_code = dt.Rows[0]["ma_code"].ToString();
+                    mabomversion = dt.Rows[0]["ma_bomversion"].ToString();
+                    make_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                    nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                    ms_status = dt.Rows[0]["ms_status"].ToString();
+                    ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                    BaseUtil.SetFormValue(this.Controls, dt);
+
+                    LockMakeCode.Checked = true;
+                    //勾选了前一工单
+                    if (iflastsn.Checked)
                     {
-                        //获取上料需要传递的参数,sp_soncode,sp_id
-                        string sp_soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
-                        string sp_fsoncode = ListA.Rows[RemainIndex]["sp_fsoncode"].ToString();
-                        string sp_prefix = ListA.Rows[RemainIndex]["sp_prefix"].ToString();
-                        string sp_regex = ListA.Rows[RemainIndex]["sp_regex"].ToString();
-                        string length = ListA.Rows[RemainIndex]["sp_length"].ToString();
-                        string sp_id = ListA.Rows[RemainIndex]["sp_id"].ToString();
-                        string sp_ifrepeat = ListA.Rows[RemainIndex]["sp_ifrepeat"].ToString();
-                        string sp_ifforsn = ListA.Rows[RemainIndex]["sp_ifforsn"].ToString();
-                        string sp_barcoderule = ListA.Rows[RemainIndex]["sp_barcoderule"].ToString();
-                        string sp_checkbarcode = ListA.Rows[RemainIndex]["sp_checkbarcode"].ToString();
-                        string sp_checksalecode = ListA.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                        if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                        dt = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_craftcode,ms_status,ms_nextstepcode,ms_prodcode,ms_code from makeserial where ms_sncode='" + code.Text + "' and ms_makecode<>'" + ma_code.Text + "' order by ms_id desc", "select");
+                        string make_code = "";
+                        string make_prodcode = "";
+                        string nextstepcode = "";
+                        string ms_status = "";
+                        if (dt.Rows.Count > 0)
                         {
-                            //判断采集的条码和本次采集的也不能重复
-                            if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")
+                            ms_id = dt.Rows[0]["ms_id"].ToString();
+                            make_code = dt.Rows[0]["ms_makecode"].ToString();
+                            make_prodcode = dt.Rows[0]["ms_prodcode"].ToString();
+                            nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                            ms_status = dt.Rows[0]["ms_status"].ToString();
+                            //判断序列号的前一工单是否已经完工
+                            if (dt.Rows[0]["ms_makecode"].ToString() != ma_code.Text && dt.Rows[0]["ms_status"].ToString() == "2")
                             {
-                                OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
-                                return;
-                            }
-                            TSN.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
-                            if (sp_checkbarcode != "")
-                            {
-                                if (CheckBarcode.ContainsKey(sp_checkbarcode))
+                                sql.Clear();
+                                sql.Append("select sp_id,sp_soncode from make inner join stepbom on ma_prodcode=sb_prodcode and ma_bomversion=sb_bomversion left ");
+                                sql.Append("join stepproduct on sp_sbid=sb_id where ma_code='" + ma_code.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' ");
+                                sql.Append("and sp_stepcode='" + User.CurrentStepCode + "' and nvl(sp_ifforsn,0)<>0");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count > 0)
                                 {
-                                    if (CheckBarcode[sp_checkbarcode] != code.Text)
+                                    string sp_id = dt.Rows[0]["sp_id"].ToString();
+                                    string sp_soncode = dt.Rows[0]["sp_soncode"].ToString();
+                                    if (!dh.CheckExist("Craftmaterial", "cm_makecode='" + ma_code.Text + "' and cm_soncode='" + make_prodcode + "' and cm_sncode='" + code.Text + "' and cm_status=0"))
                                     {
-                                        OperateResult.AppendText(">>条码" + code.Text + "需要检查物料,未匹配到之前上料数据\n", Color.Red, code);
+                                        CollectDataSonCode.Add(sp_soncode);
+                                        SPID.Add(sp_id);
+                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+                                        sn_code.Text = code.Text;
+                                        OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
+                                        RemainIndex = RemainIndex + 1;
+                                        GetItem();
                                         return;
                                     }
+                                    else
+                                    {
+                                        GetItem();
+                                    }
                                 }
-                                else
-                                {
-                                    OperateResult.AppendText(">>条码" + code.Text + "需要检查物料,未匹配到之前上料数据\n", Color.Red, code);
-                                    return;
-                                }
-                            }
-                            if (sp_barcoderule == "BARCODE")
-                            {
-                                sp_soncode = ErrorMessage;
+                                else OperateResult.AppendText(">>序列号" + code.Text + "无生产信息\n", Color.Red, code);
                             }
-                            CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
-                            SPID.Add(sp_id);
-                            CollectDataSonCode.Add(sp_soncode);
-                            if (!CheckBarcode.ContainsKey(sp_fsoncode))
-                            {
-                                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
-                            }
-                            OperateResult.AppendText(">>物料" + code.Text + "采集成功,条码号" + code.Text + "\n", Color.Green, code);
-                            RemainIndex = RemainIndex + 1;
+                            else OperateResult.AppendText(">>序列号" + code.Text + "已被工单" + dt.Rows[0]["ms_makecode"].ToString() + "绑定,尚未完工\n", Color.Red, code);
                         }
-                        else
-                        {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                            return;
-                        }
-                        code.Clear();
-                        if (RemainIndex <= ListA.Rows.Count - 1)
-                        {
-                            string soncode = ListA.Rows[RemainIndex]["sp_soncode"].ToString();
-                            string prdetail = ListA.Rows[RemainIndex]["pr_detail"].ToString();
-                            OperateResult.AppendText("<<请采集" + soncode + "(" + prdetail + ")的物料数据\n", Color.Black);
-                        }
-                        if (RemainIndex == ListA.Rows.Count)
+                        else OperateResult.AppendText(">>序列号" + code.Text + "无生产信息\n", Color.Red, code);
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select ms_status,ms_stepcode,ms_nextstepcode from makeserial where ms_sncode='" + code.Text + "' and ms_makecode='" + ma_code.Text + "' order by ms_id desc", "select");
+                        nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
+                        ms_status = dt.Rows[0]["ms_status"].ToString();
+                        sn_code.Text = code.Text;
+                        sql.Clear();
+                        sql.Append("select ma_code,ma_softversion,ma_ecncode,ma_prodcode,pr_spec,ma_qty from makeserial left join product ");
+                        sql.Append(" on ms_prodcode=pr_code left join make on ms_makecode=ma_code left join ");
+                        sql.Append("makecraftdetail on mcd_macode=ms_makecode where ms_id='" + oMsid + "'");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        BaseUtil.SetFormValue(this.Controls, dt);
+                        OperateResult.AppendText(">>获取序列号" + code.Text + "成功\n", Color.Green);
+                        if (PrintLabel.SelectedValue == null)
                         {
-                            sql.Clear();
-                            sql.Append("insert into Craftmaterial (cm_id ,cm_makecode,cm_maid,cm_maprodcode, cm_soncode, cm_mscode, cm_sncode, cm_stepcode, cm_stepname,cm_fsoncode,");
-                            sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
-                            sql.Append("select Craftmaterial_seq.nextval, ma_code, ma_id, ma_prodcode,:soncode,ms_code,ms_sncode,mcd_stepcode,");
-                            sql.Append("mcd_stepname,sp_fsoncode,ms_craftcode,ms_craftname,:barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,");
-                            sql.Append("'" + User.UserSourceCode + "',:sp_id,0,1,ms_firstsn from make left join makecraftdetail on mcd_macode=ma_code  left join stepproduct on sp_stepcode=mcd_stepcode ");
-                            sql.Append("and sp_craftcode=ma_craftcode and sp_mothercode = ma_prodcode left join makeserial on ms_makecode=ma_code ");
-                            sql.Append("where ma_code='" + ma_code.Text + "'and sp_id=:sp_id1 and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode.Text + "'");
-                            dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());
-                            //更新半成品SN已被工单使用
-                            dh.BatchInsert("update makeserial set ms_nextmacode='" + ma_code.Text + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode=:sncode and ms_nextmacode is null and ms_makecode<>'" + ma_code.Text + "')", new string[] { "sncode" }, TSN.ToArray());
-                            try
-                            {
-                                string Log = "";
-                                for (int i = 0; i < CollectDataSonCode.Count; i++)
-                                {
-                                    Log += CollectDataSonCode.ToArray()[i] + " " + CollectData.ToArray()[i] + " " + SPID.ToArray()[i];
-                                }
-                                LogManager.DoLog(Log);
-                            }
-                            catch (Exception)
-                            {
-
-                            }
-                            OperateResult.AppendText(">>序列号" + ms_sncode.Text + "对应的物料已经采集完成\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "上料采集", "上料成功", ms_sncode.Text, "");
-                            RemainIndex = 0;
-                            TSN.Clear();
-                            SPID.Clear();
-                            CollectData.Clear();
-                            CheckBarcode.Clear();
-                            CollectDataSonCode.Clear();
-                            BaseUtil.CleanDataTable(ListA);
-                            if (LogicHandler.SetTestResult(ma_code.Text, User.UserSourceCode, ms_sncode.Text, "彩盒上料打印", "彩盒上料成功", User.UserCode, out ErrorMessage))
-                            {
-                                //提示正确返回时传递的信息
-                                if (ErrorMessage.Contains("AFTERSUCCESS"))
-                                    OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
-                                code.Clear();
-                                LoadCollectNum();
-                                BaseUtil.CleanDataTableData(ListA);
-                            }
-                            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                            // doc = lbl.Documents.Open(PrintLabel.Text);
-                            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out ErrorMessage))
-                            {
-                                OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                            }
+                            OperateResult.AppendText(">>产品编号:" + ma_prodcode.Text + "未维护彩盒标签\n", Color.Red, code);
                             return;
                         }
+                        GetItem();
                     }
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                else
+                {
+                    OperateResult.AppendText(">>序列号" + code.Text + "不存在\n", Color.Red, code);
+                    code.Text = "";
+                    sn_code.Text = "";
+                }
             }
+            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
         }
 
-        private void Make_ColorBoxLoadPrint_SizeChanged(object sender, EventArgs e)
+        private void GetItem()
         {
-            asc.controlAutoSize(this);
+            //单独用一个DataTable存储一个
+            dt1 = new DataTable();
+            sql.Clear();
+            sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
+            sql.Append("sp_fsoncode,max(sp_barcoderule)sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
+            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
+            sql.Append("sp_regex,max(pr_detail)pr_detail,max(substr(pr_spec,0,20))pr_spec from stepproduct left join product on pr_code=sp_fsoncode where ");
+            sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
+            sql.Append("And sp_mothercode ='" + ma_prodcode.Text + "' and sp_tracekind=1 and not exists(select 1 from craftmaterial where ");
+            sql.Append("cm_sncode in (select '" + ms_firstsn + "' from dual union select sn from makesnrelation where firstsn='" + ms_firstsn + "') and cm_makecode='" + ma_code.Text + "' and cm_fsoncode=");
+            sql.Append("sp_fsoncode and cm_status=0) group by sp_fsoncode order by SP_DETNO asc");
+            dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            code.Clear();
+            //用于记录提醒的数据长度
+            RemainList = new string[dt1.Rows.Count];
+            for (int i = 0; i < dt1.Rows.Count; i++)
+            {
+                string soncode = dt1.Rows[i]["sp_soncode"].ToString();
+                string prdetail = dt1.Rows[i]["pr_detail"].ToString();
+                RemainList[i] = soncode + "(" + prdetail + ")";
+            }
+            if (dt1.Rows.Count > 0)
+            {
+                try
+                {
+                    string soncode = dt1.Rows[RemainIndex]["sp_soncode"].ToString();
+                    string prdetail = dt1.Rows[RemainIndex]["pr_detail"].ToString();
+                    OperateResult.AppendText("<<请采集" + soncode + "(" + prdetail + ")的物料数据\n", Color.Black);
+                }
+                catch (Exception)
+                {
+                    OperateResult.AppendText(">>序列号" + sn_code.Text + "上料采集完成!\n", Color.Green);
+                    code.Text = "";
+                    sn_code.Text = "";
+                }
+            }
+            else
+            {
+                OperateResult.AppendText(">>序列号" + sn_code.Text + "不在本道工序,请采集其它序列号\n", Color.Black);
+                if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                else
+                {
+                    //提示正确返回时传递的信息
+                    if (ErrorMessage.Contains("AFTERSUCCESS"))
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                    OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                }
+                code.Text = "";
+                sn_code.Text = "";
+            }
         }
 
-        private void pr_code_TextChanged(object sender, EventArgs e)
+        //此类中通用的保存逻辑
+        private void Save_OtherCode(string sp_fsoncode, string sp_soncode, string ma_code, string ms_sncode, string sp_id)
         {
-            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
-            PrintLabel.DataSource = _dt;
-            PrintLabel.DisplayMember = "la_url";
-            PrintLabel.ValueMember = "la_id";
-        }
+            CollectDataSonCode.Add(sp_soncode);
+            //采集成功提示
 
-        private void LoadCollectNum()
-        {
-            dt = (DataTable)dh.ExecuteSql("select ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
-            BaseUtil.SetFormValue(Controls, dt);
-        }
+            CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+            if (!CheckBarcode.ContainsKey(sp_fsoncode))
+            {
+                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
+            }
+            SPID.Add(sp_id);
+            OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
+            LabelDataGridView.Rows[RemainIndex].Cells["BarCode"].Value = code.Text;
+            if (code.Text.Length > 80)
+                OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制80,内容截取前80位进行采集\n", Color.Red);
+            code.Clear();
+            RemainIndex = RemainIndex + 1;
+            //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了
+            if (RemainIndex < RemainList.Length)
+            {
+                OperateResult.AppendText("<<请采集" + RemainList[RemainIndex] + "的物料数据\n", Color.Black);
+            }
+            else
+            {
+                sql.Clear();
+                sql.Append("insert into Craftmaterial (cm_id ,cm_makecode,cm_maid,cm_maprodcode, cm_soncode, cm_mscode, cm_sncode, cm_stepcode, cm_stepname,cm_fsoncode,");
+                sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
+                sql.Append("select Craftmaterial_seq.nextval, ma_code, ma_id, ma_prodcode,:soncode,ms_code,ms_sncode,mcd_stepcode,");
+                sql.Append("mcd_stepname,sp_fsoncode,ms_craftcode,ms_craftname,:barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,");
+                sql.Append("'" + User.UserSourceCode + "',:sp_id,0,1,ms_firstsn from make left join makecraftdetail on mcd_macode=ma_code  left join stepproduct on sp_stepcode=mcd_stepcode ");
+                sql.Append(" and sp_mothercode = ma_prodcode left join makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode ");
+                sql.Append("where ma_code='" + make_code + "'and sp_id=:sp_id1 and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode + "'");
+                dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode", "sp_id", "sp_id1" }, CollectDataSonCode.ToArray(), CollectData.ToArray(), SPID.ToArray(), SPID.ToArray());
+                try
+                {
+                    string Log = "";
+                    for (int i = 0; i < CollectDataSonCode.Count; i++)
+                    {
+                        Log += CollectDataSonCode.ToArray()[i] + " " + CollectData.ToArray()[i] + " " + SPID.ToArray()[i];
+                    }
+                    LogManager.DoLog(Log);
+                }
+                catch (Exception)
+                {
 
-        private void Make_ColorBoxLoadPrint_FormClosing(object sender, FormClosingEventArgs e)
-        {
-            BaseUtil.ClosePrint(lbl);
+                }
+                //更新序列号半成品已被使用
+                dh.BatchInsert("update makeserial set ms_nextmacode='" + ma_code + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode=:sncode and ms_nextmacode is null and ms_makecode<>'" + ma_code + "')", new string[] { "sncode" }, TSN.ToArray());
+                CollectData.Clear();
+                TSN.Clear();
+                SPID.Clear();
+                CheckBarcode.Clear();
+                CollectDataSonCode.Clear();
+                //采集成功,设置序列号栏目为空
+                RemainIndex = 0;
+                OperateResult.AppendText(">>序列号" + sn_code.Text + "上料采集完成!\n", Color.Green);
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "上料采集", "上料成功", sn_code.Text, "");
+                if (LogicHandler.SetStepResult(ma_code, User.UserSourceCode, sn_code.Text, "上料采集", "上料成功", User.UserCode, out ErrorMessage))
+                {
+
+                    //提示正确返回时传递的信息
+                    if (ErrorMessage.Contains("AFTERSUCCESS"))
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n");
+                    sn_code.Text = "";
+                    //刷新数据
+                    EventArgs e = new EventArgs();
+                    object sender = null;
+                    if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode, int.Parse(PrintNum.Text), ma_code, ma_prodcode.Text, "彩盒标", "0", out ErrorMessage))
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                    }
+                    ma_code_UserControlTextChanged(sender, e);
+                }
+                else
+                {
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
+                }
+            }
         }
 
         private void ClearSn_code_Click(object sender, EventArgs e)
         {
-            if (ListA != null)
-                BaseUtil.CleanDataTableData(ListA);
-            TSN.Clear();
+            sn_code.Clear();
             SPID.Clear();
+            TSN.Clear();
             CheckBarcode.Clear();
-            CollectDataSonCode.Clear();
             CollectData.Clear();
+            CollectDataSonCode.Clear();
+            if (dt1 != null)
+                BaseUtil.CleanDataTableData(dt1);
             RemainIndex = 0;
-            code.Clear();
-            OperateResult.AppendText(">>请重新采集序列号\n");
+            BaseUtil.CleanDGVData(LabelDataGridView);
+            OperateResult.AppendText(">>请采集序列号\n", Color.Black);
+        }
+
+        private void ma_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (ma_code.Text.Length > 5)
+            {
+                string ErrMessage = "";
+                if (LogicHandler.CheckMakeStatus(ma_code.Text, out ErrMessage))
+                {
+                    mcd_inqty.Text = "";
+                    mcd_remainqty.Text = "";
+                    sql.Clear();
+                    sql.Append("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty ");
+                    sql.Append("from make left join makecraftdetail on mcd_macode=ma_code where ");
+                    sql.Append("ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                    DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    if (dt.Rows.Count > 0)
+                        BaseUtil.SetFormValue(Controls, dt);
+                }
+            }
+        }
+
+        private void ma_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + ma_prodcode.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            PrintLabel.DataSource = _dt;
+            PrintLabel.DisplayMember = "la_url";
+            PrintLabel.ValueMember = "la_id";
         }
 
         private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)

+ 77 - 0
UAS_MES_ODLF/FunctionCode/Make/Make_ColorBoxLoadPrint.resx

@@ -117,4 +117,81 @@
   <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="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
 </root>

+ 3 - 3
UAS_MES_ODLF/FunctionCode/Query/Query_SpecialReport.cs

@@ -54,9 +54,9 @@ namespace UAS_MES_NEW.Query
                 dt.Columns.Add("工单号");
                 dt.Columns.Add("MAC");
                 dt.Columns.Add("BT");
-                dt.Columns.Add("展栏位1");
-                dt.Columns.Add("展栏位2");
-                dt.Columns.Add("展栏位3");
+                dt.Columns.Add("展栏位1");
+                dt.Columns.Add("展栏位2");
+                dt.Columns.Add("展栏位3");
                 dt.Columns.Add("备注");
                 string prefix = BeginMac.Text.Substring(0, 8);
                 string suffix = BeginMac.Text.Substring(8, 4);