#引入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