动态表单自助修改Python表单插件
用来自主修改一些无关紧要的备注类信息,省的走变更单了。
import clr #添加对cloud插件开发的常用组件的引用 clr.AddReference('System') clr.AddReference('System.Data') clr.AddReference('Kingdee.BOS') clr.AddReference('Kingdee.BOS.Core') clr.AddReference('Kingdee.BOS.App') clr.AddReference('Kingdee.BOS.ServiceHelper') #导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入) from Kingdee.BOS import * from Kingdee.BOS.Util import * from Kingdee.BOS.Core 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 * def AfterBindData(e): this.Model.SetValue('F_xgxm','66912de32826b3'); this.View.GetControl("F_xz").SetFocus(); this.View.UpdateView('F_xgxm'); return; def ButtonClick(e): key=e.Key.ToUpper(); fid=this.View.OpenParameter.GetCustomParameter("DIC"); #this.View.ShowNotificationMessage(str(key)+str(fid)); if(key=="F_BUTTON_QD".ToUpper()): if fid is None:return; xgxm=this.View.Model.GetValue("F_xgxm"); if xgxm is None:return; #tt=JsonUtil.Serialize(xgxm); #this.View.ShowNotificationMessage(tt); colName=xgxm['FNumber']; newValue=this.View.Model.GetValue("F_xz"); if colName=='F_zkl' and newValue is None: newValue='0'; else: newValue="'"+newValue+"'"; sql="update t_PUR_POOrder set "+colName+"="+newValue+" where fid="+str(fid); #this.View.ShowNotificationMessage(fid+newValue+colName+";"+sql); DBUtils.ExecuteScalar(this.Context,sql,None) #this.View.ReturnToParentWindow(fid);#将构建的列表数据返回父页面 this.View.Close();
动态表单自助修改Python表单插件
用来自主修改一些无关紧要的备注类信息,省的走变更单了。import clr#添加对cloud插件开发的常用组件的引用clr.AddReference('System')clr....
点击下载文档
上一篇:车间线边仓的使用方式下一篇:科目余额表核算维度名称显示优化
本文2024-09-16 18:06:31发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-19999.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章