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

📄 dlgpay.frm

📁 本系统可用于医院和专业体检中心的健康体检管理
💻 FRM
字号:
VERSION 5.00
Object = "{0B81E4A9-BE4E-4AEF-9272-33AB5B51C6FC}#1.0#0"; "XPControls.ocx"
Begin VB.Form dlgPay 
   BackColor       =   &H80000018&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "交费确认"
   ClientHeight    =   5355
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7275
   Icon            =   "dlgPay.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5355
   ScaleWidth      =   7275
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox TxtJXFY 
      Height          =   285
      Left            =   4530
      Locked          =   -1  'True
      TabIndex        =   12
      Top             =   4050
      Width           =   1365
   End
   Begin VB.TextBox TxtTCFY 
      Height          =   285
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   4050
      Width           =   1365
   End
   Begin VB.TextBox TxtZKL 
      Height          =   285
      Left            =   1380
      TabIndex        =   6
      Top             =   4410
      Width           =   1365
   End
   Begin VB.TextBox TxtFY 
      Height          =   285
      Left            =   4530
      TabIndex        =   5
      Top             =   4410
      Width           =   1365
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H80000018&
      Caption         =   "项目清单"
      Height          =   3435
      Left            =   90
      TabIndex        =   0
      Top             =   120
      Width           =   7095
      Begin VB.TextBox TxtXMQD 
         Height          =   3135
         Left            =   90
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   1
         Top             =   210
         Width           =   6915
      End
   End
   Begin XPControls.XPCommandButton cmdCancel 
      Height          =   405
      Left            =   4980
      TabIndex        =   2
      Top             =   4860
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   714
      Caption         =   "取消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPControls.XPCommandButton cmdOK 
      Height          =   405
      Left            =   1350
      TabIndex        =   3
      Top             =   4860
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   714
      Caption         =   "确定"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPControls.XPCommandButton cmdPrintFYQD 
      Height          =   405
      Left            =   3180
      TabIndex        =   10
      Top             =   4860
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   714
      Caption         =   "打印清单"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPControls.XPCommandButton cmdCal 
      Cancel          =   -1  'True
      Height          =   315
      Left            =   6270
      TabIndex        =   18
      Top             =   4410
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   556
      Caption         =   "计算"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "%"
      Height          =   225
      Left            =   2880
      TabIndex        =   19
      Top             =   4470
      Width           =   255
   End
   Begin VB.Label lblPayed 
      BackStyle       =   0  'Transparent
      Caption         =   "已收费用:"
      Height          =   225
      Left            =   450
      TabIndex        =   17
      Top             =   3750
      Width           =   2535
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "元"
      Height          =   225
      Left            =   5910
      TabIndex        =   16
      Top             =   4110
      Width           =   255
   End
   Begin VB.Label Label6 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "元"
      Height          =   225
      Left            =   2760
      TabIndex        =   15
      Top             =   4110
      Width           =   255
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "加项费用:"
      Height          =   225
      Left            =   3570
      TabIndex        =   14
      Top             =   4110
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "套餐费用:"
      Height          =   225
      Left            =   420
      TabIndex        =   13
      Top             =   4140
      Width           =   975
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "折扣率:"
      Height          =   225
      Left            =   480
      TabIndex        =   9
      Top             =   4470
      Width           =   885
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "实际费用:"
      Height          =   225
      Left            =   3570
      TabIndex        =   8
      Top             =   4470
      Width           =   975
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "元"
      Height          =   225
      Left            =   5910
      TabIndex        =   7
      Top             =   4470
      Width           =   255
   End
   Begin VB.Label lblPay 
      BackStyle       =   0  'Transparent
      Caption         =   "应收费用:"
      Height          =   225
      Left            =   3630
      TabIndex        =   4
      Top             =   3720
      Width           =   2715
   End
End
Attribute VB_Name = "dlgPay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCal_Click()
    If TxtZKL.Text = "" Then
        TxtFY.Text = CStr(CCur(Val(TxtTCFY.Text)) + CCur(Val(TxtJXFY.Text)))
    Else
        TxtFY.Text = CStr((CCur(Val(TxtTCFY.Text)) + CCur(Val(TxtJXFY.Text))) * CSng(Val(TxtZKL.Text)) / 100)
    End If
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    Dim strSQL As String
    Dim cmdTemp As ADODB.Command
    
    strSQL = "insert into FEE_DT(GUID,PayNum,PayDate) values(" _
            & gPayGUID & "," & CDbl(TxtFY.Text) & ",'" & Date & "')"
    Set cmdTemp = New ADODB.Command
    Set cmdTemp.ActiveConnection = GCon
    cmdTemp.CommandText = strSQL
    cmdTemp.Execute
    MsgBox "交费成功", vbInformation, "提示"
    Unload Me
End Sub

Private Sub Form_Load()
    Dim strSQL As String
    Dim rsTemp As ADODB.Recordset
    Dim tmpFee As Double
    
    tmpFee = 0
    strSQL = "select * from FEE_DT where GUID=" & gPayGUID
    Set rsTemp = New ADODB.Recordset
    rsTemp.Open strSQL, GCon, adOpenStatic, adLockReadOnly
    '存在已交费的记录
    If rsTemp.RecordCount > 0 Then
        rsTemp.MoveFirst
        Do While Not rsTemp.EOF
            tmpFee = tmpFee + CDbl(rsTemp("PayNum"))
            rsTemp.MoveNext
        Loop
    End If
    lblPayed.Caption = "已交费用:" & tmpFee & " 元"
    
    '显示应交费用
    lblPay.Caption = "应交费用:" & gdblTCFY + gdblJXFY & " 元"
    TxtTCFY.Text = gdblTCFY
    TxtJXFY.Text = gdblJXFY
    TxtXMQD.Text = gstrXMQD
End Sub

Private Sub TxtZKL_KeyPress(KeyAscii As Integer)
    If (KeyAscii > vbKey9 Or KeyAscii < vbKey0) And KeyAscii <> 46 And KeyAscii <> vbKeyReturn Then
        KeyAscii = 0
        Beep 500, 10
    End If
    If KeyAscii = vbKeyReturn Then
        cmdCal_Click
        TxtFY.SetFocus
    End If
End Sub

⌨️ 快捷键说明

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