表单插件.二开案例.操作前进行提示

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

表单插件.二开案例.操作前进行提示

【场景】操作上有操作前确认提示,但是存在部分操作不生效,如下推; 【案例】通过表单插件,下推前进行提示 ![Image_20230210185047.webp](/download/010058b4318c435749ca8e02c795d67357f2.webp) ```python import clr clr.AddReference('Kingdee.BOS.Core') from System import * from Kingdee.BOS.Core.DynamicForm import * def BeforeDoOperation(e): opShowMsg = False; keyConst = "Custom_Push_ShowMsg"; if(this.View.Session.ContainsKey(keyConst)): opShowMsg = this.View.Session[keyConst]; if not e.Operation.FormOperation.Operation.Equals("Push",StringComparison.OrdinalIgnoreCase): return; if (opShowMsg): this.View.Session[keyConst] = False; return; e.Cancel = True; this.View.ShowMessage('下推前显示一个提示', MessageBoxOptions.OKCancel, lambda x: ReDoPush(x)); def ReDoPush(e): keyConst = "Custom_Push_ShowMsg"; if e == MessageBoxResult.OK: this.View.Session[keyConst] = True; this.View.InvokeFormOperation("Push"); ``` 【效果】下推时进行交互确认提示 ![Image_20230210185135.webp](/download/0100ba57cff347f945eaa6ce4474d3d05f6b.webp)

表单插件.二开案例.操作前进行提示

【场景】操作上有操作前确认提示,但是存在部分操作不生效,如下推;【案例】通过表单插件,下推前进行提示![Image_20230210185047.webp](/...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息