首页 > 代码库 > 金蝶VB插件,单据保存时总是触发GetFocus事件

金蝶VB插件,单据保存时总是触发GetFocus事件

在做金蝶插件时,在保存时,总是触发GetFocus事件,让人很伤心啊

 

Private Sub m_BillInterface_GotFocus(ByVal sKey As String, ByVal dctData As KFO.IDictionary, ByVal curDspValue As Variant, ByVal Col As Long, ByVal Row As Long, Cancel As Boolean)
    
    If (Row > 0 And r <> -110 And r <> Row And Not m_BillInterface.GetDataFldbyKey("FBillNo_SRC", Row) Is Nothing) Then  //Row为当前行索引,r为自定义变量,当保存时,r=-110;
                                                                       //r<>Row,防止它重复乱触发
If (m_BillInterface.GetFieldValue("FBillNo_SRC", Row) <> "") Then If (sKey = "FInteger") Then r = Row                    //这一行很重要

 

金蝶VB插件,单据保存时总是触发GetFocus事件