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

📄 module1.bas

📁 这是一个基于金蝶K/3的磅秤插件源代码。安装本差价需要金蝶K/310.0以上的版本。本插件是客户端程序。在车辆过磅时自动产生金蝶K/3的出库单。
💻 BAS
字号:
Attribute VB_Name = "Module1"
Public strPort As String        '端口号
Public strSetting As String     '串口通信参数
Public strPassword As String    '解锁密码
Public strCar As String         '车牌前缀
Public strCEBFB As String       '差额百分比
Public strGBTZ As String       '过磅调整
Public strGBWDSJ As String       '过磅稳定时间

Public SjZl As String           '磅秤重量
Public isOK As Boolean          '解锁成功
Public arrayFp() As String     '选定发票数组

Public Sub InitGuoBangCs(ByVal Rt As ADODB.Recordset)
Rt.Filter = "FKey='GBXT-CKH'"
If Rt.EOF Then
    strPort = "2"
   Debug.Print "GBXT-CKH not found."
Else
   strPort = NS(Rt!FValue)
End If

Rt.Filter = "FKey='GBXT-TXCS'"
If Rt.EOF Then
    strSetting = "1200,N,7,1"
   Debug.Print "GBXT-TXCS not found."
Else
   strSetting = NS(Rt!FValue)
End If

Rt.Filter = "FKey='GBXT-JSMM'"
If Rt.EOF Then

   Debug.Print "GBXT-JSMM not found."
Else
   strPassword = NS(Rt!FValue)
End If


Rt.Filter = "FKey='GBXT-CPQZ'"
If Rt.EOF Then
    Debug.Print "GBXT-CPQZ not found."
Else
    strCar = NS(Rt!FValue)
End If

Rt.Filter = "FKey='GBXT-CEBFB'"
If Rt.EOF Then
    strCEBFB = "0"
    Debug.Print "GBXT-CEBFB not found."
Else
    strCEBFB = NS(Rt!FValue)
End If

Rt.Filter = "FKey='GBXT-GBTZ'"
If Rt.EOF Then
    strGBTZ = "0"
    Debug.Print "GBXT-GBTZ not found."
Else
    strGBTZ = NS(Rt!FValue)
End If

strGBTZ = CStr(Val(strGBTZ) / 1000)


Rt.Filter = "FKey='GBXT-GBWDSJ'"
If Rt.EOF Then
    strGBWDSJ = "0"
    Debug.Print "GBXT-GBWDSJ not found."
Else
    strGBWDSJ = NS(Rt!FValue)
End If

End Sub

Public Function ND(sZ As Variant) As String
If Not IsNull(sZ) Then
    ND = CStr(CDate(sZ))
Else
    ND = ""
End If
End Function
Public Function NS(sZ As Variant) As String
On Error GoTo Errx
If Not IsNull(sZ) Then
    NS = Trim(CStr(sZ))
Else
    NS = ""
End If
Exit Function
Errx:
NS = ""
End Function
Public Function NI(sZ As Variant) As Currency
If Not IsNull(sZ) Then
    NI = Trim(CCur(sZ))
Else
    NI = 0
End If
End Function

⌨️ 快捷键说明

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