简单Python插件 - 点击菜单弹窗动态表单录入数据返回父窗体
# 需求
- 弹出动态表单录入数据表单接收数据
# 准备工作
![1685092825733.webp](/download/010014f96fb65c1b4a24b49d870f94ca66ad.webp)
- 拉入多行文本控件,设置菜单
![image.webp](/download/01005cd1293b4d7144ed960df601e903ac37.webp)
- 添加表单插件
``` python
#动态表单插件
#作者: 老李头(Dean)
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.DynamicForm import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import *
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Orm.DataEntity import *
from Kingdee.BOS.Util import *
from System import *
from System.Collections.Generic import *
from System.ComponentModel import *
#Dean Mindee 文本编辑器插件 - 挂动态表单
#全局变量
def BarItemClick(e):
#如果是变动插入则改变状态
if e.BarItemKey.Equals("tbReturnData"):
text = this.Model.GetValue("F_sfsf_Remarks").ToString();
#items =List[Tuple[string, string]]();
#items.Add(Tuple[string, string]("F_SMTO_Remarks", text));
this.View.ReturnToParentWindow(text);
this.View.Close();
return;
elif e.BarItemKey.Equals("tbClose"):
this.View.Close();
return;
return;
```
- 对应单据新增菜单按钮
![image.webp](/download/0100b3c189183f78448faae85ce1154074ab.webp)
- 单据绑定表单插件
``` python
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 *
#Dean Mindee 生产计划准确率插件
#全局变量
def BarItemClick(e):
#如果是变动插入则改变状态
if e.BarItemKey.Equals("sfsf_tbChangeInsertion"):
dynamicFormShowParameter = DynamicFormShowParameter();
dynamicFormShowParameter.FormId = "sfsf_SCJHZQLKUAIZHANTIE";#动态表单标识
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;
```
# 简单的python开发集合
### [记录一下python简单的插件开发- beforef7select&基础资料组织 列表只显示用户拥有的组织权限](https://wenku.my7c.com/article/432506265244103680?productLineId=1)
### [记录一下python简单的插件开发- 单元格格式化事件&物料收发汇总格式化仓位编码](https://wenku.my7c.com/article/432502474717361152?productLineId=1)
### [记录一下python简单的插件开发- 菜单按钮事件(表体菜单按钮事件)执行SQL语句](https://wenku.my7c.com/article/433286928398603520)
### [python插件 - 动态 简单账表 通过SQL存储过程输出列实现动态展示](https://wenku.my7c.com/article/433709738048508160?productLineId=1):triangular_flag_on_post:
### [Python插件 - 将生产订单二开字段携带至下级订单上](https://wenku.my7c.com/article/434474741080938240?productLineId=1) :new:
### [Python插件 - 单据转换插件-WebApi下推单据 自定义入参插件](https://wenku.my7c.com/article/445155491019305984?fromAction=POST_ARTICLE&productLineId=1) :pushpin:
### [简单Python插件 - 点击菜单弹窗动态表单录入数据返回父窗体](https://wenku.my7c.com/article/449987803519330560?productLineId=1) :pushpin:
### [Python插件 - 【服务插件】取文本字段值赋值基础资料字段](https://wenku.my7c.com/article/453951446166029312?productLineId=1)
### [Python插件 - 保存、审核、提交 发送请求传输至第三方系统](https://wenku.my7c.com/article/452432069977609216?productLineId=1)
简单Python插件 - 点击菜单弹窗动态表单录入数据返回父窗体
# 需求- 弹出动态表单录入数据表单接收数据# 准备工作![1685092825733.webp](/download/010014f96fb65c1b4a24b49d870f94ca66ad.webp)- ...
点击下载文档
上一篇:快递100物流刷新常见问题解答下一篇:navicat15资源
本文2024-09-16 17:14:31发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-14442.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章