From b90e1b0f2c828bc6c9857bb7a7f520be582acaec Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期五, 23 四月 2021 16:47:32 +0800
Subject: [PATCH] 条码生成模块增加档案列表页签,条码生成完毕后,根据主内码加载条码信息到档案列表页签,并根据此页签进行打印。

---
 SCM/条码打印/Gy_BarCodeBill.cs          |   57 ++++++++++++++++++++++++----
 SCM/条码打印/Gy_BarCodeBill.designer.cs |   48 +++++++++++++++++++++---
 2 files changed, 91 insertions(+), 14 deletions(-)

diff --git "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 5791b22..0d98319 100644
--- "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -236,6 +236,7 @@
             txtHUpDater.Text = "";
             txtHUpDateDate.Text = "";
             initGrid();
+            grdList.DataSource = null;
         }
 
         //淇濆瓨鍒楀
@@ -243,6 +244,7 @@
         {
             DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name);
             DBUtility.Xt_BaseBillFun.SaveGrid(grdSub, this.Name + "grdSub");
+            DBUtility.Xt_BaseBillFun.SaveGrid(grdList, this.Name + "grdList");
         }
 
         //榛樿鍒楀
@@ -250,6 +252,7 @@
         {
             DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name);
             DBUtility.Xt_BaseBillFun.DefaultGridView(grdSub, this.Name + "grdSub");
+            DBUtility.Xt_BaseBillFun.DefaultGridView(grdList, this.Name + "grdList");
         }
 
         //澧炶鎸夐挳  
@@ -268,6 +271,7 @@
         private void bc_Click(object sender, EventArgs e)
         {
             this.Sub_SaveBill();
+            Display();
         }
 
         //閲嶇疆鎸夌航
@@ -1971,7 +1975,7 @@
             }
             else if (CampanyName == "鍥涚淮灏�") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�
             {
-                grdMain.Columns[HBatchNoCol].Visible = false;
+                //grdMain.Columns[HBatchNoCol].Visible = false;
                 grdMain.Columns[HPinfanCol].Visible = true;
                 grdMain.Columns[HAuxPropNumberCol].Visible = true;
                 grdMain.Columns[HAuxPropNameCol].Visible = true;
@@ -2198,8 +2202,40 @@
             DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name);
             DBUtility.Xt_BaseBillFun.GetGrid(grdSub, this.Name + "grdSub");
             grdSub.SelectionMode = DataGridViewSelectionMode.FullRowSelect;                     //閫夎妯″紡
+
+            ////
+            ClsPub1.initGridList(grdList, this.Name + "grdList");
+            ////
         }
-        
+
+        private void Display()
+        {
+            DataSet DSet;
+            //杩囨护鏉′欢  
+            //if (HInterID <= 0)
+            //{
+            //    return;
+            //}
+            //
+            DSet = oWeb.getDataSetBySQL("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString(), "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo);
+            //鐢熸垚棣栬鏍囬
+            if (DSet == null)
+            {
+                MessageBox.Show("娌℃湁杩斿洖浠讳綍缁撴灉,鏉$爜涓嶅瓨鍦紒" + DBUtility.ClsPub.sExeReturnInfo);
+                return;
+            }
+            //
+            grdList.DataSource = DSet.Tables[0].DefaultView;
+            //鍐荤粨
+            int FrCol = 0;
+            string s = "鏄�";
+            ClsPub1.DisplayGrid(grdList, this.Name + "grdList", s, FrCol);
+            //鐢荤嚎
+            //GraphLine();
+
+            // 
+        }
+
         //鍏紡閲嶇畻
         private void RowCount(int sRow, int sTag)
         {
@@ -3112,14 +3148,14 @@
         private void Sub_SetReport(string sOpenTmp)
         {
             //鍒ゆ柇琛屾暟
-            for (int i = 0; i < grdSub.Rows.Count; i++)
+            for (int i = 0; i < grdList.Rows.Count; i++)
             {
-                grdSub.Rows[i].Cells[0].Value = "*";
-                //grdSub.Rows[i].Cells[0].Value = "";
+                grdList.Rows[i].Cells[0].Value = "*";
+                //grdList.Rows[i].Cells[0].Value = "";
             }
-            //for (int i = 0; i < grdSub.SelectedRows.Count; i++)
+            //for (int i = 0; i < grdList.SelectedRows.Count; i++)
             //{
-            //    grdSub.Rows[grdSub.SelectedRows[i].Index].Cells[0].Value = "*";
+            //    grdList.Rows[grdList.SelectedRows[i].Index].Cells[0].Value = "*";
             //}
             //
             Report = new GridppReport();
@@ -3151,12 +3187,17 @@
             }
         }
 
+        private Int32 Fun_GetCol(string sCol)
+        {
+            return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdList);
+        }
         private void ReportFetchRecordByDataTable()
         {
             try
             {
                 DataTable ds = new DataTable();
-                BLL.Utility.FillRecordToReport(Report, grdSub, ds, HMaterIDCol);
+                //BLL.Utility.FillRecordToReport(Report, grdSub, ds, HMaterIDCol);
+                SCM.Utility.FillRecordToReport(Report, grdList, ds, Fun_GetCol("閫夋嫨"));
             }
             catch (Exception e)
             {
diff --git "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs" "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
index bbeff96..10bc73d 100644
--- "a/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
+++ "b/SCM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
@@ -103,6 +103,8 @@
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.tabPage2 = new System.Windows.Forms.TabPage();
             this.grdSub = new System.Windows.Forms.DataGridView();
+            this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.grdList = new System.Windows.Forms.DataGridView();
             this.Tool.SuspendLayout();
             this.P1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit();
@@ -115,6 +117,8 @@
             this.tabPage1.SuspendLayout();
             this.tabPage2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdSub)).BeginInit();
+            this.tabPage3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
             this.SuspendLayout();
             // 
             // Tool
@@ -851,13 +855,13 @@
             this.grdMain.RowTemplate.Height = 23;
             this.grdMain.Size = new System.Drawing.Size(923, 262);
             this.grdMain.TabIndex = 44;
-            this.grdMain.Scroll += new System.Windows.Forms.ScrollEventHandler(this.grdMain_Scroll);
-            this.grdMain.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdMain_CellBeginEdit);
-            this.grdMain.CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellLeave);
-            this.grdMain.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellEndEdit);
             this.grdMain.RowHeadersWidthChanged += new System.EventHandler(this.grdMain_RowHeadersWidthChanged);
-            this.grdMain.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdMain_EditingControlShowing);
+            this.grdMain.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdMain_CellBeginEdit);
+            this.grdMain.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellEndEdit);
+            this.grdMain.CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdMain_CellLeave);
             this.grdMain.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.grdMain_ColumnWidthChanged);
+            this.grdMain.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdMain_EditingControlShowing);
+            this.grdMain.Scroll += new System.Windows.Forms.ScrollEventHandler(this.grdMain_Scroll);
             // 
             // grdSum
             // 
@@ -888,6 +892,7 @@
             // 
             this.tabControl1.Controls.Add(this.tabPage1);
             this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Controls.Add(this.tabPage3);
             this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.tabControl1.Location = new System.Drawing.Point(41, 194);
             this.tabControl1.Name = "tabControl1";
@@ -936,6 +941,33 @@
             this.grdSub.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdSub_CellBeginEdit);
             this.grdSub.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSub_CellEndEdit);
             // 
+            // tabPage3
+            // 
+            this.tabPage3.Controls.Add(this.grdList);
+            this.tabPage3.Location = new System.Drawing.Point(4, 22);
+            this.tabPage3.Name = "tabPage3";
+            this.tabPage3.Size = new System.Drawing.Size(929, 268);
+            this.tabPage3.TabIndex = 2;
+            this.tabPage3.Text = "妗f鍒楄〃";
+            this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // grdList
+            // 
+            this.grdList.AllowUserToAddRows = false;
+            this.grdList.AllowUserToDeleteRows = false;
+            this.grdList.BackgroundColor = System.Drawing.Color.WhiteSmoke;
+            this.grdList.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.grdList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdList.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.grdList.Location = new System.Drawing.Point(0, 0);
+            this.grdList.Name = "grdList";
+            this.grdList.ReadOnly = true;
+            this.grdList.RowHeadersWidth = 30;
+            this.grdList.RowTemplate.Height = 23;
+            this.grdList.Size = new System.Drawing.Size(929, 268);
+            this.grdList.TabIndex = 46;
+            // 
             // Gy_BarCodeBill
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -955,9 +987,9 @@
             this.Name = "Gy_BarCodeBill";
             this.Text = "鍗曟嵁缂栬緫";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Gy_BarCodeBill_FormClosing);
             this.Load += new System.EventHandler(this.Gy_BarCodeBill_Load);
             this.Paint += new System.Windows.Forms.PaintEventHandler(this.Gy_BarCodeBill_Paint);
-            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Gy_BarCodeBill_FormClosing);
             this.Resize += new System.EventHandler(this.Gy_BarCodeBill_Resize);
             this.Tool.ResumeLayout(false);
             this.Tool.PerformLayout();
@@ -975,6 +1007,8 @@
             this.tabPage1.ResumeLayout(false);
             this.tabPage2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.grdSub)).EndInit();
+            this.tabPage3.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -1054,5 +1088,7 @@
         private System.Windows.Forms.ToolStripButton spRow;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
         private System.Windows.Forms.CheckBox chkAddModel;
+        private System.Windows.Forms.TabPage tabPage3;
+        private System.Windows.Forms.DataGridView grdList;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1