From 01024c743a5c20700bf8035ee48c6cdc149ded96 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期二, 04 四月 2023 15:27:08 +0800
Subject: [PATCH] 称重入库模块优化

---
 WarM/条码打印/Kf_WeighToBarCode.cs |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
index 986de11..8c0d3cf 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
@@ -21,7 +21,6 @@
             InitializeComponent();
         }
         public frmBillQueryCondition_New frmCondition;
-        public string ViewName = "Sc_ICMOBillStatus_Tmp";
         public string ModCaption = "绉伴噸鍏ュ簱";
         public const string ModName = "85";
         public Int64 HInterID = 0;
@@ -56,6 +55,7 @@
             cmbHBarCodeType.Items.Clear();
             cmbHBarCodeType.Items.Add("鍞竴鏉$爜");
             DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
+            txtHBarCode.Text = "";
             grdMain.DataSource = null;
             grdSub.DataSource = null;
         }
@@ -65,7 +65,6 @@
         {
             frmCondition = new frmBillQueryCondition_New();
             this.Text = ModCaption;
-            initGrid();
             Sub_GetSystemParameter();
         }
 
@@ -106,6 +105,11 @@
                 HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo);           //寰楀埌鏂板崟鎹甀D
                 HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);    //寰楀埌鏂板崟鎹彿
             }
+            else if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+            {
+                HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo);           //寰楀埌鏂板崟鎹甀D
+                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);    //寰楀埌鏂板崟鎹彿
+            }
             else
             {
                 HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
@@ -130,14 +134,18 @@
             GraphicsGrid();
         }
 
-        private void grdSub_Paint(object sender, PaintEventArgs e)
-        {
-            GraphicsGrid();
-        }
-
         private void GraphicsGrid()
         {
             DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain);
+        }
+
+        private void grdSub_Paint(object sender, PaintEventArgs e)
+        {
+            GraphicsGridSub();
+        }
+
+        private void GraphicsGridSub()
+        {
             DBUtility.Xt_BaseBillFun.GraphicsGrid(grdSub);
         }
 
@@ -592,6 +600,9 @@
                 //鍥炲~鏈�澶ф祦姘村彿
                 oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 ");
 
+                //鍥炲~婧愬崟涓存椂琛℉InterID
+                oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + " from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and convert(varchar(10),a.HMakeDate,120)=convert(varchar(10),getdate(),120)");
+
                 //鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃
                 oCn.RunProc("Insert into KF_PonderationBillMain_Temp " +
                     "(HInterID,HBillNo,HBillType,HMaterID,HAuxPropID,HProcID" +

--
Gitblit v1.9.1