Browse Source

[微浦MES]新增功能提交

caosy 5 years ago
parent
commit
298aa34f07

+ 4 - 1
UAS_MES_WEIP/App.config

@@ -41,6 +41,9 @@
       <setting name="FTPAddress" serializeAs="String">
         <value>\\172.16.66.51\lable</value>
       </setting>
+      <setting name="SMTBIND" serializeAs="String">
+        <value>True</value>
+      </setting>
     </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>
       <setting name="ProjectName" serializeAs="String">
@@ -73,7 +76,7 @@
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
         <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=
-10.8.0.37)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+192.168.1.105)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>

+ 19 - 1
UAS_MES_WEIP/DataOperate/ExcelHandler.cs

@@ -32,6 +32,24 @@ namespace UAS_MES_NEW.DataOperate
             return filePath;
         }
 
+
+        public string ExportExcel(DataTable dt, string FolderPath,string location)
+        {
+            //创建一个内存流,用来接收转换成Excel的内容
+            MemoryStream ms;
+            ms = DataTableToExcel(dt);
+            //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
+            string filePath = @FolderPath + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss") +location+ ".xls";
+            FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
+            byte[] data = ms.ToArray();
+            fs.Write(data, 0, data.Length);
+            fs.Flush();
+            //释放当前Excel文件,否则打开文件的时候会显示文件被占用
+            ms.Dispose();
+            fs.Dispose();
+            return filePath;
+        }
+
         /// <summary>
         /// 导入Excel
         /// </summary>
@@ -121,7 +139,7 @@ namespace UAS_MES_NEW.DataOperate
                                     break;
                                 case CellType.STRING:
                                     string strValue = item.StringCellValue;
-                                    if (string.IsNullOrEmpty(strValue))
+                                    if (!string.IsNullOrEmpty(strValue))
                                     {
                                         dr[item.ColumnIndex] = strValue.ToString();
                                     }

+ 123 - 153
UAS_MES_WEIP/FunctionCode/Make/Make_SMTBind.Designer.cs

@@ -43,6 +43,11 @@
             this.ms_craftcode = new System.Windows.Forms.Label();
             this.ma_craftcode = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_maincode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sb_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label2 = new System.Windows.Forms.Label();
             this.pr_pcbacount = new System.Windows.Forms.NumericUpDown();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -50,11 +55,6 @@
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_maincode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sb_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
@@ -78,10 +78,9 @@
             // 
             this.mcd_restqty_label.AutoSize = true;
             this.mcd_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_restqty_label.Location = new System.Drawing.Point(1170, 122);
-            this.mcd_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_restqty_label.Location = new System.Drawing.Point(585, 61);
             this.mcd_restqty_label.Name = "mcd_restqty_label";
-            this.mcd_restqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_restqty_label.TabIndex = 59;
             this.mcd_restqty_label.Text = "待采集数";
             // 
@@ -89,10 +88,9 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(622, 122);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(311, 61);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 56;
             this.mcd_inqty_label.Text = "已采集数";
             // 
@@ -100,10 +98,9 @@
             // 
             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(18, 122);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty_label.Location = new System.Drawing.Point(9, 61);
             this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_qty_label.Size = new System.Drawing.Size(74, 21);
             this.ma_qty_label.TabIndex = 53;
             this.ma_qty_label.Text = "工单数量";
             // 
@@ -111,10 +108,9 @@
             // 
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(18, 24);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(9, 12);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 49;
             this.ms_makecode_label.Text = "归属工单";
             // 
@@ -122,10 +118,9 @@
             // 
             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(1170, 24);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(585, 12);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 50;
             this.pr_detail_label.Text = "产品规格";
             // 
@@ -133,10 +128,9 @@
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(622, 24);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(311, 12);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_prodcode_label.TabIndex = 51;
             this.ma_prodcode_label.Text = "产品代码";
             // 
@@ -146,10 +140,9 @@
             this.Loading.Checked = true;
             this.Loading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Loading.ForeColor = System.Drawing.Color.Blue;
-            this.Loading.Location = new System.Drawing.Point(36, 720);
-            this.Loading.Margin = new System.Windows.Forms.Padding(6);
+            this.Loading.Location = new System.Drawing.Point(18, 360);
             this.Loading.Name = "Loading";
-            this.Loading.Size = new System.Drawing.Size(113, 45);
+            this.Loading.Size = new System.Drawing.Size(60, 25);
             this.Loading.TabIndex = 62;
             this.Loading.TabStop = true;
             this.Loading.Text = "绑定";
@@ -160,10 +153,9 @@
             this.UnLoading.AutoSize = true;
             this.UnLoading.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UnLoading.ForeColor = System.Drawing.Color.Blue;
-            this.UnLoading.Location = new System.Drawing.Point(196, 720);
-            this.UnLoading.Margin = new System.Windows.Forms.Padding(6);
+            this.UnLoading.Location = new System.Drawing.Point(98, 360);
             this.UnLoading.Name = "UnLoading";
-            this.UnLoading.Size = new System.Drawing.Size(113, 45);
+            this.UnLoading.Size = new System.Drawing.Size(60, 25);
             this.UnLoading.TabIndex = 63;
             this.UnLoading.Text = "解绑";
             this.UnLoading.UseVisualStyleBackColor = true;
@@ -172,10 +164,9 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(28, 796);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(14, 398);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(114, 41);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 64;
             this.sn_code_label.Text = "序列号";
             // 
@@ -183,10 +174,9 @@
             // 
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(28, 884);
-            this.code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.code_label.Location = new System.Drawing.Point(14, 442);
             this.code_label.Name = "code_label";
-            this.code_label.Size = new System.Drawing.Size(114, 41);
+            this.code_label.Size = new System.Drawing.Size(58, 21);
             this.code_label.TabIndex = 66;
             this.code_label.Text = "录入框";
             // 
@@ -194,10 +184,9 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(526, 802);
-            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ClearSn_code.Location = new System.Drawing.Point(263, 401);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
+            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
             this.ClearSn_code.TabIndex = 138;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
@@ -206,10 +195,9 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_craftcode.Location = new System.Drawing.Point(1536, 30);
-            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_craftcode.Location = new System.Drawing.Point(768, 15);
             this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 21);
             this.ms_craftcode.TabIndex = 142;
             this.ms_craftcode.Visible = false;
             // 
@@ -217,10 +205,9 @@
             // 
             this.ma_craftcode.AutoSize = true;
             this.ma_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode.Location = new System.Drawing.Point(1508, 122);
-            this.ma_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_craftcode.Location = new System.Drawing.Point(754, 61);
             this.ma_craftcode.Name = "ma_craftcode";
-            this.ma_craftcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_craftcode.Size = new System.Drawing.Size(0, 21);
             this.ma_craftcode.TabIndex = 145;
             this.ma_craftcode.Visible = false;
             // 
@@ -235,31 +222,78 @@
             this.sb_barcode,
             this.sb_prodcode,
             this.sb_indate});
-            this.LabelDataGridView.Location = new System.Drawing.Point(36, 216);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(6);
+            this.LabelDataGridView.Location = new System.Drawing.Point(18, 108);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1750, 454);
+            this.LabelDataGridView.Size = new System.Drawing.Size(875, 227);
             this.LabelDataGridView.TabIndex = 193;
             // 
+            // 序号
+            // 
+            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.序号.DataPropertyName = "rownum";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 35;
+            // 
+            // sb_maincode
+            // 
+            this.sb_maincode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.sb_maincode.DataPropertyName = "sb_maincode";
+            this.sb_maincode.HeaderText = "关联条码号";
+            this.sb_maincode.Name = "sb_maincode";
+            this.sb_maincode.ReadOnly = true;
+            this.sb_maincode.Width = 90;
+            // 
+            // sb_barcode
+            // 
+            this.sb_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
+            this.sb_barcode.DataPropertyName = "sb_barcode";
+            this.sb_barcode.HeaderText = "条码号";
+            this.sb_barcode.Name = "sb_barcode";
+            this.sb_barcode.ReadOnly = true;
+            this.sb_barcode.Width = 66;
+            // 
+            // sb_prodcode
+            // 
+            this.sb_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.sb_prodcode.DataPropertyName = "sb_prodcode";
+            this.sb_prodcode.HeaderText = "产品编号";
+            this.sb_prodcode.Name = "sb_prodcode";
+            this.sb_prodcode.ReadOnly = true;
+            this.sb_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.sb_prodcode.Width = 59;
+            // 
+            // sb_indate
+            // 
+            this.sb_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.sb_indate.DataPropertyName = "sb_indate";
+            this.sb_indate.HeaderText = "录入日期";
+            this.sb_indate.Name = "sb_indate";
+            this.sb_indate.ReadOnly = true;
+            this.sb_indate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.sb_indate.Width = 59;
+            // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(558, 722);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Location = new System.Drawing.Point(279, 361);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(114, 41);
+            this.label2.Size = new System.Drawing.Size(58, 21);
             this.label2.TabIndex = 200;
             this.label2.Text = "拼板数";
             // 
             // pr_pcbacount
             // 
-            this.pr_pcbacount.Location = new System.Drawing.Point(695, 728);
+            this.pr_pcbacount.Location = new System.Drawing.Point(348, 364);
+            this.pr_pcbacount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.pr_pcbacount.Name = "pr_pcbacount";
             this.pr_pcbacount.ReadOnly = true;
-            this.pr_pcbacount.Size = new System.Drawing.Size(120, 35);
+            this.pr_pcbacount.Size = new System.Drawing.Size(60, 21);
             this.pr_pcbacount.TabIndex = 199;
             // 
             // dataGridViewTextBoxColumn1
@@ -270,7 +304,6 @@
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
             this.dataGridViewTextBoxColumn1.ReadOnly = true;
             this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn1.Width = 64;
             // 
             // dataGridViewTextBoxColumn2
             // 
@@ -279,7 +312,6 @@
             this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
             this.dataGridViewTextBoxColumn2.ReadOnly = true;
-            this.dataGridViewTextBoxColumn2.Width = 175;
             // 
             // dataGridViewTextBoxColumn3
             // 
@@ -289,7 +321,6 @@
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
             this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn3.Width = 127;
             // 
             // dataGridViewTextBoxColumn4
             // 
@@ -299,7 +330,6 @@
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
             this.dataGridViewTextBoxColumn4.ReadOnly = true;
             this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn4.Width = 112;
             // 
             // dataGridViewTextBoxColumn5
             // 
@@ -310,63 +340,14 @@
             this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
             this.dataGridViewTextBoxColumn5.ReadOnly = true;
             this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn5.Width = 112;
-            // 
-            // 序号
-            // 
-            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.序号.DataPropertyName = "rownum";
-            this.序号.HeaderText = "序号";
-            this.序号.Name = "序号";
-            this.序号.ReadOnly = true;
-            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.序号.Width = 64;
-            // 
-            // sb_maincode
-            // 
-            this.sb_maincode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.sb_maincode.DataPropertyName = "sb_maincode";
-            this.sb_maincode.HeaderText = "关联条码号";
-            this.sb_maincode.Name = "sb_maincode";
-            this.sb_maincode.ReadOnly = true;
-            this.sb_maincode.Width = 175;
-            // 
-            // sb_barcode
-            // 
-            this.sb_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
-            this.sb_barcode.DataPropertyName = "sb_barcode";
-            this.sb_barcode.HeaderText = "条码号";
-            this.sb_barcode.Name = "sb_barcode";
-            this.sb_barcode.ReadOnly = true;
-            this.sb_barcode.Width = 127;
-            // 
-            // sb_prodcode
-            // 
-            this.sb_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.sb_prodcode.DataPropertyName = "sb_prodcode";
-            this.sb_prodcode.HeaderText = "产品编号";
-            this.sb_prodcode.Name = "sb_prodcode";
-            this.sb_prodcode.ReadOnly = true;
-            this.sb_prodcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.sb_prodcode.Width = 112;
-            // 
-            // sb_indate
-            // 
-            this.sb_indate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.sb_indate.DataPropertyName = "sb_indate";
-            this.sb_indate.HeaderText = "录入日期";
-            this.sb_indate.Name = "sb_indate";
-            this.sb_indate.ReadOnly = true;
-            this.sb_indate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.sb_indate.Width = 112;
             // 
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(920, 688);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Location = new System.Drawing.Point(460, 344);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(160, 44);
+            this.StepCount.Size = new System.Drawing.Size(80, 22);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
@@ -378,14 +359,14 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(192, 26);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(96, 13);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(296, 42);
+            this.ma_code.Size = new System.Drawing.Size(148, 21);
             this.ma_code.TabIndex = 141;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
@@ -397,10 +378,10 @@
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(496, 30);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Location = new System.Drawing.Point(248, 15);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 140;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
@@ -410,11 +391,10 @@
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.CutLength = null;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(802, 24);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Location = new System.Drawing.Point(401, 12);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ma_prodcode.TabIndex = 99;
             // 
             // pr_detail
@@ -422,11 +402,10 @@
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(1350, 24);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_detail.Location = new System.Drawing.Point(675, 12);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 98;
             // 
             // mcd_remainqty
@@ -434,11 +413,10 @@
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.CutLength = null;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(1348, 122);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(674, 61);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_remainqty.TabIndex = 97;
             this.mcd_remainqty.Tag = "mcd_remainqty";
             // 
@@ -447,11 +425,10 @@
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.CutLength = null;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(802, 122);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Location = new System.Drawing.Point(401, 61);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
             this.mcd_inqty.TabIndex = 96;
             // 
             // ma_qty
@@ -459,20 +436,18 @@
             this.ma_qty.AutoSize = true;
             this.ma_qty.CutLength = null;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(192, 122);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ma_qty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_qty.Location = new System.Drawing.Point(96, 61);
+            this.ma_qty.MaximumSize = new System.Drawing.Size(150, 0);
             this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.Size = new System.Drawing.Size(0, 21);
             this.ma_qty.TabIndex = 95;
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(1090, 688);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Location = new System.Drawing.Point(545, 344);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(696, 238);
+            this.OperateResult.Size = new System.Drawing.Size(350, 121);
             this.OperateResult.TabIndex = 94;
             this.OperateResult.Text = "";
             // 
@@ -483,13 +458,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(920, 878);
-            this.Clean.Margin = new System.Windows.Forms.Padding(6);
+            this.Clean.Location = new System.Drawing.Point(460, 439);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(120, 48);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 80;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -502,13 +476,12 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(578, 880);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(6);
+            this.Confirm.Location = new System.Drawing.Point(289, 440);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(120, 48);
+            this.Confirm.Size = new System.Drawing.Size(60, 24);
             this.Confirm.TabIndex = 73;
             this.Confirm.Tag = "IfRead";
             this.Confirm.Text = "确认";
@@ -520,11 +493,10 @@
             this.code.AllPower = "ifall";
             this.code.BackColor = System.Drawing.Color.White;
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(196, 884);
-            this.code.Margin = new System.Windows.Forms.Padding(6);
+            this.code.Location = new System.Drawing.Point(98, 442);
             this.code.Name = "code";
             this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(316, 35);
+            this.code.Size = new System.Drawing.Size(160, 21);
             this.code.Str = null;
             this.code.Str1 = null;
             this.code.Str2 = null;
@@ -538,11 +510,10 @@
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.Enabled = false;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(196, 796);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.sn_code.Location = new System.Drawing.Point(98, 398);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(316, 35);
+            this.sn_code.Size = new System.Drawing.Size(160, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -558,9 +529,9 @@
             // 
             // Make_SMTBind
             // 
-            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(1796, 974);
+            this.ClientSize = new System.Drawing.Size(898, 487);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.pr_pcbacount);
             this.Controls.Add(this.LabelDataGridView);
@@ -591,10 +562,9 @@
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Make_SMTBind";
             this.Tag = "Make!SMTBind";
-            this.Text = "上料采集";
+            this.Text = "拼版绑定";
             this.Load += new System.EventHandler(this.Make_FeedingCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();

+ 90 - 89
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -59,10 +59,16 @@
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
+            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
+            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -75,12 +81,6 @@
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.ma_softversion = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.Save = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
@@ -383,6 +383,19 @@
             this.panel1.Size = new System.Drawing.Size(315, 127);
             this.panel1.TabIndex = 71;
             // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            // 
             // label7
             // 
             this.label7.AutoSize = true;
@@ -407,6 +420,39 @@
             this.ob_checkno.Visible = false;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
+            // SendCheck
+            // 
+            this.SendCheck.AllPower = null;
+            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
+            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
+            this.SendCheck.Enabled = false;
+            this.SendCheck.Image = null;
+            this.SendCheck.IsShowBorder = true;
+            this.SendCheck.Location = new System.Drawing.Point(229, 90);
+            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
+            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
+            this.SendCheck.Name = "SendCheck";
+            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
+            this.SendCheck.Power = null;
+            this.SendCheck.Size = new System.Drawing.Size(65, 26);
+            this.SendCheck.TabIndex = 72;
+            this.SendCheck.Text = "送检";
+            this.SendCheck.UseVisualStyleBackColor = false;
+            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
+            // 
+            // ob_batchqty
+            // 
+            this.ob_batchqty.AutoSize = true;
+            this.ob_batchqty.CutLength = null;
+            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
+            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_batchqty.Name = "ob_batchqty";
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_batchqty.TabIndex = 75;
+            this.ob_batchqty.Tag = "ob_batchqty";
+            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -418,6 +464,19 @@
             this.ob_batchqty_label.TabIndex = 74;
             this.ob_batchqty_label.Text = "抽检批数";
             // 
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AutoSize = true;
+            this.ob_nowcheckqty.CutLength = null;
+            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
+            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_nowcheckqty.TabIndex = 73;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
+            // 
             // ob_nowcheckqty_label
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
@@ -429,6 +488,30 @@
             this.ob_nowcheckqty_label.TabIndex = 72;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(109, 12);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -506,6 +589,7 @@
             this.SMTBind.TabIndex = 195;
             this.SMTBind.Text = "SMT分板过站";
             this.SMTBind.UseVisualStyleBackColor = true;
+            this.SMTBind.CheckedChanged += new System.EventHandler(this.SMTBind_CheckedChanged);
             // 
             // StepCount
             // 
@@ -541,89 +625,6 @@
             this.ma_softversion.Size = new System.Drawing.Size(0, 21);
             this.ma_softversion.TabIndex = 73;
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(109, 91);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            // 
-            // SendCheck
-            // 
-            this.SendCheck.AllPower = null;
-            this.SendCheck.BackColor = System.Drawing.Color.Transparent;
-            this.SendCheck.DownImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.DownImage")));
-            this.SendCheck.Enabled = false;
-            this.SendCheck.Image = null;
-            this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(229, 90);
-            this.SendCheck.Margin = new System.Windows.Forms.Padding(2);
-            this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
-            this.SendCheck.Name = "SendCheck";
-            this.SendCheck.NormalImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.NormalImage")));
-            this.SendCheck.Power = null;
-            this.SendCheck.Size = new System.Drawing.Size(65, 26);
-            this.SendCheck.TabIndex = 72;
-            this.SendCheck.Text = "送检";
-            this.SendCheck.UseVisualStyleBackColor = false;
-            this.SendCheck.Click += new System.EventHandler(this.SendCheck_Click);
-            // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AutoSize = true;
-            this.ob_batchqty.CutLength = null;
-            this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(109, 51);
-            this.ob_batchqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_batchqty.TabIndex = 75;
-            this.ob_batchqty.Tag = "ob_batchqty";
-            // 
-            // ob_nowcheckqty
-            // 
-            this.ob_nowcheckqty.AutoSize = true;
-            this.ob_nowcheckqty.CutLength = null;
-            this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(248, 51);
-            this.ob_nowcheckqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
-            this.ob_nowcheckqty.TabIndex = 73;
-            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
-            // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(109, 12);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(248, 12);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // Save
             // 
             this.Save.AllPower = null;

+ 9 - 1
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.cs

@@ -9,6 +9,7 @@ using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 using System.Collections.Generic;
 using UAS_MES_NEW.CustomControl.PowerControlForm;
+using UAS_MES_NEW.Properties;
 
 namespace UAS_MES_NEW.Make
 {
@@ -63,7 +64,7 @@ namespace UAS_MES_NEW.Make
             ma_code.SetLockCheckBox(LockMakeCode);
             ControlLockTimer.Tick += ControlLockTimer_Tick;
             ControlLockTimer.Interval = 100;
-
+            SMTBind.Checked = Settings.Default.SMTBIND;
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
@@ -818,5 +819,12 @@ namespace UAS_MES_NEW.Make
             }
 
         }
+
+        private void SMTBind_CheckedChanged(object sender, EventArgs e)
+        {
+            Settings.Default.SMTBIND = SMTBind.Checked;
+            Settings.Default.Save();
+
+        }
     }
 }

+ 217 - 0
UAS_MES_WEIP/FunctionCode/Special/Special_SmtLocation.Designer.cs

@@ -0,0 +1,217 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_SmtLocation
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_SmtLocation));
+            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.valueLabel2 = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.valueLabel1 = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.normalButton3 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.normalButton2 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.RefDes = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Layer = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // textBox1
+            // 
+            this.textBox1.Location = new System.Drawing.Point(183, 112);
+            this.textBox1.Name = "textBox1";
+            this.textBox1.ReadOnly = true;
+            this.textBox1.Size = new System.Drawing.Size(276, 21);
+            this.textBox1.TabIndex = 168;
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            this.openFileDialog1.Filter = "(*.xls)|*.xls";
+            // 
+            // LabelDataGridView
+            // 
+            this.LabelDataGridView.AllowUserToAddRows = false;
+            this.LabelDataGridView.AllowUserToResizeRows = false;
+            this.LabelDataGridView.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
+            this.LabelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.RefDes,
+            this.Layer});
+            this.LabelDataGridView.Location = new System.Drawing.Point(5, 207);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            this.LabelDataGridView.RowHeadersVisible = false;
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.Size = new System.Drawing.Size(675, 233);
+            this.LabelDataGridView.TabIndex = 189;
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "RefDes";
+            this.dataGridViewTextBoxColumn1.HeaderText = "上料工单号";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "Layer";
+            this.dataGridViewTextBoxColumn2.HeaderText = "子件名称";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            // 
+            // valueLabel2
+            // 
+            this.valueLabel2.AutoSize = true;
+            this.valueLabel2.CutLength = null;
+            this.valueLabel2.Location = new System.Drawing.Point(84, 59);
+            this.valueLabel2.MaximumSize = new System.Drawing.Size(200, 0);
+            this.valueLabel2.Name = "valueLabel2";
+            this.valueLabel2.Size = new System.Drawing.Size(53, 12);
+            this.valueLabel2.TabIndex = 170;
+            this.valueLabel2.Text = "物料编号";
+            // 
+            // valueLabel1
+            // 
+            this.valueLabel1.AutoSize = true;
+            this.valueLabel1.CutLength = null;
+            this.valueLabel1.Location = new System.Drawing.Point(84, 112);
+            this.valueLabel1.MaximumSize = new System.Drawing.Size(200, 0);
+            this.valueLabel1.Name = "valueLabel1";
+            this.valueLabel1.Size = new System.Drawing.Size(65, 12);
+            this.valueLabel1.TabIndex = 169;
+            this.valueLabel1.Text = "座标图路径";
+            // 
+            // normalButton3
+            // 
+            this.normalButton3.AllPower = null;
+            this.normalButton3.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton3.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.DownImage")));
+            this.normalButton3.Image = null;
+            this.normalButton3.IsShowBorder = true;
+            this.normalButton3.Location = new System.Drawing.Point(86, 158);
+            this.normalButton3.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.MoveImage")));
+            this.normalButton3.Name = "normalButton3";
+            this.normalButton3.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton3.NormalImage")));
+            this.normalButton3.Power = null;
+            this.normalButton3.Size = new System.Drawing.Size(75, 28);
+            this.normalButton3.TabIndex = 167;
+            this.normalButton3.Text = "确认生成";
+            this.normalButton3.UseVisualStyleBackColor = false;
+            this.normalButton3.Click += new System.EventHandler(this.normalButton3_Click);
+            // 
+            // normalButton2
+            // 
+            this.normalButton2.AllPower = null;
+            this.normalButton2.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton2.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.DownImage")));
+            this.normalButton2.Image = null;
+            this.normalButton2.IsShowBorder = true;
+            this.normalButton2.Location = new System.Drawing.Point(513, 112);
+            this.normalButton2.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.MoveImage")));
+            this.normalButton2.Name = "normalButton2";
+            this.normalButton2.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton2.NormalImage")));
+            this.normalButton2.Power = null;
+            this.normalButton2.Size = new System.Drawing.Size(75, 28);
+            this.normalButton2.TabIndex = 166;
+            this.normalButton2.Text = "导入座标图";
+            this.normalButton2.UseVisualStyleBackColor = false;
+            this.normalButton2.Click += new System.EventHandler(this.normalButton2_Click);
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.Caller = null;
+            this.pr_code.Condition = null;
+            this.pr_code.DBTitle = "产品编号查询";
+            this.pr_code.FormName = null;
+            this.pr_code.Location = new System.Drawing.Point(183, 50);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.ReturnData = null;
+            this.pr_code.SelectField = null;
+            this.pr_code.SetValueField = null;
+            this.pr_code.Size = new System.Drawing.Size(160, 21);
+            this.pr_code.TabIndex = 165;
+            this.pr_code.TableName = null;
+            this.pr_code.Tag = "pr_code";
+            this.pr_code.TextBoxEnable = true;
+            // 
+            // RefDes
+            // 
+            this.RefDes.DataPropertyName = "RefDes";
+            this.RefDes.HeaderText = "RefDes";
+            this.RefDes.Name = "RefDes";
+            // 
+            // Layer
+            // 
+            this.Layer.DataPropertyName = "Layer";
+            this.Layer.HeaderText = "Layer";
+            this.Layer.Name = "Layer";
+            // 
+            // Special_SmtLocation
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(692, 527);
+            this.Controls.Add(this.LabelDataGridView);
+            this.Controls.Add(this.valueLabel2);
+            this.Controls.Add(this.valueLabel1);
+            this.Controls.Add(this.textBox1);
+            this.Controls.Add(this.normalButton3);
+            this.Controls.Add(this.normalButton2);
+            this.Controls.Add(this.pr_code);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Special_SmtLocation";
+            this.Tag = "Special!SmtLocation";
+            this.Text = "排位图模板生成";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ValueLabel.ValueLabel valueLabel1;
+        private System.Windows.Forms.TextBox textBox1;
+        private CustomControl.ButtonUtil.NormalButton normalButton3;
+        private CustomControl.ButtonUtil.NormalButton normalButton2;
+        private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
+        private CustomControl.ValueLabel.ValueLabel valueLabel2;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.DataGridView LabelDataGridView;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn RefDes;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Layer;
+    }
+}

+ 149 - 0
UAS_MES_WEIP/FunctionCode/Special/Special_SmtLocation.cs

@@ -0,0 +1,149 @@
+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;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_SmtLocation : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+        DataTable dt = new DataTable();
+        DataTable dbfind;
+        ExcelHandler eh;
+        DataTable dbbom;
+        
+
+        public Special_SmtLocation()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+             eh = new ExcelHandler();
+            dh = SystemInf.dh;
+            pr_code.FormName = Name;
+            pr_code.SetValueField = new string[] { "pr_code" };
+            pr_code.TableName = "product";
+            pr_code.SelectField = "pr_code # 物料编号,pr_detail # 物料名称,pr_kind # 物料种类,pr_spec # 物料规格";
+            pr_code.DbChange += Pr_code_DbChange;
+        }
+
+        private void Pr_code_DbChange(object sender, EventArgs e)
+        {
+            dbfind = pr_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, dbfind);
+        }
+
+        private void normalButton2_Click(object sender, EventArgs e)
+        {
+            DialogResult result = openFileDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                textBox1.Text = openFileDialog1.FileName;
+            }
+        }
+
+        private void normalButton3_Click(object sender, EventArgs e)
+        {
+            if (pr_code.Text == "" || textBox1.Text == "")
+            {
+                MessageBox.Show("产品编号与座标图地址不可为空");
+                return;
+            }
+            dt =  eh.ImportExcel(textBox1.Text, "test");
+            DataTable dta = new DataTable();
+            DataTable dtb = new DataTable();
+
+            dta.Columns.Add("序号", typeof(string));
+            dta.Columns.Add("线别", typeof(string));
+            dta.Columns.Add("产品编号", typeof(string));
+            dta.Columns.Add("设备编号", typeof(string));
+            dta.Columns.Add("站位", typeof(string));
+            dta.Columns.Add("板面", typeof(string));
+            dta.Columns.Add("首选料号", typeof(string));
+            dta.Columns.Add("替代料号", typeof(string));
+            dta.Columns.Add("单位用量", typeof(int));
+
+
+            dtb.Columns.Add("序号", typeof(string));
+            dtb.Columns.Add("线别", typeof(string));
+            dtb.Columns.Add("产品编号", typeof(string));
+            dtb.Columns.Add("设备编号", typeof(string));
+            dtb.Columns.Add("站位", typeof(string));
+            dtb.Columns.Add("板面", typeof(string));
+            dtb.Columns.Add("首选料号", typeof(string));
+            dtb.Columns.Add("替代料号", typeof(string));
+            dtb.Columns.Add("单位用量", typeof(int));
+
+            //for (int i = 0; i < dt.Rows.Count; i++)
+            //{
+            //    MessageBox.Show(dt.Rows[i]["RefDes"].ToString()+":"+ dt.Rows[i]["Layer"].ToString());
+            //}
+            BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
+
+            dbbom = (DataTable)dh.ExecuteSql("select BD_SONCODE, case  when SUBSTR(BD_LOCATION,length(BD_LOCATION)) = ',' then SUBSTR(BD_LOCATION,1,LENGTH(BD_LOCATION)-1) else BD_LOCATION end BD_LOCATION from bomdetail@WP where bd_mothercode = '"+pr_code.Text+"' and bd_location is not null and nvl(bd_usestatus,' ') <>'DISABLE'", "select");
+            for (int i = 0; i < dbbom.Rows.Count; i++)
+            {
+                String[] locationsum = dbbom.Rows[i]["BD_LOCATION"].ToString().Split(',');
+                int A = 0;
+                int B = 0;
+                for (int j = 0; j < locationsum.Length; j++)
+                {
+                    String location = locationsum[j];
+                    DataRow[] dra  =  dt.Select("RefDes = '"+location+ "' and Layer = 'Top'");
+                    DataRow[] drb = dt.Select("RefDes = '" + location + "' and Layer = 'Bottom'");
+                    if (dra.Length > 0)
+                    {
+                        A++;
+                    }
+                    if (drb.Length > 0)
+                    {
+                        B++;
+                    }
+                }
+                if (A > 0)
+                {
+                    DataRow dr = dta.NewRow();
+                    dr[2] = pr_code.Text;
+                    dr[5] = "A";
+                    dr[6] = dbbom.Rows[i]["BD_SONCODE"].ToString();
+                    dr[7] = dbbom.Rows[i]["BD_SONCODE"].ToString();
+                    dr[8] = A;
+                    dta.Rows.Add(dr);
+                }
+                if (B > 0)
+                {
+                    DataRow dr = dtb.NewRow();
+                    dr[2] = pr_code.Text;
+                    dr[5] = "A";
+                    dr[6] = dbbom.Rows[i]["BD_SONCODE"].ToString();
+                    dr[7] = dbbom.Rows[i]["BD_SONCODE"].ToString();
+                    dr[8] = A;
+                    dtb.Rows.Add(dr);
+                }
+            }
+            String filepath;
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                filepath = folderBrowserDialog1.SelectedPath;
+                eh.ExportExcel(dta, filepath,"A");
+                eh.ExportExcel(dtb, filepath,"B");
+                MessageBox.Show("OK");
+            }
+
+
+        }
+    }
+}

+ 209 - 0
UAS_MES_WEIP/FunctionCode/Special/Special_SmtLocation.resx

@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="RefDes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Layer.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>195, 16</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="normalButton3.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="normalButton3.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="normalButton3.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="normalButton2.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="normalButton2.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="normalButton2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 1 - 1
UAS_MES_WEIP/Login.cs

@@ -88,7 +88,7 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.8.0.37)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 14 - 2
UAS_MES_WEIP/Properties/Settings.Designer.cs

@@ -122,12 +122,24 @@ namespace UAS_MES_NEW.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
-            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=\r\n10.8.0.37" +
-            ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=\r\n192.168.1" +
+            ".105)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public bool SMTBIND {
+            get {
+                return ((bool)(this["SMTBIND"]));
+            }
+            set {
+                this["SMTBIND"] = value;
+            }
+        }
     }
 }

+ 4 - 1
UAS_MES_WEIP/Properties/Settings.settings

@@ -28,7 +28,10 @@
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
       <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=
-10.8.0.37)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+192.168.1.105)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+    </Setting>
+    <Setting Name="SMTBIND" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">True</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 10 - 1
UAS_MES_WEIP/UAS_MES_WEIP.csproj

@@ -902,6 +902,12 @@
     <Compile Include="FunctionCode\SMT\SMT_WaringSetting.Designer.cs">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Special\Special_SmtLocation.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Special\Special_SmtLocation.Designer.cs">
+      <DependentUpon>Special_SmtLocation.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_GetBad.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1440,6 +1446,9 @@
     <EmbeddedResource Include="FunctionCode\SMT\SMT_WaringSetting.resx">
       <DependentUpon>SMT_WaringSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Special\Special_SmtLocation.resx">
+      <DependentUpon>Special_SmtLocation.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_GetBad.resx">
       <DependentUpon>Special_GetBad.cs</DependentUpon>
     </EmbeddedResource>
@@ -1512,6 +1521,7 @@
     <EmbeddedResource Include="Main.resx">
       <DependentUpon>Main.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <SubType>Designer</SubType>
@@ -1534,7 +1544,6 @@
     </None>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
   </ItemGroup>
   <ItemGroup>