• k3 cloud python 插件实现点击对应的单据编号打开单据


    #引入clr运行库 
    import clr 
    #添加对cloud插件开发的常用组件的引用 
    clr.AddReference('Kingdee.BOS') 
    clr.AddReference('Kingdee.BOS.Core') 
    clr.AddReference('Kingdee.BOS.App')

    clr.AddReference("System")
    clr.AddReference("System.Linq")
    clr.AddReference("System.ComponentModel")
    clr.AddReference("System.Core")
    #clr.AddReference("Kingdee.BOS")
    clr.AddReference("Kingdee.BOS.ServiceHelper")
    clr.AddReference("Kingdee.BOS.DataEntity")
    clr.AddReference('mscorlib')


    #clr.AddReference('Kingdee.BOS.Core.DynamicForm.PlugIn')
    #clr.AddReference('Kingdee.BOS.Core.DynamicForm.PlugIn.Args')

    from Kingdee.BOS.Core.Bill.PlugIn import *
    from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import *
    from Kingdee.BOS.JSON import *
    from Kingdee.BOS.Util import *
    from System import *
    from Kingdee.BOS.Core.Bill import *
    from Kingdee.BOS.Core.DynamicForm import *
    from Kingdee.BOS.DataEntity import *
    from Kingdee.BOS.Orm.DataEntity import *
    from Kingdee.BOS.App.Data import *
    from Kingdee.BOS.ServiceHelper import *
    #from Kingdee.K3.SCM.App.Core.WebApi import *
    from Kingdee.BOS.Core.Metadata import SelectorItemInfo ##字段选择实体类
    from Kingdee.BOS.Core.SqlBuilder import QueryBuilderParemeter ##查询参数实体类

    #文本超链接执行方法
    def  EntryButtonCellClick(e):
       
        #单据编号标识
         if  e.FieldKey.Equals("F_PAEZ_Text", StringComparison.OrdinalIgnoreCase):
               #获取传递过来的参数,本单据中为收款单的单据编号
            fbillno=this.Model.GetValue(e.FieldKey,e.Row);
            queryParam = QueryBuilderParemeter();
            queryParam.FormId = "AR_RECEIVEBILL";
            queryParam.SelectItems.Add(SelectorItemInfo("FID"));
            queryParam.FilterClauseWihtKey ="FBillNo ='%s'" %fbillno  #. format("","SKD00000753"  #, "SKD00000753");
            # using Kingdee.BOS.ServiceHelper;
            objs = QueryServiceHelper.GetDynamicObjectCollection(this.Context, queryParam);
            result=objs[0][0]
            parameter =BillShowParameter();
            parameter.Status = OperationStatus.EDIT;
            parameter.FormId = "AR_RECEIVEBILL";#收款单
            parameter.PKey = str(result);
            parameter.OpenStyle.ShowType =ShowType.MainNewTabPage;#打开方式,到主界面一个新的页签
                        #param.ParentPageId = this.View.PageId;//指定ParentPageId,可以实现打开的界面直接拿到父界面的数据 如this.View.ParentFormView.Model.DataObject
            this.View.ShowForm(parameter);


         

  • 相关阅读:
    VSTO程序基本知识
    NPOI根据Excel模板生成原生的Excel文件实例
    编程实现n阶奇数幻方
    深入介绍Word开发
    漫谈算法(五)问题复杂度分析(Problem Complexity and Adversarial Lower Bound)
    我的VSTO之路:序
    MFC如何让编辑框自动换行,垂直滚动条自动下移到底端
    WORD
    MFC中的列表控件CListCtrl
    实验 1:Mininet 源码安装和可视化拓扑工具
  • 原文地址:https://www.cnblogs.com/woshinige/p/14271226.html
Copyright © 2020-2023  润新知