Browse Source

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

caosy 6 years ago
parent
commit
1fdeb255a0
1 changed files with 12 additions and 5 deletions
  1. 12 5
      UAS-出货标签管理/UAS_出货标签管理.cs

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

@@ -1142,7 +1142,7 @@ namespace UAS_LabelMachine
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' and pi_invostatus='已审核'");
+                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date from prodinout where pi_inoutno='" + pi_inoutno.Text + "' ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -1530,6 +1530,12 @@ namespace UAS_LabelMachine
         {
             if (SingleLabelCombox.Text != "")
             {
+                if (SingleDoc != null)
+                    SingleDoc.Close();
+                if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
+                {
+                    SingleDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + SingleLabelCombox.Text);
+                }
                 if (SingleBoxBegin.Text != "" || SingleBoxEnd.Text != "")
                 {
                     try
@@ -2446,9 +2452,7 @@ namespace UAS_LabelMachine
             {
                 if (LabelInf.Rows[0].Cells["pib_outboxcode2"].Value != null)
                 {
-                    //Vivo_GetPlateID.Service1SoapClient getPlateID = new Vivo_GetPlateID.Service1SoapClient();
                     Vivo_New_GetPlateID.Service1SoapClient getPlateID = new Vivo_New_GetPlateID.Service1SoapClient();
-                    //Vivo_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_BoxReelRelation.Service1SoapClient();
                     Vivo_New_BoxReelRelation.Service1SoapClient getOutBox = new Vivo_New_BoxReelRelation.Service1SoapClient();
                     string VenderCode = dh.GetConfig("VivoCode", "ProdInOut!Sale").ToString();
                     string CurrentTime = System.DateTime.Now.ToString("yyyyMM");
@@ -2469,8 +2473,7 @@ namespace UAS_LabelMachine
                             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, brand, amount, "新条码", OrderCode, "", "", VenderCode, pwd), "")["return_result"].ToString();
+                            string custbarcode = BaseUtil.ToDictionary(getPlateID.getCompID_20190403("", custprodcode, VenderCode, brand, amount, "新条码", "", "", "", VenderCode, pwd), "")["return_result"].ToString();
                             getPlateID.SaveMrn_20190403("", custbarcode, LotNo, DateCode, OrderCode, "", VenderCode, pwd);
                             LabelInf.Rows[i].Cells["pib_cusbarcode"].Value = custbarcode;
                             //如果下一行的外箱号和当前行不一致
@@ -2498,6 +2501,10 @@ namespace UAS_LabelMachine
                             //获取信息为T-表示成功获取了信息
                             string Message = getOutBox.BindReelToBox(outboxcode, custbarcode, VenderCode, pwd);
                             LabelInf.Rows[i].Cells["pib_cusoutboxcode"].Value = outboxcode;
+                            if (BaseUtil.ToDictionary(Message, "")["return_status"].ToString() != "T")
+                            {
+                                MessageLog.AppendText(BaseUtil.ToDictionary(Message, "")["return_message"].ToString() + "\n");
+                            }
                         }
                     }
                 }