소스 검색

出货单装箱状态更新,删除为0就更新为空

章政 6 년 전
부모
커밋
c58133bbbd
2개의 변경된 파일329개의 추가작업 그리고 204개의 파일을 삭제
  1. 309 195
      UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs
  2. 20 9
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 309 - 195
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs


+ 20 - 9
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -1180,8 +1180,8 @@ namespace UAS_LabelMachine
         {
             if (dh.getFieldDataByCondition("prodinout", "pi_statuscode", "pi_inoutno='" + pi_inoutno.Text + "'").ToString() == "POSTED")
             {
-                MessageBox.Show("单据" + pi_inoutno.Text + "已过账,不允许删除条码");
-                return;
+                //MessageBox.Show("单据" + pi_inoutno.Text + "已过账,不允许删除条码");
+                //return;
             }
             ArrayList<string> DeleteID = new ArrayList<string>();
             for (int i = 0; i < LabelInf.RowCount; i++)
@@ -1202,7 +1202,14 @@ namespace UAS_LabelMachine
                     Input.Clear();
                     LoadPrcodeData();
                     LoadGridData(sender, e);
-                    dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packing'", "pi_inoutno='" + pi_inoutno.Text + "'");
+                    if (int.Parse(dh.getFieldDataByCondition("prodiobarcode", "count(1)", "pib_inoutno='" + pi_inoutno.Text + "'").ToString()) == 0)
+                    {
+                        dh.UpdateByCondition("prodinout", "pi_user_packingstatus=''", "pi_inoutno='" + pi_inoutno.Text + "'");
+                    }
+                    else
+                    {
+                        dh.UpdateByCondition("prodinout", "pi_user_packingstatus='Packing'", "pi_inoutno='" + pi_inoutno.Text + "'");
+                    }
                 }
             }
             else
@@ -1214,11 +1221,14 @@ namespace UAS_LabelMachine
             if (OutBoxCombox.Text != "")
             {
                 Pack_Click(sender, e);
-                //记录整箱的重量
-                sql.Clear();
-                sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
-                sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
-                dh.ExecuteSql(sql.ToString(), "update");
+                if (Weight.Text != "" && Weight.Text != "0.000")
+                {
+                    //记录整箱的重量
+                    sql.Clear();
+                    sql.Append("update prodiobarcode set pib_totalweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
+                    sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "'");
+                    dh.ExecuteSql(sql.ToString(), "update");
+                }
                 LoadGridData(sender, e);
                 thread = new Thread(OutBoxPrint);
                 stw = new SetLoadingWindow(thread, "正在打印外箱");
@@ -2035,6 +2045,7 @@ namespace UAS_LabelMachine
             {
                 dh.ExecuteSql("delete from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "'", "delete");
                 dh.ExecuteSql("delete from CS$InoutPrcode where pd_inoutno='" + pi_inoutno.Text + "'", "delete");
+                dh.UpdateByCondition("prodinout", "pi_user_packingstatus=''", "pi_inoutno='" + pi_inoutno.Text + "'");
                 pi_inoutno_KeyDown(sender, new KeyEventArgs(Keys.Enter));
             }
         }
@@ -2060,7 +2071,7 @@ namespace UAS_LabelMachine
 
         private void ButtonWeigh_Click(object sender, EventArgs e)
         {
-            if (Weight.Text != "")
+            if (Weight.Text != "" && Weight.Text != "0.000")
             {
                 sql.Clear();
                 sql.Append("update prodiobarcode set pib_boxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.