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 clrclr.AddReference("System")clr.AddReference("Kingdee.BOS")clr.AddReference("Kingd...
点击下载文档
上一篇:字段下一篇:Python 模拟点击
本文2024-09-16 18:27:38发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-22288.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章