根据采购员过滤采购组
根据采购员过滤采购组需要通过插件实现,注册python脚本重写BeforeF7Select事件
```python
import clr
clr.AddReference('mscorlib')
from System import *
def BeforeF7Select(e):
if e.FieldKey=="FPURCHASERGROUPID":#采购组字段标识
purchaser = this.View.Model.GetValue("FPURCHASERID")#采购员字段标识
f = " FIsUse='1' "
if purchaser != None and purchaser["Id"] > 0 :
f += """And FENTRYID IN (SELECT tod.FOPERATORGROUPID FROM T_BD_OPERATORENTRY toe
INNER JOIN T_BD_OPERATORDETAILS tod ON tod.FENTRYID = toe.FENTRYID
WHERE toe.FENTRYID = {0})""".format(purchaser["Id"])
if e.ListFilterParameter.Filter == "":
e.ListFilterParameter.Filter = f
else:
e.ListFilterParameter.Filter += " AND " + f
```
有报错的话尝试去掉注释
**其他更多文章入口:**[https://wenku.my7c.com/link/s/lbRPP](https://wenku.my7c.com/link/s/lbRPP)
根据采购员过滤采购组
根据采购员过滤采购组需要通过插件实现,注册python脚本重写BeforeF7Select事件```pythonimport clrclr.AddReference('mscorlib')from Sy...
点击下载文档
本文2024-09-16 19:02:49发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-26049.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章