python列表打开动态表单并传递参数到表单页面原创
24人赞赏了该文章
465次浏览
编辑于2024年04月19日 21:27:14
import clr clr.AddReference("System") clr.AddReference("System.Core") clr.AddReference("Kingdee.BOS") clr.AddReference("Kingdee.BOS.App") clr.AddReference("Kingdee.BOS.Core") clr.AddReference("Kingdee.BOS.DataEntity") #引入命名空间 from Kingdee.BOS.Core import* from Kingdee.BOS.Core.Metadata 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.DynamicForm.PlugIn.ControlModel import * from Kingdee.BOS.Orm.DataEntity import * from Kingdee.BOS.Util import * from System import * from System.ComponentModel import * from System.Linq import * def BarItemClick(e): if e.BarItemKey.Equals("tbButton"): fids = '0' if this.ListView.SelectedRowsInfo == None or this.ListView.SelectedRowsInfo.Count == 0: this.View.ShowMessage("没有选择任何数据,请先选择!"); return rows = this.ListView.SelectedRowsInfo ; # 获取选中行 for i in range(len(rows )): fids ="{0}{1}{2}".format(fids,',',a[i].PrimaryKeyValue); dynamicFormShowParameter = DynamicFormShowParameter(); dynamicFormShowParameter.FormId = "FORMID"; dynamicFormShowParameter.OpenStyle.ShowType = ShowType.MainNewTabPage; dynamicFormShowParameter.CustomComplexParams.Add("FIDS", fids); this.View.ShowForm(dynamicFormShowParameter,lambda x: SetModel(x)); return; def SetModel(results): if results is None or results.ReturnData is None: return; allbill = results.ReturnData.ToString(); this.View.ShowMessage(allbill); return;
赞 24
24人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读