Browse Source

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

caosy 6 years ago
parent
commit
7e9f7df96e

+ 8 - 3
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -2485,7 +2485,7 @@ namespace UAS_LabelMachine
                 Dictionary<string, Dictionary<string, decimal>> outsumqty = new Dictionary<string, Dictionary<string, decimal>>();
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
-                    string pr_spec = dt.Rows[i]["规格型号"].ToString();
+                    string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim();
                     if (pr_spec.Trim() == "")
                     {
                         break;
@@ -2502,7 +2502,7 @@ namespace UAS_LabelMachine
                 for (int i = 0; i < dt1.Rows.Count; i++)
                 {
                     //不包含型号则进行添加
-                    string pr_spec = dt1.Rows[i]["pr_spec"].ToString();
+                    string pr_spec = dt1.Rows[i]["pr_spec"].ToString().Trim();
                     string pd_pdno = dt1.Rows[i]["pd_pdno"].ToString();
                     decimal pd_outqty = decimal.Parse(dt1.Rows[i]["pd_outqty"].ToString());
                     if (!outsumqty.ContainsKey(pr_spec))
@@ -2519,7 +2519,7 @@ namespace UAS_LabelMachine
                 //上一个的最小外箱号,如果箱号没有发生变化则外箱条码也不变化
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
-                    string pr_spec = dt.Rows[i]["规格型号"].ToString();
+                    string pr_spec = dt.Rows[i]["规格型号"].ToString().Trim();
                     if (pr_spec.Trim() == "")
                     {
                         break;
@@ -2534,6 +2534,11 @@ namespace UAS_LabelMachine
                             DateCode = dt.Rows[i]["DC/LOT NO"].ToString().Split('-')[0];
                             LotNo = dt.Rows[i]["DC/LOT NO"].ToString().Split('-')[1];
                         }
+                        else if (dt.Rows[i]["DC/LOT NO"].ToString().IndexOf(" ") > 0)
+                        {
+                            DateCode = dt.Rows[i]["DC/LOT NO"].ToString().Split(' ')[0];
+                            LotNo = dt.Rows[i]["DC/LOT NO"].ToString().Split(' ')[1];
+                        }
                     }
                     if (dt.Columns.Contains("DC") && DateCode == "")
                     {

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

@@ -2463,9 +2463,11 @@ namespace UAS_LabelMachine
                             string LotNo = LabelInf.Rows[i].Cells["pib_lotno"].Value.ToString();
                             string OrderCode = LabelInf.Rows[i].Cells["pr_vendprodcode"].Value.ToString();
                             string custprodcode = LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString();
+                            string brand = LabelInf.Rows[i].Cells["pib_brand"].Value.ToString();
                             //通过接口获取Vivo料盘号
                             //string custbarcode = getPlateID.getCompID(Createcode, "", custprodcode, VenderCode, LotNo, DateCode, amount, OrderCode, "", "").Replace("T-", "");
-                            string custbarcode = BaseUtil.ToDictionary(getPlateID.getCompID_20190403("", custprodcode, VenderCode, "", amount, "新条码", OrderCode, LotNo, DateCode, VenderCode, pwd),"")["return_result"].ToString();
+                            string custbarcode = BaseUtil.ToDictionary(getPlateID.getCompID_20190403("", custprodcode, VenderCode, brand, amount, "新条码", OrderCode, "", "", VenderCode, pwd), "")["return_result"].ToString();
+                            getPlateID.SaveMrn_20190403("", custbarcode, LotNo, DateCode, OrderCode, "", VenderCode, pwd);
                             LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode;
                             //如果下一行的外箱号和当前行不一致
                             bool NextBoxDiff = false;