Python插件根据表单一个字段的不同值,限制辅助资料列表过滤的不同条件原创
6人赞赏了该文章
90次浏览
编辑于2024年08月16日 09:31:31
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);
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);
赞 6
6人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!