Python版本自由批量填充原创
金蝶云社区-htv
htv
14人赞赏了该文章 61次浏览 未经作者许可,禁止转载编辑于2024年07月20日 11:57:37
def EntryBarItemClick(e):
    djzt=this.View.Model.GetValue("FDocumentStatus");
    if djzt in ['B','C']:return;
    entity="FSaleOrderEntry";
    rowindex=this.View.Model.GetEntryCurrentRowIndex(entity);
    if e.BarItemKey=="xdtj":
        field=this.View.GetControl(entity).GetFocusField()
        data=this.View.Model.GetValue(field,rowindex)
        objs=this.View.Model.GetEntityDataObject(this.View.BusinessInfo.GetEntity(entity))
        checkRows = [x for x in objs if bool(x["F_CheckBox"])]
        for item in checkRows:
            r=objs.IndexOf(item)
            this.View.Model.SetValue(field,data,r)
            this.View.InvokeFieldUpdateService(field,r)
            this.View.UpdateView(field,r)
        field="F_CheckBox"
        allRows= [x for x in objs]
        for item in allRows:
            r=objs.IndexOf(item)
            this.View.Model.SetValue(field,data,r)
            this.View.InvokeFieldUpdateService(field,r)
            this.View.UpdateView(field,r)

上传图片

代码转换自

广分龙德樟


赞 14