• 周二. 8月 16th, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

python实现单据体必录字段显示星号

admin

11月 28, 2021

#引入clr运行库
import clr
#添加对cloud插件开发的常用组件的引用
clr.AddReference(‘Kingdee.BOS’)
clr.AddReference(‘Kingdee.BOS.Core’)
clr.AddReference(‘Kingdee.BOS.ServiceHelper’)
#导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入)
from Kingdee.BOS import *
from Kingdee.BOS.Util import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
from Kingdee.BOS.Core.Interaction import *
from Kingdee.BOS.Core.Metadata import *
from Kingdee.BOS.Core.Metadata.EntityElement import *
from Kingdee.BOS.Core.Metadata.FieldElement import *
from Kingdee.BOS.ServiceHelper import *
from System import *
from System.Collections.Generic import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
def AfterBindData(e):
SetStar();

def DataChanged(e):
if e.Field.Key == “FReceiveType”:
SetStar();

def SetStar():
FStockOrgId = this.Model.GetValue(“FStockOrgId”);
if FStockOrgId is not None:
orgNumber = FStockOrgId [“number”];
FReceiveType = this.Model.GetValue(“FReceiveType”);
if orgNumber == ‘105’:
if FReceiveType == ‘资产领用’: #新合新资产领用
this.View.GetControl[EntryGrid](“FEntity”).SetMustInput(“F_VTR_Text”,True); #资产编码显示星号
else:
this.View.GetControl[EntryGrid](“FEntity”).SetMustInput(“F_VTR_Text”,False); #资产编码隐藏星号

发表回复

您的电子邮箱地址不会被公开。