Browse Source

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

caosy 5 years ago
parent
commit
d6ad630135

+ 8 - 0
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -168,6 +168,14 @@ namespace UAS_MES.Make
                                         return;
                                     }
                                 }
+                                if (ms_outboxcode != "")
+                                {
+                                    string logout_confirm = MessageBox.Show(this, "序列号"+ sn_code.Text + "已装入卡通箱"+ ms_outboxcode + "是否确认返工","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                                    if (logout_confirm != "Yes")
+                                    {
+                                        return;
+                                    }
+                                }
                                 if (ma_unlimitin == 0 && ma_inqty - ma_scrapqty + 1 > ma_qty)
                                 {
                                     OperateResult.AppendText(">>工单不允许超数投产\n", Color.Red, sn_code);

+ 3 - 3
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.cs

@@ -94,11 +94,11 @@ namespace UAS_MES.OQC
                         {
                             ob_id = dh.GetSEQ("oqcbatch_seq");
                             sql.Clear();
-                            sql.Append("insert into oqcbatch(ob_id,ob_checkno,ob_indate,ob_oldcheckno,ob_source,");
+                            sql.Append("insert into oqcbatch(ob_id,ob_checkno,ob_indate,ob_oldcheckno,ob_source,ob_salecode,");
                             sql.Append("ob_batchqty,ob_status,ob_prodcode,ob_sourcecode,ob_reworkcode,ob_orgcheckno,");
                             sql.Append("OB_CRAFTCODE,OB_STEPCODE,OB_MAKECODE,oB_WCCODE,OB_FACTORY,OB_PROJECTCODE,OB_DESCRIPTION,");
                             sql.Append("OB_AQLCODE,OB_REMARK,OB_INMAN) select '" + ob_id + "','" + new_checkno.Text + "',sysdate,");
-                            sql.Append("'" + ob_checkno.Text + "',ob_source,ob_batchqty,ob_status,ob_prodcode, ob_sourcecode,");
+                            sql.Append("'" + ob_checkno.Text + "',ob_source,ob_batchqty,ob_status,ob_prodcode, ob_sourcecode,ob_salecode,");
                             sql.Append("ob_reworkcode,ob_orgcheckno,OB_CRAFTCODE, OB_STEPCODE,OB_MAKECODE,oB_WCCODE,OB_FACTORY,");
                             sql.Append("OB_PROJECTCODE,OB_DESCRIPTION,OB_AQLCODE,OB_REMARK,'" + User.UserCode + "' from oqcbatch where ob_checkno='" + ob_checkno.Text + "'");
                             sqls.Add(sql.GetString());
@@ -112,7 +112,7 @@ namespace UAS_MES.OQC
                         dh.BatchInsert("delete from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "' and obd_sncode =:obd_sncode ", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         dh.BatchInsert("update package set pa_checkno='" + new_checkno.Text + "' where pa_outboxcode in (select distinct obd_outboxcode from oqcbatchdetail where obd_sncode=:obd_sncode)", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         //删除之前的明细
-                        dh.BatchInsert("update makeserial set ms_checkno='" + new_checkno.Text + "' where ms_makecode='" + ob_makecode.Text + "' and ms_sncode=:obd_sncode ", new string[] { "obd_sncode" }, DeleteSn.ToArray());
+                        dh.BatchInsert("update makeserial set ms_checkno='" + new_checkno.Text + "' where  ms_sncode=:obd_sncode and ms_checkno = '"+ ob_checkno.Text + "'", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         dh.BatchInsert("delete from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "' and obd_sncode =:obd_sncode ", new string[] { "obd_sncode" }, DeleteSn.ToArray());
                         //插入新批次的从表,更新两个批次
                         sqls.Add("update OQCBatch set ob_nowcheckqty=(select count(1) from oqcbatchdetail where obd_checkno='" + new_checkno.Text + "') where ob_checkno='" + new_checkno.Text + "'");

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

@@ -254,7 +254,7 @@ namespace UAS_LabelMachine.CustomControl
                 string FolderPath = folderBrowserDialog1.SelectedPath;
                 ExcelHandler eh = new ExcelHandler();
                 //导出Excel的时候返回一个文件名,用户选择是否打开
-                string filePath = eh.ExportExcel(BaseUtil.GetExportDataTable(Dgv), BaseUtil.GetExportDataTable(Dgv), FolderPath, "客户标签","",100,null);
+                string filePath = eh.ExportExcel_Normal(BaseUtil.GetExportDataTable(Dgv), BaseUtil.GetExportDataTable(Dgv), FolderPath, "客户标签","",100,null);
                 //用户选择导出之后是否立即打开
                 MessageBoxButtons messButton = MessageBoxButtons.YesNo;
                 string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();

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

@@ -42,86 +42,44 @@ namespace UAS_LabelMachine
         {
             //先删除之前此客户的记录
             dh.ExecuteSql("delete from CS_EXPORTSETTING where es_custcode='" + custcode + "'", "delete");
-            string Param = dh.getFieldDataByCondition("CHIP_EDCPARAMS", "wm_concat(cep_name)", "1=1").ToString();
             StringBuilder sql = new StringBuilder();
             List<string> es_filed = new List<string>();
             List<string> es_caption = new List<string>();
             List<string> es_enable = new List<string>();
-            List<string> es_prefix = new List<string>();
-            List<string> es_suffix = new List<string>();
             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");
-            es_filed.Add("pr_orispeccode"); es_caption.Add("型号"); es_enable.Add("-1"); es_prefix.Add("'型号:'"); es_suffix.Add("''"); es_detno.Add("0.3"); es_filed1.Add("pr_orispeccode"); es_istitle.Add("-1");
-            es_filed.Add("pi_date"); es_caption.Add("销售日期"); es_enable.Add("-1"); es_prefix.Add("'销售日期:'"); es_suffix.Add("'销售部门:市场部'"); es_detno.Add("0.4"); es_filed1.Add("pi_date"); es_istitle.Add("-1");
-            es_filed.Add("pd_ordercode"); es_caption.Add("订单编号"); es_enable.Add("-1"); es_prefix.Add("''"); es_suffix.Add("''"); es_detno.Add("0.5"); es_filed1.Add("pd_ordercode"); es_istitle.Add("-1");
-            //插入首页信息
-            for (int i = 0; i < FirstPage.Columns.Count; i++)
+
+            for (int i = 0; i < FirstPage.Rows.Count; i++)
             {
-                for (int j = 0; j < FirstPage.Columns.Count; j++)
-                {
-                    if (i == FirstPage.Columns[j].DisplayIndex)
-                    {
-                        //pr_orispeccode1 冲突BUG暂时无解,先特殊处理
-                        es_filed.Add(FirstPage.Columns[j].Tag.ToString() == "pr_orispeccode1" ? "pr_orispeccode" : FirstPage.Columns[j].Tag.ToString());
-                        es_caption.Add(FirstPage.Columns[j].DataPropertyName);
-                        es_enable.Add("-1");
-                        es_prefix.Add("''");
-                        es_suffix.Add("''");
-                        es_detno.Add((FirstPage.Columns[j].DisplayIndex + 1).ToString());
-                        es_filed1.Add(FirstPage.Columns[j].Tag.ToString());
-                        es_istitle.Add("");
-                    }
-                }
+                es_filed.Add(FirstPage.Rows[i].Cells["es_filed"].Value.ToString());
+                es_caption.Add(FirstPage.Rows[i].Cells["es_caption"].Value.ToString());
+                es_enable.Add(FirstPage.Rows[i].Cells["es_enable"].Value.ToString());
+                es_detno.Add(FirstPage.Rows[i].Cells["es_detno"].Value.ToString());
+                es_istitle.Add(FirstPage.Rows[i].Cells["es_istitle"].Value.ToString());
+                es_datatype.Add(FirstPage.Rows[i].Cells["es_datatype"].Value.ToString());
             }
             sql.Clear();
-            sql.Append("insert into CS_EXPORTSETTING(es_type,es_filed,es_caption,es_enable,es_prefix,es_suffix,es_detno,es_filed1,es_custcode,es_istitle)");
-            sql.Append("values('First',:es_filed,:es_caption,:es_enable,:es_prefix,:es_suffix,:es_detno,:es_filed1,'" + custcode + "',:es_istitle)");
-            dh.BatchInsert(sql.ToString(), new string[] { "es_filed", "es_caption", "es_enable", "es_prefix", "es_suffix", "es_detno", "es_filed1", "es_istitle" }, es_filed.ToArray(), es_caption.ToArray(), es_enable.ToArray(), es_prefix.ToArray(), es_suffix.ToArray(), es_detno.ToArray(), es_filed1.ToArray(), es_istitle.ToArray());
+            sql.Append("insert into CS_EXPORTSETTING(es_type,es_filed,es_caption,es_enable,es_detno,es_custcode,es_istitle,es_datatype)");
+            sql.Append("values('First',:es_filed,:es_caption,:es_enable,:es_detno,'" + custcode + "',:es_istitle,:es_datatype)");
+            dh.BatchInsert(sql.ToString(), new string[] { "es_filed", "es_caption", "es_enable", "es_detno", "es_istitle", "es_datatype" }, es_filed.ToArray(), es_caption.ToArray(), es_enable.ToArray(), es_detno.ToArray(), es_istitle.ToArray(), es_datatype.ToArray());
             //清除首页赋的值
-            es_filed.Clear(); es_caption.Clear(); es_enable.Clear(); es_prefix.Clear(); es_suffix.Clear(); es_detno.Clear(); es_filed.Clear(); es_filed1.Clear(); es_istitle.Clear();
-            //新生成Data的抬头
-            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_datatype.Add("");
-            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"); es_datatype.Add("");
-            es_filed.Add("pr_orispeccode"); es_caption.Add("型号"); es_enable.Add("-1"); es_prefix.Add("'型号:'"); es_suffix.Add("'销售部门:市场部'"); es_detno.Add("0.3"); es_filed1.Add("pr_orispeccode"); es_istitle.Add("-1"); es_datatype.Add("");
-            es_filed.Add("pi_date"); es_caption.Add("销售日期"); es_enable.Add("-1"); es_prefix.Add("'销售日期:'"); es_suffix.Add("''"); es_detno.Add("0.4"); es_filed1.Add("pi_date"); es_istitle.Add("-1"); es_datatype.Add("");
-            es_filed.Add("me_desc"); es_caption.Add("大小"); es_enable.Add("-1"); es_prefix.Add("'('"); es_suffix.Add("')'"); es_detno.Add("5.1"); es_filed1.Add("me_desc"); es_istitle.Add("-1"); es_datatype.Add("");
-            es_filed.Add("pr_size"); es_caption.Add("尺寸"); es_enable.Add("-1"); es_prefix.Add("'尺寸:'"); es_suffix.Add("'销售部门:市场部'"); es_detno.Add("5.2"); es_filed1.Add("pr_size"); es_istitle.Add("-1"); es_datatype.Add("");
-            for (int i = 0; i < DataPage.Columns.Count; i++)
+            es_filed.Clear(); es_caption.Clear(); es_enable.Clear(); ; es_detno.Clear(); es_filed.Clear(); es_istitle.Clear();
+            for (int i = 0; i < DataPage.Rows.Count; i++)
             {
-                for (int j = 0; j < DataPage.Columns.Count; j++)
-                {
-                    if (i == DataPage.Columns[j].DisplayIndex)
-                    {
-                        //pr_orispeccode1 冲突BUG暂时无解,先特殊处理
-                        es_filed.Add(DataPage.Columns[j].Tag.ToString() == "pr_orispeccode1" ? "pr_orispeccode" : DataPage.Columns[j].Tag.ToString());
-                        es_caption.Add(DataPage.Columns[j].DataPropertyName);
-                        es_enable.Add("-1");
-                        es_prefix.Add("''");
-                        es_suffix.Add("''");
-                        es_detno.Add((DataPage.Columns[j].DisplayIndex + 1).ToString());
-                        es_filed1.Add(DataPage.Columns[j].Tag.ToString());
-                        es_istitle.Add("");
-                        if (Param.Contains(Regex.Replace(DataPage.Columns[j].DataPropertyName.ToUpper(), @"\d", "")))
-                        {
-                            es_datatype.Add("Param");
-                        }
-                        else
-                        {
-                            es_datatype.Add("");
-                        }
-                    }
-                }
+                es_filed.Add(DataPage.Rows[i].Cells["es_filed"].Value.ToString());
+                es_caption.Add(DataPage.Rows[i].Cells["es_caption"].Value.ToString());
+                es_enable.Add(DataPage.Rows[i].Cells["es_enable"].Value.ToString());
+                es_detno.Add(DataPage.Rows[i].Cells["es_detno"].Value.ToString());
+                es_istitle.Add(DataPage.Rows[i].Cells["es_istitle"].Value.ToString());
+                es_datatype.Add(DataPage.Rows[i].Cells["es_datatype"].Value.ToString());
             }
             sql.Clear();
-            sql.Append("insert into CS_EXPORTSETTING(es_type,es_filed,es_datatype,es_caption,es_enable,es_prefix,es_suffix,es_detno,es_filed1,es_custcode,es_istitle)");
-            sql.Append("values('DataPage',:es_filed,:es_datatype,:es_caption,:es_enable,:es_prefix,:es_suffix,:es_detno,:es_filed1,'" + custcode + "',:es_istitle)");
-            dh.BatchInsert(sql.ToString(), new string[] { "es_filed", "es_datatype", "es_caption", "es_enable", "es_prefix", "es_suffix", "es_detno", "es_filed1", "es_istitle" }, es_filed.ToArray(), es_datatype.ToArray(), es_caption.ToArray(), es_enable.ToArray(), es_prefix.ToArray(), es_suffix.ToArray(), es_detno.ToArray(), es_filed1.ToArray(), es_istitle.ToArray());
+            sql.Append("insert into CS_EXPORTSETTING(es_type,es_filed,es_caption,es_enable,es_detno,es_custcode,es_istitle,es_datatype)");
+            sql.Append("values('DataPage',:es_filed,:es_caption,:es_enable,:es_detno,'" + custcode + "',:es_istitle,:es_datatype)");
+            dh.BatchInsert(sql.ToString(), new string[] { "es_filed", "es_caption", "es_enable", "es_detno", "es_istitle", "es_datatype" }, es_filed.ToArray(), es_caption.ToArray(), es_enable.ToArray(), es_detno.ToArray(), es_istitle.ToArray(), es_datatype.ToArray());
             MessageBox.Show("保存成功!");
+            LoadData();
         }
 
         private void ResetColumns_Click(object sender, EventArgs e)
@@ -178,99 +136,31 @@ namespace UAS_LabelMachine
 
         private void LoadData()
         {
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
             StringBuilder sql = new StringBuilder();
             custcode = dh.getFieldDataByCondition("prodinout", "pi_cardcode", "pi_inoutno='" + inoutno + "'").ToString();
-            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 + "' and nvl(es_istitle,0)<>-1 order by es_detno", "select");
+            DataTable SQL1_ = (DataTable)dh.ExecuteSql("select es_type,es_filed,es_engcaption,es_detno,es_caption,es_enable,es_istitle,es_datatype 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 and nvl(es_istitle,0)<>-1  order by es_detno", "select");
+                SQL1_ = (DataTable)dh.ExecuteSql("select es_type,es_filed,es_engcaption,es_detno,es_caption,es_enable,es_istitle,es_datatype from CS_EXPORTSETTING where es_type='DataPage' and es_enable=-1 and es_custcode is null  order by es_detno", "select");
             }
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
 
-            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() + ",";
-            }
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
-
-            //分页信息的DataTable
-            string datasql = "";
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
-            LogicHandler.GetDataSQL(inoutno, es_field1.Substring(0, es_field1.Length - 1), out datasql);
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
-            DataTable dt = (DataTable)dh.ExecuteSql(datasql, "select");
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
-
-            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())
-                {
-                    dt.Columns[i].Caption = SQL1_.Rows[i]["es_filed1"].ToString();
-                    dt.Columns[i].ColumnName = SQL1_.Rows[i]["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 + "' and nvl(es_istitle,0)<>-1 order by es_detno", "select");
+            DataTable SQL_ = (DataTable)dh.ExecuteSql("select es_type,es_filed,es_engcaption,es_detno,es_caption,es_enable,es_istitle,es_datatype 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)
             {
-                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");
-            }
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
-
-            string es_field = "";
-            for (int i = 0; i < SQL_.Rows.Count; i++)
-            {
-                es_field += SQL_.Rows[i]["es_prefix"].ToString() + "||" + SQL_.Rows[i]["es_filed"].ToString() + "||" + SQL_.Rows[i]["es_suffix"].ToString() + ",";
-            }
-            //首页信息的DataTable
-            sql.Clear();
-            sql.Append("select " + es_field.Substring(0, es_field.Length - 1) + "  from FIRSTPAGE_BATCH_VIEW where pi_inoutno='" + inoutno + "'");
-            DataTable dt1 = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
-            for (int i = 0; i < dt1.Columns.Count; i++)
-            {
-                if (dt1.Columns[i].ColumnName == (SQL_.Rows[i]["es_prefix"].ToString() + "||" + SQL_.Rows[i]["es_filed"].ToString() + "||" + SQL_.Rows[i]["es_suffix"].ToString()).ToUpper())
-                {
-                    dt1.Columns[i].Caption = SQL_.Rows[i]["es_filed1"].ToString();
-                    dt1.Columns[i].ColumnName = SQL_.Rows[i]["es_caption"].ToString();
-                }
+                SQL_ = (DataTable)dh.ExecuteSql("select es_type,es_filed,es_engcaption,es_detno,es_caption,es_enable,es_istitle,es_datatype from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode is null order by es_detno", "select");
             }
-            Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd h:mm:ss.fff"));
 
             if (FirstPage.DataSource != null)
                 FirstPage.DataSource = null;
             if (DataPage.DataSource != null)
                 DataPage.DataSource = null;
-            FirstPage.DataSource = dt1;
-            DataPage.DataSource = dt;
-            //将字段赋值到Tag字段,后续保存的时候取值
-            for (int i = 0; i < FirstPage.Columns.Count; i++)
-            {
-                for (int j = 0; j < dt1.Columns.Count; j++)
-                {
-                    if (FirstPage.Columns[i].Name == dt1.Columns[j].ColumnName)
-                    {
-                        FirstPage.Columns[i].Tag = dt1.Columns[j].Caption;
-                    }
-                }
-            }
+            FirstPage.DataSource = SQL_;
+            DataPage.DataSource = SQL1_;
 
-            for (int i = 0; i < DataPage.Columns.Count; i++)
-            {
-                for (int j = 0; j < dt.Columns.Count; j++)
-                {
-                    if (DataPage.Columns[i].Name == dt.Columns[j].ColumnName)
-                    {
-                        DataPage.Columns[i].Tag = dt.Columns[j].Caption;
-                    }
-                }
-            }
-            DataPage.Columns["chw_percent1"].HeaderText = "机测1";
-            DataPage.Columns["chw_percent2"].HeaderText = "机测2";
-            DataPage.Columns["chw_itemname1"].Visible = false;
-            DataPage.Columns["chw_itemname2"].Visible = false;
+            FirstPage.ReadOnly = false;
+            DataPage.ReadOnly = false;
         }
     }
 }

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

@@ -58,15 +58,27 @@
             this.H_Param3 = new System.Windows.Forms.CheckBox();
             this.M_Param4 = new System.Windows.Forms.CheckBox();
             this.H_Param4 = new System.Windows.Forms.CheckBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.Rate = new System.Windows.Forms.RadioButton();
+            this.Mount = new System.Windows.Forms.RadioButton();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.Chinese = new System.Windows.Forms.RadioButton();
+            this.English = new System.Windows.Forms.RadioButton();
+            this.CH_YIELD = new System.Windows.Forms.CheckBox();
+            this.FirstPage_BOXCODE = new System.Windows.Forms.CheckBox();
+            this.BoxSplit = new System.Windows.Forms.RadioButton();
             this.RowNum = new UAS_LabelMachine.CustomControl.NumOnlyTextBox();
+            this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
             this.SuspendLayout();
             // 
             // Export
             // 
-            this.Export.Location = new System.Drawing.Point(584, 580);
-            this.Export.Margin = new System.Windows.Forms.Padding(4);
+            this.Export.Location = new System.Drawing.Point(292, 320);
+            this.Export.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Export.Name = "Export";
-            this.Export.Size = new System.Drawing.Size(188, 48);
+            this.Export.Size = new System.Drawing.Size(94, 24);
             this.Export.TabIndex = 0;
             this.Export.Text = "导出";
             this.Export.UseVisualStyleBackColor = true;
@@ -78,22 +90,22 @@
             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(260, 116);
-            this.CH_BLUEFILM.Margin = new System.Windows.Forms.Padding(4);
+            this.CH_BLUEFILM.Location = new System.Drawing.Point(130, 58);
+            this.CH_BLUEFILM.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CH_BLUEFILM.Name = "CH_BLUEFILM";
-            this.CH_BLUEFILM.Size = new System.Drawing.Size(125, 31);
+            this.CH_BLUEFILM.Size = new System.Drawing.Size(82, 18);
             this.CH_BLUEFILM.TabIndex = 1;
-            this.CH_BLUEFILM.Text = "蓝膜号";
+            this.CH_BLUEFILM.Text = "划片片号";
             this.CH_BLUEFILM.UseVisualStyleBackColor = true;
             // 
             // CH_SPLITBATCH
             // 
             this.CH_SPLITBATCH.AutoSize = true;
             this.CH_SPLITBATCH.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_SPLITBATCH.Location = new System.Drawing.Point(700, 116);
-            this.CH_SPLITBATCH.Margin = new System.Windows.Forms.Padding(4);
+            this.CH_SPLITBATCH.Location = new System.Drawing.Point(350, 58);
+            this.CH_SPLITBATCH.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CH_SPLITBATCH.Name = "CH_SPLITBATCH";
-            this.CH_SPLITBATCH.Size = new System.Drawing.Size(152, 31);
+            this.CH_SPLITBATCH.Size = new System.Drawing.Size(82, 18);
             this.CH_SPLITBATCH.TabIndex = 3;
             this.CH_SPLITBATCH.Text = "扩散批号";
             this.CH_SPLITBATCH.UseVisualStyleBackColor = true;
@@ -102,10 +114,10 @@
             // 
             this.CH_PBCODE.AutoSize = true;
             this.CH_PBCODE.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_PBCODE.Location = new System.Drawing.Point(260, 188);
-            this.CH_PBCODE.Margin = new System.Windows.Forms.Padding(4);
+            this.CH_PBCODE.Location = new System.Drawing.Point(130, 94);
+            this.CH_PBCODE.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CH_PBCODE.Name = "CH_PBCODE";
-            this.CH_PBCODE.Size = new System.Drawing.Size(98, 31);
+            this.CH_PBCODE.Size = new System.Drawing.Size(54, 18);
             this.CH_PBCODE.TabIndex = 8;
             this.CH_PBCODE.Text = "盒号";
             this.CH_PBCODE.UseVisualStyleBackColor = true;
@@ -114,10 +126,10 @@
             // 
             this.CH_REMARK.AutoSize = true;
             this.CH_REMARK.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_REMARK.Location = new System.Drawing.Point(488, 188);
-            this.CH_REMARK.Margin = new System.Windows.Forms.Padding(4);
+            this.CH_REMARK.Location = new System.Drawing.Point(244, 94);
+            this.CH_REMARK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CH_REMARK.Name = "CH_REMARK";
-            this.CH_REMARK.Size = new System.Drawing.Size(152, 31);
+            this.CH_REMARK.Size = new System.Drawing.Size(82, 18);
             this.CH_REMARK.TabIndex = 9;
             this.CH_REMARK.Text = "芯片备注";
             this.CH_REMARK.UseVisualStyleBackColor = true;
@@ -128,10 +140,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(488, 116);
-            this.ch_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ch_code.Location = new System.Drawing.Point(244, 58);
+            this.ch_code.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ch_code.Name = "ch_code";
-            this.ch_code.Size = new System.Drawing.Size(125, 31);
+            this.ch_code.Size = new System.Drawing.Size(68, 18);
             this.ch_code.TabIndex = 10;
             this.ch_code.Text = "芯片号";
             this.ch_code.UseVisualStyleBackColor = true;
@@ -140,10 +152,10 @@
             // 
             this.CH_WATERID.AutoSize = true;
             this.CH_WATERID.Font = new System.Drawing.Font("宋体", 10F);
-            this.CH_WATERID.Location = new System.Drawing.Point(904, 116);
-            this.CH_WATERID.Margin = new System.Windows.Forms.Padding(4);
+            this.CH_WATERID.Location = new System.Drawing.Point(452, 58);
+            this.CH_WATERID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CH_WATERID.Name = "CH_WATERID";
-            this.CH_WATERID.Size = new System.Drawing.Size(156, 31);
+            this.CH_WATERID.Size = new System.Drawing.Size(82, 18);
             this.CH_WATERID.TabIndex = 11;
             this.CH_WATERID.Text = "Wafer_ID";
             this.CH_WATERID.UseVisualStyleBackColor = true;
@@ -152,10 +164,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("宋体", 10F);
-            this.label1.Location = new System.Drawing.Point(22, 52);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(11, 26);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(120, 27);
+            this.label1.Size = new System.Drawing.Size(63, 14);
             this.label1.TabIndex = 12;
             this.label1.Text = "打印选项";
             // 
@@ -163,10 +175,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("宋体", 10F);
-            this.label2.Location = new System.Drawing.Point(22, 120);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(11, 60);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(215, 27);
+            this.label2.Size = new System.Drawing.Size(112, 14);
             this.label2.TabIndex = 13;
             this.label2.Text = "请选择打印内容:";
             // 
@@ -174,10 +186,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("宋体", 10F);
-            this.label3.Location = new System.Drawing.Point(22, 270);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(11, 135);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(216, 27);
+            this.label3.Size = new System.Drawing.Size(112, 14);
             this.label3.TabIndex = 14;
             this.label3.Text = "参数选择(机测):";
             // 
@@ -185,10 +197,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("宋体", 10F);
-            this.label4.Location = new System.Drawing.Point(22, 350);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(11, 175);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(216, 27);
+            this.label4.Size = new System.Drawing.Size(112, 14);
             this.label4.TabIndex = 15;
             this.label4.Text = "参数选择(手测):";
             // 
@@ -196,10 +208,10 @@
             // 
             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);
+            this.H_Param2.Location = new System.Drawing.Point(244, 173);
+            this.H_Param2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.H_Param2.Name = "H_Param2";
-            this.H_Param2.Size = new System.Drawing.Size(156, 31);
+            this.H_Param2.Size = new System.Drawing.Size(82, 18);
             this.H_Param2.TabIndex = 17;
             this.H_Param2.Text = "H_Param2";
             this.H_Param2.UseVisualStyleBackColor = true;
@@ -209,10 +221,10 @@
             // 
             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);
+            this.H_Param1.Location = new System.Drawing.Point(130, 173);
+            this.H_Param1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.H_Param1.Name = "H_Param1";
-            this.H_Param1.Size = new System.Drawing.Size(156, 31);
+            this.H_Param1.Size = new System.Drawing.Size(82, 18);
             this.H_Param1.TabIndex = 18;
             this.H_Param1.Text = "H_Param1";
             this.H_Param1.UseVisualStyleBackColor = true;
@@ -222,10 +234,10 @@
             // 
             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);
+            this.M_Param1.Location = new System.Drawing.Point(130, 133);
+            this.M_Param1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.M_Param1.Name = "M_Param1";
-            this.M_Param1.Size = new System.Drawing.Size(156, 31);
+            this.M_Param1.Size = new System.Drawing.Size(82, 18);
             this.M_Param1.TabIndex = 19;
             this.M_Param1.Text = "M_Param1";
             this.M_Param1.UseVisualStyleBackColor = true;
@@ -235,10 +247,10 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("宋体", 10F);
-            this.label5.Location = new System.Drawing.Point(22, 508);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Location = new System.Drawing.Point(11, 254);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(188, 27);
+            this.label5.Size = new System.Drawing.Size(98, 14);
             this.label5.TabIndex = 20;
             this.label5.Text = "首页打印方式:";
             // 
@@ -246,10 +258,10 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("宋体", 10F);
-            this.label6.Location = new System.Drawing.Point(22, 432);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(11, 216);
+            this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(188, 27);
+            this.label6.Size = new System.Drawing.Size(98, 14);
             this.label6.TabIndex = 21;
             this.label6.Text = "打印分页方式:";
             // 
@@ -257,48 +269,51 @@
             // 
             this.BatchCode.AutoSize = true;
             this.BatchCode.Font = new System.Drawing.Font("宋体", 10F);
-            this.BatchCode.Location = new System.Drawing.Point(260, 432);
-            this.BatchCode.Margin = new System.Windows.Forms.Padding(4);
+            this.BatchCode.Location = new System.Drawing.Point(130, 216);
+            this.BatchCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.BatchCode.Name = "BatchCode";
-            this.BatchCode.Size = new System.Drawing.Size(124, 31);
+            this.BatchCode.Size = new System.Drawing.Size(67, 18);
             this.BatchCode.TabIndex = 22;
             this.BatchCode.Text = "扩散批";
             this.BatchCode.UseVisualStyleBackColor = true;
+            this.BatchCode.CheckedChanged += new System.EventHandler(this.BatchCode_CheckedChanged);
             // 
             // BoxCode
             // 
             this.BoxCode.AutoSize = true;
             this.BoxCode.Font = new System.Drawing.Font("宋体", 10F);
-            this.BoxCode.Location = new System.Drawing.Point(444, 432);
-            this.BoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.BoxCode.Location = new System.Drawing.Point(208, 216);
+            this.BoxCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.BoxCode.Name = "BoxCode";
-            this.BoxCode.Size = new System.Drawing.Size(97, 31);
+            this.BoxCode.Size = new System.Drawing.Size(53, 18);
             this.BoxCode.TabIndex = 23;
             this.BoxCode.Text = "盒号";
             this.BoxCode.UseVisualStyleBackColor = true;
+            this.BoxCode.CheckedChanged += new System.EventHandler(this.BatchCode_CheckedChanged);
             // 
             // FixRow
             // 
             this.FixRow.AutoSize = true;
             this.FixRow.Checked = true;
             this.FixRow.Font = new System.Drawing.Font("宋体", 10F);
-            this.FixRow.Location = new System.Drawing.Point(612, 432);
-            this.FixRow.Margin = new System.Windows.Forms.Padding(4);
+            this.FixRow.Location = new System.Drawing.Point(270, 215);
+            this.FixRow.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.FixRow.Name = "FixRow";
-            this.FixRow.Size = new System.Drawing.Size(151, 31);
+            this.FixRow.Size = new System.Drawing.Size(81, 18);
             this.FixRow.TabIndex = 24;
             this.FixRow.TabStop = true;
             this.FixRow.Text = "固定行号";
             this.FixRow.UseVisualStyleBackColor = true;
+            this.FixRow.CheckedChanged += new System.EventHandler(this.BatchCode_CheckedChanged);
             // 
             // label7
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("宋体", 10F);
-            this.label7.Location = new System.Drawing.Point(810, 432);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Location = new System.Drawing.Point(344, 216);
+            this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(134, 27);
+            this.label7.Size = new System.Drawing.Size(70, 14);
             this.label7.TabIndex = 25;
             this.label7.Text = "分页行数:";
             // 
@@ -306,10 +321,10 @@
             // 
             this.FirstPage_WID.AutoSize = true;
             this.FirstPage_WID.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_WID.Location = new System.Drawing.Point(260, 508);
-            this.FirstPage_WID.Margin = new System.Windows.Forms.Padding(4);
+            this.FirstPage_WID.Location = new System.Drawing.Point(130, 254);
+            this.FirstPage_WID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.FirstPage_WID.Name = "FirstPage_WID";
-            this.FirstPage_WID.Size = new System.Drawing.Size(210, 31);
+            this.FirstPage_WID.Size = new System.Drawing.Size(110, 18);
             this.FirstPage_WID.TabIndex = 29;
             this.FirstPage_WID.Text = "打印Wafer id";
             this.FirstPage_WID.UseVisualStyleBackColor = true;
@@ -318,10 +333,10 @@
             // 
             this.FirstPage_YIELD.AutoSize = true;
             this.FirstPage_YIELD.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_YIELD.Location = new System.Drawing.Point(488, 508);
-            this.FirstPage_YIELD.Margin = new System.Windows.Forms.Padding(4);
+            this.FirstPage_YIELD.Location = new System.Drawing.Point(244, 254);
+            this.FirstPage_YIELD.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.FirstPage_YIELD.Name = "FirstPage_YIELD";
-            this.FirstPage_YIELD.Size = new System.Drawing.Size(98, 31);
+            this.FirstPage_YIELD.Size = new System.Drawing.Size(54, 18);
             this.FirstPage_YIELD.TabIndex = 31;
             this.FirstPage_YIELD.Text = "良率";
             this.FirstPage_YIELD.UseVisualStyleBackColor = true;
@@ -330,20 +345,20 @@
             // 
             this.FirstPage_REMARK.AutoSize = true;
             this.FirstPage_REMARK.Font = new System.Drawing.Font("宋体", 10F);
-            this.FirstPage_REMARK.Location = new System.Drawing.Point(608, 508);
-            this.FirstPage_REMARK.Margin = new System.Windows.Forms.Padding(4);
+            this.FirstPage_REMARK.Location = new System.Drawing.Point(304, 254);
+            this.FirstPage_REMARK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.FirstPage_REMARK.Name = "FirstPage_REMARK";
-            this.FirstPage_REMARK.Size = new System.Drawing.Size(98, 31);
+            this.FirstPage_REMARK.Size = new System.Drawing.Size(54, 18);
             this.FirstPage_REMARK.TabIndex = 32;
             this.FirstPage_REMARK.Text = "备注";
             this.FirstPage_REMARK.UseVisualStyleBackColor = true;
             // 
             // ExportSetting
             // 
-            this.ExportSetting.Location = new System.Drawing.Point(402, 580);
-            this.ExportSetting.Margin = new System.Windows.Forms.Padding(4);
+            this.ExportSetting.Location = new System.Drawing.Point(201, 320);
+            this.ExportSetting.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ExportSetting.Name = "ExportSetting";
-            this.ExportSetting.Size = new System.Drawing.Size(160, 48);
+            this.ExportSetting.Size = new System.Drawing.Size(80, 24);
             this.ExportSetting.TabIndex = 33;
             this.ExportSetting.Text = "导出列配置";
             this.ExportSetting.UseVisualStyleBackColor = true;
@@ -353,10 +368,10 @@
             // 
             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.Location = new System.Drawing.Point(244, 133);
+            this.M_Param2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.M_Param2.Name = "M_Param2";
-            this.M_Param2.Size = new System.Drawing.Size(156, 31);
+            this.M_Param2.Size = new System.Drawing.Size(82, 18);
             this.M_Param2.TabIndex = 34;
             this.M_Param2.Text = "M_Param2";
             this.M_Param2.UseVisualStyleBackColor = true;
@@ -366,10 +381,10 @@
             // 
             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.Location = new System.Drawing.Point(350, 134);
+            this.M_Param3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.M_Param3.Name = "M_Param3";
-            this.M_Param3.Size = new System.Drawing.Size(156, 31);
+            this.M_Param3.Size = new System.Drawing.Size(82, 18);
             this.M_Param3.TabIndex = 35;
             this.M_Param3.Text = "M_Param3";
             this.M_Param3.UseVisualStyleBackColor = true;
@@ -379,10 +394,10 @@
             // 
             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.Location = new System.Drawing.Point(350, 173);
+            this.H_Param3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.H_Param3.Name = "H_Param3";
-            this.H_Param3.Size = new System.Drawing.Size(156, 31);
+            this.H_Param3.Size = new System.Drawing.Size(82, 18);
             this.H_Param3.TabIndex = 36;
             this.H_Param3.Text = "H_Param3";
             this.H_Param3.UseVisualStyleBackColor = true;
@@ -392,10 +407,10 @@
             // 
             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.Location = new System.Drawing.Point(452, 133);
+            this.M_Param4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.M_Param4.Name = "M_Param4";
-            this.M_Param4.Size = new System.Drawing.Size(156, 31);
+            this.M_Param4.Size = new System.Drawing.Size(82, 18);
             this.M_Param4.TabIndex = 37;
             this.M_Param4.Text = "M_Param4";
             this.M_Param4.UseVisualStyleBackColor = true;
@@ -405,30 +420,161 @@
             // 
             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.Location = new System.Drawing.Point(452, 173);
+            this.H_Param4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.H_Param4.Name = "H_Param4";
-            this.H_Param4.Size = new System.Drawing.Size(156, 31);
+            this.H_Param4.Size = new System.Drawing.Size(82, 18);
             this.H_Param4.TabIndex = 38;
             this.H_Param4.Text = "H_Param4";
             this.H_Param4.UseVisualStyleBackColor = true;
             this.H_Param4.Visible = false;
             // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("宋体", 10F);
+            this.label8.Location = new System.Drawing.Point(11, 290);
+            this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(70, 14);
+            this.label8.TabIndex = 39;
+            this.label8.Text = "分档方式:";
+            // 
+            // Rate
+            // 
+            this.Rate.AutoSize = true;
+            this.Rate.Checked = true;
+            this.Rate.Font = new System.Drawing.Font("宋体", 10F);
+            this.Rate.Location = new System.Drawing.Point(12, 13);
+            this.Rate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Rate.Name = "Rate";
+            this.Rate.Size = new System.Drawing.Size(67, 18);
+            this.Rate.TabIndex = 40;
+            this.Rate.TabStop = true;
+            this.Rate.Text = "百分比";
+            this.Rate.UseVisualStyleBackColor = true;
+            // 
+            // Mount
+            // 
+            this.Mount.AutoSize = true;
+            this.Mount.Font = new System.Drawing.Font("宋体", 10F);
+            this.Mount.Location = new System.Drawing.Point(83, 14);
+            this.Mount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Mount.Name = "Mount";
+            this.Mount.Size = new System.Drawing.Size(53, 18);
+            this.Mount.TabIndex = 41;
+            this.Mount.Text = "数量";
+            this.Mount.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.Rate);
+            this.groupBox1.Controls.Add(this.Mount);
+            this.groupBox1.Location = new System.Drawing.Point(119, 276);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox1.Size = new System.Drawing.Size(248, 34);
+            this.groupBox1.TabIndex = 42;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox1_Paint);
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.Chinese);
+            this.groupBox2.Controls.Add(this.English);
+            this.groupBox2.Location = new System.Drawing.Point(119, 12);
+            this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox2.Size = new System.Drawing.Size(248, 34);
+            this.groupBox2.TabIndex = 43;
+            this.groupBox2.TabStop = false;
+            // 
+            // Chinese
+            // 
+            this.Chinese.AutoSize = true;
+            this.Chinese.Checked = true;
+            this.Chinese.Font = new System.Drawing.Font("宋体", 10F);
+            this.Chinese.Location = new System.Drawing.Point(12, 13);
+            this.Chinese.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Chinese.Name = "Chinese";
+            this.Chinese.Size = new System.Drawing.Size(53, 18);
+            this.Chinese.TabIndex = 40;
+            this.Chinese.TabStop = true;
+            this.Chinese.Text = "中文";
+            this.Chinese.UseVisualStyleBackColor = true;
+            // 
+            // English
+            // 
+            this.English.AutoSize = true;
+            this.English.Font = new System.Drawing.Font("宋体", 10F);
+            this.English.Location = new System.Drawing.Point(83, 14);
+            this.English.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.English.Name = "English";
+            this.English.Size = new System.Drawing.Size(53, 18);
+            this.English.TabIndex = 41;
+            this.English.Text = "英文";
+            this.English.UseVisualStyleBackColor = true;
+            // 
+            // CH_YIELD
+            // 
+            this.CH_YIELD.AutoSize = true;
+            this.CH_YIELD.Font = new System.Drawing.Font("宋体", 10F);
+            this.CH_YIELD.Location = new System.Drawing.Point(350, 94);
+            this.CH_YIELD.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CH_YIELD.Name = "CH_YIELD";
+            this.CH_YIELD.Size = new System.Drawing.Size(54, 18);
+            this.CH_YIELD.TabIndex = 44;
+            this.CH_YIELD.Text = "良率";
+            this.CH_YIELD.UseVisualStyleBackColor = true;
+            // 
+            // FirstPage_BOXCODE
+            // 
+            this.FirstPage_BOXCODE.AutoSize = true;
+            this.FirstPage_BOXCODE.Font = new System.Drawing.Font("宋体", 10F);
+            this.FirstPage_BOXCODE.Location = new System.Drawing.Point(367, 254);
+            this.FirstPage_BOXCODE.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.FirstPage_BOXCODE.Name = "FirstPage_BOXCODE";
+            this.FirstPage_BOXCODE.Size = new System.Drawing.Size(54, 18);
+            this.FirstPage_BOXCODE.TabIndex = 45;
+            this.FirstPage_BOXCODE.Text = "盒号";
+            this.FirstPage_BOXCODE.UseVisualStyleBackColor = true;
+            // 
+            // BoxSplit
+            // 
+            this.BoxSplit.AutoSize = true;
+            this.BoxSplit.Font = new System.Drawing.Font("宋体", 10F);
+            this.BoxSplit.Location = new System.Drawing.Point(482, 216);
+            this.BoxSplit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.BoxSplit.Name = "BoxSplit";
+            this.BoxSplit.Size = new System.Drawing.Size(81, 18);
+            this.BoxSplit.TabIndex = 46;
+            this.BoxSplit.Text = "盒号拆批";
+            this.BoxSplit.UseVisualStyleBackColor = true;
+            this.BoxSplit.CheckedChanged += new System.EventHandler(this.BatchCode_CheckedChanged);
+            // 
             // RowNum
             // 
-            this.RowNum.Location = new System.Drawing.Point(960, 428);
-            this.RowNum.Margin = new System.Windows.Forms.Padding(4);
+            this.RowNum.Location = new System.Drawing.Point(422, 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(100, 35);
+            this.RowNum.Size = new System.Drawing.Size(52, 21);
             this.RowNum.TabIndex = 30;
             this.RowNum.Text = "10";
             // 
             // ExportExcel
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1144, 672);
+            this.ClientSize = new System.Drawing.Size(572, 352);
+            this.Controls.Add(this.BoxSplit);
+            this.Controls.Add(this.FirstPage_BOXCODE);
+            this.Controls.Add(this.CH_YIELD);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.H_Param4);
             this.Controls.Add(this.M_Param4);
             this.Controls.Add(this.H_Param3);
@@ -459,10 +605,14 @@
             this.Controls.Add(this.CH_SPLITBATCH);
             this.Controls.Add(this.CH_BLUEFILM);
             this.Controls.Add(this.Export);
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Name = "ExportExcel";
             this.Text = "导出数据";
             this.Load += new System.EventHandler(this.ExportExcel_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -501,5 +651,15 @@
         private System.Windows.Forms.CheckBox H_Param3;
         private System.Windows.Forms.CheckBox M_Param4;
         private System.Windows.Forms.CheckBox H_Param4;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.RadioButton Rate;
+        private System.Windows.Forms.RadioButton Mount;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.RadioButton Chinese;
+        private System.Windows.Forms.RadioButton English;
+        private System.Windows.Forms.CheckBox CH_YIELD;
+        private System.Windows.Forms.CheckBox FirstPage_BOXCODE;
+        private System.Windows.Forms.RadioButton BoxSplit;
     }
 }

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

@@ -44,9 +44,7 @@ namespace UAS_LabelMachine
 
         private void ExportMethod()
         {
-
             string custcode = dh.getFieldDataByCondition("prodinout", "pi_cardcode", "pi_inoutno='" + inoutno + "'").ToString();
-
             {
                 StringBuilder sql = new StringBuilder();
                 List<CheckBox> conditionbox = new List<CheckBox>();
@@ -60,12 +58,18 @@ namespace UAS_LabelMachine
                     MessageBox.Show("勾选扩撒批分页,打印内容请勾选扩撒批号");
                     return;
                 }
+                if ((!CH_SPLITBATCH.Checked || !CH_PBCODE.Checked) && BoxSplit.Checked)
+                {
+                    MessageBox.Show("勾选盒号拆批,打印内容请勾选扩撒批号和盒号");
+                    return;
+                }
                 conditionbox.Add(CH_BLUEFILM);
                 conditionbox.Add(CH_PBCODE);
                 conditionbox.Add(CH_REMARK);
                 conditionbox.Add(CH_SPLITBATCH);
                 conditionbox.Add(CH_WATERID);
                 conditionbox.Add(ch_code);
+                conditionbox.Add(CH_YIELD);
                 conditionbox.Add(M_Param1);
                 conditionbox.Add(H_Param1);
                 conditionbox.Add(H_Param2);
@@ -85,18 +89,41 @@ namespace UAS_LabelMachine
                 {
                     SplitType = BoxCode.Name;
                 }
-                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");
+                else if (BoxSplit.Checked)
+                {
+                    SplitType = BoxSplit.Name;
+                }
+                string caption = "";
+                if (Chinese.Checked)
+                {
+                    caption = "es_caption";
+                    dh.ExecuteSql("update prodinout set pi_exporttype='Chinese' where pi_inoutno='" + inoutno + "'", "update");
+                }
+                else
+                {
+                    caption = "es_engcaption es_caption";
+                    dh.ExecuteSql("update prodinout set pi_exporttype='English' where pi_inoutno='" + inoutno + "'", "update");
+                }
+                if (Mount.Checked)
+                {
+                    dh.ExecuteSql("update prodinout set pi_exporttype1='QTY' where pi_inoutno='" + inoutno + "'", "update");
+                }
+                else
+                {
+                    dh.ExecuteSql("update prodinout set pi_exporttype1='Rate' where pi_inoutno='" + inoutno + "'", "update");
+                }
+                DataTable SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_datatype," + caption + ",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_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");
+                    SQL1_ = (DataTable)dh.ExecuteSql("select es_filed,es_datatype," + caption + ",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++)
                 {
                     //不是参数的直接拼接
                     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() + ",";
+                        es_field1 += SQL1_.Rows[i]["es_filed"].ToString() + ",";
                     //是参数的则先判断是否含有内容
                     else if (
                         (SQL1_.Rows[i]["es_filed"].ToString().Contains(M_Param1.Text) && M_Param1.Visible == true && M_Param1.Checked) ||
@@ -108,18 +135,20 @@ namespace UAS_LabelMachine
                         (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() + ",";
+                        es_field1 += SQL1_.Rows[i]["es_filed"].ToString() + ",";
                     }
                 }
+                //生成导出数据
+                LogicHandler.GenHFEData(inoutno);
                 //分页信息的DataTable
                 string datasql = "";
-                LogicHandler.GetDataSQL(inoutno, es_field1.Substring(0, es_field1.Length - 1), out datasql);
+                LogicHandler.GetDataSQL(inoutno, es_field1.Substring(0, es_field1.Length - 1), Mount.Checked ? "QTY" : "Rate", out datasql);
                 DataTable dt = (DataTable)dh.ExecuteSql(datasql, "select");
                 for (int i = 0; i < dt.Columns.Count; i++)
                 {
                     for (int j = 0; j < SQL1_.Rows.Count; j++)
                     {
-                        if (dt.Columns[i].ColumnName == (SQL1_.Rows[j]["es_prefix"].ToString() + "||" + SQL1_.Rows[j]["es_filed"].ToString() + "||" + SQL1_.Rows[j]["es_suffix"].ToString()).ToUpper())
+                        if (dt.Columns[i].ColumnName == SQL1_.Rows[j]["es_filed1"].ToString().ToUpper())
                         {
                             dt.Columns[i].ColumnName = SQL1_.Rows[j]["es_filed1"].ToString();
                             dt.Columns[i].Caption = SQL1_.Rows[j]["es_caption"].ToString();
@@ -127,15 +156,15 @@ 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 + "' order by es_detno", "select");
+                DataTable SQL_ = (DataTable)dh.ExecuteSql("select es_filed," + caption + ",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)
                 {
-                    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 order by es_detno", "select");
+                    SQL_ = (DataTable)dh.ExecuteSql("select es_filed," + caption + ",es_filed1 from CS_EXPORTSETTING where es_type='First' and es_enable=-1 and es_custcode is null order by es_detno", "select");
                 }
                 string es_field = "";
                 for (int i = 0; i < SQL_.Rows.Count; i++)
                 {
-                    es_field += SQL_.Rows[i]["es_prefix"].ToString() + "||" + SQL_.Rows[i]["es_filed"].ToString() + "||" + SQL_.Rows[i]["es_suffix"].ToString() + ",";
+                    es_field += SQL_.Rows[i]["es_filed"].ToString() + ",";
                 }
                 //首页信息的DataTable
                 sql.Clear();
@@ -143,16 +172,30 @@ namespace UAS_LabelMachine
                 DataTable dt1 = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 for (int i = 0; i < dt1.Columns.Count; i++)
                 {
-                    if (dt1.Columns[i].ColumnName == (SQL_.Rows[i]["es_prefix"].ToString() + "||" + SQL_.Rows[i]["es_filed"].ToString() + "||" + SQL_.Rows[i]["es_suffix"].ToString()).ToUpper())
+                    if (dt1.Columns[i].ColumnName == SQL_.Rows[i]["es_filed1"].ToString().ToUpper())
                     {
                         dt1.Columns[i].ColumnName = SQL_.Rows[i]["es_filed1"].ToString();
                         dt1.Columns[i].Caption = SQL_.Rows[i]["es_caption"].ToString();
                     }
                 }
-                eh.ExportExcel(dt1, dt, ExportFileDialog.SelectedPath, inoutno, SplitType, int.Parse(RowNum.Text), conditionbox);
+                string FilePath = "";
+                string pi_cardcode = dh.getFieldDataByCondition("prodinout", "pi_cardcode", "pi_inoutno='" + inoutno + "'").ToString();
+                //晶源客户
+                if (pi_cardcode == dh.GetConfig("JINGYUAN", "ExportProdExcel").ToString())
+                {
+                    FilePath = eh.JINYUAN(dt1, dt, ExportFileDialog.SelectedPath, inoutno, SplitType, int.Parse(RowNum.Text), conditionbox);
+                }
+                else if (pi_cardcode == dh.GetConfig("LIPUXIN", "ExportProdExcel").ToString())
+                {
+                    FilePath = eh.LIPIUXIN(dt1, dt, ExportFileDialog.SelectedPath, inoutno, SplitType, int.Parse(RowNum.Text), conditionbox);
+                }
+                else
+                {
+                    FilePath = eh.ExportExcel_Normal(dt1, dt, ExportFileDialog.SelectedPath, inoutno, SplitType, int.Parse(RowNum.Text), conditionbox);
+                }
                 string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close.ToString() == "Yes")
-                    System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + inoutno + ".xls");
+                    System.Diagnostics.Process.Start(FilePath);
                 Close();
             }
         }
@@ -163,7 +206,7 @@ namespace UAS_LabelMachine
             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("select distinct replace(cep_name,'(ON)','ON')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");
@@ -172,11 +215,12 @@ namespace UAS_LabelMachine
                 if (i <= 4)
                 {
                     Controls["M_Param" + (i + 1)].Visible = true;
+                    ((CheckBox)Controls["M_Param" + (i + 1)]).Checked = 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("select distinct replace(cep_name,'(ON)','ON')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");
@@ -197,5 +241,35 @@ namespace UAS_LabelMachine
             ex.WindowState = FormWindowState.Maximized;
             ex.ShowDialog();
         }
+
+        private void groupBox1_Paint(object sender, PaintEventArgs e)
+        {
+            e.Graphics.Clear(this.BackColor);
+        }
+
+        private void BatchCode_CheckedChanged(object sender, EventArgs e)
+        {
+            RadioButton box = (RadioButton)sender;
+            if (box.Checked)
+            {
+                switch (box.Name)
+                {
+                    case "BatchCode":
+                        CH_SPLITBATCH.Checked = true;
+                        break;
+                    case "BoxCode":
+                        CH_PBCODE.Checked = true;
+                        break;
+                    case "FixRow":
+                        break;
+                    case "BoxSplit":
+                        CH_SPLITBATCH.Checked = true;
+                        CH_PBCODE.Checked = true;
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
     }
 }

+ 7 - 4
UAS-出货标签管理(贸易版)/PreViewWindow.Designer.cs

@@ -35,21 +35,24 @@
             // LabelPreView
             // 
             this.LabelPreView.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.LabelPreView.Location = new System.Drawing.Point(12, 12);
+            this.LabelPreView.Location = new System.Drawing.Point(24, 24);
+            this.LabelPreView.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.LabelPreView.Name = "LabelPreView";
-            this.LabelPreView.Size = new System.Drawing.Size(446, 394);
+            this.LabelPreView.Size = new System.Drawing.Size(892, 788);
             this.LabelPreView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.LabelPreView.TabIndex = 0;
             this.LabelPreView.TabStop = false;
             // 
             // PreViewWindow
             // 
-            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(470, 418);
+            this.ClientSize = new System.Drawing.Size(940, 836);
             this.Controls.Add(this.LabelPreView);
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "PreViewWindow";
             this.Text = "预览标签";
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PreViewWindow_FormClosed);
             this.Load += new System.EventHandler(this.PreViewWindow_Load);
             ((System.ComponentModel.ISupportInitialize)(this.LabelPreView)).EndInit();
             this.ResumeLayout(false);

+ 5 - 0
UAS-出货标签管理(贸易版)/PreViewWindow.cs

@@ -24,5 +24,10 @@ namespace UAS_LabelMachine
         {
             LabelPreView.Image = Image.FromFile(@"C:\打印标签\"+FileName+".jpg");
         }
+
+        private void PreViewWindow_FormClosed(object sender, FormClosedEventArgs e)
+        {
+            LabelPreView.Image = null;
+        }
     }
 }

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

@@ -902,7 +902,6 @@ namespace UAS_LabelMachine
             objCompilerParameters.ReferencedAssemblies.Add("System.Windows.Forms.dll");
             objCompilerParameters.GenerateExecutable = false;
             objCompilerParameters.GenerateInMemory = true;
-            Console.WriteLine(oContent);
             // 4.CompilerResults
             CompilerResults cr = objCSharpCodePrivoder.CompileAssemblyFromSource(objCompilerParameters, oContent);
             if (cr.Errors.HasErrors)
@@ -924,8 +923,7 @@ namespace UAS_LabelMachine
                 }
                 catch (Exception ex)
                 {
-                    Console.WriteLine(ex.StackTrace);
-                    Console.WriteLine(ex.Message);
+                  
                 }
             }
         }

File diff suppressed because it is too large
+ 462 - 159
UAS-出货标签管理(贸易版)/PublicMethod/ExcelHandler.cs


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

@@ -7,9 +7,9 @@ namespace UAS_LabelMachine.PublicMethod
     {
         public static void DoLog(string Message)
         {
-            StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
-            sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
-            sw.Close();
+            //StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+            //sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
+            //sw.Close();
         }
     }
 }

+ 10 - 4
UAS-出货标签管理(贸易版)/PublicMethod/LogicHandler.cs

@@ -482,11 +482,17 @@ namespace UAS_LabelMachine.PublicMethod
             return str;
         }
 
-        public static void GetDataSQL(string iInoutno,string iText,out string oSQL) {
+        public static void GetDataSQL(string iInoutno,string iText,string iNumOrRate,out string oSQL) {
             oSQL = "";
-            string[] param = new string[] { iInoutno, iText, oSQL };
-            dh.CallProcedure("SP_GETDATASQL", ref param);
-            oSQL = param[2];
+            string[] param = new string[] { iInoutno, iText, iNumOrRate, oSQL };
+            dh.CallProcedure("SP_GETDATASQL1", ref param);
+            oSQL = param[3];
+        }
+
+        public static void GenHFEData(string iInoutno)
+        {
+            string[] param = new string[] { iInoutno};
+            dh.CallProcedure("sp_InsertHFE", ref param);
         }
     }
 }

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

@@ -0,0 +1,10 @@
+Configs 表,对应不同的客户编号
+晶源
+CODE:JINGYUAN
+Caller	ExportProdExcel
+Data 010101281
+
+利普芯
+CODE:LIPUXIN
+Caller	ExportProdExcel
+Data 010101278

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

@@ -103,11 +103,6 @@
     <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>
@@ -827,6 +822,7 @@
       <Generator>WCF Proxy Generator</Generator>
       <LastGenOutput>Reference.cs</LastGenOutput>
     </None>
+    <Content Include="SQL\Note.txt" />
     <Content Include="SQL\SQL.txt" />
     <Content Include="tool\Analysis.dll" />
     <Content Include="tool\DataHelper.dll" />

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

@@ -209,7 +209,7 @@ namespace UAS_LabelMachine
             pi_inoutno.TableName = "prodinout";
             pi_inoutno.Field = "pi_inoutno";
             pi_inoutno.ValueField = "pi_inoutno";
-            pi_inoutno.Condition = "pi_class in('出货单','拨出单')";
+            pi_inoutno.Condition = "pi_class in('出货单','拨出单','其它出库单')";
             pi_inoutno.Focus();
             //将本地读取的打印机设置进Combox,并选中默认打印机
             sg_code.FormName = Name;
@@ -1735,7 +1735,7 @@ namespace UAS_LabelMachine
                 sdh.BatchInsert("prodiobarcode", LabelInfDataTable);
             }
             sql.Clear();
-            sql.Append("select * from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'");
+            sql.Append("select * from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by cast(pib_outboxcode1 as int)");
             LabelInfDataTable = (DataTable)sdh.ExecuteSql(sql.ToString(), "select");
             bindingsource(LabelInf, LabelInfDataTable);
             //有数据的话默认取第一条的品牌去取采集策略
@@ -2375,7 +2375,7 @@ namespace UAS_LabelMachine
                             ex.StartPosition = FormStartPosition.CenterScreen;
                             ex.ShowDialog();
                             break;
-                        case "SZSI":
+                        case "SZSI_P":
                             ex.StartPosition = FormStartPosition.CenterScreen;
                             ex.ShowDialog();
                             break;
@@ -2783,6 +2783,10 @@ namespace UAS_LabelMachine
         {
             MidFormat = engine.Documents.Open(ftpOperater.DownLoadTo + MidLabelCombox.Text);
             Resolution re = new Resolution(ImageResolution.Printer);
+            if (File.Exists(@"C:\打印标签\" + MidLabelCombox.Text + ".jpg"))
+            {
+                File.Delete(@"C:\打印标签\" + MidLabelCombox.Text + ".jpg");
+            }
             MidFormat.ExportImageToFile(@"C:\打印标签\" + MidLabelCombox.Text + ".jpg", ImageType.JPEG, Seagull.BarTender.Print.ColorDepth.Mono, re, OverwriteOptions.DoNotOverwrite);
             PreViewWindow pre = new PreViewWindow(MidLabelCombox.Text);
             pre.StartPosition = FormStartPosition.CenterScreen;

Some files were not shown because too many files changed in this diff