callm 4 лет назад
Родитель
Сommit
538526c348
1 измененных файлов с 11 добавлено и 6 удалено
  1. 11 6
      UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

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

@@ -1343,7 +1343,7 @@ namespace UAS_LabelMachine
                 {
                     dh.BatchInsert("delete from prodiobarcode where pib_id=:pib_id", new string[] { "pib_id" }, DeleteID.ToArray());
                     dh.UpdateByCondition("CS$InoutPrcode", "collectednum=(select nvl(sum(pib_qty),0) from prodiobarcode where pib_inoutno=pd_inoutno and pib_pdno=pd_pdno)", "pd_inoutno='" + pi_inoutno.Text + "'");
-                    dh.UpdateByCondition("CS$InoutPrcode", "checknum=CollectedNum/pjd_zxbzs_user", "pd_inoutno='" + pi_inoutno.Text + "'");
+                    //dh.UpdateByCondition("CS$InoutPrcode", "checknum=CollectedNum/pjd_zxbzs_user", "pd_inoutno='" + pi_inoutno.Text + "'");
 
                     LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "删除明细", "删除明细成功");
                     MessageBox.Show("删除成功", "提示");
@@ -1900,11 +1900,16 @@ namespace UAS_LabelMachine
             string ID = GridPrcode.Rows[e.RowIndex].Cells["pjd_id"].Value.ToString();
             string checknum = GridPrcode.Rows[e.RowIndex].Cells["checknum"].Value.ToString();
             string pdno = GridPrcode.Rows[e.RowIndex].Cells["pd_pdno"].Value.ToString();
-
-            dh.UpdateByCondition("PRODJOINVENDDETAIL", "pjd_zxbzs_user='" + Value + "'", "pjd_id='" + ID + "'");
-            dh.UpdateByCondition("CS$INOUTPRCODE", "pjd_zxbzs_user='" + Value + "'", "pjd_id='" + ID + "' and pd_inoutno='" + pi_inoutno.Text + "'");
-            //更新复核数据
-            dh.UpdateByCondition("CS$InoutPrcode", "checknum='" + checknum + "'", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined);
+            if (GridPrcode.Columns[e.ColumnIndex].Name == "pjd_zxbzs_user")
+            {
+                dh.UpdateByCondition("PRODJOINVENDDETAIL", "pjd_zxbzs_user='" + Value + "'", "pjd_id='" + ID + "'");
+                dh.UpdateByCondition("CS$INOUTPRCODE", "pjd_zxbzs_user='" + Value + "'", "pjd_id='" + ID + "' and pd_inoutno='" + pi_inoutno.Text + "'");
+            }
+            if (GridPrcode.Columns[e.ColumnIndex].Name == "checknum")
+            {
+                //更新复核数据
+                dh.UpdateByCondition("CS$InoutPrcode", "checknum='" + checknum + "'", "pd_inoutno='" + pi_inoutno.Text + "' and pd_pdno='" + pdno + "' and combined=" + combined);
+            }
             //删除对应物料的明细
             CurrentPrCode = GridPrcode.Rows[e.RowIndex].Cells["pd_prodcode"].Value.ToString();
             CurrentZXBZ = GridPrcode.Rows[e.RowIndex].Cells["pjd_zxbzs_user"].Value.ToString();