EAS DEP扩展分录面板添加自定义按钮及分录面板新增、插入、删除监听原创
金蝶云社区-温日明
温日明
11人赞赏了该文章 1,102次浏览 未经作者许可,禁止转载编辑于2023年03月31日 23:41:38

EAS DEP扩展分录面板添加自定义按钮及分录面板新增、插入、删除监听

参考代码:

EAS DEP扩展分录面板添加自定义按钮

//定义按钮

var btnGenerateKPSQ=new com.kingdee.bos.ctrl.swing.KDWorkButton("开票");

btnGenerateKPSQ.addActionListener(function(e,methodName){

        doSomething();

    }

});

//通过分录表格获取分录面板

var hkjhDetailPanel=pluginCtx.getKDTable("hkjhentry").getParent().getParent();

var hkjhToolbar =hkjhDetailPanel.getAddNewLineButton().getParent();

var rect = pluginCtx.getKDTable("hkjhentry").getBounds();

//给分录面板添加按钮

hkjhToolbar.add(btnGenerateKPSQ, new com.kingdee.bos.ctrl.swing.KDLayout.Constraints(rect.width-150, 5, 60, 19, 9));


//分录面板新增、插入、删除监听

var addListenerBeforeEvent= { beforeEvent: function(e){

        doSomething();

    }

}

hkjhDetailPanel.addAddListener(new com.kingdee.eas.framework.client.multiDetail.IDetailPanelListener(addListenerBeforeEvent));


var insertListenerBeforeEvent= { beforeEvent: function(e){

        doSomething();

    }

}

hkjhDetailPanel.addInsertListener(new com.kingdee.eas.framework.client.multiDetail.IDetailPanelListener(insertListenerBeforeEvent));


var removeListenerBeforeEvent= { beforeEvent: function(e){

        doSomething();

    }

}

hkjhDetailPanel.addRemoveListener(new com.kingdee.eas.framework.client.multiDetail.IDetailPanelListener(removeListenerBeforeEvent));




图标赞 11
11人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!