#引入clr运行库
import clr
#添加对cloud插件开发的常用组件的引用
clr.AddReference('System')
clr.AddReference('System.Data')
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.App')
clr.AddReference('Kingdee.BOS.ServiceHelper')
#导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入)
from Kingdee.BOS import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
from Kingdee.BOS.Core.List import*
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Core.SqlBuilder import *
from Kingdee.BOS.Core.Metadata import *
from System import *
from System.Data import *
from Kingdee.BOS.App.Data import *
from System.Collections.Generic import List
from Kingdee.BOS.ServiceHelper import *
def OnFormatRowConditions(args):
if(args.DataRow.ColumnContains("FRealProcessStartTime")):
dateStr=str(args.DataRow["FRealProcessStartTime"]);
if(len(str(args.DataRow["FRealProcessStartTime"]))>0):
if(args.DataRow.ColumnContains("FOperStatus")):
if(str(args.DataRow["FOperStatus"])=="4"):
if(DateTime.Now.Subtract(Convert.ToDateTime(args.DataRow["FRealProcessStartTime"])).Days > 3):
fc=FormatCondition();
fc.ForeColor="#000000";
fc.BackColor="#f79646";
args.FormatConditions.Add(fc);
推荐阅读