zoukankan      html  css  js  c++  java
  • 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);


         

  • 相关阅读:
    strcpy 和 strnpy 区别
    js apply/call/caller/callee/bind使用方法与区别分析
    js中的this关键字详解
    Asp.Net_Get跟Post
    Asp.Net_Form验证跟授权
    Css_button样式对不齐
    Asp.Net_上传文件(ftp、webClient、webService)
    Asp.Net_优化
    Asp.Net_后台代码访问前台html标签
    Asp.Net_Ajax调用WebService返回Json前台获取循环解析
  • 原文地址:https://www.cnblogs.com/woshinige/p/14271226.html
Copyright © 2011-2022 走看看