浏览代码

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

Hcsy 6 年之前
父节点
当前提交
ab46440983

+ 0 - 3
UAS-出货标签管理/PublicMethod/BaseUtil.cs

@@ -378,11 +378,8 @@ namespace UAS_LabelMachine
         /// <param name="operate"></param>
         public static void FillDgvWithDataTable(DataGridView dgv, DataTable dt, params DataGridViewImageColumn[] operate)
         {
-            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
             dgv.AutoGenerateColumns = false;
-            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
             dgv.DataSource = dt;
-            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
             if (operate.Length > 0)
             {
                 if (dgv.Columns[operate[0].Name] != null)

+ 6 - 5
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -11,14 +11,16 @@ namespace UAS_LabelMachine
     public class DataHelper
     {
 
-        //富为外网地址
+        ////富为外网地址
         //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
-        //富为ERP地址
+        ////富为ERP地址
         //public static readonly string ERPAddesss = "http://richwellgroup.com.cn:8099/ERP/";
-        //富为FTP
+        ////富为FTP
         //public static readonly string FTPAdress = "ftp://richwellgroup.com.cn|printuser|printuser";
-        //Oracle端口
+        ////Oracle端口
         //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "JDTSY,FW_JDT,N_DATACENTER,FY_TEST,JD_TEST,XY_TEST,FW_TEST,DATACENTER,FW,XY,FY";
 
         //怡海能达外网地址
         private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
@@ -790,7 +792,6 @@ namespace UAS_LabelMachine
         {
             object result = null;
             command = new OracleCommand(SQL, connection);
-            Console.WriteLine(SQL);
             //用来拼接参数的
             if (names.Length > 0)
             {

+ 2 - 2
UAS-出货标签管理/PublicMethod/ftpOperater.cs

@@ -18,7 +18,7 @@ namespace UAS_LabelMachine
 
         public ftpOperater()
         {
-            string[] FTPInf = Properties.Settings.Default.FTPAddress.Split('|');
+            string[] FTPInf = DataHelper.FTPAdress.Split('|');
             this.ftpServerIP = FTPInf[0];
             this.ftpUser = FTPInf[1];
             this.ftpPwd = FTPInf[2];
@@ -137,7 +137,7 @@ namespace UAS_LabelMachine
         /// 实现ftp下载操作
         /// </summary>
         /// <param name="fileName">远程文件名</param>
-        public string Download(string fileName,DateTime time)
+        public string Download(string fileName, DateTime time)
         {
             FtpWebRequest reqFTP;
             try

+ 18 - 19
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -91,7 +91,9 @@
             this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.MidSource = new System.Windows.Forms.BindingSource(this.components);
             this.ChooseAll = new System.Windows.Forms.Button();
+            this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ExportData = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
             this.MidBoxEnd = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.MidBoxBegin = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -173,8 +175,6 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.ExportData = new System.Windows.Forms.Button();
-            this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -762,6 +762,19 @@
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = " 打印参数设置";
             // 
+            // ExportData
+            // 
+            this.ExportData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ExportData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ExportData.Location = new System.Drawing.Point(74, 202);
+            this.ExportData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ExportData.Name = "ExportData";
+            this.ExportData.Size = new System.Drawing.Size(68, 26);
+            this.ExportData.TabIndex = 91;
+            this.ExportData.Text = "导出数据";
+            this.ExportData.UseVisualStyleBackColor = true;
+            this.ExportData.Click += new System.EventHandler(this.ExportData_Click);
+            // 
             // label18
             // 
             this.label18.AutoSize = true;
@@ -1131,7 +1144,6 @@
             this.pib_id1.DataPropertyName = "pib_id";
             this.pib_id1.HeaderText = "pib_id";
             this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Visible = false;
             this.pib_id1.Width = 66;
             // 
             // pib_pdno
@@ -1301,7 +1313,7 @@
             // 
             this.ViVoPlate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ViVoPlate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ViVoPlate.Location = new System.Drawing.Point(37, 162);
+            this.ViVoPlate.Location = new System.Drawing.Point(80, 166);
             this.ViVoPlate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ViVoPlate.Name = "ViVoPlate";
             this.ViVoPlate.Size = new System.Drawing.Size(68, 26);
@@ -1674,19 +1686,6 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // ExportData
-            // 
-            this.ExportData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.ExportData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ExportData.Location = new System.Drawing.Point(74, 202);
-            this.ExportData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.ExportData.Name = "ExportData";
-            this.ExportData.Size = new System.Drawing.Size(68, 26);
-            this.ExportData.TabIndex = 91;
-            this.ExportData.Text = "导出数据";
-            this.ExportData.UseVisualStyleBackColor = true;
-            this.ExportData.Click += new System.EventHandler(this.ExportData_Click);
-            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1884,6 +1883,8 @@
         private System.Windows.Forms.Label label18;
         private CustomControl.EnterTextBox MidBoxEnd;
         private CustomControl.EnterTextBox MidBoxBegin;
+        private System.Windows.Forms.Button ExportData;
+        private System.Windows.Forms.FolderBrowserDialog ExportFileDialog;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifpick;
         private System.Windows.Forms.DataGridViewCheckBoxColumn pib_ifprint;
@@ -1905,7 +1906,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodspec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.Button ExportData;
-        private System.Windows.Forms.FolderBrowserDialog ExportFileDialog;
     }
 }

+ 2 - 5
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1100,8 +1100,7 @@ namespace UAS_LabelMachine
                     CurrentItemIndex = 0;
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
-                else
-                    MessageBox.Show("当前出入库单号不存在!");
+                else MessageBox.Show("当前出入库单号不存在!");
             }
         }
 
@@ -1190,7 +1189,6 @@ namespace UAS_LabelMachine
                 //用于判断用户是否勾选了行
                 int CheckedRowCount = 0;
                 string[] arg = SingleBoxArgument.ToArray();
-
                 //一盒打印的份数
                 List<string> PrintNums = new List<string>();
                 //打印所有的选中行
@@ -1213,7 +1211,7 @@ namespace UAS_LabelMachine
                             }
                         }
                         //如果包含
-                        if (!PrintNums.Contains(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()) || i == LastCheckRowIndex)
+                        if ((i + 1 < LabelInf.Rows.Count && LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() != LabelInf.Rows[i + 1].Cells["pib_outboxcode1"].Value.ToString()) || i == LastCheckRowIndex)
                         {
                             string pib_id = LabelInf.Rows[i].Cells["pib_id1"].Value.ToString();
                             DataRow[] dr = SingleBoxCacheData.Select("pib_id=" + pib_id);
@@ -2517,7 +2515,6 @@ namespace UAS_LabelMachine
             if (result == DialogResult.OK)
             {
                 ExcelHandler eh = new ExcelHandler();
-
                 DataTable dt = ((DataTable)MidSource.DataSource).Copy();
                 for (int i = 0; i < dt.Columns.Count; i++)
                 {

+ 3 - 3
UAS-出货标签管理/UAS_出货标签管理.resx

@@ -144,6 +144,9 @@
   <metadata name="MidSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>179, 17</value>
   </metadata>
+  <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>294, 17</value>
+  </metadata>
   <metadata name="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -162,9 +165,6 @@
   <metadata name="pd_custprodspec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>294, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>