From 96bca0db0b7298f1e5a8510e3f657c2460276003 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期三, 18 九月 2024 10:15:22 +0800
Subject: [PATCH] 导入任务1

---
 WarM/条码打印/Gy_BarCodeBill_New.cs |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_New.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_New.cs"
index fb259d0..36353ba 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_New.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_New.cs"
@@ -615,9 +615,18 @@
                 DateTime HEndDate;              //璁″垝瀹屽伐鏃ユ湡
 
                 oCn.BeginTran();
+                Application.DoEvents();
+                //鑾峰彇鍚屼竴鎵圭敓鎴愭潯鐮佹�荤鏁�
                 for (int j = 0; j < grdMain.Rows.Count; j++)
                 {
-                    Application.DoEvents();
+                    if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0)
+                    {
+                        HSumBQty = HSumBQty + ClsPub.isInt(grdMain.Rows[j].Cells[HBQtyCol].Value);
+                        pb1.Maximum = HSumBQty;
+                    }
+                }
+                for (int j = 0; j < grdMain.Rows.Count; j++)
+                {
                     if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0)
                     {
                         sMaterID = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterIDCol].Value);
@@ -677,12 +686,10 @@
                         HBQty = ClsPub.isLong(grdMain.Rows[j].Cells[HBQtyCol].Value);
                         HMinQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value);
                         HSumQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value);
-                        HSumBQty = HSumBQty + ClsPub.isInt(grdMain.Rows[j].Cells[HBQtyCol].Value);
-                        pb1.Maximum = HSumBQty;
 
+                        int nn = 0;     //鏈娴佹按鍙风疮璁′娇鐢ㄤ釜鏁�
                         for (int i = 0; i < HBQty; i++)
                         {
-                            pb1.Value = n+1;
                             if (HSumQty - HMinQty > 0)
                             {
                                 HEndQty = "";
@@ -808,9 +815,12 @@
                                     + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HSeOrderBillNo + "'," + HSeOrderSEQ.ToString() + ",'" + HInnerBillNo + "','" + HWorkLineName + "'"
                                     + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HEndDate.ToShortDateString() + "','" + ClsPub.CurUserName + "',getdate()" +
                                     ")");
+                            pb1.Value = n + 1;
                             n = n + 1;
-                            Application.DoEvents();
+                            nn = nn + 1;
                         }
+                        //鍥炲~娴佹按鍙蜂俊鎭�
+                        oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "'," + nn.ToString() + " ");
                     }
                 }
                 oCn.Commit();

--
Gitblit v1.9.1