一、HTML端单据体字段自动换行python插件
import clr
clr.AddReference('System')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.JSON import *
def AfterBindData(e):
this.View.GetControl("F_TAIC_Entity").InvokeControlMethod("setStylekey","kd_grid_td_autowrap");
二、设置单据体行高,F_TAIC_Entity单据体标识
import clr
clr.AddReference('System')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.JSON import *
def AfterBindData(e):
this.View.GetControl("F_TAIC_Entity").SetRowHeight(80);
三、设置鼠标光标停留单据体某个字段时,弹出显示框显示全部内容
def AfterBindData(e):
grid=this.View.GetControl("单据体标识");
grid.SetTooltipEnabled("字段标识",False);#False:字段未锁定状态下提示
grid.SetTooltipEnabled("字段标识",True);#True:字段锁定状态下提示
四、面板控件绑定链接/图片
import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.DataEntity')
from Kingdee.BOS.Util import *
from Kingdee.BOS import LocaleValue
from Kingdee.BOS.Core.Metadata import *
from Kingdee.BOS.Core.Bill.PlugIn import *
from Kingdee.BOS.Orm.DataEntity import *
from System import *
def CreateControl (e) :
if (e.ControlAppearance.Key.Equals("F_TAIC_Panel"),StringComparison.InvariantCultureIgnoreCase):
e.Control["xtype"] = "kdwebbrowser";
e.Control["source"] = "http://127.0.0.1/k3cloud/";
if (e.ControlAppearance.Key.Equals("F_YUE_Panel2"),StringComparison.InvariantCultureIgnoreCase):
e.Control["xtype"] = "kdwebbrowser";
e.Control["source"] = "https://636gj57747.zicp.fun/K3Cloud/html5/lease/Image_20230810023426.png";
五、列表插件批改功能
import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BoS.Core')
from Kingdee.BOS.Core import*
from Kingdee.BOS.Core.Bill import*
from Kingdee.BOS.Core.Bill.PlugIn import*
def BarItemClick(e):
if e.BarItemKey=="PERT_pg" :
if this.ListView.CurrentSelectedRowInfo==None:
this.View.ShowErrMessage("请选择数据行")
return
param=BillShowParameter()
param.FormId = FormIdConst.BD_BulkEdit
this.View.ShowForm(param)