19、表单插件,打开外部页面原创
金蝶云社区-林荫大道cc
林荫大道cc
9人赞赏了该文章 6106次浏览 未经作者许可,禁止转载编辑于2020年07月04日 16:23:23
封面

业务场景:点击按钮,打开第三方软件的链接


4.1



1、打开VS,新建一个类库,具体可以参考4.1 ,1-7步



2、采购订单,添加按钮可参考 18.1




3、


//本节新增

using Kingdee.BOS.JSON;



4、



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kingdee.BOS;
using Kingdee.BOS.Core.Bill.PlugIn;
using System.ComponentModel;

//本节新增
using Kingdee.BOS.JSON;


namespace Kingdee.Web
{
    [Description("打开外部链接")]
    
    [Kingdee.BOS.Util.HotUpdate]
    
    
    public class ClassName:AbstractBillPlugIn
    {
        public override void BarItemClick(BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        {
            base.BarItemClick(e);
            
            
            if(e.BarItemKey ==("YDIE_tbTest"))
            {
                JSONObject webobj = new JSONObject();
                webobj["source"] = @"http://www.baidu.com";
                webobj["height"] = 600;
                webobj["width"] = 910;
                
                
                //是否新窗口打开
                webobj["isweb"] = true;
                
                webobj["title"] = "百度";
                
                this.View.AddAction("ShowKDWebbrowseForm", webobj);
                this.View.SendAynDynamicFormAction(this.View);
            }
        }
    }
}


image.png


5、重新生成dll




6、重新打开采购订单, 点按钮,弹窗,百度


image.png




总目录链接

https://vip.kingdee.com/article/64993872014591232



赞 9