您的位置:首页 > 其它

金蝶核算项目插件

2016-04-18 10:16 375 查看

'delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'

'insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)

'values (101,4, 1, 'baseitemtest.myclass')

'-- 101表示基础资料,4表示物料

'-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可

'--select * from t_ThirdPartyComponent where ftypeid=101

'定义插件对象接口. 必须具有的声明, 以此来获得事件

Private WithEvents m_K3BaseDataEvents As K3BaseDataEvents.ItemEvents

Private m_EditInterface As K3BaseDataEvents.ItemEditInterface 'API接口

Public Sub Show(ByVal oBillTransfer As ItemEvents)

'接口实现

'注意: 此方法必须存在, 请勿修改

Set m_K3BaseDataEvents = oBillTransfer

Set m_EditInterface = m_K3BaseDataEvents.EditInterface

End Sub

Private Sub m_K3BaseDataEvents_AfterGridLoad()

Dim i As Integer

i = m_EditInterface.GetRowNumber("F_114")

m_EditInterface.SetRowValue i, "哦也"

m_EditInterface.SetRowCaption i, "" & m_EditInterface.ItemClassId & "," & m_EditInterface.ParentID & ","

m_EditInterface.SetRowLock i

i = m_EditInterface.GetRowNumber("FSPID")

MsgBox m_EditInterface.ReadID(i)

m_EditInterface.SetRowValue i, "仓位", 50 '给基础资料类型字段赋值

End Sub

Private Sub m_K3BaseDataEvents_BeforeF7(ByVal lRow As Long, strFilterReturn As String)

MsgBox strFilterReturn

' SELECT * FROM t_StockPlace WHERE FSPID <> 0 And FDeleted=0 AND FDetail=1 ORDER BY FNumber

strFilterReturn = " 1=2" '失败

End Sub

Private Sub m_K3BaseDataEvents_BeforeList(ByVal lRow As Long, strSqlReturn As String)

'MsgBox strSqlReturn

'strSqlReturn = "select FNumber,FName from t_Item where FItemClassID =4"

End Sub

Private Sub m_K3BaseDataEvents_BeforeSave(Cancel As Boolean)

MsgBox "BeforeSave"

End Sub

Private Sub m_K3BaseDataEvents_GridChange(ByVal lRow As Long)

MsgBox "GridChange"

End Sub

Private Sub m_K3BaseDataEvents_OnPressF7(ByVal lRow As Long, RetCol As KDVBF.ReturnCollection, Cancel As Boolean)

MsgBox "OnPressF7"

End Sub

--注册脚本

delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'

insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)

values (101,4, 1, 'baseitemtest.myclass')

-- 101表示基础资料,4表示物料

-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可

--select * from t_ThirdPartyComponent where ftypeid=101

引用插件

K3BaseDataEvents.dll#K3BaseDataEvents


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: