📄 browseinvoice.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form BrowseInvoice
BorderStyle = 1 'Fixed Single
ClientHeight = 5205
ClientLeft = 1680
ClientTop = 1725
ClientWidth = 9345
Icon = "BrowseInvoice.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 5205
ScaleWidth = 9345
Begin MSComctlLib.ImageList ImageList1
Left = 2580
Top = 3660
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 22
ImageHeight = 22
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "BrowseInvoice.frx":038A
Key = ""
EndProperty
EndProperty
End
Begin VB.CommandButton Command1
Caption = "关闭窗口(&E)"
Height = 330
Left = 7890
TabIndex = 1
Top = 4740
Width = 1305
End
Begin VB.Frame Frame1
Height = 1500
Left = 7695
TabIndex = 11
Top = -15
Width = 1605
Begin VB.OptionButton Option1
Caption = "全部恢复打印"
ForeColor = &H00000000&
Height = 375
Left = 135
TabIndex = 2
Top = 420
Width = 1380
End
Begin VB.OptionButton Option2
Caption = "选择恢复打印"
ForeColor = &H00000000&
Height = 435
Left = 135
TabIndex = 3
Top = 930
Width = 1380
End
End
Begin VB.Frame Frame2
Height = 3075
Left = 7695
TabIndex = 8
Top = 1530
Width = 1605
Begin VB.TextBox Text1
ForeColor = &H000000FF&
Height = 270
Left = 210
MaxLength = 4
TabIndex = 4
Top = 885
Width = 1185
End
Begin VB.TextBox Text2
ForeColor = &H000000FF&
Height = 315
Left = 225
MaxLength = 4
TabIndex = 5
Top = 1965
Width = 1185
End
Begin VB.CommandButton Command2
Caption = "确定(&O)"
Height = 345
Left = 180
TabIndex = 6
Top = 2550
Width = 1320
End
Begin VB.Label Label1
Caption = "输入开始用户代码:"
Height = 405
Left = 195
TabIndex = 10
Top = 330
Width = 1185
End
Begin VB.Label Label2
Caption = "输入终止用户代码:"
Height = 375
Left = 195
TabIndex = 9
Top = 1380
Width = 1215
End
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 270
Left = 75
TabIndex = 7
Top = 5205
Width = 9210
_ExtentX = 16245
_ExtentY = 476
_Version = 393216
BorderStyle = 1
Appearance = 0
End
Begin MSComctlLib.ListView ListView1
Height = 5055
Left = 60
TabIndex = 0
Top = 60
Width = 7515
_ExtentX = 13256
_ExtentY = 8916
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
SmallIcons = "ImageList1"
ForeColor = -2147483646
BackColor = 16777215
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 5
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "用户编码"
Object.Width = 1765
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "用户名称"
Object.Width = 3246
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "用户类型"
Object.Width = 1764
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "发票打印"
Object.Width = 1764
EndProperty
BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 4
Text = "交费情况"
Object.Width = 1764
EndProperty
End
End
Attribute VB_Name = "BrowseInvoice"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
OpenMdb
DoEvents
Set MdbR = NdMd.OpenRecordset("select 用户电费.用户编码,用户电费.用户名称,用户电费.用户类型,用户电费.[" & JJ & "] AS 发票打印,用户电费.[" & KK & "] AS 交费情况,用户电费.组合编码 from 用户电费 WHERE 用户电费.镇村代码='" & UserSeek & "' and 用户电费.[" & JJ & "]=-1 order by 用户电费.组合编码 asc")
Dim intCounter, intRecCount As Integer
Dim itm As ListItem
ListView1.SortKey = 0
ListView1.SortOrder = lvwAscending
If Not MdbR.eof Then
MdbR.MoveLast
intRecCount = MdbR.RecordCount
MdbR.MoveFirst
For intCounter = 0 To MdbR.RecordCount - 1
Set itm = ListView1.ListItems.Add(, , CStr(MdbR!用户编码), , 1)
itm.SubItems(1) = CStr(MdbR!用户名称) & ""
itm.SubItems(2) = MdbR!用户类型 & ""
itm.SubItems(3) = "已开"
itm.SubItems(4) = IIf(MdbR!交费情况 = True, "已开", "未交")
'itm.SubItems(6) = MdbR!调整原因 & ""
MdbR.MoveNext
DoEvents
Next intCounter
ListView1.Sorted = True
Else
Option1.Enabled = False
Option2.Enabled = False
Frame2.Enabled = False
Exit Sub
End If
Me.Caption = "发票统计查询(计打印:" & MdbR.RecordCount & "张)"
ProgressBar1.Visible = False
Frame2.Visible = False
End Sub
Private Sub Command2_Click()
Dim I, intRecCount, intCounter As Integer
On Error Resume Next
If pbUserPermission <> "系统管理员" Then
MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
Exit Sub
End If
If MsgBox("确定要进行此项操作吗?(Y/N)", vbYesNo + 32) = vbYes Then
Set MdbR = NdMd.OpenRecordset("select 用户电费.用户编码,用户电费.用户名称,用户电费.[" & AAA & "] AS 上期示数,用户电费.[" & AA & "] AS 本期示数,用户电费.表损,用户电费.倍率,用户电费.[" & BB & "] AS 调整电量,用户电费.[" & CC & "] AS 本次电量,用户电费.[" & DD & "] AS 合计电量,用户电费.电价,用户电费.[" & EE & "] AS 调整金额,用户电费.[" & FF & "] AS 滞纳金,用户电费.[" & GG & "] AS 本次电费,用户电费.[" & HH & "] AS 合计电费,用户电费.[" & JJ & "] AS 发票打印,用户电费.[" & KK & "] AS 交费情况 from 用户电费 where 用户电费.镇村代码 ='" & UserSeek & "' and 用户电费.用户编码 >= '" & Trim(Text1) & "' and 用户电费.用户编码 <='" & Trim(Text2) & "' AND 用户电费.[" & JJ & "]=-1")
ProgressBar1.Visible = True
Me.Height = 5910
With MdbR
ProgressBar1.Max = .RecordCount
For I = 0 To ProgressBar1.Max - 1
.Edit
.Fields!发票打印 = 0
.Update
.MoveNext
ProgressBar1.Value = I
DoEvents
Next I
End With
Screen.MousePointer = 0
ProgressBar1.Value = 0
ProgressBar1.Visible = False
Me.Height = 5610
ListView1.ListItems.Clear
MsgBox "[" & XzName & XcName & "]恢复完毕!", vbInformation
Exit Sub
End If
End Sub
Private Sub Command3_Click()
Text1.SetFocus
End Sub
Private Sub Option1_Click()
'On Error Resume Next
Option2.Value = False
Option1.Value = True
Frame2.Visible = False
If pbUserPermission <> "系统管理员" Then
MsgBox "您的权限不够,请于系统管理员联系!", vbInformation
Exit Sub
End If
If MsgBox("确定要进行此项操作吗?(Y/N)", vbYesNo + 32) = vbYes Then
'On Error Resume Next
Screen.MousePointer = 11
ProgressBar1.Visible = True
Me.Height = 5920
Dim I As Integer
With MdbR
.MoveFirst
ProgressBar1.Max = .RecordCount
For I = 0 To ProgressBar1.Max - 1
.Edit
.Fields!发票打印 = 0
.Update
.MoveNext
ProgressBar1.Value = I
DoEvents
Next I
End With
Screen.MousePointer = 0
ProgressBar1.Value = 0
ProgressBar1.Visible = False
Option1.Value = False
Option1.Enabled = False
Option2.Enabled = False
Me.Height = 5610
ListView1.ListItems.Clear
Else
Option1.Value = False
End If
End Sub
Private Sub Option2_Click()
Option1.Value = False
Option2.Value = True
Frame2.Visible = True
Frame2.Enabled = True
Text1.SetFocus
End Sub
Private Sub Text1_Change()
Call CheckIsNumber(Text1)
End Sub
Private Sub Text2_Change()
Call CheckIsNumber(Text2)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
If KeyAscii = 27 Then
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -