pzy
2024-09-18 96bca0db0b7298f1e5a8510e3f657c2460276003
WarM/ÌõÂë´òÓ¡/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();