python 单据体批量赋值

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

python 单据体批量赋值

#引入clr运行库
import clr
#添加对cloud插件开发的常用组件的引用
clr.AddReference('System')
clr.AddReference('System.Data')
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.DataEntity')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.App')
clr.AddReference('Kingdee.BOS.App.Core')
clr.AddReference('Kingdee.BOS.ServiceHelper')
#导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入)
from Kingdee.BOS import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DependencyRules import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
from System import *
from System.Data import *
from Kingdee.BOS.App.Data import *
from System.Collections.Generic import List
from Kingdee.BOS.ServiceHelper import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.Core.Metadata.EntityElement import *
from Kingdee.BOS.Core.Metadata.FieldElement import *
from Kingdee.BOS.Orm.DataEntity import *
from Kingdee.BOS.Util import *
from Kingdee.BOS.Log import *
def BarItemClick(e):
	key=e.BarItemKey.ToUpperInvariant();
	if(key=="Button".ToUpperInvariant()):
		orgId=this.Context.CurrentOrganizationInfo.ID;
		this.View.Model.DeleteEntryData("FEntity");
		sql=("""/*dialect*/EXEC CPZ_QT @orgId={0}""").format(orgId);
		doc = DBUtils.ExecuteDynamicObject(this.Context, sql);
		for dr in doc:
			this.View.Model.CreateNewEntryRow("FEntity");
			RowCounts = this.Model.GetEntryRowCount("FEntity");
			this.View.Model.SetValue("FPRODUCTID", str(dr["FMATERIALID"]), RowCounts - 1);
			this.View.InvokeFieldUpdateService("FPRODUCTID", RowCounts - 1);
		this.View.UpdateView();


python 单据体批量赋值

#引入clr运行库import clr#添加对cloud插件开发的常用组件的引用clr.AddReference('System')clr.AddReference('System.Data')clr.AddRefere...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息