根据条件改变采购订单明细字段的颜色

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

根据条件改变采购订单明细字段的颜色

通过python注册表单插件实现单据体颜色控制,以采购订单为例 ```python import clr clr.AddReference('mscorlib') from System import * def AfterBindData(e): SetBackColor() def DataChanged(e): if e.Field.Key == "FPRICE": SetBackColor() def SetBackColor(): entity = this.View.BusinessInfo.GetEntity("FPOOrderEntry") entrys = this.View.Model.GetEntityDataObject(entity) grid = this.View.GetControl(entity.Key) for entry in entrys: rowIndex = this.View.Model.GetRowIndex(entity, entry) if entry["PRICE"] < 10: grid.SetRowBackcolor("#FFFF00",rowIndex)#设置整行颜色 if entry["PRICE"] > 10: grid.SetRowBackcolor("#FFCCCC",rowIndex) if entry["PRICE"] == 10: grid.SetBackcolor("FPrice","#FFCCCC",rowIndex)#设置单元格颜色 ``` **其他更多文章入口:**[https://vip.kingdee.com/link/s/lbRPP](https://vip.kingdee.com/link/s/lbRPP)

根据条件改变采购订单明细字段的颜色

通过python注册表单插件实现单据体颜色控制,以采购订单为例```pythonimport clrclr.AddReference('mscorlib')from System import *def...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息