Python if 使用 in 做判断的示例
def DataChanged(e):
if e.Key == "FNumber" and e.NewValue <> "":#物料编码发生变化时
PartNumber=this.Model.GetValue("FNumber")[0:4];#获取物料编码前4位
#准备比较的列表
partNumList=["P156","P173","B100","B200","X110","X120","X200","X201","X202","Q100","Q103","Q102","L200","J100","J102","J102","F510","K200","K202","K300","K300","F200","T100","F302","F303","F304","F306","C101","C800","C900","C200","C900"];
if PartNumber in partNumList:#使用in做判断
this.Model.SetValue("字段标识","可以赋值");#条件符合就赋值
#not in 同理 if PartNumber not in partNumList: 即不相等的条件。
Python if 使用 in 做判断的示例
def DataChanged(e): if e.Key == "FNumber" and e.NewValue <> "":#物料编码发生变化时 PartNumber=this.Model.GetValue("FNu...
点击下载文档
本文2024-09-16 18:19:36发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-21419.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章