Browse Source

错误提示数据

callm 6 years ago
parent
commit
a04db6bc60
1 changed files with 9 additions and 7 deletions
  1. 9 7
      UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

+ 9 - 7
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

@@ -192,7 +192,7 @@ namespace UAS_LabelMachine
             }
             catch (Exception ex)
             {
-                MessageLog.AppendText(ex.Message);
+                MessageLog.AppendText("前端扫描" + ex.Message + "\n");
             }
             try
             {
@@ -213,7 +213,7 @@ namespace UAS_LabelMachine
             }
             catch (Exception ex)
             {
-                MessageLog.AppendText(ex.Message);
+                MessageLog.AppendText("后端扫描" + ex.Message + "\n");
             }
             try
             {
@@ -239,7 +239,7 @@ namespace UAS_LabelMachine
             }
             catch (Exception ex)
             {
-                MessageLog.AppendText(ex.Message);
+                MessageLog.AppendText("自动贴标机" + ex.Message + "\n");
             }
             try
             {
@@ -266,7 +266,7 @@ namespace UAS_LabelMachine
             }
             catch (Exception ex)
             {
-                MessageLog.AppendText(ex.Message);
+                MessageLog.AppendText("手动后端复核" + ex.Message + "\n");
             }
             RefreshPLCInstruct();
         }
@@ -484,7 +484,7 @@ namespace UAS_LabelMachine
                                         }
                                         else if (CheckType == "BackCheck")
                                         {
-                                            sql += " and pib_ifrecheck=0 and " + (prodcodeback.Text == "" ? "pr_orispeccode" : prodcodeback.Text)+ "='" + PN + "'";
+                                            sql += " and pib_ifrecheck=0 and " + (prodcodeback.Text == "" ? "pr_orispeccode" : prodcodeback.Text) + "='" + PN + "'";
                                         }
                                         DataTable pndt = (DataTable)adh.ExecuteSql(sql, "select");
                                         if (pndt.Rows[0][0].ToString() != "")
@@ -629,7 +629,7 @@ namespace UAS_LabelMachine
                         //直接验证两个值相等
                         if (Equal.Checked)
                         {
-                            pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and "+(guestlabeldata.Text==""? "pd_custprodcode": guestlabeldata.Text) +"='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
+                            pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and " + (guestlabeldata.Text == "" ? "pd_custprodcode" : guestlabeldata.Text) + "='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
                             if (pibid != "")
                             {
                                 pibid1 = pibid;
@@ -647,7 +647,7 @@ namespace UAS_LabelMachine
                                 {
                                     if (LabelInf.Rows[CurrentRowIndex].Cells[(guestlabeldata.Text == "" ? "pd_custprodcode" : guestlabeldata.Text)].Value.ToString() == matchs1.Groups[re.GroupNumberFromName(groupName)].Value)
                                     {
-                                        pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and "+ (guestlabeldata.Text == "" ? "pd_custprodcode" : guestlabeldata.Text) + "='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
+                                        pibid = back_adh.getFieldDataByCondition("prodiobarcode", "min(pib_id)", "pib_inoutno='" + pi_inoutno.Text + "' and " + (guestlabeldata.Text == "" ? "pd_custprodcode" : guestlabeldata.Text) + "='" + msgArr[i] + "' and pib_ifrecheck=0").ToString();
                                         if (pibid != "")
                                         {
                                             pibid1 = pibid;
@@ -2194,6 +2194,7 @@ namespace UAS_LabelMachine
 
         private void UploadData_Click(object sender, EventArgs e)
         {
+            adh.ExecuteSql("update prodiobarcode set pib_ifpick=0,pib_ifprint=0,pib_ifmodify=0 where pib_inoutno='" + pi_inoutno.Text + "' and pib_ifrecheck=0", "update");
             if (LogicHandler.CheckUploadData(pi_inoutno.Text))
             {
                 DataTable dtt = LabelInf.DataSource as DataTable;
@@ -2210,6 +2211,7 @@ namespace UAS_LabelMachine
             {
                 MessageLog.AppendText(">>无可上传数据\n", Color.Red);
             }
+            LoadGridData();
         }
 
         private void DocRefresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)