桌面版条码出入库记录报表增加按组织过滤,新增网页版条码出入库报表模块调用方法
3个文件已修改
169 ■■■■■ 已修改文件
WarM/报表分析/Kf_BarCodeOutInReport.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/报表分析/Kf_BarCodeOutInReport.designer.cs 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/±¨±í·ÖÎö/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);
WarM/±¨±í·ÖÎö/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;
    }
}
WebAPI/Controllers/ÌõÂë¹ÜÀí/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));  //获取到DataColumn列对象的列名
                    }
                    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
    }
}