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

📄 tjb.frm

📁 煤炭销售管理系统.完成煤炭销售的日常管理工作,和重车计量系统空车计量系统配合使用.
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   6840
         MaskColor       =   &H000000FF&
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   120
         UseMaskColor    =   -1  'True
         Visible         =   0   'False
         Width           =   972
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5760
         TabIndex        =   3
         Top             =   120
         Visible         =   0   'False
         Width           =   972
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   2160
         TabIndex        =   8
         Top             =   120
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   63963136
         UpDown          =   -1  'True
         CurrentDate     =   37506
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "输入需统计的月份"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   0
         TabIndex        =   2
         Top             =   120
         Width           =   2772
      End
   End
   Begin MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "tjb.frx":263A
      Height          =   330
      Left            =   1080
      TabIndex        =   9
      Top             =   7560
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "rm"
      Text            =   ""
   End
   Begin VB.Label Label3 
      Caption         =   "制表人"
      Height          =   375
      Left            =   120
      TabIndex        =   12
      Top             =   7560
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "本月累计"
      Height          =   255
      Left            =   4080
      TabIndex        =   11
      Top             =   7560
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "销售统计表"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   492
      Left            =   600
      TabIndex        =   5
      Top             =   120
      Width           =   8412
   End
   Begin VB.Menu prin 
      Caption         =   "文件"
      Begin VB.Menu neuoutput 
         Caption         =   "导出"
      End
      Begin VB.Menu mnuPreview 
         Caption         =   "打印预览"
      End
      Begin VB.Menu mnuPrint 
         Caption         =   "打印"
      End
      Begin VB.Menu mnunull 
         Caption         =   "-"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "关闭"
      End
   End
   Begin VB.Menu mnuManual 
      Caption         =   "编码控制预览"
      Enabled         =   0   'False
      Begin VB.Menu mnuPageUp 
         Caption         =   "上页"
      End
      Begin VB.Menu mnuPageDown 
         Caption         =   "下页"
      End
      Begin VB.Menu mnuZoom 
         Caption         =   "显示比例"
      End
      Begin VB.Menu mnuPaperSize 
         Caption         =   "选择纸张"
      End
      Begin VB.Menu mnuOrientation 
         Caption         =   "纸张方向"
      End
   End
   Begin VB.Menu hlp 
      Caption         =   "帮助"
      Begin VB.Menu about 
         Caption         =   "关于"
      End
      Begin VB.Menu neirong 
         Caption         =   "内容"
      End
   End
   Begin VB.Menu quit 
      Caption         =   "退出"
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
End
Attribute VB_Name = "tjb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit 'CODE Manger By BcodeXRose
Dim listindex1
Dim listindex2

Private Const MARGIN_SIZE = 60      ' 单位为缇
' 列拖拽变量
Dim sj, drq
Private m_bDragOK As Boolean
Private m_iDragCol As Integer
Private xdn As Integer, ydn As Integer
Dim sj1, sj2 As String
Dim le%, istr%
Dim ljsj
Dim ljfz
Dim i, j

Private Sub about_Click()
frmAbout.Show
End Sub

'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
'Adodc1.ConnectionTimeout = 15
  ' Adodc1.ConnectionString = "dsn=dzqch"
       'Label2.Caption = Format(DTPicker1.Value, "yyyy年mm月") & "销售统计表"
  '  Adodc1.RecordSource = "SELECT DISTINCT " & jl_sqlstr & ".fhr AS 货主姓名, htk.hth AS 发运票号, htk.htl/1000 AS 合同量, htk.hwm AS 煤种, SUM(" & jl_sqlstr & ".jz)/1000 AS 本月发运量, htk.yfl/1000 AS 累计发量, htk.wfl/1000 AS 欠存量, htk.sj AS 开票时间, htk.fhdw AS 发货单位 FROM " & jl_sqlstr & " INNER JOIN htk ON " & jl_sqlstr & ".hth = htk.hth where " & jl_sqlstr & ".sj like '%" & Format(DTPicker1.Value, "yyyy-mm") & "%' GROUP BY htk.fhdw," & jl_sqlstr & ".fhr, htk.hth,htk.htl, htk.hwm , htk.yfl, htk.wfl, htk.sj"
  '  Adodc1.refresh
   '  Set MSHFlexGrid1.DataSource = Adodc1
    'adodcEnvironment1.Command1 refrash
   ' MSHFlexGrid1.refresh
   ' Call js
End Sub
    
    
    
'##################################################################
'## 过程名称:Command3_Click
'## 参数: 无
'##################################################################
Private Sub Command3_Click()
Unload Me
    Me.Picture2.Visible = True
    Me.MSHFlexGrid1.Visible = False
End Sub
    
'##################################################################
'## 过程名称:Command4_Click
'## 参数: 无
'##################################################################
Private Sub Command4_Click()
    Me.Picture2.Visible = True
    Me.MSHFlexGrid1.Visible = False
End Sub
'##################################################################
'## 过程名称:Command5_Click
'## 参数: 无
'##################################################################
Private Sub Command5_Click()
   ' On Error Resume Next
    List2.AddItem List1.List(listindex1)
    List1.RemoveItem listindex1
End Sub
'##################################################################
'## 过程名称:Command6_Click
'## 参数: 无
'##################################################################
Private Sub Command6_Click()
   ' On Error Resume Next
    Dim li
    Dim jj
    li = List1.listcount
    For jj = 1 To li
        List2.AddItem List1.List(jj)
    Next jj
End Sub
'##################################################################
'## 过程名称:Command7_Click
'## 参数: 无
'##################################################################
Private Sub Command7_Click()
   ' On Error Resume Next
    List1.AddItem List2.List(listindex2)
    List2.RemoveItem listindex2
End Sub
'##################################################################
'## 过程名称:Command9_Click
'## 参数: 无
'##################################################################
Private Sub Command9_Click()
    Dim sql As String
    Me.Picture2.Visible = False
    Me.MSHFlexGrid1.Visible = True
    Dim li, jj
    li = List2.listcount
    If li = 0 Then
        sql = "*"
    Else
        sql = "'"
        For jj = 0 To li - 2
            
            sql = sql & Trim(List2.List(jj)) & "','"
        Next
        sql = sql & Trim(List2.List(li - 1)) & "'"
        
    End If
    Dim sj1, sj2 As String * 10
    Me.Label2.Caption = Format(DTPicker1.Value, "yyyy年m月") & "汽运销售报表"
    sj1 = Format(DTPicker1.Value, "yyyy-mm")
 Adodc1.RecordSource = " SELECT  htk.fhdw AS 发货单位,htk.hth as 票号, htk.htl AS 开票数量,htk.sj AS 开票时间, htk.hwm AS 煤种, SUM(" _
    & jl_sqlstr & ".jz) AS 今日发运量, htk.yfl AS 累计发量, htk.wfl AS 欠存量  FROM " _
    & jl_sqlstr & " INNER JOIN  htk ON htk.hth = " _
    & jl_sqlstr & ".hth where   " & jl_sqlstr & ".sj like'%" _
    & sj1 & "%' and " & jl_sqlstr & ".hwm in (" _
    & sql & ")  group BY htk.fhdw, " _
    & " htk.hth, htk.htl, htk.hwm, htk.yfl, htk.wfl, htk.sj "
    ''debug.Print Adodc1.RecordSource
    Adodc1.refresh
     Set MSHFlexGrid1.DataSource = Adodc1
    MSHFlexGrid1.refresh
    Me.neuoutput.Enabled = True
    Call js
End Sub
    
Private Sub exit_Click()
Unload Me
End Sub

'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
    With Me.MSHFlexGrid1
    .Row = 0
    .ColWidth(0) = 2400
    .ColWidth(1) = 1000
    .ColWidth(2) = 1000
    .ColWidth(3) = 1000
    .ColWidth(4) = 1000
    .ColWidth(5) = 1000
    .ColWidth(6) = 1000
    .ColWidth(7) = 1000
    .ColWidth(8) = 1000
    .ColWidth(9) = 1000
    .ColWidth(10) = 1000
    End With
    Me.DTPicker1.Value = Now
   tjb.Adodc1.ConnectionString = connetstr
tjb.Adodc2.ConnectionString = connetstr
tjb.Adodc3.ConnectionString = connetstr

     Dim llen
     Dim jj  As Integer
    Adodc3.refresh
    llen = Adodc3.Recordset.RecordCount
    For jj = 0 To llen - 1
        List1.AddItem Adodc3.Recordset.Fields(0)
        Adodc3.Recordset.MoveNext
    Next jj
    CurtPrinter1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub
    
'##################################################################
'## 过程名称:Form_Resize
'## 参数: 无
'##################################################################
Private Sub Form_Resize()
    MSHFlexGrid1.Rows = 30
    MSHFlexGrid1.Width = tjb.Width - 400
    MSHFlexGrid1.Height = tjb.Height - 2800
    Label2.Width = tjb.Width
    Dim jj
    Me.CurtPrinter1.Move 0, 0, Me.Width, Me.Height
    End Sub
Private Sub List1_Click()
    listindex1 = List1.ListIndex
End Sub
'##################################################################
'## 过程名称:List2_Click
'## 参数: 无
'##################################################################
Private Sub List2_Click()
    listindex2 = List2.ListIndex
End Sub

'##################################################################
'## 过程名称:Text1_GotFocus
'## 参数: 无
'##################################################################

'##################################################################
'## 过程名称:text1_KeyPress
'## 参数:KeyAscii 为Integer型
'##################################################################
Private Sub text1_KeyPress(KeyAscii As Integer)

⌨️ 快捷键说明

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