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

📄 xstj.frm

📁 本系统特为行业报价、订单、产品管理与客户关系管理所订制
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Object = "{4F29B06F-16D9-4A0C-9C8A-2F0C02F625FE}#1.7#0"; "FlexCell.ocx"
Object = "{CFA7AFF4-3242-4269-9172-7389D695AE01}#1.0#0"; "StoneXP.ocx"
Begin VB.Form xstj 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "销售统计表"
   ClientHeight    =   5865
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6630
   Icon            =   "XStj.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5865
   ScaleWidth      =   6630
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame2 
      Caption         =   "指定排行榜查询"
      Height          =   855
      Left            =   120
      TabIndex        =   5
      Top             =   4800
      Width           =   6255
      Begin VB.CheckBox Check3 
         Caption         =   "日:"
         Height          =   255
         Left            =   3600
         TabIndex        =   12
         Top             =   390
         Value           =   1  'Checked
         Width           =   580
      End
      Begin VB.CheckBox Check2 
         Caption         =   "月:"
         Height          =   255
         Left            =   2020
         TabIndex        =   11
         Top             =   390
         Value           =   1  'Checked
         Width           =   615
      End
      Begin VB.CheckBox Check1 
         Caption         =   "年:"
         Height          =   255
         Left            =   220
         TabIndex        =   10
         Top             =   390
         Value           =   1  'Checked
         Width           =   615
      End
      Begin StoneXP.XPButton XPButton1 
         Height          =   300
         Left            =   5280
         TabIndex        =   9
         Top             =   360
         Width           =   735
         _ExtentX        =   1296
         _ExtentY        =   529
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "查询"
         MouseIcon       =   "XStj.frx":000C
         MousePointer    =   99
      End
      Begin 商品综合管理系统.XPCombo XPCombo1 
         Height          =   315
         Left            =   840
         TabIndex        =   6
         Top             =   360
         Width           =   975
         _extentx        =   1720
         _extenty        =   556
         font            =   "XStj.frx":0326
         locked          =   -1
      End
      Begin 商品综合管理系统.XPCombo XPCombo2 
         Height          =   315
         Left            =   2640
         TabIndex        =   7
         Top             =   360
         Width           =   855
         _extentx        =   1508
         _extenty        =   556
         font            =   "XStj.frx":034A
         locked          =   -1
      End
      Begin 商品综合管理系统.XPCombo XPCombo3 
         Height          =   315
         Left            =   4200
         TabIndex        =   8
         Top             =   360
         Width           =   855
         _extentx        =   1508
         _extenty        =   556
         font            =   "XStj.frx":036E
         locked          =   -1
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "本年销售统计"
      Height          =   375
      Left            =   5040
      TabIndex        =   4
      Top             =   120
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "本月销售统计"
      Height          =   375
      Left            =   3600
      TabIndex        =   3
      Top             =   120
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "本日销售统计"
      Height          =   4215
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   6375
      Begin FlexCell.Grid Grid1 
         Height          =   3735
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   6135
         _ExtentX        =   10821
         _ExtentY        =   6588
         Cols            =   5
         DisplayRowIndex =   -1  'True
         ExtendLastCol   =   -1  'True
         ReadOnly        =   -1  'True
         Rows            =   1
         ScrollBars      =   2
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "本日销售统计"
      Height          =   375
      Left            =   2160
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
   Begin ACTIVESKINLibCtl.Skin Skn1 
      Left            =   0
      OleObjectBlob   =   "XStj.frx":0392
      Top             =   0
   End
End
Attribute VB_Name = "xstj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2008/05/10
'描    述:商品综合管理系统 Sql2000版
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub Check2_Click()
If Check2.Value = 1 Then
Check1.Value = 1
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Check1.Value = 1
Check2.Value = 1
End If
End Sub
Private Sub SGfinish()
Grid1.Column(3).Sort (cellDescending)
Grid1.AutoRedraw = True
Grid1.Refresh
Grid1.Rows = Grid1.Rows + 1
Grid1.ReadOnly = False
Grid1.Range(Grid1.Rows - 1, 1, Grid1.Rows - 1, 4).ForeColor = vbRed
Grid1.Range(Grid1.Rows - 1, 1, Grid1.Rows - 1, 2).Merge
Grid1.Range(Grid1.Rows - 1, 1, Grid1.Rows - 1, 2).Alignment = cellRightCenter
Grid1.Cell(Grid1.Rows - 1, 1).Text = "统计金额:"
Grid1.Cell(Grid1.Rows - 1, 3).Text = "0.00"
For i = 1 To Grid1.Rows - 2
 Grid1.Cell(Grid1.Rows - 1, 3).Text = Grid1.Cell(Grid1.Rows - 1, 3).DoubleValue + Grid1.Cell(i, 3).DoubleValue
Next
Grid1.ReadOnly = True
Set Qy1 = Nothing
End Sub
Private Sub TJ_Bof()
Set Qy1 = cnn.Execute("select id,coname,zmoney,jdate from XS_dj")
Grid1.Rows = 1
Grid1.AutoRedraw = False
End Sub
Private Sub Command1_Click()
Frame1.Caption = "本日销售统计"
TJ_Bof

Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = Year(Date) And Month(Qy1.Fields(3)) = Month(Date) And Day(Qy1.Fields(3)) = Day(Date) Then
    SG
  End If
  Qy1.MoveNext
Loop
SGfinish
End Sub
Private Sub SG()
    Grid1.Rows = Grid1.Rows + 1
    Grid1.Cell(Grid1.Rows - 1, 1).Text = Qy1.Fields(0)
    Grid1.Cell(Grid1.Rows - 1, 2).Text = Qy1.Fields(1)
    Grid1.Cell(Grid1.Rows - 1, 3).Text = Qy1.Fields(2)
    Grid1.Cell(Grid1.Rows - 1, 4).Text = Qy1.Fields(3)
End Sub
Private Sub Command2_Click()
Frame1.Caption = "本月销售统计"
TJ_Bof
Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = Year(Date) And Month(Qy1.Fields(3)) = Month(Date) Then
  Dim inset As Integer
  inset = 0
   For i = 1 To Grid1.Rows - 1
    If Grid1.Cell(i, 1).Text = Qy1.Fields(0) Then
     Grid1.Cell(i, 3).Text = Grid1.Cell(i, 3).DoubleValue + Qy1.Fields(2)
     inset = 1
    End If
   Next
   If inset = 0 Then
    SG
   End If
  End If
  Qy1.MoveNext
Loop
SGfinish
End Sub

Private Sub Command3_Click()
Frame1.Caption = "本年销售统计"
TJ_Bof
Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = Year(Date) Then
  Dim inset As Integer
  inset = 0
   For i = 1 To Grid1.Rows - 1
    If Grid1.Cell(i, 1).Text = Qy1.Fields(0) Then
     Grid1.Cell(i, 3).Text = Grid1.Cell(i, 3).DoubleValue + Qy1.Fields(2)
     inset = 1
    End If
  Next
    If inset = 0 Then
      SG
    End If
   End If
  Qy1.MoveNext
Loop
SGfinish
End Sub

Private Sub Form_Load()
Skn1.LoadSkin App.Path & sknPname
Skn1.ApplySkinByName hWnd, "窗体"
Skn1.ApplySkin hWnd

With Grid1
 .OpenFile ("xstj.cel")
End With
For i = Year(Date) To Year(Date) - 5 Step -1
 XPCombo1.AddItem "" & i & ""
Next
XPCombo1.ListIndex = 0
For i = 1 To 12
 XPCombo2.AddItem "" & i & ""
Next
XPCombo2.ListIndex = Month(Date) - 1

For i = 1 To 31
 XPCombo3.AddItem "" & i & ""
Next
XPCombo3.ListIndex = Day(Date) - 1
Call Command1_Click
End Sub

Private Sub XPButton1_Click()
Frame1.Caption = "销售统计查询"
  Dim inset As Integer
If Check1.Value = 1 And Check2.Value <> 1 And Check3.Value <> 1 Then
TJ_Bof
Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = XPCombo1.Text Then
  inset = 0
   For i = 1 To Grid1.Rows - 1
    If Grid1.Cell(i, 1).Text = Qy1.Fields(0) Then
     Grid1.Cell(i, 3).Text = Grid1.Cell(i, 3).DoubleValue + Qy1.Fields(2)
     inset = 1
    End If
  Next
    If inset = 0 Then
      SG
    End If
   End If
  Qy1.MoveNext
Loop
Frame1.Caption = Frame1.Caption & "(" & XPCombo1.Text & "年)"
End If

If Check1.Value = 1 And Check2.Value = 1 And Check3.Value <> 1 Then
TJ_Bof
Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = XPCombo1.Text And Month(Qy1.Fields(3)) = XPCombo2.Text Then
  inset = 0
   For i = 1 To Grid1.Rows - 1
    If Grid1.Cell(i, 1).Text = Qy1.Fields(0) Then
     Grid1.Cell(i, 3).Text = Grid1.Cell(i, 3).DoubleValue + Qy1.Fields(2)
     inset = 1
    End If
   Next
   If inset = 0 Then
    SG
   End If
  End If
  Qy1.MoveNext
Loop
Frame1.Caption = Frame1.Caption & "(" & XPCombo1.Text & "年" & XPCombo2.Text & "月)"
End If

If Check1.Value = 1 And Check2.Value = 1 And Check3.Value = 1 Then
TJ_Bof
Do While Not Qy1.EOF
  If Year(Qy1.Fields(3)) = XPCombo1.Text And Month(Qy1.Fields(3)) = XPCombo2.Text And Day(Qy1.Fields(3)) = XPCombo3.Text Then
    SG
  End If
  Qy1.MoveNext
Loop
Frame1.Caption = Frame1.Caption & "(" & XPCombo1.Text & "年" & XPCombo2.Text & "月" & XPCombo3.Text & "日)"
End If
SGfinish

End Sub

⌨️ 快捷键说明

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