BOS插件中实现根据对应代码携带出产品编码的示例
'Chang事件是在每个字段录入值发生变化回车之后触发
'参数@dct发生变化的字段模板,@dctFld发生变化的字段值对象
Private Sub m_BillInterface_Change(ByVal dct As KFO.IDictionary, ByVal dctFld As KFO.IDictionary, ByVal Col As Long, ByVal Row As Long, Cancel As Boolean)
Dim rs As ADODB.Recordset
'FMapID为对应代码关键字
'对对应代码字段录入发生变化做处理
If dct("FKey") = "FMapID" Then
'根据对应代码的值查询出相应的产品编号FNumber
'注意:实际情况可能获取单据上输入的客户或者供应商ID来组合查询过滤
Set rs = m_BillInterface.K3Lib.GetData("SELECT t2.FNumber FROM ICItemMapping t1 INNER JOIN t_ICItem t2 ON t1.FItemID=t2.FItemID WHERE FMapNumber='" & dctFld("FFND") & "'")
If Not rs.EOF Then
'将查出的产品编码赋值到界面上去(FItemID为产品编号字段关键字)
m_BillInterface.SetFieldValue "FItemID", rs("FNumber"), Row
End If
Set rs = Nothing
End If
End Sub
BOS插件中实现根据对应代码携带出产品编码的示例
本文2024-09-22 16:40:04发表“k3wise知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3wise-89415.html