Hcsy 7 lat temu
rodzic
commit
2c28df518a

+ 41 - 25
UAS-MES/FunctionCode/Make/Make_SmtTestCollection.Designer.cs

@@ -122,7 +122,7 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(296, 181);
+            this.bc_remark_label.Location = new System.Drawing.Point(296, 184);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(74, 21);
             this.bc_remark_label.TabIndex = 25;
@@ -132,7 +132,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(240, 500);
+            this.ms_sncode_label.Location = new System.Drawing.Point(214, 498);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 18;
@@ -182,7 +182,7 @@
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(3, 184);
+            this.label4.Location = new System.Drawing.Point(2, 184);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(74, 22);
             this.label4.TabIndex = 39;
@@ -213,7 +213,7 @@
             // 
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(419, 145);
+            this.AutoBadCode.Location = new System.Drawing.Point(718, 526);
             this.AutoBadCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoBadCode.Name = "AutoBadCode";
             this.AutoBadCode.Size = new System.Drawing.Size(123, 21);
@@ -226,7 +226,7 @@
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(296, 15);
+            this.ma_qty_label.Location = new System.Drawing.Point(287, 14);
             this.ma_qty_label.Name = "ma_qty_label";
             this.ma_qty_label.Size = new System.Drawing.Size(74, 21);
             this.ma_qty_label.TabIndex = 11;
@@ -343,7 +343,7 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(296, 64);
+            this.pr_detail_label.Location = new System.Drawing.Point(287, 64);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 6;
@@ -365,7 +365,7 @@
             this.NoteForChange.Checked = true;
             this.NoteForChange.CheckState = System.Windows.Forms.CheckState.Checked;
             this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.NoteForChange.Location = new System.Drawing.Point(300, 112);
+            this.NoteForChange.Location = new System.Drawing.Point(287, 112);
             this.NoteForChange.Margin = new System.Windows.Forms.Padding(2);
             this.NoteForChange.Name = "NoteForChange";
             this.NoteForChange.Size = new System.Drawing.Size(99, 21);
@@ -431,7 +431,7 @@
             this.mbp_part_label.AutoSize = true;
             this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
-            this.mbp_part_label.Location = new System.Drawing.Point(403, 239);
+            this.mbp_part_label.Location = new System.Drawing.Point(384, 240);
             this.mbp_part_label.Name = "mbp_part_label";
             this.mbp_part_label.Size = new System.Drawing.Size(74, 21);
             this.mbp_part_label.TabIndex = 206;
@@ -479,17 +479,23 @@
             // 
             // dataGridViewTextBoxColumn3
             // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.dataGridViewTextBoxColumn3.DataPropertyName = "mb_badcode";
             this.dataGridViewTextBoxColumn3.HeaderText = "不良代码";
+            this.dataGridViewTextBoxColumn3.MinimumWidth = 80;
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.Width = 80;
             // 
             // dataGridViewTextBoxColumn4
             // 
+            this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.dataGridViewTextBoxColumn4.DataPropertyName = "mb_badname";
             this.dataGridViewTextBoxColumn4.HeaderText = "不良名称";
+            this.dataGridViewTextBoxColumn4.MinimumWidth = 80;
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
             this.dataGridViewTextBoxColumn4.ReadOnly = true;
+            this.dataGridViewTextBoxColumn4.Width = 80;
             // 
             // dataGridViewTextBoxColumn5
             // 
@@ -529,6 +535,7 @@
             this.dataGridViewTextBoxColumn8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.dataGridViewTextBoxColumn8.DataPropertyName = "mbl_loc";
             this.dataGridViewTextBoxColumn8.HeaderText = "不良位置";
+            this.dataGridViewTextBoxColumn8.MinimumWidth = 45;
             this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
             // 
             // dataGridViewCheckBoxColumn2
@@ -616,14 +623,14 @@
             this.bd_soncode.Condition = null;
             this.bd_soncode.DBTitle = null;
             this.bd_soncode.FormName = null;
-            this.bd_soncode.Location = new System.Drawing.Point(482, 239);
+            this.bd_soncode.Location = new System.Drawing.Point(477, 240);
             this.bd_soncode.Margin = new System.Windows.Forms.Padding(2);
             this.bd_soncode.Name = "bd_soncode";
             this.bd_soncode.Power = null;
             this.bd_soncode.ReturnData = null;
             this.bd_soncode.SelectField = null;
             this.bd_soncode.SetValueField = null;
-            this.bd_soncode.Size = new System.Drawing.Size(137, 21);
+            this.bd_soncode.Size = new System.Drawing.Size(170, 21);
             this.bd_soncode.TabIndex = 207;
             this.bd_soncode.TableName = null;
             this.bd_soncode.Tag = "bd_soncode";
@@ -632,7 +639,7 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(300, 145);
+            this.StepCount.Location = new System.Drawing.Point(287, 146);
             this.StepCount.Margin = new System.Windows.Forms.Padding(4, 7, 4, 7);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(64, 22);
@@ -644,11 +651,11 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(82, 184);
+            this.Filter.Location = new System.Drawing.Point(98, 181);
             this.Filter.Margin = new System.Windows.Forms.Padding(2);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";
-            this.Filter.Size = new System.Drawing.Size(156, 22);
+            this.Filter.Size = new System.Drawing.Size(140, 24);
             this.Filter.TabIndex = 76;
             this.Filter.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             // 
@@ -753,7 +760,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(499, 496);
+            this.Save.Location = new System.Drawing.Point(477, 497);
             this.Save.Margin = new System.Windows.Forms.Padding(2);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
@@ -884,11 +891,11 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(407, 181);
+            this.bc_remark.Location = new System.Drawing.Point(388, 181);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(240, 50);
+            this.bc_remark.Size = new System.Drawing.Size(259, 50);
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
@@ -900,7 +907,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(300, 498);
+            this.ms_sncode.Location = new System.Drawing.Point(280, 498);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
             this.ms_sncode.Size = new System.Drawing.Size(181, 24);
@@ -915,9 +922,9 @@
             // 
             this.choose1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.choose1.HeaderText = "勾选";
-            this.choose1.MinimumWidth = 80;
+            this.choose1.MinimumWidth = 60;
             this.choose1.Name = "choose1";
-            this.choose1.Width = 80;
+            this.choose1.Width = 60;
             // 
             // mb_id
             // 
@@ -935,17 +942,23 @@
             // 
             // mb_badcode
             // 
+            this.mb_badcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.mb_badcode.DataPropertyName = "mb_badcode";
             this.mb_badcode.HeaderText = "不良代码";
+            this.mb_badcode.MinimumWidth = 80;
             this.mb_badcode.Name = "mb_badcode";
             this.mb_badcode.ReadOnly = true;
+            this.mb_badcode.Width = 80;
             // 
             // mb_badname
             // 
+            this.mb_badname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.mb_badname.DataPropertyName = "mb_badname";
             this.mb_badname.HeaderText = "不良名称";
+            this.mb_badname.MinimumWidth = 80;
             this.mb_badname.Name = "mb_badname";
             this.mb_badname.ReadOnly = true;
+            this.mb_badname.Width = 80;
             // 
             // mb_bgname
             // 
@@ -963,6 +976,7 @@
             // 
             // mbc_component
             // 
+            this.mbc_component.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.mbc_component.DataPropertyName = "mbc_component";
             this.mbc_component.HeaderText = "不良组件";
             this.mbc_component.Items.AddRange(new object[] {
@@ -971,7 +985,9 @@
             "液晶屏",
             "电路板",
             "其他"});
+            this.mbc_component.MinimumWidth = 80;
             this.mbc_component.Name = "mbc_component";
+            this.mbc_component.Width = 80;
             // 
             // mbp_part
             // 
@@ -984,8 +1000,8 @@
             // 
             this.mbl_loc.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.mbl_loc.DataPropertyName = "mbl_loc";
-            this.mbl_loc.FillWeight = 50F;
             this.mbl_loc.HeaderText = "不良位置";
+            this.mbl_loc.MinimumWidth = 45;
             this.mbl_loc.Name = "mbl_loc";
             // 
             // Make_SmtTestCollection
@@ -1119,6 +1135,11 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_name;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose1;
         private System.Windows.Forms.DataGridViewTextBoxColumn mb_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbr_id;
@@ -1129,10 +1150,5 @@
         private System.Windows.Forms.DataGridViewComboBoxColumn mbc_component;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbp_part;
         private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
     }
 }

+ 4 - 1
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -2511,6 +2511,7 @@ 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++)
                 {
@@ -2523,7 +2524,9 @@ namespace UAS_LabelMachine
                     }
                 }
                 eh.ExportExcel(dt, ExportFileDialog.SelectedPath, pi_inoutno.Text);
-                MessageBox.Show("导出成功");
+                string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (close.ToString() == "Yes")
+                    System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_inoutno.Text + ".xls");
             }
         }
     }

+ 2 - 1
UAS_Web/Browser.cs

@@ -18,11 +18,12 @@ namespace UAS_Web
         {
             InitializeComponent();
             Text = "思拓微-供应商条码打印";
-            string path = "http://192.168.253.80:8090/ERP/jsps/vendbarcode/login.jsp";
+            string path = "http://stwecig.vicp.io:8099/ERP/jsps/vendbarcode/login.jsp";
             webBrowser = new ChromiumWebBrowser(path)
             {
                 Dock = DockStyle.Fill
             };
+            CheckForIllegalCrossThreadCalls = false;
             webBrowser.MenuHandler = new MenuHandler();
             webBrowser.RequestHandler = new RequestHandler();
             webBrowser.DownloadHandler = new DownLoadFile();

+ 3 - 0
UAS_Web/UAS_Web.csproj

@@ -15,6 +15,7 @@
     <FileAlignment>512</FileAlignment>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>x86</PlatformTarget>
@@ -84,6 +85,7 @@
       <HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
       <Private>True</Private>
     </Reference>
+    <Reference Include="PresentationCore" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
@@ -110,6 +112,7 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="tool\CustomCommand.cs" />
     <Compile Include="tool\DownLoadFile.cs" />
     <Compile Include="tool\FilterManager.cs" />
     <Compile Include="tool\MenuHandler.cs" />

+ 5 - 5
UAS_Web/app.config

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <configSections>
-        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
-            <section name="UAS_Web.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+            <section name="UAS_Web.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
         </sectionGroup>
     </configSections>
     <userSettings>
         <UAS_Web.Properties.Settings>
             <setting name="PrinterName" serializeAs="String">
-                <value />
+                <value/>
             </setting>
         </UAS_Web.Properties.Settings>
     </userSettings>
-</configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

+ 43 - 0
UAS_Web/tool/CustomCommand.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Input;
+
+namespace UAS_Web.tool
+{
+    class CustomCommand : ICommand
+    {
+        Action _TargetExecuteMethod;
+        Func<bool> _TargetCanExecuteMethod;
+        public event EventHandler CanExecuteChanged = delegate { };
+
+        public CustomCommand(Action executeMethod)
+        {
+            _TargetExecuteMethod = executeMethod;
+        }
+
+        bool ICommand.CanExecute(object parameter)
+        {
+            if (_TargetCanExecuteMethod != null)
+            {
+                return _TargetCanExecuteMethod();
+            }
+            if (_TargetExecuteMethod != null)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        public void RaiseCanExecuteChanged()
+        {
+            CanExecuteChanged(this, EventArgs.Empty);
+        }
+
+        void ICommand.Execute(object parameter)
+        {
+            _TargetExecuteMethod?.Invoke();
+        }
+    }
+}

+ 6 - 8
UAS_Web/tool/MenuHandler.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using CefSharp;
+using CefSharp;
 
 namespace UAS_Web.tool
 {
@@ -10,8 +6,10 @@ namespace UAS_Web.tool
     {
         public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
         {
-            //browser.ShowDevTools();
             model.Clear();
+            model.AddItem(CefMenuCommand.Copy, "复制");
+            model.AddItem(CefMenuCommand.Paste, "粘贴");
+            model.AddItem(CefMenuCommand.Reload, "重新加载");
         }
 
         public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
@@ -21,7 +19,7 @@ namespace UAS_Web.tool
 
         public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
         {
-            //throw new NotImplementedException();
+
         }
 
         public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
@@ -29,4 +27,4 @@ namespace UAS_Web.tool
             return false;
         }
     }
-}
+}