初学Python脚本
金蝶云社区-毛旭强
毛旭强
2人赞赏了该文章 2534次浏览 未经作者许可,禁止转载编辑于2017年04月19日 21:15:13

import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.Bos.Core')
from Kingdee.BOS.Core import *
def DataChanged(e):
if e.Key=="F_mao_Assistant" and e.NewValue<>"":
this.Model.SetItemValueByNumber('F_mao_Assistant1',"",-1);
aaa= this.Model.GetValue("F_mao_Assistant");
if aaa<>None:
this.Model.SetValue ('F_mao_Text',aaa['fnumber']);
if e.Key=="F_mao_Assistant1" and e.NewValue<>"" :
this.Model.SetItemValueByNumber('F_mao_Assistant',"",-1);
bbb= this.Model.GetValue("F_mao_Assistant1");
if bbb<>None:
this.Model.SetValue ('F_mao_Text',bbb['fnumber']);

根据输入的值更新其他字段数据。