📄 rtj.frm
字号:
End
Begin VB.PictureBox Picture1
BackColor = &H00E0E0E0&
DrawStyle = 1 'Dash
DrawWidth = 32
Height = 615
Left = 120
ScaleHeight = 564
ScaleWidth = 11604
TabIndex = 0
Top = 840
Width = 11655
Begin VB.CommandButton Command4
Caption = "统计条件"
Height = 375
Left = 5160
TabIndex = 12
Top = 120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 300
Left = 6840
TabIndex = 3
Top = 120
Visible = 0 'False
Width = 972
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "打印"
Height = 300
Left = 7800
MaskColor = &H000000FF&
Style = 1 'Graphical
TabIndex = 2
Top = 120
UseMaskColor = -1 'True
Visible = 0 'False
Width = 972
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 372
Left = 2280
TabIndex = 1
Top = 36
Width = 1932
_ExtentX = 3408
_ExtentY = 656
_Version = 393216
Format = 63111168
UpDown = -1 'True
CurrentDate = 37506
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 1080
Top = 480
Visible = 0 'False
Width = 4455
_ExtentX = 7853
_ExtentY = 868
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
BackColor = &H00C0FFFF&
BackStyle = 0 'Transparent
Caption = "输入需统计的日期"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 120
Width = 2055
End
End
Begin VB.Label Label4
Caption = "本日累计"
Height = 255
Left = 4920
TabIndex = 8
Top = 7560
Visible = 0 'False
Width = 1335
End
Begin VB.Label Label3
Caption = "制表人"
Height = 375
Left = 600
TabIndex = 7
Top = 7560
Width = 855
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "销售日报表"
BeginProperty Font
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 240
TabIndex = 5
Top = 240
Width = 8415
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 = "rtjb"
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 headle
Dim i, j
Private Sub about_Click()
frmAbout.Show
End Sub
'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
' On Error Resume Next
Dim sj1, sj2 As String * 10
Label2.Caption = Format(DTPicker1.Value, "yyyy年m月d日") & "销售日报表"
' sj1 = Format(DTPicker1.Value, "yyyy-mm-dd")
' MSHFlexGrid1.refresh
' Adodc1.RecordSource = " SELECT DISTINCT htk.fhdw AS 发货单位, htk.htl AS 开票数量,htk.sj AS 开票时间, htk.hwm AS 煤种, SUM(" & jl_sqlstr &".jz) AS 今日发运量, htk.yfl AS 累计发量, htk.wfl AS 欠存量," & jl_sqlstr &".dhdd as 到货地点," & jl_sqlstr &".fhr AS 发货人,bz as 备注 FROM " & jl_sqlstr &" INNER JOIN htk ON htk.hth = " & jl_sqlstr &".hth where " & jl_sqlstr &".sj like'%" & sj1 & "%' and " & jl_sqlstr &".hwm like '%煤%' group BY " & jl_sqlstr &".dhdd,htk.bz,htk.fhdw, " & jl_sqlstr &".fhr, htk.hth, htk.htl, htk.hwm, htk.yfl, htk.wfl, htk.sj"
'Adodc1.refresh
'MSHFlexGrid1.refresh
End Sub
'##################################################################
'## 过程名称:Command3_Click
'## 参数: 无
'##################################################################
Private Sub Command3_Click()
Unload Me
End Sub
'##################################################################
'## 过程名称:Command4_Click
'## 参数: 无
'##################################################################
Private Sub Command4_Click()
On Error Resume Next
Dim recc As Integer
Dim jj As Integer
Me.Adodc4.ConnectionString = connetstr
Adodc4.RecordSource = "select DISTINCT hth from jlk where sj like '%" & Format(Me.DTPicker1.Value, "yyyy-mm-dd") & "%'"
Adodc4.refresh
recc = Adodc4.Recordset.RecordCount
If recc <= 1 Then
MsgBox "没有今日记录"
Exit Sub
End If
Adodc4.Recordset.MoveFirst
List3.Clear
For jj = 1 To recc
List3.AddItem Adodc4.Recordset.Fields("hth")
Adodc4.Recordset.MoveNext
Next jj
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 list1cont As Integer
Dim list2cont As Integer
Dim li, jj
Dim sql As String
Dim hwms As String
Dim hths As String
Dim sj1, sj2 As String * 10
list1cont = List1.ListCount
list2cont = List3.ListCount
hwms = "'煤'"
For jj = 0 To list1cont - 1
If List1.Selected(jj) = True Then
hwms = hwms + ",'" & List1.List(jj) & "'"
End If
Next jj
jj = 0
hths = "'1000' "
For jj = 0 To list2cont - 1
If List3.Selected(jj) = True Then
hths = hths + ",'" & List3.List(jj) & "'"
End If
Next jj
Debug.Print hwms, hths
Me.Picture2.Visible = False
Me.MSHFlexGrid1.Visible = True
li = List2.ListCount
If li = 0 Then
sql = "*"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -