金蝶云 操作插件(列表界面、维护界面)弹出提示信息

金蝶云 操作插件(列表界面、维护界面)弹出提示信息

1.维护界面 弹出提示

在这里插入图片描述
在这里插入图片描述
【注意】注册操作插件

import clr
clr.AddReference("System")
clr.AddReference("System.Data")
clr.AddReference("System.XML")
clr.AddReference("System.Web.Extensions")
clr.AddReference("Kingdee.BOS")
clr.AddReference("Kingdee.BOS.Core")
clr.AddReference("Kingdee.BOS.DataEntity")
clr.AddReference("Kingdee.BOS.ServiceHelper")
clr.AddReference("Newtonsoft.Json")
clr.AddReference("Kingdee.BOS.Contracts")
clr.AddReference("Kingdee.BOS.App")
clr.AddReference("System.Windows.Forms")
clr.AddReference("System.Web")

import sys
from System import *
from System.IO import *
from System.Net import *
from System.Web import *
from System.Text import *
from System.Threading import *
from System.Globalization import *
from System.Security.Cryptography import *
from System.Web.Script.Serialization import *
from System.Collections.Generic import List as syslist
from System.Collections.Generic import Dictionary
from Newtonsoft.Json.Linq import *
from Kingdee.BOS.Contracts import * 
from Kingdee.BOS.Core.List import * 
from Kingdee.BOS.Core.CommonFilter import * 
from Kingdee.BOS.Contracts.Report import *
from Kingdee.BOS.Core.Report import ISysReportView
from Kingdee.BOS.Core.Report import ReportTitles
from Kingdee.BOS.App import ServiceHelper as ServiceHelperAPP
from Kingdee.BOS import *
from System.Windows.Forms import *
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Core.Log import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.Orm import OperateOption
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.DataEntity import *
from Kingdee.BOS.Orm.DataEntity import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.Bill.PlugIn import *
from Kingdee.BOS.ServiceHelper import *
from Kingdee.BOS.Core.Interaction import KDInteractionException
from Kingdee.BOS import KDBusinessException
from Kingdee.BOS.Core.Metadata.EntityElement import *
from Kingdee.BOS.Core.Metadata import SelectorItemInfo ##字段选择实体类
from Kingdee.BOS.Core.SqlBuilder import QueryBuilderParemeter ##查询参数实体类
#修改默认编码为utf8
reload(sys)
sys.setdefaultencoding('utf-8') 
def BeforeExecuteOperationTransaction(e):
    oResult = this.OperationResult.OperateResult;
    dp=OperateResult()
    dp.Message ="哈哈哈哈哈哈哈哈哈哈"#校验信息
    dp.Name = "提示"#关键字
    dp.MessageType =MessageType.Normal#信息类型
    #MessageType.Normal  普通
    #MessageType.Warning 警告
    #MessageType.FatalError 错误
    dp.SuccessStatus =True#状态
    oResult.Add(dp)

在这里插入图片描述

2.列表界面 弹出提示

【注意】操作插件的提示会继承到列表提示上,若不需要可设置(关闭原有的提示信息)
【注意】注册列表插件

import clr
clr.AddReference("System")
clr.AddReference("System.Data")
clr.AddReference("System.XML")
clr.AddReference("System.Web.Extensions")
clr.AddReference("Kingdee.BOS")
clr.AddReference("Kingdee.BOS.Core")
clr.AddReference("Kingdee.BOS.DataEntity")
clr.AddReference("Kingdee.BOS.ServiceHelper")
clr.AddReference("Newtonsoft.Json")
clr.AddReference("Kingdee.BOS.Contracts")
clr.AddReference("Kingdee.BOS.App")
clr.AddReference("System.Windows.Forms")
clr.AddReference("System.Web")

import sys
from System import *
from System.IO import *
from System.Net import *
from System.Web import *
from System.Text import *
from System.Threading import *
from System.Globalization import *
from System.Security.Cryptography import *
from System.Web.Script.Serialization import *
from System.Collections.Generic import List as syslist
from System.Collections.Generic import Dictionary
from Newtonsoft.Json.Linq import *
from Kingdee.BOS.Contracts import * 
from Kingdee.BOS.Core.List import * 
from Kingdee.BOS.Core.CommonFilter import * 
from Kingdee.BOS.Contracts.Report import *
from Kingdee.BOS.Core.Report import ISysReportView
from Kingdee.BOS.Core.Report import ReportTitles
from Kingdee.BOS.App import ServiceHelper as ServiceHelperAPP
from Kingdee.BOS import *
from System.Windows.Forms import *
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Core.Log import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.Orm import OperateOption
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.DataEntity import *
from Kingdee.BOS.Orm.DataEntity import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.Bill.PlugIn import *
from Kingdee.BOS.ServiceHelper import *
from Kingdee.BOS.Core.Interaction import KDInteractionException
from Kingdee.BOS import KDBusinessException
from Kingdee.BOS.Core.Metadata.EntityElement import *
from Kingdee.BOS.Core.Metadata import SelectorItemInfo ##字段选择实体类
from Kingdee.BOS.Core.SqlBuilder import QueryBuilderParemeter ##查询参数实体类
#修改默认编码为utf8
reload(sys)
sys.setdefaultencoding('utf-8') 

def AfterDoOperation(e):
    if e.Operation.Operation=="DoNothing":#操作代码
        #e.OperationResult.IsShowMessage =False #关闭原有的提示信息(操作插件插入的提示全部不显示)
        oResult =e.OperationResult.OperateResult
        f=0
        for p in range(len(oResult)):
            if "空操作" in oResult[p-f].Message:
                oResult.RemoveAt(p-f) #删除没用的提示信息
                f+=1
        if len(oResult)>0:
            this.View.ShowOperateResult(oResult) #打开新的提示信息

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值