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

📄 frmhz.frm

📁 一套比较全面的茶馆控制系统软件源代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmHZ 
   Caption         =   "消费汇总表"
   ClientHeight    =   3990
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9870
   Icon            =   "frmHZ.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   3990
   ScaleWidth      =   9870
   WindowState     =   2  'Maximized
   Begin VB.PictureBox Picture1 
      Height          =   540
      Left            =   30
      ScaleHeight     =   480
      ScaleWidth      =   11505
      TabIndex        =   6
      Top             =   2925
      Width           =   11565
      Begin VB.CommandButton cmdPrinter 
         Caption         =   "打印(&P)"
         Height          =   435
         Left            =   8385
         TabIndex        =   3
         Top             =   -15
         Width           =   1110
      End
      Begin VB.CommandButton cmdSearch 
         Caption         =   "搜索(&S)"
         Height          =   435
         Left            =   9300
         TabIndex        =   4
         Top             =   -60
         Width           =   1110
      End
      Begin VB.CommandButton cmdClose 
         Cancel          =   -1  'True
         Caption         =   "关闭(&C)"
         Height          =   435
         Left            =   10215
         TabIndex        =   5
         Top             =   15
         Width           =   1110
      End
      Begin VB.Frame Frame1 
         Height          =   495
         Left            =   75
         TabIndex        =   7
         Top             =   -45
         Width           =   8160
         Begin VB.OptionButton optStyle 
            Caption         =   "按消费时间归类"
            Height          =   240
            Left            =   6300
            TabIndex        =   2
            Top             =   195
            Width           =   1695
         End
         Begin VB.OptionButton optBranch 
            Caption         =   "按物品类型"
            Height          =   210
            Left            =   4695
            TabIndex        =   1
            Top             =   210
            Value           =   -1  'True
            Width           =   1455
         End
         Begin VB.Line Line1 
            BorderColor     =   &H00808080&
            Index           =   0
            X1              =   4365
            X2              =   4365
            Y1              =   135
            Y2              =   450
         End
         Begin VB.Line Line1 
            BorderColor     =   &H00FFFFFF&
            Index           =   1
            X1              =   4380
            X2              =   4380
            Y1              =   135
            Y2              =   450
         End
         Begin VB.Line Line1 
            BorderColor     =   &H00808080&
            Index           =   2
            X1              =   4305
            X2              =   4305
            Y1              =   135
            Y2              =   450
         End
         Begin VB.Line Line1 
            BorderColor     =   &H00FFFFFF&
            Index           =   3
            X1              =   4320
            X2              =   4320
            Y1              =   135
            Y2              =   450
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "请 选 择 您 所 喜 欢 的 归 类 方 法"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000000C0&
            Height          =   210
            Left            =   270
            TabIndex        =   8
            Top             =   195
            Width           =   3675
         End
      End
   End
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      Height          =   2430
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3885
      _ExtentX        =   6853
      _ExtentY        =   4286
      _Version        =   393216
      Rows            =   3
      RowHeightMin    =   50
      BackColorSel    =   14737632
      ForeColorSel    =   12582912
      BackColorBkg    =   12632256
      WordWrap        =   -1  'True
      AllowBigSelection=   0   'False
      FocusRect       =   0
      SelectionMode   =   1
      AllowUserResizing=   1
   End
   Begin VB.Menu MnuStoreDisplay 
      Caption         =   "事务(&T)"
      Begin VB.Menu MnuStoreSearch 
         Caption         =   "搜索(&S) ..."
         Shortcut        =   ^F
      End
      Begin VB.Menu Line01 
         Caption         =   "-"
      End
      Begin VB.Menu MnuStorePrint 
         Caption         =   "打印(&P) ..."
         Shortcut        =   ^P
      End
      Begin VB.Menu Line02 
         Caption         =   "-"
      End
      Begin VB.Menu MnuStoreNameSort 
         Caption         =   "按物品类别归类"
         Checked         =   -1  'True
      End
      Begin VB.Menu MnuProductNameSort 
         Caption         =   "按消费时间归类"
         Checked         =   -1  'True
      End
      Begin VB.Menu Line04 
         Caption         =   "-"
      End
      Begin VB.Menu MnuDisplayAllStore 
         Caption         =   "重新汇总消费单(&A) ..."
         Shortcut        =   ^A
      End
      Begin VB.Menu Line03 
         Caption         =   "-"
      End
      Begin VB.Menu MnuDisplayStoreMerge 
         Caption         =   "合并归类的相同列(&M)"
         Checked         =   -1  'True
         Shortcut        =   ^M
      End
   End
   Begin VB.Menu MnuReturn 
      Caption         =   "返回首页(&R)"
   End
End
Attribute VB_Name = "frmHZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdClose_Click()

  Unload Me
  
End Sub

Private Sub cmdPrinter_Click()

  Me.MousePointer = 11
     frmHZPrint.Show 1
  Me.MousePointer = 0
  
End Sub

Private Sub cmdSearch_Click()

  Screen.MousePointer = 11
    Load frmMainSearch
    frmMainSearch.cmbBranchName.Enabled = False
    frmMainSearch.cmbBranchName.BackColor = &H8000000F
  Screen.MousePointer = 0
    frmMainSearch.Show 1
    
    '继续工作
    Call QuerySell(optBranch.Value, optStyle.Value, MnuDisplayStoreMerge.Checked)
    
End Sub


Private Sub Form_Load()

    Screen.MousePointer = 11
    
    '排列表格
    Dim Ltp As Boolean
        Ltp = GetSetting(App.EXEName, "MainOption", "库存合并归类的列", False)
    If Ltp = False Then
       MnuDisplayStoreMerge.Checked = False
     Else
       MnuDisplayStoreMerge.Checked = True
    End If
         
     MnuStoreNameSort.Checked = True
     MnuProductNameSort.Checked = False
    
     DCondStr = ""
     SCondStr = ""
     
    QueryStr = "Select  MenuType,名称,代码,单位,单价,sum(selllist.数量) as 数量,sum(selllist.金额) as 金额,日期 from SellList"
    Call QuerySell(True, False, MnuDisplayStoreMerge.Checked)

    Screen.MousePointer = 0
End Sub

Private Sub Form_Resize()

    Dim sngButtonTop As Single
    Dim sngScaleWidth As Single
    Dim sngScaleHeight As Single

    On Error GoTo Form_Resize_Error
    With Me
        sngScaleWidth = .ScaleWidth
        sngScaleHeight = .ScaleHeight

        ' 移动“关闭”按钮到右下角
        With .Picture1
              sngButtonTop = sngScaleHeight - (.Height + MARGIN_SIZE)
              .Move MARGIN_SIZE, sngButtonTop, sngScaleWidth - (2 * MARGIN_SIZE), .Height
        End With
        
        With .cmdClose
              .Move Picture1.ScaleWidth - 10 - .Width, 30
        End With
        
        With .cmdSearch
              .Move Me.cmdClose.Left - .Width - 20, 30
        End With
        
        With .cmdPrinter
              .Move Me.cmdSearch.Left - .Width - 20, 30
        End With
        
        .Grid1.Move MARGIN_SIZE, _
            MARGIN_SIZE, _
            sngScaleWidth - (2 * MARGIN_SIZE), _
            sngButtonTop - (2 * MARGIN_SIZE)

    End With
    Exit Sub

Form_Resize_Error:
    ' 避免负值错误
    Resume Next

End Sub

Private Sub QuerySell(CBranch As Boolean, CStyle As Boolean, CMerge As Boolean)

   Me.MousePointer = 11
   Dim DB As Database, EF As Recordset, HH As Integer
   Dim MargeRowBN As String, X As Integer, tmpBNX As String, ZF As String
   Dim MargeRow As String, tmpBN As String
   
    '配置网格

    Dim StoreQueryString As String
    
    Select Case SCondStr
           Case ""
               StoreQueryString = QueryStr
           Case Is <> ""
               StoreQueryString = QueryStr + " Where " & SCondStr
    End Select
    
    If CBranch = True Then
       StoreQueryString = StoreQueryString + " Group by 日期,MenuType,名称,代码,单位,单价  Order by MenuType"
       Else
       StoreQueryString = StoreQueryString + "  Group by 日期,MenuType,名称,代码,单位,单价 Order by 日期"
    End If
    
Grid1.Visible = False
Grid1.Clear
Grid1.Cols = 8
Grid1.FormatString = "^ 物品类别 |^ 物品名称 |^ 物品代码|^ 单位 |^ 单价 |^ 数量 |^ 金额 |^ 购物日期 "

⌨️ 快捷键说明

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