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

📄 sk_tuicount.frm

📁 小型医院管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Height          =   180
      Left            =   7560
      TabIndex        =   13
      Top             =   1920
      Width           =   90
   End
   Begin VB.Label 检查费 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   1200
      TabIndex        =   12
      Top             =   3120
      Width           =   90
   End
   Begin VB.Label 手术费 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   2160
      TabIndex        =   11
      Top             =   3120
      Width           =   90
   End
   Begin VB.Label 照像费 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   3240
      TabIndex        =   10
      Top             =   3120
      Width           =   90
   End
   Begin VB.Label b超 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   4320
      TabIndex        =   9
      Top             =   3120
      Width           =   90
   End
   Begin VB.Label 心电图 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   5400
      TabIndex        =   8
      Top             =   3120
      Width           =   90
   End
   Begin VB.Label 金额 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   7800
      TabIndex        =   7
      Top             =   3720
      Width           =   90
   End
   Begin VB.Label 大写金额 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   2160
      TabIndex        =   6
      Top             =   3720
      Width           =   90
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "退 款 统 计"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   3360
      TabIndex        =   5
      Top             =   0
      Width           =   2085
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "到"
      Height          =   180
      Left            =   3000
      TabIndex        =   4
      Top             =   720
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "时   间"
      Height          =   180
      Left            =   360
      TabIndex        =   3
      Top             =   720
      Width           =   630
   End
End
Attribute VB_Name = "sk_tuicount"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


'*********************************************************
'* 名称:nNumber2Chinese
'* 功能:数值转换为人民币(汉字)
'* 用法:nNumber2Chinese(数值)
'*********************************************************
Public Function Num2Chi(txtJE As Double) As String
    Dim i, k As Integer
    Dim NC, nd, ka, chrNum, strZheng As String
    Dim c1, c2, c3 As String
    Dim K1 As Integer
    Dim Zheng As String
    Dim Xiao As String
    NC = Trim(Format(txtJE, "##0.00"))
    c1 = "仟佰拾万仟佰拾亿仟佰拾万仟佰拾元"
    c2 = "角分"
    c3 = "玖捌柒陆伍肆叁贰壹"
    If NC = 0 Then
        Num2Chi = "零元整"
        Exit Function
    End If
    Num2Chi = ""
    Zheng = Mid(NC, 1, (Len(NC) - 3))
    Xiao = Mid(NC, (Len(Zheng) + 2))
    If Val(Xiao) <> 0 Then
        For i = Len(Xiao) To 1 Step -1
            chrNum = Mid(Xiao, i, 1)
            If chrNum <> 0 Then
                Num2Chi = Mid(c2, i, 1) & Num2Chi
                Num2Chi = Mid(c3, (Len(c3) - chrNum + 1), 1) & Num2Chi
            End If
        Next i
    End If
    
    k = 0
    If Val(Zheng) <> 0 Then
        Num2Chi = "元" & Num2Chi
        For i = Len(Zheng) To 1 Step -1
            If (Len(Zheng) - i) = 4 Then
                Num2Chi = "万" & Num2Chi
            ElseIf (Len(Zheng) - i) = 8 Then
                Num2Chi = "亿" & Num2Chi
            ElseIf (Len(Zheng) - i) = 12 Then
                Num2Chi = "万" & Num2Chi
            End If
            chrNum = Mid(Zheng, i, 1)
            If chrNum <> 0 Then
                If i = Len(Zheng) Then
                    Num2Chi = Mid(c3, (Len(c3) - chrNum + 1), 1) & Num2Chi
                Else
                    If (Len(Zheng) - i) <> 4 And (Len(Zheng) - i) <> 8 And (Len(Zheng) - i) <> 12 Then
                        Num2Chi = Mid(c1, (Len(c1) - k), 1) & Num2Chi
                    End If
                    Num2Chi = Mid(c3, (Len(c3) - chrNum + 1), 1) & Num2Chi
                End If
            Else
                If Mid(Num2Chi, 1, 1) <> "元" And Mid(Num2Chi, 1, 1) <> "万" And Mid(Num2Chi, 1, 1) <> "亿" Then
                    If Mid(Num2Chi, 1, 1) <> "零" Then
                        Num2Chi = "零" & Num2Chi
                    End If
                End If
           End If
            k = k + 1
        Next i
    End If
    If Right(Trim(Num2Chi), 1) <> "分" Then
        Num2Chi = Num2Chi & "整"
    End If
    
    
   
   大写金额.Caption = Num2Chi

End Function





Private Sub Command1_Click()
Dim sql As String

v_zt = "退款"

sql = "select * from 收费表 where 日期 between '" & v_sj1.Value & "'and '" & v_sj2.Value & "' and 状态= '" + Trim(v_zt) + "'"

Dim rs As New ADODB.Recordset
rs.Open sql, db
If Not rs.EOF Then


'药费——————————----------------------------
Dim rs1 As New ADODB.Recordset
Dim sql1 As String
sql1 = "select sum(药费) as 药费,sum(出生证) as 出生证,sum(妇检) as 妇检,sum(妇科) as 妇科,sum(处置) as 处置,sum(访视) as 访视,sum(儿检) as 儿检,sum(化验) as 化验,sum(检查费) as 检查费,sum(手术费) as 手术费,sum(照像费) as 照像费,sum(b超) as b超,sum(心电图) as 心电图,sum(金额) as 金额 from 收费表 where 日期 BETWEEN ('" + CStr(v_sj1.Value) + "') and ('" + CStr(v_sj2.Value) + "') and 状态= '" + Trim(v_zt) + "'"
rs1.Open sql1, db


v_yaofei = rs1("药费")

If v_yaofei = 0 Then
v_yaofei = ""
End If

v_chusheng = rs1("出生证")

If v_chusheng = 0 Then
v_chusheng = ""
End If

v_fujian = rs1("妇检")

If v_fujian = 0 Then
v_fujian = ""
End If


v_fuke = rs1("妇科")


If v_fuke = 0 Then
v_fuke = ""
End If


v_chuzhi = rs1("处置")

If v_chuzhi = 0 Then
v_chuzhi = ""
End If


v_fangshi = rs1("访视")


If v_fangshi = 0 Then
v_fangshi = ""
End If


v_erjian = rs1("儿检")

If v_erjian = 0 Then
v_erjian = ""
End If


v_huayan = rs1("化验")

If v_huayan = 0 Then
v_huayan = ""
End If


v_jiancha = rs1("检查费")

If v_jiancha = 0 Then
v_jiancha = ""
End If

v_shoushu = rs1("手术费")

If v_shoushu = 0 Then
v_shoushu = ""
End If


v_zhaoxiang = rs1("照像费")

If v_zhaoxiang = 0 Then
v_zhaoxiang = ""
End If




v_bc = rs1("b超")

If v_bc = 0 Then
v_bc = ""
End If


v_xd = rs1("心电图")

If v_xd = 0 Then
v_xd = ""
End If


v_jine = rs1("金额")

'MsgBox (v_jine)



'装换大小写
 Dim txtJE As Double
 txtJE = v_jine
 Call Num2Chi(txtJE)





药费.Caption = v_yaofei
出生证.Caption = v_chusheng
妇检.Caption = v_fujian
妇科.Caption = v_fuke
处置.Caption = v_chuzhi
访视.Caption = v_fangshi
儿检.Caption = v_erjian
化验.Caption = v_huayan
检查费.Caption = v_jiancha
手术费.Caption = v_shoushu
照像费.Caption = v_zhaoxiang
B超.Caption = v_bc
心电图.Caption = v_xd
金额.Caption = v_jine

Command2.Enabled = True

'-----------------------------------
Else

b1 = MsgBox("没有找到任何数据!", vbQuestion, "系统提示!")
Command2.Enabled = False

药费.Caption = ""
出生证.Caption = ""
妇检.Caption = ""
妇科.Caption = ""
处置.Caption = ""
访视.Caption = ""
儿检.Caption = ""
化验.Caption = ""
检查费.Caption = ""
手术费.Caption = ""
照像费.Caption = ""
B超.Caption = ""
心电图.Caption = ""
金额.Caption = ""
大写金额.Caption = ""


End If
End Sub

Private Sub Command2_Click()

v_zt = "退款"
sql = "select * from 收费表 where 日期 between '" & v_sj1.Value & "'and '" & v_sj2.Value & "' and 状态= '" + Trim(v_zt) + "'"
Dim rs As New ADODB.Recordset
rs.Open sql, db
If Not rs.EOF Then

Set 退款表.DataSource = rs
退款表.Sections.Item("section2").Controls.Item("sj1").Caption = v_sj1.Value
退款表.Sections.Item("section2").Controls.Item("sj2").Caption = v_sj2.Value
退款表.Sections.Item("section2").Controls.Item("药费").Caption = 药费.Caption
退款表.Sections.Item("section2").Controls.Item("出生证").Caption = 出生证.Caption
退款表.Sections.Item("section2").Controls.Item("妇检").Caption = 妇检.Caption
退款表.Sections.Item("section2").Controls.Item("妇科").Caption = 妇科.Caption
退款表.Sections.Item("section2").Controls.Item("处置").Caption = 处置.Caption
退款表.Sections.Item("section2").Controls.Item("访视").Caption = 访视.Caption
退款表.Sections.Item("section2").Controls.Item("儿检").Caption = 儿检.Caption
退款表.Sections.Item("section2").Controls.Item("化验").Caption = 化验.Caption
退款表.Sections.Item("section2").Controls.Item("检查费").Caption = 检查费.Caption
退款表.Sections.Item("section2").Controls.Item("手术费").Caption = 手术费.Caption
退款表.Sections.Item("section2").Controls.Item("照像费").Caption = 照像费.Caption
退款表.Sections.Item("section2").Controls.Item("b超").Caption = B超.Caption
退款表.Sections.Item("section2").Controls.Item("心电图").Caption = 心电图.Caption
退款表.Sections.Item("section2").Controls.Item("大写金额").Caption = 大写金额.Caption
退款表.Sections.Item("section2").Controls.Item("小写").Caption = 金额.Caption

退款表.Show
End If
End Sub

⌨️ 快捷键说明

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