Browse Source

修改支持动态参数

callm 5 years ago
parent
commit
8d02d02103

+ 3 - 1
UAS-出货标签管理(贸易版)/ExportColumns.cs

@@ -50,6 +50,7 @@ namespace UAS_LabelMachine
             List<string> es_detno = new List<string>();
             List<string> es_filed1 = new List<string>();
             List<string> es_istitle = new List<string>();
+            List<string> es_datatype = new List<string>();
             //插入首页固定的抬头
             es_filed.Add("pi_title"); es_caption.Add("客户"); es_enable.Add("-1"); es_prefix.Add("'客户:'"); es_suffix.Add("''"); es_detno.Add("0.1"); es_filed1.Add("pi_title"); es_istitle.Add("-1");
             es_filed.Add("pi_inoutno"); es_caption.Add("出货单号"); es_enable.Add("-1"); es_prefix.Add("'出货单号:'"); es_suffix.Add("''"); es_detno.Add("0.2"); es_filed1.Add("pi_inoutno"); es_istitle.Add("-1");
@@ -101,6 +102,7 @@ namespace UAS_LabelMachine
                         es_detno.Add((DataPage.Columns[j].DisplayIndex + 1).ToString());
                         es_filed1.Add(DataPage.Columns[j].Tag.ToString());
                         es_istitle.Add("");
+                        es_datatype.Add("");
                     }
                 }
             }
@@ -194,7 +196,7 @@ namespace UAS_LabelMachine
             DataTable SQL_ = (DataTable)dh.ExecuteSql("select es_filed,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode='" + custcode + "' and nvl(es_istitle,0)<>-1 order by es_detno", "select");
             if (SQL_.Rows.Count == 0)
             {
-                SQL_ = (DataTable)dh.ExecuteSql("select es_filed,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode is null and  nvl(es_istitle,0)<>-1 order by es_detno", "select");
+                SQL_ = (DataTable)dh.ExecuteSql("select es_filed,es_datatype,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode is null and  nvl(es_istitle,0)<>-1 order by es_detno", "select");
             }
             string es_field = "";
             for (int i = 0; i < SQL_.Rows.Count; i++)

+ 204 - 121
UAS-出货标签管理(贸易版)/ExportExcel.Designer.cs

@@ -39,9 +39,9 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
-            this.BVCEO = new System.Windows.Forms.CheckBox();
-            this.TS = new System.Windows.Forms.CheckBox();
-            this.percent = new System.Windows.Forms.CheckBox();
+            this.H_Param2 = new System.Windows.Forms.CheckBox();
+            this.H_Param1 = new System.Windows.Forms.CheckBox();
+            this.M_Param1 = new System.Windows.Forms.CheckBox();
             this.label5 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.BatchCode = new System.Windows.Forms.RadioButton();
@@ -52,16 +52,21 @@
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.FirstPage_YIELD = new System.Windows.Forms.CheckBox();
             this.FirstPage_REMARK = new System.Windows.Forms.CheckBox();
-            this.RowNum = new UAS_LabelMachine.CustomControl.NumOnlyTextBox();
             this.ExportSetting = new System.Windows.Forms.Button();
+            this.M_Param2 = new System.Windows.Forms.CheckBox();
+            this.M_Param3 = new System.Windows.Forms.CheckBox();
+            this.H_Param3 = new System.Windows.Forms.CheckBox();
+            this.RowNum = new UAS_LabelMachine.CustomControl.NumOnlyTextBox();
+            this.M_Param4 = new System.Windows.Forms.CheckBox();
+            this.H_Param4 = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // Export
             // 
-            this.Export.Location = new System.Drawing.Point(292, 290);
-            this.Export.Margin = new System.Windows.Forms.Padding(2);
+            this.Export.Location = new System.Drawing.Point(584, 580);
+            this.Export.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Export.Name = "Export";
-            this.Export.Size = new System.Drawing.Size(94, 24);
+            this.Export.Size = new System.Drawing.Size(188, 48);
             this.Export.TabIndex = 0;
             this.Export.Text = "导出";
             this.Export.UseVisualStyleBackColor = true;
@@ -73,10 +78,10 @@
             this.CH_BLUEFILM.Checked = true;
             this.CH_BLUEFILM.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CH_BLUEFILM.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_BLUEFILM.Location = new System.Drawing.Point(130, 58);
-            this.CH_BLUEFILM.Margin = new System.Windows.Forms.Padding(2);
+            this.CH_BLUEFILM.Location = new System.Drawing.Point(260, 116);
+            this.CH_BLUEFILM.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CH_BLUEFILM.Name = "CH_BLUEFILM";
-            this.CH_BLUEFILM.Size = new System.Drawing.Size(68, 18);
+            this.CH_BLUEFILM.Size = new System.Drawing.Size(125, 31);
             this.CH_BLUEFILM.TabIndex = 1;
             this.CH_BLUEFILM.Text = "蓝膜号";
             this.CH_BLUEFILM.UseVisualStyleBackColor = true;
@@ -87,10 +92,10 @@
             this.CH_SPLITBATCH.Checked = true;
             this.CH_SPLITBATCH.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CH_SPLITBATCH.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_SPLITBATCH.Location = new System.Drawing.Point(350, 58);
-            this.CH_SPLITBATCH.Margin = new System.Windows.Forms.Padding(2);
+            this.CH_SPLITBATCH.Location = new System.Drawing.Point(700, 116);
+            this.CH_SPLITBATCH.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CH_SPLITBATCH.Name = "CH_SPLITBATCH";
-            this.CH_SPLITBATCH.Size = new System.Drawing.Size(82, 18);
+            this.CH_SPLITBATCH.Size = new System.Drawing.Size(152, 31);
             this.CH_SPLITBATCH.TabIndex = 3;
             this.CH_SPLITBATCH.Text = "扩散批号";
             this.CH_SPLITBATCH.UseVisualStyleBackColor = true;
@@ -101,10 +106,10 @@
             this.CH_PBCODE.Checked = true;
             this.CH_PBCODE.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CH_PBCODE.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_PBCODE.Location = new System.Drawing.Point(130, 94);
-            this.CH_PBCODE.Margin = new System.Windows.Forms.Padding(2);
+            this.CH_PBCODE.Location = new System.Drawing.Point(260, 188);
+            this.CH_PBCODE.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CH_PBCODE.Name = "CH_PBCODE";
-            this.CH_PBCODE.Size = new System.Drawing.Size(54, 18);
+            this.CH_PBCODE.Size = new System.Drawing.Size(98, 31);
             this.CH_PBCODE.TabIndex = 8;
             this.CH_PBCODE.Text = "盒号";
             this.CH_PBCODE.UseVisualStyleBackColor = true;
@@ -115,10 +120,10 @@
             this.CH_REMARK.Checked = true;
             this.CH_REMARK.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CH_REMARK.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_REMARK.Location = new System.Drawing.Point(244, 94);
-            this.CH_REMARK.Margin = new System.Windows.Forms.Padding(2);
+            this.CH_REMARK.Location = new System.Drawing.Point(488, 188);
+            this.CH_REMARK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CH_REMARK.Name = "CH_REMARK";
-            this.CH_REMARK.Size = new System.Drawing.Size(82, 18);
+            this.CH_REMARK.Size = new System.Drawing.Size(152, 31);
             this.CH_REMARK.TabIndex = 9;
             this.CH_REMARK.Text = "芯片备注";
             this.CH_REMARK.UseVisualStyleBackColor = true;
@@ -129,10 +134,10 @@
             this.ch_code.Checked = true;
             this.ch_code.CheckState = System.Windows.Forms.CheckState.Checked;
             this.ch_code.Font = new System.Drawing.Font("宋体", 10F);
-            this.ch_code.Location = new System.Drawing.Point(244, 58);
-            this.ch_code.Margin = new System.Windows.Forms.Padding(2);
+            this.ch_code.Location = new System.Drawing.Point(488, 116);
+            this.ch_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ch_code.Name = "ch_code";
-            this.ch_code.Size = new System.Drawing.Size(68, 18);
+            this.ch_code.Size = new System.Drawing.Size(125, 31);
             this.ch_code.TabIndex = 10;
             this.ch_code.Text = "芯片号";
             this.ch_code.UseVisualStyleBackColor = true;
@@ -143,10 +148,10 @@
             this.CH_WATERID.Checked = true;
             this.CH_WATERID.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CH_WATERID.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_WATERID.Location = new System.Drawing.Point(452, 58);
-            this.CH_WATERID.Margin = new System.Windows.Forms.Padding(2);
+            this.CH_WATERID.Location = new System.Drawing.Point(904, 116);
+            this.CH_WATERID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CH_WATERID.Name = "CH_WATERID";
-            this.CH_WATERID.Size = new System.Drawing.Size(82, 18);
+            this.CH_WATERID.Size = new System.Drawing.Size(156, 31);
             this.CH_WATERID.TabIndex = 11;
             this.CH_WATERID.Text = "Wafer_ID";
             this.CH_WATERID.UseVisualStyleBackColor = true;
@@ -155,10 +160,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
-            this.label1.Location = new System.Drawing.Point(11, 26);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(22, 52);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(63, 14);
+            this.label1.Size = new System.Drawing.Size(120, 27);
             this.label1.TabIndex = 12;
             this.label1.Text = "打印选项";
             // 
@@ -166,10 +171,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("宋体", 10F);
-            this.label2.Location = new System.Drawing.Point(11, 60);
-            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Location = new System.Drawing.Point(22, 120);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(112, 14);
+            this.label2.Size = new System.Drawing.Size(215, 27);
             this.label2.TabIndex = 13;
             this.label2.Text = "请选择打印内容:";
             // 
@@ -177,10 +182,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("宋体", 10F);
-            this.label3.Location = new System.Drawing.Point(11, 135);
-            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label3.Location = new System.Drawing.Point(22, 270);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(112, 14);
+            this.label3.Size = new System.Drawing.Size(216, 27);
             this.label3.TabIndex = 14;
             this.label3.Text = "参数选择(机测):";
             // 
@@ -188,57 +193,60 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("宋体", 10F);
-            this.label4.Location = new System.Drawing.Point(11, 175);
-            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Location = new System.Drawing.Point(22, 350);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(112, 14);
+            this.label4.Size = new System.Drawing.Size(216, 27);
             this.label4.TabIndex = 15;
             this.label4.Text = "参数选择(手测):";
             // 
-            // BVCEO
-            // 
-            this.BVCEO.AutoSize = true;
-            this.BVCEO.Font = new System.Drawing.Font("宋体", 10F);
-            this.BVCEO.Location = new System.Drawing.Point(244, 173);
-            this.BVCEO.Margin = new System.Windows.Forms.Padding(2);
-            this.BVCEO.Name = "BVCEO";
-            this.BVCEO.Size = new System.Drawing.Size(61, 18);
-            this.BVCEO.TabIndex = 17;
-            this.BVCEO.Text = "BVCEO";
-            this.BVCEO.UseVisualStyleBackColor = true;
-            // 
-            // TS
-            // 
-            this.TS.AutoSize = true;
-            this.TS.Font = new System.Drawing.Font("宋体", 10F);
-            this.TS.Location = new System.Drawing.Point(130, 173);
-            this.TS.Margin = new System.Windows.Forms.Padding(2);
-            this.TS.Name = "TS";
-            this.TS.Size = new System.Drawing.Size(40, 18);
-            this.TS.TabIndex = 18;
-            this.TS.Text = "TS";
-            this.TS.UseVisualStyleBackColor = true;
-            // 
-            // percent
-            // 
-            this.percent.AutoSize = true;
-            this.percent.Font = new System.Drawing.Font("宋体", 10F);
-            this.percent.Location = new System.Drawing.Point(130, 133);
-            this.percent.Margin = new System.Windows.Forms.Padding(2);
-            this.percent.Name = "percent";
-            this.percent.Size = new System.Drawing.Size(47, 18);
-            this.percent.TabIndex = 19;
-            this.percent.Text = "HFS";
-            this.percent.UseVisualStyleBackColor = true;
+            // H_Param2
+            // 
+            this.H_Param2.AutoSize = true;
+            this.H_Param2.Font = new System.Drawing.Font("宋体", 10F);
+            this.H_Param2.Location = new System.Drawing.Point(488, 346);
+            this.H_Param2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.H_Param2.Name = "H_Param2";
+            this.H_Param2.Size = new System.Drawing.Size(156, 31);
+            this.H_Param2.TabIndex = 17;
+            this.H_Param2.Text = "H_Param2";
+            this.H_Param2.UseVisualStyleBackColor = true;
+            this.H_Param2.Visible = false;
+            // 
+            // H_Param1
+            // 
+            this.H_Param1.AutoSize = true;
+            this.H_Param1.Font = new System.Drawing.Font("宋体", 10F);
+            this.H_Param1.Location = new System.Drawing.Point(260, 346);
+            this.H_Param1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.H_Param1.Name = "H_Param1";
+            this.H_Param1.Size = new System.Drawing.Size(156, 31);
+            this.H_Param1.TabIndex = 18;
+            this.H_Param1.Text = "H_Param1";
+            this.H_Param1.UseVisualStyleBackColor = true;
+            this.H_Param1.Visible = false;
+            // 
+            // M_Param1
+            // 
+            this.M_Param1.AutoSize = true;
+            this.M_Param1.Font = new System.Drawing.Font("宋体", 10F);
+            this.M_Param1.Location = new System.Drawing.Point(260, 266);
+            this.M_Param1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.M_Param1.Name = "M_Param1";
+            this.M_Param1.Size = new System.Drawing.Size(156, 31);
+            this.M_Param1.TabIndex = 19;
+            this.M_Param1.Text = "M_Param1";
+            this.M_Param1.UseVisualStyleBackColor = true;
+            this.M_Param1.Visible = false;
             // 
             // label5
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("宋体", 10F);
-            this.label5.Location = new System.Drawing.Point(11, 254);
-            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label5.Location = new System.Drawing.Point(22, 508);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(98, 14);
+            this.label5.Size = new System.Drawing.Size(188, 27);
             this.label5.TabIndex = 20;
             this.label5.Text = "首页打印方式:";
             // 
@@ -246,10 +254,10 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("宋体", 10F);
-            this.label6.Location = new System.Drawing.Point(11, 216);
-            this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label6.Location = new System.Drawing.Point(22, 432);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(98, 14);
+            this.label6.Size = new System.Drawing.Size(188, 27);
             this.label6.TabIndex = 21;
             this.label6.Text = "打印分页方式:";
             // 
@@ -257,10 +265,10 @@
             // 
             this.BatchCode.AutoSize = true;
             this.BatchCode.Font = new System.Drawing.Font("宋体", 10F);
-            this.BatchCode.Location = new System.Drawing.Point(130, 216);
-            this.BatchCode.Margin = new System.Windows.Forms.Padding(2);
+            this.BatchCode.Location = new System.Drawing.Point(260, 432);
+            this.BatchCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BatchCode.Name = "BatchCode";
-            this.BatchCode.Size = new System.Drawing.Size(67, 18);
+            this.BatchCode.Size = new System.Drawing.Size(124, 31);
             this.BatchCode.TabIndex = 22;
             this.BatchCode.Text = "扩散批";
             this.BatchCode.UseVisualStyleBackColor = true;
@@ -269,10 +277,10 @@
             // 
             this.BoxCode.AutoSize = true;
             this.BoxCode.Font = new System.Drawing.Font("宋体", 10F);
-            this.BoxCode.Location = new System.Drawing.Point(222, 216);
-            this.BoxCode.Margin = new System.Windows.Forms.Padding(2);
+            this.BoxCode.Location = new System.Drawing.Point(444, 432);
+            this.BoxCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BoxCode.Name = "BoxCode";
-            this.BoxCode.Size = new System.Drawing.Size(53, 18);
+            this.BoxCode.Size = new System.Drawing.Size(97, 31);
             this.BoxCode.TabIndex = 23;
             this.BoxCode.Text = "盒号";
             this.BoxCode.UseVisualStyleBackColor = true;
@@ -282,10 +290,10 @@
             this.FixRow.AutoSize = true;
             this.FixRow.Checked = true;
             this.FixRow.Font = new System.Drawing.Font("宋体", 10F);
-            this.FixRow.Location = new System.Drawing.Point(306, 216);
-            this.FixRow.Margin = new System.Windows.Forms.Padding(2);
+            this.FixRow.Location = new System.Drawing.Point(612, 432);
+            this.FixRow.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.FixRow.Name = "FixRow";
-            this.FixRow.Size = new System.Drawing.Size(81, 18);
+            this.FixRow.Size = new System.Drawing.Size(151, 31);
             this.FixRow.TabIndex = 24;
             this.FixRow.TabStop = true;
             this.FixRow.Text = "固定行号";
@@ -295,10 +303,10 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("宋体", 10F);
-            this.label7.Location = new System.Drawing.Point(405, 216);
-            this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label7.Location = new System.Drawing.Point(810, 432);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(70, 14);
+            this.label7.Size = new System.Drawing.Size(134, 27);
             this.label7.TabIndex = 25;
             this.label7.Text = "分页行数:";
             // 
@@ -306,10 +314,10 @@
             // 
             this.FirstPage_WID.AutoSize = true;
             this.FirstPage_WID.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_WID.Location = new System.Drawing.Point(130, 254);
-            this.FirstPage_WID.Margin = new System.Windows.Forms.Padding(2);
+            this.FirstPage_WID.Location = new System.Drawing.Point(260, 508);
+            this.FirstPage_WID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.FirstPage_WID.Name = "FirstPage_WID";
-            this.FirstPage_WID.Size = new System.Drawing.Size(110, 18);
+            this.FirstPage_WID.Size = new System.Drawing.Size(210, 31);
             this.FirstPage_WID.TabIndex = 29;
             this.FirstPage_WID.Text = "打印Wafer id";
             this.FirstPage_WID.UseVisualStyleBackColor = true;
@@ -318,10 +326,10 @@
             // 
             this.FirstPage_YIELD.AutoSize = true;
             this.FirstPage_YIELD.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_YIELD.Location = new System.Drawing.Point(244, 254);
-            this.FirstPage_YIELD.Margin = new System.Windows.Forms.Padding(2);
+            this.FirstPage_YIELD.Location = new System.Drawing.Point(488, 508);
+            this.FirstPage_YIELD.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.FirstPage_YIELD.Name = "FirstPage_YIELD";
-            this.FirstPage_YIELD.Size = new System.Drawing.Size(54, 18);
+            this.FirstPage_YIELD.Size = new System.Drawing.Size(98, 31);
             this.FirstPage_YIELD.TabIndex = 31;
             this.FirstPage_YIELD.Text = "良率";
             this.FirstPage_YIELD.UseVisualStyleBackColor = true;
@@ -330,40 +338,110 @@
             // 
             this.FirstPage_REMARK.AutoSize = true;
             this.FirstPage_REMARK.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_REMARK.Location = new System.Drawing.Point(304, 254);
-            this.FirstPage_REMARK.Margin = new System.Windows.Forms.Padding(2);
+            this.FirstPage_REMARK.Location = new System.Drawing.Point(608, 508);
+            this.FirstPage_REMARK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.FirstPage_REMARK.Name = "FirstPage_REMARK";
-            this.FirstPage_REMARK.Size = new System.Drawing.Size(54, 18);
+            this.FirstPage_REMARK.Size = new System.Drawing.Size(98, 31);
             this.FirstPage_REMARK.TabIndex = 32;
             this.FirstPage_REMARK.Text = "备注";
             this.FirstPage_REMARK.UseVisualStyleBackColor = true;
             // 
-            // RowNum
-            // 
-            this.RowNum.Location = new System.Drawing.Point(480, 214);
-            this.RowNum.Margin = new System.Windows.Forms.Padding(2);
-            this.RowNum.Name = "RowNum";
-            this.RowNum.Negative = false;
-            this.RowNum.Size = new System.Drawing.Size(52, 21);
-            this.RowNum.TabIndex = 30;
-            this.RowNum.Text = "10";
-            // 
             // ExportSetting
             // 
-            this.ExportSetting.Location = new System.Drawing.Point(201, 290);
-            this.ExportSetting.Margin = new System.Windows.Forms.Padding(2);
+            this.ExportSetting.Location = new System.Drawing.Point(402, 580);
+            this.ExportSetting.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ExportSetting.Name = "ExportSetting";
-            this.ExportSetting.Size = new System.Drawing.Size(80, 24);
+            this.ExportSetting.Size = new System.Drawing.Size(160, 48);
             this.ExportSetting.TabIndex = 33;
             this.ExportSetting.Text = "导出列配置";
             this.ExportSetting.UseVisualStyleBackColor = true;
             this.ExportSetting.Click += new System.EventHandler(this.ExportSetting_Click);
             // 
+            // M_Param2
+            // 
+            this.M_Param2.AutoSize = true;
+            this.M_Param2.Font = new System.Drawing.Font("宋体", 10F);
+            this.M_Param2.Location = new System.Drawing.Point(488, 266);
+            this.M_Param2.Margin = new System.Windows.Forms.Padding(4);
+            this.M_Param2.Name = "M_Param2";
+            this.M_Param2.Size = new System.Drawing.Size(156, 31);
+            this.M_Param2.TabIndex = 34;
+            this.M_Param2.Text = "M_Param2";
+            this.M_Param2.UseVisualStyleBackColor = true;
+            this.M_Param2.Visible = false;
+            // 
+            // M_Param3
+            // 
+            this.M_Param3.AutoSize = true;
+            this.M_Param3.Font = new System.Drawing.Font("宋体", 10F);
+            this.M_Param3.Location = new System.Drawing.Point(700, 269);
+            this.M_Param3.Margin = new System.Windows.Forms.Padding(4);
+            this.M_Param3.Name = "M_Param3";
+            this.M_Param3.Size = new System.Drawing.Size(156, 31);
+            this.M_Param3.TabIndex = 35;
+            this.M_Param3.Text = "M_Param3";
+            this.M_Param3.UseVisualStyleBackColor = true;
+            this.M_Param3.Visible = false;
+            // 
+            // H_Param3
+            // 
+            this.H_Param3.AutoSize = true;
+            this.H_Param3.Font = new System.Drawing.Font("宋体", 10F);
+            this.H_Param3.Location = new System.Drawing.Point(700, 346);
+            this.H_Param3.Margin = new System.Windows.Forms.Padding(4);
+            this.H_Param3.Name = "H_Param3";
+            this.H_Param3.Size = new System.Drawing.Size(156, 31);
+            this.H_Param3.TabIndex = 36;
+            this.H_Param3.Text = "H_Param3";
+            this.H_Param3.UseVisualStyleBackColor = true;
+            this.H_Param3.Visible = false;
+            // 
+            // RowNum
+            // 
+            this.RowNum.Location = new System.Drawing.Point(960, 428);
+            this.RowNum.Margin = new System.Windows.Forms.Padding(4);
+            this.RowNum.Name = "RowNum";
+            this.RowNum.Negative = false;
+            this.RowNum.Size = new System.Drawing.Size(100, 35);
+            this.RowNum.TabIndex = 30;
+            this.RowNum.Text = "10";
+            // 
+            // M_Param4
+            // 
+            this.M_Param4.AutoSize = true;
+            this.M_Param4.Font = new System.Drawing.Font("宋体", 10F);
+            this.M_Param4.Location = new System.Drawing.Point(904, 266);
+            this.M_Param4.Margin = new System.Windows.Forms.Padding(4);
+            this.M_Param4.Name = "M_Param4";
+            this.M_Param4.Size = new System.Drawing.Size(156, 31);
+            this.M_Param4.TabIndex = 37;
+            this.M_Param4.Text = "M_Param4";
+            this.M_Param4.UseVisualStyleBackColor = true;
+            this.M_Param4.Visible = false;
+            // 
+            // H_Param4
+            // 
+            this.H_Param4.AutoSize = true;
+            this.H_Param4.Font = new System.Drawing.Font("宋体", 10F);
+            this.H_Param4.Location = new System.Drawing.Point(904, 346);
+            this.H_Param4.Margin = new System.Windows.Forms.Padding(4);
+            this.H_Param4.Name = "H_Param4";
+            this.H_Param4.Size = new System.Drawing.Size(156, 31);
+            this.H_Param4.TabIndex = 38;
+            this.H_Param4.Text = "H_Param4";
+            this.H_Param4.UseVisualStyleBackColor = true;
+            this.H_Param4.Visible = false;
+            // 
             // ExportExcel
             // 
-            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(572, 336);
+            this.ClientSize = new System.Drawing.Size(1144, 672);
+            this.Controls.Add(this.H_Param4);
+            this.Controls.Add(this.M_Param4);
+            this.Controls.Add(this.H_Param3);
+            this.Controls.Add(this.M_Param3);
+            this.Controls.Add(this.M_Param2);
             this.Controls.Add(this.ExportSetting);
             this.Controls.Add(this.FirstPage_REMARK);
             this.Controls.Add(this.FirstPage_YIELD);
@@ -375,9 +453,9 @@
             this.Controls.Add(this.BatchCode);
             this.Controls.Add(this.label6);
             this.Controls.Add(this.label5);
-            this.Controls.Add(this.percent);
-            this.Controls.Add(this.TS);
-            this.Controls.Add(this.BVCEO);
+            this.Controls.Add(this.M_Param1);
+            this.Controls.Add(this.H_Param1);
+            this.Controls.Add(this.H_Param2);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label2);
@@ -389,7 +467,7 @@
             this.Controls.Add(this.CH_SPLITBATCH);
             this.Controls.Add(this.CH_BLUEFILM);
             this.Controls.Add(this.Export);
-            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "ExportExcel";
             this.Text = "导出数据";
             this.Load += new System.EventHandler(this.ExportExcel_Load);
@@ -411,9 +489,9 @@
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.CheckBox BVCEO;
-        private System.Windows.Forms.CheckBox TS;
-        private System.Windows.Forms.CheckBox percent;
+        private System.Windows.Forms.CheckBox H_Param2;
+        private System.Windows.Forms.CheckBox H_Param1;
+        private System.Windows.Forms.CheckBox M_Param1;
         private System.Windows.Forms.Label label5;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.RadioButton BatchCode;
@@ -426,5 +504,10 @@
         private System.Windows.Forms.CheckBox FirstPage_YIELD;
         private System.Windows.Forms.CheckBox FirstPage_REMARK;
         private System.Windows.Forms.Button ExportSetting;
+        private System.Windows.Forms.CheckBox M_Param2;
+        private System.Windows.Forms.CheckBox M_Param3;
+        private System.Windows.Forms.CheckBox H_Param3;
+        private System.Windows.Forms.CheckBox M_Param4;
+        private System.Windows.Forms.CheckBox H_Param4;
     }
 }

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

@@ -21,7 +21,7 @@ namespace UAS_LabelMachine
         public ExportExcel(string pi_inoutno)
         {
             InitializeComponent();
-     
+
             inoutno = pi_inoutno;
         }
 
@@ -50,9 +50,9 @@ namespace UAS_LabelMachine
                 conditionbox.Add(CH_SPLITBATCH);
                 conditionbox.Add(CH_WATERID);
                 conditionbox.Add(ch_code);
-                conditionbox.Add(percent);
-                conditionbox.Add(TS);
-                conditionbox.Add(BVCEO);
+                conditionbox.Add(M_Param1);
+                conditionbox.Add(H_Param1);
+                conditionbox.Add(H_Param2);
                 conditionbox.Add(FirstPage_WID);
                 conditionbox.Add(FirstPage_YIELD);
                 conditionbox.Add(FirstPage_REMARK);
@@ -69,16 +69,31 @@ namespace UAS_LabelMachine
                 {
                     SplitType = BoxCode.Name;
                 }
-                DataTable SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='DataPage' and es_enable=-1 and es_custcode='" + custcode + "' order by es_detno", "select");
+                DataTable SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_datatype,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='DataPage' and es_enable=-1 and es_custcode='" + custcode + "' order by es_detno", "select");
                 //没有置顶客户的取空的
                 if (SQL1_.Rows.Count == 0)
                 {
-                    SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='DataPage' and es_enable=-1 and es_custcode is null order by es_detno", "select");
+                    SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_datatype,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='DataPage' and es_enable=-1 and es_custcode is null order by es_detno", "select");
                 }
                 string es_field1 = "";
                 for (int i = 0; i < SQL1_.Rows.Count; i++)
                 {
-                    es_field1 += SQL1_.Rows[i]["es_prefix"].ToString() + "||" + SQL1_.Rows[i]["es_filed"].ToString() + "||" + SQL1_.Rows[i]["es_suffix"].ToString() + ",";
+                    //不是参数的直接拼接
+                    if (SQL1_.Rows[i]["es_datatype"].ToString() != "Param")
+                        es_field1 += SQL1_.Rows[i]["es_prefix"].ToString() + "||" + SQL1_.Rows[i]["es_filed"].ToString() + "||" + SQL1_.Rows[i]["es_suffix"].ToString() + ",";
+                    //是参数的则先判断是否含有内容
+                    else if (
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(M_Param1.Text) && M_Param1.Visible == true && M_Param1.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(M_Param2.Text) && M_Param2.Visible == true && M_Param2.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(M_Param3.Text) && M_Param3.Visible == true && M_Param3.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(M_Param4.Text) && M_Param4.Visible == true && M_Param4.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(H_Param1.Text) && H_Param1.Visible == true && H_Param1.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(H_Param2.Text) && H_Param2.Visible == true && H_Param2.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(H_Param3.Text) && H_Param3.Visible == true && H_Param3.Checked) ||
+                        (SQL1_.Rows[i]["es_filed"].ToString().Contains(H_Param4.Text) && H_Param4.Visible == true && H_Param4.Checked))
+                    {
+                        es_field1 += SQL1_.Rows[i]["es_prefix"].ToString() + "||" + SQL1_.Rows[i]["es_filed"].ToString() + "||" + SQL1_.Rows[i]["es_suffix"].ToString() + ",";
+                    }
                 }
                 //分页信息的DataTable
                 string datasql = "";
@@ -86,13 +101,15 @@ namespace UAS_LabelMachine
                 DataTable dt = (DataTable)dh.ExecuteSql(datasql, "select");
                 for (int i = 0; i < dt.Columns.Count; i++)
                 {
-                    if (dt.Columns[i].ColumnName == (SQL1_.Rows[i]["es_prefix"].ToString() + "||" + SQL1_.Rows[i]["es_filed"].ToString() + "||" + SQL1_.Rows[i]["es_suffix"].ToString()).ToUpper())
+                    for (int j = 0; j < SQL1_.Rows.Count; j++)
                     {
-                        dt.Columns[i].ColumnName = SQL1_.Rows[i]["es_filed1"].ToString();
-                        dt.Columns[i].Caption = SQL1_.Rows[i]["es_caption"].ToString();
+                        if (dt.Columns[i].ColumnName == (SQL1_.Rows[j]["es_prefix"].ToString() + "||" + SQL1_.Rows[j]["es_filed"].ToString() + "||" + SQL1_.Rows[j]["es_suffix"].ToString()).ToUpper())
+                        {
+                            dt.Columns[i].ColumnName = SQL1_.Rows[j]["es_filed1"].ToString();
+                            dt.Columns[i].Caption = SQL1_.Rows[j]["es_caption"].ToString();
+                        }
                     }
                 }
-         
                 //获取首页需要展示的字段
                 DataTable SQL_ = (DataTable)dh.ExecuteSql("select es_filed,es_caption,es_prefix,es_suffix,es_filed1 from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode='" + custcode + "' order by es_detno", "select");
                 if (SQL_.Rows.Count == 0)
@@ -128,6 +145,33 @@ namespace UAS_LabelMachine
         {
             Activate();
             LogicHandler.CustInit("0");
+            StringBuilder sql = new StringBuilder();
+            sql.Clear();
+            sql.Append("select distinct cep_name,CEP_COLLECTIONTYPE from ProdIODetail left join Product on pd_prodcode = pr_code ");
+            sql.Append("left join CHIP_EDCPARAMS_SPEC on pr_orispeccode=ced_model left join  CHIP_EDCPARAMS_SPECDETAIL  on ced_id=cesd_cedid  ");
+            sql.Append("left join  CHIP_EDCPARAMS on CESD_CEPID = CEP_ID where pd_inoutno='" + inoutno + "' and ced_status='-1' and CEP_COLLECTIONTYPE='机测'");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (i <= 4)
+                {
+                    Controls["M_Param" + (i + 1)].Visible = true;
+                    Controls["M_Param" + (i + 1)].Text = dt.Rows[i]["cep_name"].ToString();
+                }
+            }
+            sql.Clear();
+            sql.Append("select distinct cep_name,CEP_COLLECTIONTYPE from ProdIODetail left join Product on pd_prodcode = pr_code ");
+            sql.Append("left join CHIP_EDCPARAMS_SPEC on pr_orispeccode=ced_model left join  CHIP_EDCPARAMS_SPECDETAIL  on ced_id=cesd_cedid  ");
+            sql.Append("left join  CHIP_EDCPARAMS on CESD_CEPID = CEP_ID where pd_inoutno='" + inoutno + "' and ced_status='-1' and CEP_COLLECTIONTYPE='手测'");
+            dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (i <= 4)
+                {
+                    Controls["H_Param" + (i + 1)].Visible = true;
+                    Controls["H_Param" + (i + 1)].Text = dt.Rows[i]["cep_name"].ToString();
+                }
+            }
         }
 
         private void ExportSetting_Click(object sender, EventArgs e)

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

@@ -100,6 +100,14 @@
     <Reference Include="Analysis">
       <HintPath>tool\Analysis.dll</HintPath>
     </Reference>
+    <Reference Include="CheckBoxComboBox">
+      <HintPath>tool\CheckBoxComboBox.dll</HintPath>
+    </Reference>
+    <Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Sparkline.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+    <Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="ICSharpCode.SharpZipLib">
       <HintPath>tool\ICSharpCode.SharpZipLib.dll</HintPath>
     </Reference>
@@ -123,8 +131,10 @@
       <HintPath>tool\Seagull.BarTender.Print.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Data.Linq" />
     <Reference Include="System.Data.SQLite, Version=1.0.82.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>tool\System.Data.SQLite.dll</HintPath>

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