Python单价检测
import clr clr.AddReference("System") clr.AddReference("Kingdee.BOS") clr.AddReference("Kingdee.BOS.Core") clr.AddReference("Kingdee.BOS.Contracts") from Kingdee.BOS import * from Kingdee.BOS.Core import * from System import * from System.ComponentModel import * from System.Collections.Generic import * from System.Text import * from Kingdee.BOS.Util import * def AfterBarItemClick(e): if e.BarItemKey == "djjc": SetBackColor() def SetBackColor(): row_count = this.Model.GetEntryRowCount("FPOOrderEntry") if row_count <= 0: return back_color_0 = "#FF4500" back_color_1 = "#3CB371" entity = this.View.BusinessInfo.GetEntity("FPOOrderEntry") entrys = this.View.Model.GetEntityDataObject(entity) grid = this.View.GetControl(entity.Key) i = 0 for entry in entrys: rowIndex = this.View.Model.GetRowIndex(entity, entry) price = this.View.Model.GetValue("FTaxPrice", rowIndex) price1 = this.View.Model.GetValue("F_XVKJ_ndpj", rowIndex) try: price1_value = float(price1) except ValueError: price1_value = 0.0 if float(price) > price1_value and price1_value > 0: grid.SetBackcolor("FTaxPrice", back_color_0, rowIndex) i += 1 else: grid.SetBackcolor("FTaxPrice", back_color_1, rowIndex) if i > 0: this.View.ShowNotificationMessage("检测出有" + str(i) + "记录超出均价")
Python单价检测
本文2024-09-16 17:43:31发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-17546.html