python实现不同条件下单据体的颜色不一样,比如直接成本分析表中关闭的细目显示为黄色

#引入clr运行库
import clr
#添加对cloud插件开发的常用组件的引用
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *

def  AfterBindData(e):
     grid = this.View.GetControl[EntryGrid]("FEntity")#需要设置的单据体标识Key   
     rows = this.View.Model.GetEntryRowCount("FEntity")
     fh=0
     for row in range(0,rows):
         fxh=this.View.Model.GetValue("FBILLSTATUS", row)
         if  fxh=='2':
            grid.SetRowBackcolor("#FFFF00", fh)
            grid.Enabled = False
         fh=fh+1
        

原文地址:https://www.cnblogs.com/woshinige/p/11510874.html