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

📄 frm_hyicaddmoney.frm

📁 一个完整的非接触IC卡会员管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frm_hyicaddmoney 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "充值充次"
   ClientHeight    =   7680
   ClientLeft      =   30
   ClientTop       =   435
   ClientWidth     =   11685
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7680
   ScaleWidth      =   11685
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.ListBox List1 
      Height          =   2940
      ItemData        =   "frm_hyicaddmoney.frx":0000
      Left            =   5760
      List            =   "frm_hyicaddmoney.frx":0002
      TabIndex        =   22
      Top             =   240
      Width           =   2175
   End
   Begin VB.CommandButton cmdict 
      Caption         =   "充次(&T)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   9840
      TabIndex        =   21
      Top             =   840
      Width           =   1572
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   375
      Left            =   4200
      TabIndex        =   20
      Top             =   2760
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      _Version        =   393216
      Format          =   6750209
      CurrentDate     =   39408
   End
   Begin VB.CheckBox Check1 
      Caption         =   "自动打印"
      Height          =   372
      Left            =   8280
      TabIndex        =   19
      Top             =   2400
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.CommandButton cmdicp 
      Caption         =   "重打票据(&P)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   9840
      TabIndex        =   18
      Top             =   1560
      Visible         =   0   'False
      Width           =   1572
   End
   Begin VB.CommandButton cmdictd 
      Caption         =   "次数充正(&U)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   8160
      TabIndex        =   17
      Top             =   1560
      Width           =   1572
   End
   Begin VB.TextBox txtAfterMoney 
      Enabled         =   0   'False
      ForeColor       =   &H80000007&
      Height          =   372
      Left            =   4200
      MaxLength       =   6
      TabIndex        =   14
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox txtMoney 
      Height          =   372
      Left            =   1320
      MaxLength       =   6
      TabIndex        =   6
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox txtTimes 
      Height          =   372
      Left            =   1320
      MaxLength       =   6
      TabIndex        =   5
      Top             =   2760
      Width           =   1215
   End
   Begin VB.CommandButton cmdicd 
      Caption         =   "减值(&D)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   8160
      TabIndex        =   4
      Top             =   840
      Width           =   1572
   End
   Begin VB.CommandButton cmdicq 
      Caption         =   "退出(&Q)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   9840
      TabIndex        =   3
      Top             =   1560
      Width           =   1572
   End
   Begin VB.CommandButton cmdicf 
      Caption         =   "充值(&F)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   9840
      TabIndex        =   2
      Top             =   240
      Width           =   1572
   End
   Begin VB.CommandButton cmdicm 
      Caption         =   "验卡(&M)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   8160
      TabIndex        =   0
      Top             =   240
      Width           =   1572
   End
   Begin MSComctlLib.ListView ListViewF 
      Height          =   4095
      Left            =   240
      TabIndex        =   1
      Top             =   3360
      Width           =   11175
      _ExtentX        =   19711
      _ExtentY        =   7223
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   11.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
   Begin VB.Label Label10 
      Caption         =   "月票:"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   4920
      TabIndex        =   23
      Top             =   360
      Width           =   735
   End
   Begin VB.Label Label9 
      Caption         =   "充次月份:"
      Height          =   375
      Left            =   2760
      TabIndex        =   16
      Top             =   2760
      Width           =   1335
   End
   Begin VB.Label Label8 
      Caption         =   "充值后余额:"
      Height          =   375
      Left            =   2760
      TabIndex        =   15
      Top             =   2280
      Width           =   1455
   End
   Begin VB.Label Label6 
      Caption         =   "充值金额:"
      Height          =   375
      Left            =   120
      TabIndex        =   13
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Label Label7 
      Caption         =   "充次次数:"
      Height          =   375
      Left            =   120
      TabIndex        =   12
      Top             =   2760
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   "卡上余额:"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   11
      Top             =   1680
      Width           =   4215
   End
   Begin VB.Label Label4 
      Caption         =   "IC卡类型:"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   10
      Top             =   1320
      Width           =   4215
   End
   Begin VB.Label Label3 
      Caption         =   "人员名称:"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   9
      Top             =   960
      Width           =   4215
   End
   Begin VB.Label Label2 
      Caption         =   "人员编号:"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   600
      Width           =   4215
   End
   Begin VB.Label Label1 
      Caption         =   "IC 卡 号:"
      ForeColor       =   &H00C00000&
      Height          =   252
      Left            =   240
      TabIndex        =   7
      Top             =   240
      Width           =   4212
   End
End
Attribute VB_Name = "frm_hyicaddmoney"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset

Dim pbOut(3) As Byte
Dim CardID As String '物理卡号

Dim sKeyLast As String '用户密码
Dim sKeyPin As String '用户密码因子 物理卡号+物理卡号
Dim skeyPI(8) As Byte
Dim skeyID(8) As Byte
Dim skeyLA(8) As Byte
Dim sN As Integer
Dim sBeforeMoney As Currency
Dim sBeforeTimes As Long

Dim sCardid As Long
Dim sCardTYpe As Integer
Dim sDate As String

Dim sBalance As Currency
Dim sAddmoney As Currency
Dim sAftermoney As Currency
Dim txtEmpID As String
Dim sMonth As String
Dim i As Integer
Dim sMonthTF As String '充次或充正

Private Sub cmdicd_Click() '充正
If Val(txtMoney) <= 0 Then
     txtMoney.Text = ""
     MsgBox "减值金额输入错误,请重新输入!", vbInformation + vbOKOnly, "中芯德立提示信息"
     Exit Sub
End If
If Val(txtMoney) > sBalance Then MsgBox "减值金额不能大于卡上余额,请重新输入!", vbInformation + vbOKOnly, "中芯德立提示信息": Exit Sub
If MsgBox("减值后金额为:" & -Val(txtMoney) + sBalance & ",请确认?", vbInformation + vbYesNo, "中芯德立提示信息") = vbYes Then
    If ReaderOpen = False Then MsgBox "未检测到IC卡读写器,请检查!", vbInformation + vbOKOnly, "中芯德立提示信息": Exit Sub
    'Function R_CardFull(sp_AddMoney As Currency, sp_BeforeMoney As Currency, sp_AfterMoney As Currency, sp_String As String) As Boolean '充值
    sAddmoney = -Val(txtMoney)
    If R_CardFull(sAddmoney, sBalance, sAftermoney, sErr) = True Then
        maSys_db.Execute "insert into 充值积分明细表(IC卡号,卡上余额,卡上积分,充值金额,赠送积分,操作员,操作时间,操作类型,员工编号,IC卡类)" _
                            & "values('" & Format(sCardid, "00000000") & "'," & sAftermoney & ",0," _
                            & Val(txtMoney) & ",0,'" & strUserName & "'," & "'" & Format(Now, "yyyy-mm-dd hh:mm:ss") & "'," _
                            & "'充正','" & Trim(txtEmpID) & "','" & Format(sCardTYpe, "00") & "')"
        Call listrecord
        txtAfterMoney = sAftermoney
        Call ReaderSound(2)
        MsgBox "减值成功!", vbInformation + vbOKOnly, "中芯德立提示信息": GoTo err
    Else

⌨️ 快捷键说明

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