📄 frmbill.frm
字号:
FrozenCols = 0
AllowUserFreezing= 0
BackColorFrozen = 0
ForeColorFrozen = 0
WallPaperAlignment= 9
End
Begin VSFlex7Ctl.VSFlexGrid vfgCbo
Height = 285
Index = 2
Left = 8190
TabIndex = 11
Top = 990
Width = 1410
_cx = 2487
_cy = 503
_ConvInfo = 1
Appearance = 0
BorderStyle = 1
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MousePointer = 0
BackColor = -2147483643
ForeColor = -2147483640
BackColorFixed = 14737632
ForeColorFixed = -2147483630
BackColorSel = 16777215
ForeColorSel = 0
BackColorBkg = 16777215
BackColorAlternate= -2147483643
GridColor = 12632256
GridColorFixed = -2147483632
TreeColor = -2147483632
FloodColor = 192
SheetBorder = -2147483642
FocusRect = 2
HighLight = 1
AllowSelection = 0 'False
AllowBigSelection= 0 'False
AllowUserResizing= 1
SelectionMode = 1
GridLines = 1
GridLinesFixed = 2
GridLineWidth = 1
Rows = 1
Cols = 1
FixedRows = 0
FixedCols = 0
RowHeightMin = 275
RowHeightMax = 0
ColWidthMin = 0
ColWidthMax = 0
ExtendLastCol = -1 'True
FormatString = $"frmBill.frx":4E4E
ScrollTrack = 0 'False
ScrollBars = 0
ScrollTips = 0 'False
MergeCells = 0
MergeCompare = 0
AutoResize = 0 'False
AutoSizeMode = 0
AutoSearch = 1
AutoSearchDelay = 3
MultiTotals = -1 'True
SubtotalPosition= 1
OutlineBar = 0
OutlineCol = 0
Ellipsis = 2
ExplorerBar = 7
PicturesOver = 0 'False
FillStyle = 0
RightToLeft = 0 'False
PictureType = 0
TabBehavior = 0
OwnerDraw = 0
Editable = 2
ShowComboButton = 1
WordWrap = 0 'False
TextStyle = 0
TextStyleFixed = 0
OleDragMode = 0
OleDropMode = 0
DataMode = 0
VirtualData = -1 'True
DataMember = ""
ComboSearch = 3
AutoSizeMouse = -1 'True
FrozenRows = 0
FrozenCols = 0
AllowUserFreezing= 0
BackColorFrozen = 0
ForeColorFrozen = 0
WallPaperAlignment= 9
End
Begin VB.Label lblTel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电话 "
Height = 180
Left = 7590
TabIndex = 35
Top = 240
Width = 450
End
Begin VB.Label lblContact
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系人"
Height = 180
Left = 5010
TabIndex = 34
Top = 270
Width = 540
End
Begin VB.Label lblSecret
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密级"
Height = 180
Left = 7590
TabIndex = 26
Top = 1050
Width = 360
End
Begin VB.Label lblHurry
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "紧急度"
Height = 180
Left = 5010
TabIndex = 25
Top = 1050
Width = 540
End
Begin VB.Label lblDonne
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "主题"
Height = 180
Left = 150
TabIndex = 24
Top = 1050
Width = 360
End
Begin VB.Label lblNo
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文号"
Height = 180
Left = 7590
TabIndex = 23
Top = 660
Width = 360
End
Begin VB.Label lblName
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "来件名称"
Height = 180
Left = 2940
TabIndex = 22
Top = 660
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "来件类型"
Height = 180
Left = 150
TabIndex = 21
Top = 660
Width = 720
End
Begin VB.Label lblDept
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "单位名称"
Height = 180
Left = 150
TabIndex = 20
Top = 270
Width = 720
End
End
Begin VB.Frame fraBase
BorderStyle = 0 'None
Enabled = 0 'False
Height = 405
Left = 180
TabIndex = 30
Top = 1290
Width = 11085
Begin VB.TextBox txtID
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 285
Left = 5040
TabIndex = 1
Top = 30
Width = 1545
End
Begin VB.TextBox txtBillID
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 285
Left = 1050
Locked = -1 'True
TabIndex = 0
Top = 30
Width = 1545
End
Begin MSComCtl2.DTPicker dtpDate
Height = 315
Left = 9240
TabIndex = 2
Top = 30
Width = 1425
_ExtentX = 2514
_ExtentY = 556
_Version = 393216
CustomFormat = "yyyy-MM-dd"
Format = 60030979
UpDown = -1 'True
CurrentDate = 38341
End
Begin VB.Label lblID
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "业务号"
Height = 180
Left = 4080
TabIndex = 33
Top = 90
Width = 540
End
Begin VB.Label lblBillID
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "单据号"
Height = 180
Left = 150
TabIndex = 32
Top = 90
Width = 540
End
Begin VB.Label lblDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "时间"
Height = 180
Left = 8400
TabIndex = 31
Top = 90
Width = 360
End
End
Begin VB.Label lblPrepare
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "制单"
Height = 180
Left = 8820
TabIndex = 29
Top = 6990
Width = 360
End
Begin VB.Label lblCheck
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "审核"
Height = 180
Left = 4800
TabIndex = 28
Top = 6990
Width = 360
End
Begin VB.Label lblState
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "状态"
Height = 180
Left = 660
TabIndex = 27
Top = 6990
Visible = 0 'False
Width = 360
End
Begin VB.Label lblTitle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "完工清样单"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 4560
TabIndex = 18
Top = 810
Width = 1725
End
End
Attribute VB_Name = "frmBill"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mstate As State '状态
Private mstrAuth As String '权限
Private mBillID As String '单据号
Private Const conID = 0
Private Const conProjectNumber = 1
Private Const conProjectName = 2
Private Const conUnit = 3
Private Const conQty = 4
Private Const conPrice = 5
Private Const conMoney = 6
Private Sub actBar_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
Select Case Tool.Name
Case "tbRefresh": RefreshBill
Case "tbAdd": AddNew
Case "tbEdit": Edit
Case "tbSave":
If mstate = isadd Then
DoSaveNew
Else
DoSaveEdit
End If
Case "tbCancel": Cancel
Case "tbCheck": CheckBill
Case "tbPrintset": PrintSetup
Case "tbPrint": PrintBill
Case "tbExit": Quit
Case "tbAddRow": AddRow
Case "tbDelRow": DelRow
Case Else
End Select
End Sub
Private Sub dtpDate_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then txtID.SetFocus
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 2 Then
If KeyCode = vbKeyS Then
If mstate = isadd Then
Call DoSaveNew
Else
If mstate = isedit Then DoSaveEdit
End If
End If
End If
If mstate = isview Then
If KeyCode = vbKeyEscape Then Quit
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
Select Case Me.ActiveControl.Name
Case Else
SendKeys "{TAB}"
' If Me.ActiveControl.Name = "vfgCbo" Then Me.ActiveControl.EditCell
End Select
End If
End Sub
'不允许修改单据号
Private Sub txtBillID_GotFocus()
Clipboard.Clear
End Sub
'单位只允许F7选择
Private Sub txtDept_GotFocus()
Clipboard.Clear
End Sub
'选择单位
Private Sub txtDept_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo Err
Dim rstItem As ADODB.Recordset
If KeyCode = vbKeyF7 Then
If GetItemRst("1", rstItem) Then
If frmItem.GetItem(rstItem) Then
txtDept.Text = Trim(rstItem!FName)
txtDept.Tag = Trim(rstItem!FNumber)
txtContact.Text = Trim(rstItem!FContact & "")
txtTel.Text = Trim(rstItem!FPhone & "")
Set rstItem = Nothing
End If
End If
End If
Exit Sub
Err:
Set rstItem = Nothing
Call ErrTreat(Err.Number, Err.Source, Err.Description)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -