From f57b283ccdc35835338c779d5cae2b0289f38029 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 24 七月 2023 08:23:30 +0800
Subject: [PATCH] 桌面版条码出入库记录报表增加按组织过滤,新增网页版条码出入库报表模块调用方法

---
 WebAPI/Controllers/条码管理/WEBSController.cs   |   92 ++++++++++++++++++++++++++++++
 WarM/报表分析/Kf_BarCodeOutInReport.designer.cs |   55 +++++++++++++-----
 WarM/报表分析/Kf_BarCodeOutInReport.cs          |   22 +++++++
 3 files changed, 154 insertions(+), 15 deletions(-)

diff --git "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.cs" "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.cs"
index e2effff..f7a318f 100644
--- "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.cs"
+++ "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.cs"
@@ -35,6 +35,8 @@
             dtpHEDate.Value = DateTime.Today;
             //鍔犺浇鍗曟嵁绫诲瀷淇℃伅
             Sub_AddBillTypeList();
+            //鍔犺浇缁勭粐淇℃伅
+            Sub_AddOrdList();
         }
 
         //鍔犺浇鍗曟嵁绫诲瀷淇℃伅
@@ -54,6 +56,25 @@
                 cmbBillType.Items.Add(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBillTypeName"]));
             }
             cmbBillType.Text = "鍏ㄩ儴";
+        }
+        //鍔犺浇缁勭粐淇℃伅
+        private void Sub_AddOrdList()
+        {
+            DataSet ds;
+            DAL.ClsGy_ORGANIZATIONS_View oClsGy_ORGANIZATIONS_View = new DAL.ClsGy_ORGANIZATIONS_View();
+            ds = oClsGy_ORGANIZATIONS_View.GetList();
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                MessageBox.Show("鑾峰彇缁勭粐澶辫触");
+                return;
+            }
+            cmbHOrgID.Items.Clear();
+            cmbHOrgID.Items.Add("鍏ㄩ儴");
+            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+            {
+                cmbHOrgID.Items.Add(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HName"]));
+            }
+            cmbHOrgID.Text = "鍏ㄩ儴";
         }
 
         //璁剧疆鎶ヨ〃鍚嶇О
@@ -184,6 +205,7 @@
             sDlgWhere = sDlgWhere + ",'" + txtHSPName.Text + "'";
             sDlgWhere = sDlgWhere + ",'" + txtHSourceBillNo.Text + "'";
             sDlgWhere = sDlgWhere + ",'" + txtHMaker.Text + "'";
+            sDlgWhere = sDlgWhere + ",'" + cmbHOrgID.Text + "'";
             if (sDlgWhere.Trim().Length > 0)
             {
                 sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1);
diff --git "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.designer.cs" "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.designer.cs"
index 8c70245..6ce5869 100644
--- "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.designer.cs"
+++ "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Kf_BarCodeOutInReport.designer.cs"
@@ -53,6 +53,7 @@
             this.grdMain = new System.Windows.Forms.DataGridView();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.txtHSourceBillNo = new System.Windows.Forms.TextBox();
+            this.txtHMaker = new System.Windows.Forms.TextBox();
             this.txtHBillNo = new System.Windows.Forms.TextBox();
             this.dtpHBDate = new System.Windows.Forms.DateTimePicker();
             this.cmbBillType = new System.Windows.Forms.ComboBox();
@@ -63,6 +64,7 @@
             this.txtHSPName = new System.Windows.Forms.TextBox();
             this.txtHWHName = new System.Windows.Forms.TextBox();
             this.label9 = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
             this.label8 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.label10 = new System.Windows.Forms.Label();
@@ -72,8 +74,8 @@
             this.label6 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.txtHMaker = new System.Windows.Forms.TextBox();
+            this.cmbHOrgID = new System.Windows.Forms.ComboBox();
+            this.label12 = new System.Windows.Forms.Label();
             this.Tool.SuspendLayout();
             this.pPic.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
@@ -315,6 +317,8 @@
             // groupBox1
             // 
             this.groupBox1.BackColor = System.Drawing.Color.Lavender;
+            this.groupBox1.Controls.Add(this.cmbHOrgID);
+            this.groupBox1.Controls.Add(this.label12);
             this.groupBox1.Controls.Add(this.txtHSourceBillNo);
             this.groupBox1.Controls.Add(this.txtHMaker);
             this.groupBox1.Controls.Add(this.txtHBillNo);
@@ -350,6 +354,13 @@
             this.txtHSourceBillNo.Name = "txtHSourceBillNo";
             this.txtHSourceBillNo.Size = new System.Drawing.Size(122, 21);
             this.txtHSourceBillNo.TabIndex = 69;
+            // 
+            // txtHMaker
+            // 
+            this.txtHMaker.Location = new System.Drawing.Point(804, 40);
+            this.txtHMaker.Name = "txtHMaker";
+            this.txtHMaker.Size = new System.Drawing.Size(122, 21);
+            this.txtHMaker.TabIndex = 67;
             // 
             // txtHBillNo
             // 
@@ -430,6 +441,16 @@
             this.label9.Size = new System.Drawing.Size(65, 12);
             this.label9.TabIndex = 68;
             this.label9.Text = "婧愬崟鍗曞彿锛�";
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.BackColor = System.Drawing.Color.Transparent;
+            this.label11.Location = new System.Drawing.Point(752, 44);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(53, 12);
+            this.label11.TabIndex = 66;
+            this.label11.Text = "鍒跺崟浜猴細";
             // 
             // label8
             // 
@@ -521,22 +542,24 @@
             this.label3.TabIndex = 56;
             this.label3.Text = "浠� 浣嶏細";
             // 
-            // label11
+            // cmbHOrgID
             // 
-            this.label11.AutoSize = true;
-            this.label11.BackColor = System.Drawing.Color.Transparent;
-            this.label11.Location = new System.Drawing.Point(752, 44);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(53, 12);
-            this.label11.TabIndex = 66;
-            this.label11.Text = "鍒跺崟浜猴細";
+            this.cmbHOrgID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbHOrgID.FormattingEnabled = true;
+            this.cmbHOrgID.Location = new System.Drawing.Point(993, 40);
+            this.cmbHOrgID.Name = "cmbHOrgID";
+            this.cmbHOrgID.Size = new System.Drawing.Size(122, 20);
+            this.cmbHOrgID.TabIndex = 87;
             // 
-            // txtHMaker
+            // label12
             // 
-            this.txtHMaker.Location = new System.Drawing.Point(804, 40);
-            this.txtHMaker.Name = "txtHMaker";
-            this.txtHMaker.Size = new System.Drawing.Size(122, 21);
-            this.txtHMaker.TabIndex = 67;
+            this.label12.AutoSize = true;
+            this.label12.ForeColor = System.Drawing.Color.Black;
+            this.label12.Location = new System.Drawing.Point(931, 44);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(65, 12);
+            this.label12.TabIndex = 86;
+            this.label12.Text = "缁�    缁囷細";
             // 
             // Kf_BarCodeOutInReport
             // 
@@ -610,5 +633,7 @@
         private System.Windows.Forms.ToolStripButton dc;
         public System.Windows.Forms.TextBox txtHMaker;
         private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.ComboBox cmbHOrgID;
+        private System.Windows.Forms.Label label12;
     }
 }
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 35da585..1ace6a3 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -2735,5 +2735,97 @@
         #endregion
 
 
+
+
+
+
+        #region 鎶ヨ〃鏁版嵁鑾峰彇鏂规硶
+
+        #region 鏉$爜鍑哄叆搴撹褰曟姤琛�
+
+        #region 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+        /// <summary>
+        /// 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBarCodeReport_BillType_Json")]
+        [HttpGet]
+        public object GetBarCodeReport_BillType_Json()
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeReport_BillType ", "h_p_WMS_BarCodeReport_BillType");
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鍗曟嵁绫诲瀷淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鑾峰彇鏉$爜鍑哄叆搴撹褰�
+        /// <summary>
+        /// 鑾峰彇鏉$爜鍑哄叆搴撹褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_BarCodeOutInReport_Json")]
+        [HttpGet]
+        public object GetKf_BarCodeOutInReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New");
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏉$爜鍑哄叆搴撹褰曚俊鎭け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #endregion
+
+
+        #endregion
+
+
     }
 }

--
Gitblit v1.9.1