Python显示单据体首行过滤原创
金蝶云社区-CQ周玉立
CQ周玉立
17人赞赏了该文章 2597次浏览 未经作者许可,禁止转载编辑于2021年03月12日 15:45:30

在单据中,当单据体行数据太多时,不便于搜索过滤,现在新版本的功能在BOS中已经可以对单据体设置首行过滤,但是子单据体还不支持,通过这个脚本可以添加。

实现方法:

  1. 在BOS中打开需要设置的单据。

  2. 在【表单构建插件】中注册Python脚本。

  3. 修改需要设置首行过滤的单据体标识。


#参考代码

clr.AddReference('System')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.Metadata.EntityElement import *
from System import *
#方法重载
def CreateControl(e):
    if isinstance(e.ControlAppearance, EntryEntityAppearance) and e.ControlAppearance.Key == "FEntryDeliveryPlan":
        e.Control.Put("showFilterRow", True);


赞 17