Browse Source

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

Hcsy 7 years ago
parent
commit
0f9e609609

+ 18 - 2
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -208,7 +208,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        if (oMakeCode == ""||(oMakeCode != "" && oMakeCode != ma_code.Text))
+                        if (oMakeCode == "" || (oMakeCode != "" && oMakeCode == ma_code.Text))
                         {
                             oMakeCode = ma_code.Text;
                         }
@@ -241,17 +241,33 @@ namespace UAS_MES.Make
                                 LockMakeCode.Checked = true;
                             }
                         }
-                        dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
+                        dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_craftcode,ms_prodcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
                         string status = dt.Rows[0]["ms_status"].ToString();
                         reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
                         string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
                         string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
+                        string craftcode = dt.Rows[0]["ms_craftcode"].ToString();
+                        string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
                         if (sncode != ms_sncode.Text)
                         {
                             OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
                             return;
                         }
+                        //判断是否是序列号转换工序,如果有导入号段则不允许直接良品过站
+                        if (dh.getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid", "cd_ifsnchange", "cr_code='" + craftcode + "' and cr_prodcode='" + prodcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString() != "0")
+                        {
+                            if (dh.getRowCount("Makeaddresslist", "mal_makecode='" + oMakeCode + "'") > 0)
+                            {
+                                OperateResult.AppendText(">>工单导入烧写信息,不允许直接良品过站\n", Color.Red, ms_sncode);
+                                return;
+                            }
+                            if (dh.getRowCount("makeimeilist", "mil_makecode='" + oMakeCode + "'") > 0)
+                            {
+                                OperateResult.AppendText(">>工单导入烧写信息,不允许直接良品过站\n", Color.Red, ms_sncode);
+                                return;
+                            }
+                        }
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         if (GoodProduct.Checked)
                         {

+ 7 - 6
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -1575,6 +1575,7 @@
             this.pib_madein.DataPropertyName = "pib_madein";
             this.pib_madein.HeaderText = "产地";
             this.pib_madein.Name = "pib_madein";
+            this.pib_madein.Visible = false;
             this.pib_madein.Width = 54;
             // 
             // pib_lotno
@@ -1722,20 +1723,20 @@
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
-            this.CollectionProcess.ResumeLayout(false);
+            this.CollectionProcess.ResumeLayout(true);
             this.CollectionProcess.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).EndInit();
-            this.SingleLabel.ResumeLayout(false);
+            this.SingleLabel.ResumeLayout(true);
             this.SingleLabel.PerformLayout();
-            this.MidLabel.ResumeLayout(false);
+            this.MidLabel.ResumeLayout(true);
             this.MidLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.MidBoxCapacity)).EndInit();
-            this.OutBoxLabel.ResumeLayout(false);
+            this.OutBoxLabel.ResumeLayout(true);
             this.OutBoxLabel.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.OutboxCapacity)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

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

@@ -11,7 +11,6 @@ using LabelManager2;
 using UAS_LabelMachine.PublicMethod;
 using UAS_LabelMachine.Entity;
 using UAS_特殊解析规则;
-using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 using UAS_LabelMachine.PublicForm;
 using System.Threading;
 using System.IO;
@@ -207,6 +206,7 @@ namespace UAS_LabelMachine
                 pib_datecode1.Visible = true;
                 SingleLabelAutoPrint.Checked = true;
                 MidLabelAutoPrint.Checked = true;
+                pib_madein.Visible = true;
             }
             if (!(DataHelper.DBConnectionString.Contains("richwell") || DataHelper.DBConnectionString.Contains("192.168.0.88")))
             {
@@ -1028,6 +1028,8 @@ namespace UAS_LabelMachine
             OutBoxCombox.DisplayMember = "cl_labelname";
             OutBoxCombox.ValueMember = "la_id";
             OutBoxCombox.DataSource = dt;
+            if (OutBoxDoc != null)
+                OutBoxDoc.Close();
             if (!GetGridOnly.Checked)
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
@@ -1040,8 +1042,6 @@ namespace UAS_LabelMachine
                 }
             if (OutBoxCombox.Text != "")
             {
-                if (OutBoxDoc != null)
-                    OutBoxDoc.Close();
                 OutBoxDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + OutBoxCombox.Text);
             }
             ComBoxClickChangeLabelDoc = true;
@@ -1214,6 +1214,11 @@ namespace UAS_LabelMachine
                                     if (LabelInf.Rows[i].Cells["pib_madein"].Value != null)
                                         SingleDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[i].Cells["pib_madein"].Value.ToString();
                                 }
+                                else if (SingleDoc.Variables.FreeVariables.Item(j + 1).Name.ToLower().Contains("pib_cusbarcode"))
+                                {
+                                    if (LabelInf.Rows[i].Cells["pib_cusbarcode"].Value != null)
+                                        SingleDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[i].Cells["pib_cusbarcode"].Value.ToString();
+                                }
                                 else if (arg.Contains(SingleDoc.Variables.FreeVariables.Item(j + 1).Name))
                                     SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dr[0][SingleDoc.Variables.FreeVariables.Item(j + 1).Name].ToString();
                                 ParamLog.AppendLine("pib_id:" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",SingleDoc打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
@@ -2403,8 +2408,8 @@ namespace UAS_LabelMachine
                             string OrderCode = LabelInf.Rows[i].Cells["pr_vendprodcode"].Value.ToString();
                             string custprodcode = LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString();
                             //通过接口获取Vivo料盘号
-                            string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "");
-                            LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode.Replace("T-", "");
+                            string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
+                            LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode;
                             //如果下一行的外箱号和当前行不一致
                             bool NextBoxDiff = false;
                             //通过接口维护料盘和外箱关系,需要根据箱内容量计算