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

2021/7/15 9:36:11

本文主要是介绍python实现单据体必录字段显示星号,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

#引入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); #资产编码隐藏星号



这篇关于python实现单据体必录字段显示星号的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程