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

📄 stuff_form_consume.frm

📁 这是一个医院管理系统中的院长查询模块
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      _ExtentY        =   741
      _StockProps     =   64
      Enabled         =   -1  'True
      Enabled         =   -1  'True
      FormMinWidth    =   0
      FormMinHeight   =   0
      AutoCenterFormOnLoad=   -1  'True
      FormDesignHeight=   6825
      FormDesignWidth =   9510
   End
   Begin MSRDC.MSRDC biao 
      Height          =   375
      Left            =   3435
      Top             =   3300
      Visible         =   0   'False
      Width           =   2910
      _ExtentX        =   5133
      _ExtentY        =   661
      _Version        =   393216
      Options         =   0
      CursorDriver    =   1
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "MSRDC1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "stuff_form_consume.frx":0000
      Height          =   5715
      Left            =   75
      OleObjectBlob   =   "stuff_form_consume.frx":000F
      TabIndex        =   7
      Top             =   1050
      Width           =   9300
   End
End
Attribute VB_Name = "stuff_form_consume"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim this_section As String
Dim mkind_code As String

Private Sub print_com_Click()
    Dim s As Integer
    Dim j As Integer
    Dim mnumber
    Dim mline
    Dim mpage
    mline = 40
    Dim mlast
    Dim xh As Integer
    
    If biao.SQL = "" Then
        MsgBox "没有数据", , "错误"
        Exit Sub
    End If
   
    
    If biao.Resultset.EOF And biao.Resultset.BOF Then
        MsgBox "没有数据", , "错误"
        Exit Sub
    End If
    If biao.Resultset.RowCount = 1 Then
        MsgBox "没有数据", , "错误"
        print_COM.Enabled = False
        Exit Sub
    End If
    mnumber = biao.Resultset.RowCount
    mpage = mnumber \ mline
    mlast = mnumber Mod mline
    If mlast <> 0 Then mpage = mpage + 1
    biao.Resultset.MoveFirst
    Screen.MousePointer = 11
    '打印
    Printer.PaperSize = 39
  
    For s = 1 To mpage
        Printer.FontSize = 20
        Printer.FontName = "隶书"
        Printer.Print Space(30) + yuanming + " 消 耗 明 细 表"
        Printer.FontSize = 10.5
        Printer.Print ""
        Printer.Print " [ " + stuff_kind.Text + "(" + NoNull(section.Text) + " ) ]" + Space(38) + CStr(begin_date.Text) + "--" + CStr(end_date.Text) + Space(55) + "第" + CStr(s) + "页/共" + CStr(mpage) + "页"
        Printer.FontName = "宋体"
        Printer.FontSize = 7
        Printer.Print "┌──────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐"
        Printer.Print "│  科    别  │   办公用品   │   印 刷 品   │   水暖材料   │   电器材料   │   卫生洁具   │   洗涤用品   │   纺 织 品   │   机修材料   │   维修材料   │  烟      茶  │   缝纫材料   │   其他材料   │   微机耗材   │   其    他   │      ???     │   合    计   │"
                For j = 1 To mline
            If Not biao.Resultset.EOF Then
        Printer.Print "├──────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤"
                    
                    Printer.Print "│" + biao.Resultset!科别 _
                                ; "│" + iszero(biao.Resultset!办公用品) _
                                ; "│" + iszero(biao.Resultset!印刷品) _
                                ; "│" + iszero(biao.Resultset!水暖材料) _
                                ; "│" + iszero(biao.Resultset!电器材料) _
                                ; "│" + iszero(biao.Resultset!卫生洁具) _
                                ; "│" + iszero(biao.Resultset!洗涤用品) _
                                ; "│" + iszero(biao.Resultset!纺织品) _
                                ; "│" + iszero(biao.Resultset!机修材料) _
                                ; "│" + iszero(biao.Resultset!维修材料) _
                                ; "│" + iszero(biao.Resultset!烟茶) _
                                ; "│" + iszero(biao.Resultset!缝纫材料) _
                                ; "│" + iszero(biao.Resultset!其他材料) _
                                ; "│" + iszero(biao.Resultset!微机耗材) _
                                ; "│" + iszero(biao.Resultset!其他) _
                                ; "│" + iszero(biao.Resultset!不知) _
                                ; "│" + iszero(biao.Resultset!合计) _
                                ; "│"
 
                biao.Resultset.MoveNext
            End If
        Next j
   
        Printer.Print "└──────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘"
        Printer.FontSize = 10.5
        Printer.Print " 科(处)长:                               报表人:" + mop_name + "               审核:                库保:                 打印日期:" + CStr(Date) + "     打印时间:" + CStr(Time)
        If s <> mpage Then Printer.NewPage
    
       
    Next s
    Printer.EndDoc
    Screen.MousePointer = 0
    MsgBox "打印结束", , "确定"

End Sub

Private Sub section_Click()
    If section.Text = " " Then this_section = "%"
    If section.Text = "行政后勤" Then this_section = "1"
    If section.Text = "医疗科室" Then this_section = "2"
    If section.Text = "药技科室" Then this_section = "3"
    If section.Text = "制剂科室" Then this_section = "4"
    If section.Text = "药研所" Then this_section = "5"
    If section.Text = "其他" Then this_section = "6"

End Sub

Private Sub browse_com_Click()
    If (Not IsDate(begin_date.Text)) Or begin_date.Text < "2000-01-01" Or begin_date > Date Then
        MsgBox "起始日期错误", 32, "提示"
        begin_date.SetFocus
        Exit Sub
    End If
    If (Not IsDate(end_date.Text)) Or end_date.Text < "2000-01-01" Or end_date > Date Then
        MsgBox "终止日期错误", 32, "提示"
        end_date.SetFocus
        Exit Sub
    End If

   biao.SQL = "stuff_form_consume '" + CStr(CDate(begin_date)) + "','" + CStr(CDate(CDate(end_date) + 1)) + "','" + this_section + "'"
    biao.Refresh
End Sub

Private Sub Form_Load()
    biao.DataSourceName = dbfname
    biao.Connect = dbfstr
    end_date.Text = Date
    begin_date.Text = DateAdd("m", -1, Date)
    begin_date.Text = DateAdd("d", 1, begin_date.Text)
    section.AddItem "行政后勤"
    section.AddItem "医疗科室"
    section.AddItem "药技科室"
    section.AddItem "制剂科室"
    'section.AddItem "药研所"
    section.AddItem "其他"
    section.AddItem " "
    section.Text = " "
     '''''隐藏主菜单''''''''''''''
    Form3.Visible = False
    Form3.Enabled = False
    '''''''''''''''''''''''
    stuff_kind.AddItem "卫生材料"
    stuff_kind.AddItem "卫杂材料"
    stuff_kind.AddItem "其他材料"
    stuff_kind.Text = "卫生材料"

End Sub
Private Sub Form_Unload(Cancel As Integer)
    Form3.Enabled = True
    Form3.Visible = True

End Sub

Private Sub quit_com_Click()
    Unload Me
End Sub




Private Sub stuff_kind_Click()
    If stuff_kind.Text = "卫生材料" Then mkind_code = "H"
    If stuff_kind.Text = "卫杂材料" Then mkind_code = "I"
    If stuff_kind.Text = "其他材料" Then mkind_code = "J"
End Sub

Private Sub UpDown_begin_DownClick()
    If IsDate(begin_date) Then
        begin_date.Text = CStr(CDate(begin_date.Text) - 1)
        If begin_date.Text < "2000-01-01" Then begin_date = "2000-01-01"
        If begin_date.Text > Date Then begin_date = Date
    End If
End Sub
Private Sub UpDown_begin_UpClick()
    If IsDate(begin_date) Then
        begin_date.Text = CStr(CDate(begin_date.Text) + 1)
        If begin_date.Text < "2000-01-01" Then begin_date = "2000-01-01"
        If begin_date.Text > Date Then begin_date = Date
    End If
End Sub
Private Sub UpDown_end_DownClick()
    If IsDate(end_date) Then
        end_date.Text = CStr(CDate(end_date.Text) - 1)
        If end_date.Text < "2000-01-01" Then end_date = "2000-01-01"
        If end_date.Text > Date Then end_date = Date
    End If
End Sub
Private Sub UpDown_end_UpClick()
    If IsDate(end_date) Then
        end_date.Text = CStr(CDate(end_date.Text) + 1)
        If end_date.Text < "2000-01-01" Then end_date = "2000-01-01"
        If end_date.Text > Date Then end_date = Date
    End If
End Sub





⌨️ 快捷键说明

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