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

📄 frmorderstatistics.frm

📁 vb编出的关于传销工资结算系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Left            =   225
      TabIndex        =   6
      Top             =   2850
      Width           =   8190
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   3240
         Left            =   75
         TabIndex        =   7
         Top             =   150
         Width           =   8040
         _ExtentX        =   14182
         _ExtentY        =   5715
         _Version        =   393216
         AllowUpdate     =   0   'False
         BackColor       =   12648447
         BorderStyle     =   0
         ForeColor       =   16711680
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.ComboBox cob月 
      BackColor       =   &H00C0FFFF&
      ForeColor       =   &H00FF0000&
      Height          =   300
      ItemData        =   "frmOrderStatistics.frx":0000
      Left            =   7500
      List            =   "frmOrderStatistics.frx":0028
      TabIndex        =   4
      Top             =   975
      Width           =   615
   End
   Begin VB.TextBox txt年 
      BackColor       =   &H00C0FFFF&
      ForeColor       =   &H00FF0000&
      Height          =   300
      Left            =   6525
      TabIndex        =   2
      Top             =   975
      Width           =   615
   End
   Begin Crystal.CrystalReport CrystalReport1 
      Left            =   0
      Top             =   6240
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   262150
      ReportFileName  =   "C:\SYSTEM\REPORT\sgtj.rpt"
      WindowWidth     =   640
      WindowHeight    =   480
      WindowControlBox=   -1  'True
      WindowMaxButton =   -1  'True
      WindowMinButton =   -1  'True
      WindowState     =   2
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   8160
      Top             =   360
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   4
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmOrderStatistics.frx":0053
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmOrderStatistics.frx":036D
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmOrderStatistics.frx":0687
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmOrderStatistics.frx":09A1
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Label Label4 
      Caption         =   "月"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   8175
      TabIndex        =   5
      Top             =   1005
      Width           =   165
   End
   Begin VB.Label Label3 
      Caption         =   "年"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   7275
      TabIndex        =   3
      Top             =   1005
      Width           =   165
   End
   Begin VB.Label Label2 
      Caption         =   "查询月份"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   5550
      TabIndex        =   1
      Top             =   1005
      Width           =   840
   End
End
Attribute VB_Name = "frmOrderStatistics"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Conn As New ADODB.Connection
Dim Cmd As New ADODB.Command
'Dim rs As New ADODB.Recordset

Private Sub cmdClose_Click()
  Conn.Close
  Unload Me
End Sub

Private Sub cmdPreview_Click()
  CrystalReport1.Destination = crptToWindow
  CrystalReport1.PrintReport
End Sub

Private Sub cmdPrint_Click()
  CrystalReport1.Destination = crptToPrinter
  CrystalReport1.PrintReport
End Sub

Private Sub cmdSearch_Click()
  Dim Sql As String
  
  Sql = "delete * from 购货清单审购统计"
  Cmd.CommandText = Sql
  Cmd.Execute
  
  If Option1.Value = True Then
     If txt起始订单号码.Text > txt终止订单号码.Text Then
        MsgBox "起始订单号码不能大于终止订单号码!"
        Exit Sub
     End If
     
     Sql = "select 货品代号 as 代号,货品品名 as 品名,货品单价 as 单价,货品单位积分 as 单位积分,sum(购货数量) as 数量 from 购货清单明细 where 订单号码>= '" & _
         txt起始订单号码.Text & "' and " & "订单号码<= '" & txt终止订单号码.Text & "' group by 货品代号,货品品名,货品单价,货品单位积分"
     
     Adodc1.RecordSource = Sql
     Adodc1.Refresh
     Set DataGrid1.DataSource = Adodc1
     DataGrid1.ReBind
  End If
  
  If Option2.Value = True Then
    Sql = "select 货品代号 as 代号,货品品名 as 品名,货品单价 as 单价,货品单位积分 as 单位积分,sum(购货数量) as 数量 from 购货清单明细 where 订单号码 in (select 订单号码 from 购货清单 where 业务员工号= '" & txt员工工号.Text & "') group by 货品代号,货品品名,货品单价,货品单位积分"
    
    Adodc1.RecordSource = Sql
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
    DataGrid1.ReBind
  End If
  
  Sql = "insert into 购货清单审购统计 " & Sql
  Cmd.CommandText = Sql
  Cmd.Execute
End Sub

Private Sub Combo2_Change()
  Combo2.Text = UCase(Combo2.Text)
  Combo2.SelStart = Len(Combo2.Text)
  txt起始订单号码.Text = Combo2.Text
  txt终止订单号码.Text = Combo2.Text
End Sub

Private Sub Combo2_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     txt起始订单号码.SetFocus
     txt起始订单号码.SelStart = Len(txt终止订单号码.Text)
  End If
End Sub

Private Sub Combo3_Change()
  Combo3.Text = UCase(Combo3.Text)
  Combo3.SelStart = Len(Combo3.Text)
  txt员工工号.Text = Combo3.Text
End Sub

Private Sub Combo3_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     txt员工工号.SetFocus
     txt员工工号.SelStart = Len(txt员工工号.Text)
  End If
End Sub

Private Sub Command2_Click()
  frmSGQD_YGGH.Show 1
End Sub

Private Sub Form_Load()
  Dim ConnStr As String
  
  ConnStr = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\system\database\system.mdb"

  If Month(Date) = 1 Then
     txt年.Text = Year(Date) - 1
  Else
     txt年.Text = Year(Date)
  End If
  
  If Month(Date) = 1 Then
     cob月.Text = 12
  Else
     cob月.Text = Month(Date) - 1
  End If
  
  Option1.Value = True
  Frame3.Visible = True
  Option2.Value = False
  Frame4.Visible = False
  
  Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\system\database\system.mdb"
  
  Conn.Open ConnStr
  Set Cmd.ActiveConnection = Conn
End Sub

Private Sub Option1_Click()
  Frame3.Visible = True
  Frame4.Visible = False
End Sub

Private Sub Option2_Click()
  Frame3.Visible = False
  Frame4.Visible = True
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
  Select Case Button.Key
  Case "Search"
    cmdSearch_Click
  Case "Preview"
    cmdPreview_Click
  Case "Print"
    cmdPrint_Click
  Case "Close"
    cmdClose_Click
  End Select
End Sub

Private Sub txt起始订单号码_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     txt终止订单号码.SetFocus
     txt终止订单号码.SelStart = Len(txt终止订单号码.Text)
  End If
End Sub

⌨️ 快捷键说明

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