⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bos_billevent_plugins.cls

📁 金蝶地磅称重插件
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "BOS_BillEvent_PlugIns"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Description = "This is BillEvent Interface Class, made by K3BOSPLUGINSWIZAED"
Private xp As Integer
'定义 BillEvent 接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_BillInterface  As BillEvent
Attribute m_BillInterface.VB_VarHelpID = -1
 
Public Sub Show(ByVal oBillInterface As Object)
 
    'BillEvent 接口实现
    '注意: 此方法必须存在, 请勿修改
    Set m_BillInterface = oBillInterface
'    sign = False
End Sub

Private Sub Class_Terminate()
 
    '释放接口对象
    '注意: 此方法必须存在, 请勿修改
    Set m_BillInterface = Nothing

End Sub
Private Sub m_BillInterface_AfterSelBill(ByVal lSelBillType As Long)
    m_BillInterface.SetFieldValue "FBase", strMar
    m_BillInterface.SetFieldValue "Amount", dblQty
    
End Sub
Private Sub m_BillInterface_BeforeSave(bCancel As Boolean)
'用于控制被选项目的备注不能为空值
If Len(m_BillInterface.GetFieldValue("FNOte", lngRow)) = 0 Then
        MsgBox "备注不许为空!", vbInformation, "金蝶提示"
        bCancel = True
End If
End Sub
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)

    '用于控制选项为单选项并自动选择非零的最低价中标
    If Col = 7 Then
            m_BillInterface.SetFieldValue "CheckBox", 0, lngRow
            m_BillInterface.SetFieldValue "CheckBox", 1
            lngRow = Row
    
    ElseIf Col = 6 Then
        If Not sign Then
                m_BillInterface.SetFieldValue "CheckBox", 1
                xp = m_BillInterface.GetFieldValue("Price")
                lngRow = Row
                sign = True
        ElseIf xp >= m_BillInterface.GetFieldValue("Price") And m_BillInterface.GetFieldValue("Price") <> 0 Then
               m_BillInterface.SetFieldValue "CheckBox", 0, lngRow
               m_BillInterface.SetFieldValue "CheckBox", 1
               xp = m_BillInterface.GetFieldValue("Price")
               lngRow = Row
               sign = True
        Else
               Exit Sub
    
        End If
    End If

End Sub
Private Sub m_BillInterface_FinishMultiCheck(ByVal lCheckMode As Long, ByVal lCheckMaxLevel As Long, ByVal lBusinessLevel As Long, ByVal lCheckStatus As Long, bSendMessage As Boolean)
    Dim rs As New ADODB.Recordset
    Dim re As New ADODB.Recordset
    Dim rr As New ADODB.Recordset
    Dim rt As New ADODB.Recordset
    Dim strSql As String
    Dim str As String
    Dim strq As String
    Dim strr As String
    Dim strt As String
    
'用于将审核后的开,评标结果写入中标记录中
    strSql = "select VictualerName,Price from t_BOS200000024Entry2 where FID=(select fid from t_BOS200000024 where BillNo = " & m_BillInterface.GetFieldValue("BillNo") & ") and checkbox =1"
    Set rs = m_BillInterface.K3Lib.GetData(strSql)
    
    strr = "select FID from t_BOS200000139  where FNo=" & m_BillInterface.GetFieldValue("FNo")
    Set rr = m_BillInterface.K3Lib.GetData(strr)

    strt = "select type from t_BOS200000022 where BillNo = " & m_BillInterface.GetFieldValue("FNo")
    Set rt = m_BillInterface.K3Lib.GetData(strt)

    If rt.Fields("Type") = 2 Then

                            strq = "Insert into t_BOS200000139Entry2 (VName,Price,FID,PPrice,SSum) VALUES ('" & rs!VictualerName & "','" & rs!Price & "','" & rr!FID & "','" & rs!Price & "','" & rs!Price & "')"
                             m_BillInterface.K3Lib.GetData (strq)
    Else

                            str = "select FBase,Amount from t_BOS200000024 where BillNo = " & m_BillInterface.GetFieldValue("BillNo")
                            Set re = m_BillInterface.K3Lib.GetData(str)

                            strq = "Insert into t_BOS200000139Entry2 (VName,Price,FID,PPrice,SSum,DNumber,Amount) VALUES ('" & rs!VictualerName & "','" & rs!Price & "','" & rr!FID & "','" & rs!Price & "','" & rs!Price * CSng(re!Amount) & "','" & re!FBase & "','" & re!Amount & "')"
                            m_BillInterface.K3Lib.GetData (strq)
    End If


End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -