采购订单列表根据条件设置行背景色

 

 方式一:通过Python脚本实现

 

import clr 
clr.AddReference('System')
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('System.Drawing')
clr.AddReference('System.Collections')

from System import *
from System.Collections import *
from System.Collections.Generic import *
from Kingdee.BOS import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.Metadata import FormatCondition
from System.Drawing import *

def OnFormatRowConditions(args):
  if(args.DataRow.ColumnContains('F_Krystal_PriceStatus') and args.DataRow['F_Krystal_PriceStatus'] is not None):
    if(args.DataRow['F_Krystal_PriceStatus']!='B'):
      fc = FormatCondition()
      fc.ApplayRow = True
      fc.BackColor = "#FF0000"
      args.FormatConditions.Add(fc)
View Code

 

 

方式二:设置列表条件格式

 

重启开发环境

 

posted @ 2024-08-06 13:53  lanrenka  阅读(12)  评论(0编辑  收藏  举报