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

📄 storestat.frm

📁 一个关于电脑管理汽车的软件
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Object = "{40D97E01-4259-4398-B597-183C348B488F}#1.0#0"; "BSE.ocx"
Begin VB.Form StoreStat 
   Caption         =   "库存分析"
   ClientHeight    =   8535
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11445
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   8535
   ScaleWidth      =   11445
   Begin VB.Frame frameInfo 
      Height          =   855
      Index           =   0
      Left            =   0
      TabIndex        =   5
      Top             =   0
      Width           =   11775
      Begin VB.CommandButton Command1 
         Height          =   495
         Index           =   4
         Left            =   6240
         Picture         =   "StoreStat.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   8
         ToolTipText     =   "刷新"
         Top             =   240
         Width           =   495
      End
      Begin VB.CommandButton Command1 
         Height          =   495
         Index           =   5
         Left            =   6840
         Picture         =   "StoreStat.frx":014A
         Style           =   1  'Graphical
         TabIndex        =   7
         ToolTipText     =   "打印"
         Top             =   240
         Width           =   495
      End
      Begin VB.ComboBox Combo1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Left            =   3240
         TabIndex        =   6
         Top             =   360
         Width           =   2415
      End
      Begin VB.Label Label10 
         Caption         =   "库存分析"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   9
         Top             =   360
         Width           =   1935
      End
   End
   Begin VB.Frame frameInfo 
      Height          =   855
      Index           =   1
      Left            =   0
      TabIndex        =   0
      Top             =   7680
      Width           =   11775
      Begin VB.Label Label1 
         Height          =   255
         Index           =   2
         Left            =   8400
         TabIndex        =   12
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label10 
         Caption         =   "占总库存(%):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   1
         Left            =   6480
         TabIndex        =   11
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label1 
         Height          =   255
         Index           =   1
         Left            =   4320
         TabIndex        =   4
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label1 
         Height          =   255
         Index           =   0
         Left            =   1200
         TabIndex        =   3
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label10 
         Caption         =   "成本额:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   3
         Left            =   3360
         TabIndex        =   2
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label10 
         Caption         =   "总数量:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   975
      End
   End
   Begin BSE_Engine.BSE BSE1 
      Left            =   6960
      Top             =   6360
      _ExtentX        =   6588
      _ExtentY        =   1085
   End
   Begin MSComctlLib.ListView lstBillDocu 
      Height          =   4695
      Left            =   0
      TabIndex        =   10
      Top             =   840
      Width           =   8175
      _ExtentX        =   14420
      _ExtentY        =   8281
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   8388608
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   4
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "Name"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "Address"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "City, State, Zip"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   3
         Text            =   "Notes"
         Object.Width           =   2540
      EndProperty
   End
End
Attribute VB_Name = "StoreStat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private SearchGoodsKey As String

Private Sub Combo1_Click()
 Dim TempStr As String
 Dim TempStr2 As String
 Select Case Combo1.ListIndex
   Case 0
    TempStr = Date - 90
    SearchGoodsKey = " Where lastdate > " & Quote(TempStr)
   Case 1
    TempStr = Date - 30
    TempStr2 = Date - 90
    SearchGoodsKey = " Where lastdate > " & Quote(TempStr2) & " and lastdate <= " & Quote(TempStr)
   Case 2
    TempStr = Date - 90
    TempStr2 = Date - 270
    SearchGoodsKey = " Where lastdate > " & Quote(TempStr2) & " and lastdate <= " & Quote(TempStr)
   Case 3
    TempStr = Date - 270
    SearchGoodsKey = " Where lastdate <= " & Quote(TempStr)
 End Select
 LoadData SearchGoodsKey
End Sub


Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
 Combo1.Text = ""
End Sub

Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer)
 Combo1.Text = ""
End Sub

Private Sub Command1_Click(Index As Integer)
 LoadData SearchGoodsKey
End Sub

Private Sub Form_Load()
 Dim TempStr As String
 VarInitData.InitBSE BSE1
 Combo1.AddItem "1月内无动态"
 Combo1.AddItem "1-3月内无动态"
 Combo1.AddItem "3-9月内无动态"
 Combo1.AddItem "9月以上无动态"
 TempStr = Date - 30
 SearchGoodsKey = " Where lastdate > " & TempStr
 Combo1.ListIndex = 0
' LoadData SearchGoodsKey
End Sub

Private Sub Form_Resize()
If Me.ScaleHeight > 0 And Me.ScaleWidth > 0 Then
  frameInfo(0).Width = Me.ScaleWidth
  lstBillDocu.top = frameInfo(0).top + frameInfo(0).Height + 50
  lstBillDocu.left = 100
  lstBillDocu.Width = Me.ScaleWidth - 200
  lstBillDocu.Height = Me.ScaleHeight - frameInfo(0).Height - frameInfo(1).Height
  frameInfo(1).top = lstBillDocu.top + lstBillDocu.Height
  frameInfo(1).Width = Me.ScaleWidth
 End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
 If BSE1.EngineStarted Then BSE1.EndSubClassing
End Sub

Public Sub LoadData(ByVal SearchGoodsKey As String)
 Dim TempSQL As String, TempCount As Long
 Dim i As Integer, VarCount As Long, VarCount2 As Long, VarMoney As Double
 Dim TempRS As MYSQL_RS
  Label1(0) = ""
  Label1(1) = ""
  Label1(2) = ""
  TempSQL = VarInitData.DisplaySQLVal(10) & SearchGoodsKey
  VarInitData.LoadData lstBillDocu, TempSQL
  TempCount = lstBillDocu.ListItems.Count
  If TempCount > 0 Then
   VarCount = 0
   VarMoney = 0
   VarCount2 = 0
   For i = 1 To TempCount
    With lstBillDocu.ListItems(i)
     VarCount = VarCount + Val(.SubItems(3))
     VarMoney = VarMoney + Val(.SubItems(5)) * VarCount
    End With
   Next i
   Set TempRS = New MYSQL_RS
   TempRS.OpenRs VarInitData.DisplaySQLVal(10), gCnn
   With TempRS
    Do Until .EOF
     VarCount2 = VarCount2 + .Fields("goodscount")
     .MoveNext
    Loop
    .CloseRecordset
    .ReleaseMemory
   End With
   Set TempRS = Nothing
   Label1(0) = VarCount
   Label1(1) = VarFunction.DefFormat(VarMoney)
   Label1(2) = VarFunction.DefFormat((VarCount / VarCount2) * 100)
  End If
  VarInitData.lstSort lstBillDocu
End Sub



⌨️ 快捷键说明

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