Python插件根据表单一个字段的不同值,限制辅助资料列表过滤的不同条件

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

Python插件根据表单一个字段的不同值,限制辅助资料列表过滤的不同条件

import clr
clr.AddReference('mscorlib')
clr.AddReference('Kingdee.BOS.Core')
from System import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import *
from Kingdee.BOS.Util import *

def BeforeF7Select(e):
    if (e.FieldKey.Equals("FReturnReason", StringComparison.OrdinalIgnoreCase)):
        if this.View.Model.GetValue("FReturnType") is None:
            return
        #取得界面上字段的值
        tllx = str(this.Model.GetValue("FReturnType"))
        # 增加辅助资料列表快捷过滤
        if tllx == '1':
            tlyy = "FNumber in ('TLYY01_SYS','TLYY02_SYS','TLYY03_SYS')"
        elif tllx == '2':
            tlyy = "FNumber in ('1')"
        #elif tllx == '3':
             #tlyy = "FNumber in ('001')"
        else:
             tlyy = ""
        #this.View.ShowMessage(kjgl)
        e.ListFilterParameter.Filter = StringUtils.JoinFilterString(e.ListFilterParameter.Filter, tlyy);

Python插件根据表单一个字段的不同值,限制辅助资料列表过滤的不同条件

import clrclr.AddReference('mscorlib')clr.AddReference('Kingdee.BOS.Core')from System import *from Kingdee.BOS.Core.DynamicFo...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息