From cccafa42039b6fca001908b5e2aed4d0d1d9c0e3 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期三, 23 二月 2022 14:46:48 +0800
Subject: [PATCH] 条码生成模块,选择源单收料通知单时增加获取销售订单号、销售订单行号,并写入条码档案表中

---
 WarM/条码打印/Gy_BarCodeBill.cs |   69 +++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 30 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index c6b008e..bf698e8 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -67,19 +67,20 @@
         public const Int16 HInstructNoCol = 46;
         public const Int16 HSeOrderBillIDCol = 47;
         public const Int16 HSeOrderBillNoCol = 48;
-        public const Int16 HWhIDCol = 49;
-        public const Int16 HWhNumberCol = 50;
-        public const Int16 HWhNameCol = 51;
-        public const Int16 HSPIDCol = 52;
-        public const Int16 HSPNumberCol = 53;
-        public const Int16 HSPNameCol = 54;
-        public const Int16 HinitQtyCol = 55;
-        public const Int16 HRemarkCol = 56;
-        public const Int16 HPinfanBarCodeCol = 57;
-        public const Int16 HMTONoCol = 58;
-        public const Int16 HShowDateCol = 59;
-        public const Int16 HInnerBillNoCol = 60;
-        public const Int16 HMakerCol = 61;
+        public const Int16 HSeOrderSEQCol = 49;
+        public const Int16 HWhIDCol = 50;
+        public const Int16 HWhNumberCol = 51;
+        public const Int16 HWhNameCol = 52;
+        public const Int16 HSPIDCol = 53;
+        public const Int16 HSPNumberCol = 54;
+        public const Int16 HSPNameCol = 55;
+        public const Int16 HinitQtyCol = 56;
+        public const Int16 HRemarkCol = 57;
+        public const Int16 HPinfanBarCodeCol = 58;
+        public const Int16 HMTONoCol = 59;
+        public const Int16 HShowDateCol = 60;
+        public const Int16 HInnerBillNoCol = 61;
+        public const Int16 HMakerCol = 62;
 
         public Int16 HSelectCol = 0;
         public Int16 HSno2Col = 1;
@@ -127,19 +128,20 @@
         public Int16 HInstructNo2Col = 43;
         public Int16 HSeOrderBillID2Col = 44;
         public Int16 HSeOrderBillNo2Col = 45;
-        public Int16 HWhID2Col = 46;
-        public Int16 HWhNumber2Col = 47;
-        public Int16 HWhName2Col = 48;
-        public Int16 HSPID2Col = 49;
-        public Int16 HSPNumber2Col = 50;
-        public Int16 HSPName2Col = 51;
-        public Int16 HRemark2Col = 52;
-        public Int16 HPinfanBarCode2Col = 53;
-        public Int16 HMTONo2Col = 54;
-        public Int16 HShowDate2Col = 55;
-        public Int16 HInnerBillNo2Col = 56; 
-        public Int16 HMaker2Col = 57;
-        public Int16 HEntryID2Col = 58;
+        public Int16 HSeOrderSEQ2Col = 46;
+        public Int16 HWhID2Col = 47;
+        public Int16 HWhNumber2Col = 48;
+        public Int16 HWhName2Col = 49;
+        public Int16 HSPID2Col = 50;
+        public Int16 HSPNumber2Col = 51;
+        public Int16 HSPName2Col = 52;
+        public Int16 HRemark2Col = 53;
+        public Int16 HPinfanBarCode2Col = 54;
+        public Int16 HMTONo2Col = 55;
+        public Int16 HShowDate2Col = 56;
+        public Int16 HInnerBillNo2Col = 57; 
+        public Int16 HMaker2Col = 58;
+        public Int16 HEntryID2Col = 59;
         //
         public  string ModName = "85";
         public  string ModCaption = "鏉$爜鐢熸垚";
@@ -964,6 +966,7 @@
                         grdSub.Rows[i].Cells[HSourceName2Col].Value = grdMain.Rows[j].Cells[HSourceNameCol].Value;
                         grdSub.Rows[i].Cells[HEndDate2Col].Value = grdMain.Rows[j].Cells[HEndDateCol].Value;
                         grdSub.Rows[i].Cells[HSeOrderBillNo2Col].Value = grdMain.Rows[j].Cells[HSeOrderBillNoCol].Value;
+                        grdSub.Rows[i].Cells[HSeOrderSEQ2Col].Value = grdMain.Rows[j].Cells[HSeOrderSEQCol].Value;
                         grdSub.Rows[i].Cells[HInnerBillNo2Col].Value = grdMain.Rows[j].Cells[HInnerBillNoCol].Value;
                         grdSub.Rows[i].Cells[HMaker2Col].Value = grdMain.Rows[j].Cells[HMakerCol].Value;
                         grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value = grdMain.Rows[j].Cells[HGiveAwayFlagCol].Value;
@@ -1009,6 +1012,7 @@
             DateTime HEndDate;
             string HWorkLineName = "";
             string HSeOrderBillNo = "";
+            Int64 HSeOrderSEQ = 0;
             string HInnerBillNo = "";
             bool HGiveAwayFlag = false;
             Int64 HEntryID = 0;
@@ -1054,6 +1058,7 @@
                         HEndDate = ClsPub.isDate(grdSub.Rows[i].Cells[HEndDate2Col].Value);
                         HWorkLineName = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSourceName2Col].Value);
                         HSeOrderBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSeOrderBillNo2Col].Value);
+                        HSeOrderSEQ = ClsPub.isLong(grdSub.Rows[i].Cells[HSeOrderSEQ2Col].Value);
                         HInnerBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HInnerBillNo2Col].Value);
                         HGiveAwayFlag = ClsPub.isBool(grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value);
                         oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
@@ -1062,7 +1067,7 @@
                                     ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                                     ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
                                     ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
-                                    ",HGiveAwayFlag " +
+                                    ",HGiveAwayFlag,HSeOrderSEQ " +
                                     ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                     ") values ("
                                     + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
@@ -1071,7 +1076,7 @@
                                     + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                                     + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
                                     + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
-                                    + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag)
+                                    + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString()
                                     + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')");
 
 
@@ -1478,7 +1483,7 @@
             //
             grdMain.RowCount = 0;
             grdSub.RowCount = 0;
-            grdMain.ColumnCount = 62;                       //鎬诲垪鏁�
+            grdMain.ColumnCount = 63;                       //鎬诲垪鏁�
             DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
             grdMain.Columns[HSnoCol].HeaderText = "搴忓彿";
             grdMain.Columns[HMainIDCol].HeaderText = "婧愬崟涓籌D";
@@ -1520,6 +1525,7 @@
             grdMain.Columns[HSPNameCol].HeaderText = "浠撲綅";
             grdMain.Columns[HInstructNoCol].HeaderText = "鎸囦护鍗曞彿";
             grdMain.Columns[HSeOrderBillNoCol].HeaderText = "閿�鍞鍗曞彿";
+            grdMain.Columns[HSeOrderSEQCol].HeaderText = "閿�鍞鍗曡鍙�";
             grdMain.Columns[HDateCol].HeaderText = "杩涙枡鏃ユ湡";
             grdMain.Columns[HRemarkCol].HeaderText = "澶囨敞";
             grdMain.Columns[HMTONoCol].HeaderText = "璁″垝璺熻釜鍙�";
@@ -1611,7 +1617,7 @@
             DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol,oSumGrid);
             //----------------------------
 
-            grdSub.ColumnCount = 59;                       //鎬诲垪鏁�
+            grdSub.ColumnCount = 60;                       //鎬诲垪鏁�
             DBUtility.Xt_BaseBillFun.initGridFst(grdSub, this.Name);
             grdSub.Columns[HSelectCol].HeaderText = "閫夋嫨";
             grdSub.Columns[HTMCol].HeaderText = "鏉$爜缂栧彿";
@@ -1640,6 +1646,7 @@
             grdSub.Columns[HSourceBillNo2Col].HeaderText = "婧愬崟鍗曞彿";
             grdSub.Columns[HSourceBillType2Col].HeaderText = "婧愬崟绫诲瀷";
             grdSub.Columns[HSeOrderBillNo2Col].HeaderText = "閿�鍞鍗曞彿";
+            grdSub.Columns[HSeOrderSEQ2Col].HeaderText = "閿�鍞鍗曡鍙�";
             grdSub.Columns[HBarcodeNoCol].HeaderText = "鎵樺彿";
             grdSub.Columns[HBarcodeQtysCol].HeaderText = "鎬绘墭鏁�";
             grdSub.Columns[HSupID2Col].HeaderText = "渚涘簲鍟咺D";
@@ -2459,6 +2466,8 @@
                     {
                         grdMain.Rows[i].Cells[HGiveAwayFlagCol].Value = 0;
                     }
+                    grdMain.Rows[i].Cells[HSeOrderBillNoCol].Value = oTable.Rows[0]["閿�鍞鍗曞彿"].ToString();
+                    grdMain.Rows[i].Cells[HSeOrderSEQCol].Value = oTable.Rows[0]["閿�鍞鍗曡鍙�"].ToString();
                 }
 
             }

--
Gitblit v1.9.1