单价检测Python

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

单价检测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

方便审批人进行快速查看单价是否超过均价。import clr clr.AddReference("System") clr.AddReference("Kingdee.BOS") clr.AddReference("Ki...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息