单据列表干预数据显示,增加Python版本原创
4人赞赏了该文章
125次浏览
编辑于2024年09月29日 15:47:08
修改为Python版本
# 引入clr运行库 import clr # 添加对cloud插件开发的常用组件的引用 clr.AddReference('System') clr.AddReference('System.IO') clr.AddReference('System.Xml') clr.AddReference('System.Data') clr.AddReference('Kingdee.BOS') clr.AddReference('Kingdee.BOS.Core') clr.AddReference('Kingdee.BOS.App') clr.AddReference('Kingdee.BOS.ServiceHelper') clr.AddReference("NPOI") clr.AddReference("NPOI.OOXML") clr.AddReference("NPOI.OpenXml4Net") clr.AddReference("NPOI.OpenXmlFormats") # 导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入) from Kingdee.BOS import * from Kingdee.BOS.Core import * from Kingdee.BOS.Core.Bill import * from Kingdee.BOS.Core.DependencyRules import * from Kingdee.BOS.Core.DynamicForm.PlugIn import * from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import * from Kingdee.BOS.Core.DynamicForm import * from Kingdee.BOS.Core.DynamicForm.PlugIn import * from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import * from Kingdee.BOS.Core.Metadata.EntityElement import * from Kingdee.BOS.Core.Metadata.FieldElement import * from Kingdee.BOS.Orm.DataEntity import * from Kingdee.BOS.KDThread import * from Kingdee.BOS.App.Data import * from Kingdee.BOS.ServiceHelper import * from Kingdee.BOS.JSON import * from Kingdee.BOS.Util import * from NPOI.SS.UserModel import * from NPOI.XSSF.UserModel import * from NPOI.HSSF.UserModel import * from NPOI.OpenXmlFormats.Spreadsheet import * from NPOI.OpenXml4Net.Util import * from System import * from System.IO import * from System.Data import * from System.Collections import * from System.Collections.Generic import * from System.ComponentModel import * from System.Xml import XmlDocument, XmlNode from System.IO import * from System import * global tempPk tempPk='' def FormatCellValue(e): global tempPk if e.Header.IsHeadField: if e.Header.RealKey in ('F_SCO_Amount_zc5','F_SCO_Decimal_imu','F_SCO_Amount_1xj','F_SCO_Amount_k79'): dr=e.DataRow pkFieldName=this.Model.PkFieldName currPK=dr[pkFieldName].ToString() if tempPk==currPK: e.FormateValue="" tempPk=currPK #this.View.ShowMessage(JsonUtil.Serialize(e.Header.RealKey)) def AfterGetData(): global tempPk tempPk=''
来自金蝶的官方回复。
赞 4
4人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读