Browse Source

特殊报表,条码生成

callm 1 year ago
parent
commit
0801c4994c

+ 1 - 6
UAS_MES_LGDZ/FunctionCode/Query/BarCodePrint.cs

@@ -1,10 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
@@ -41,7 +36,7 @@ namespace UAS_MES_NEW.Query
                 string bar_vendbarcode = dt.Rows[0]["bar_vendbarcode"].ToString();
                 string barcode = "";
                 LogicHandler.SP_GETBARCODE(bar_prodcode, "", out barcode);
-                newbarcode.Text = barcode.Replace("BARCODE:","") + "#" + bar_prodcode + "," + bar_prodcode + "," + bar_remain.Text + "," + bar_vendbarcode + "," + bar_madedate + ",";
+                newbarcode.Text = barcode.Replace("BARCODE:","") + "," + bar_prodcode + "," + bar_remain.Text + "," + bar_vendbarcode + "," + bar_madedate + ",";
             }
             Close();
         }

+ 3 - 4
UAS_MES_LGDZ/FunctionCode/Query/Query_BarcodeIn.cs

@@ -110,7 +110,6 @@ namespace UAS_MES_NEW.Query
             MessageBox.Show("生成明细成功");
         }
 
-        string new_barcode = "";
 
         private void pi_inoutno_UserControlTextChanged(object sender, EventArgs e)
         {
@@ -152,11 +151,11 @@ namespace UAS_MES_NEW.Query
                 string bar_prodcode = dt.Rows[0]["bar_prodcode"].ToString();
                 string bar_madedate = dt.Rows[0]["bar_madedate"].ToString();
                 string bar_vendbarcode = dt.Rows[0]["bar_vendbarcode"].ToString();
-                dh.ExecuteSql("insert into barcodeio(bi_id,bi_piid,bi_barcode,bi_inoutno,bi_prodcode,bi_indate,bi_inqty,bi_vendbarcode,bi_madedate,bi_sourcecode)" +
-                    "values(barcodeio_seq.nextval,'" + pi_id + "','" + newbarcode + "','" + pi_inoutno.Text + "','" + bar_prodcode + "',sysdate,'" + bar_remain + "','" + bar_vendbarcode + "',to_date('" + bar_madedate + "','yyyy-mm-dd'),'" + bar_code + "')", "insert");
+                dh.ExecuteSql("insert into barcodeio(bi_id,bi_piid,bi_barcode,bi_inoutno,bi_prodcode,bi_indate,bi_inqty,bi_vendbarcode,bi_madedate,bi_sourcecode,bi_printstatus)" +
+                    "values(barcodeio_seq.nextval,'" + pi_id + "','" + newbarcode + "','" + pi_inoutno.Text + "','" + bar_prodcode + "',sysdate,'" + bar_remain + "','" + bar_vendbarcode + "',to_date('" + bar_madedate + "','yyyy-mm-dd'),'" + bar_code + "',1)", "insert");
                 LoadGridData();
                 string ErrorMessage = "";
-                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, new_barcode, int.Parse("1"), pi_inoutno.Text, bar_prodcode, "自定义", "0", out ErrorMessage))
+                if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, newbarcode, int.Parse("1"), pi_inoutno.Text, bar_prodcode, "自定义", "0", out ErrorMessage))
                 {
 
                 }

+ 3 - 4
UAS_MES_LGDZ/FunctionCode/Query/Query_SpecialReport.cs

@@ -39,7 +39,6 @@ namespace UAS_MES_NEW.Query
             pr_code.DBTitle = "物料查询";
             pr_code.SetValueField = new string[] { "pr_code" };
 
-            pr_code.Text = "12112572";
         }
 
         private static string lpad(int length, string number)
@@ -191,8 +190,8 @@ namespace UAS_MES_NEW.Query
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
                     STF_MODEL.Add(dt.Rows[i][0].ToString());
-                    STF_FEEDER.Add(dt.Rows[i][3].ToString());
-                    STF_FEEDERNO.Add(dt.Rows[i][11].ToString());
+                    STF_FEEDER.Add(dt.Rows[i][2].ToString());
+                    STF_FEEDERNO.Add(dt.Rows[i][10].ToString());
                     STF_LOCATION.Add(dt.Rows[i][12].ToString());
                     STF_MACHINE.Add(dt.Rows[i][1].ToString());
                 }
@@ -207,7 +206,7 @@ namespace UAS_MES_NEW.Query
                 DialogResult result1 = ExportFileDialog.ShowDialog();
                 if (result1 == DialogResult.OK)
                 {
-                    excel.ExportExcel_LIANGAN(dt1, ExportFileDialog.SelectedPath +"\\"+ System.DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls");
+                    excel.ExportExcel_LIANGAN(dt1, ExportFileDialog.SelectedPath + "\\" + pr_code.Text + System.DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls");
                 }
             }
         }