BOS运行时-批量过滤条件表格-插件过滤条件
1.列表的过滤页面包含普通条件过滤和高级过滤,高级过滤是一个整体控件,这个控件过滤有多种组合方式,对应BOS IDE控件如下:
2.高级过滤设置过滤条件参考如下代码:
此代码演示了点击按钮时,设置单据编号字段批量属性:
using Kingdee.BOS.Core.CommonFilter; using Kingdee.BOS.Core.DynamicForm.PlugIn; using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel; using Kingdee.BOS.Core.ListFilter; using Kingdee.BOS.JSON; using Kingdee.BOS.Util; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Cloud.BOS.Support.Filter { [HotUpdate] [Description("高级过滤控件设置条件")] public class BatchFilterSetPlugin : AbstractListFilterPlugIn { public override void TreeNodeClick(TreeNodeArgs e) { SetBatchFilter(); } public override void ButtonClick(ButtonClickEventArgs e) { if (e.Key.EqualsIgnoreCase("F_PIGM_Button")) { SetBatchFilter(); } } private void SetBatchFilter() { JSONObject obj = new JSONObject(); obj.Add("MakeUpType", "Column"); //列组合,行组合用Row obj.Add("Source", this.GetFilterRows()); var baseBatchFilterGrid =this.View.GetControl(CommonFilterConst.ControlKey_BatchFilterGrid); if (baseBatchFilterGrid != null) { BatchFilterGrid batchFilterGrid = baseBatchFilterGrid as BatchFilterGrid; // 公共过滤可能没有这些面板,需要增加判断 batchFilterGrid.SetFilterRowsWithMakeUpType(obj); } } private JSONArray GetFilterRows() { JSONArray rows = new JSONArray(); rows.Add(FilterRows()); return rows; } public JSONObject FilterRows() { JSONObject o = new JSONObject(); o.Put("FieldName", "FBillNo"); o.Put("Value", "[\"NO1\",\"NO2\",\"NO3\"]"); o.Put("Logic", 0); return o; } } }
3.点击按钮设置高级过滤效果如下:
BOS运行时-批量过滤条件表格-插件过滤条件
1.列表的过滤页面包含普通条件过滤和高级过滤,高级过滤是一个整体控件,这个控件过滤有多种组合方式,对应BOS IDE控件如下:2.高级过滤设...
点击下载文档
本文2024-09-16 18:22:13发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-21694.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章