📄
字号:
BackStyle = 0 'Transparent
Caption = "项目数量:"
Height = 180
Index = 11
Left = 270
TabIndex = 36
Top = 4980
Width = 810
End
Begin VB.Label Lab_Measure
AutoSize = -1 'True
BackStyle = 0 'Transparent
ForeColor = &H00404040&
Height = 180
Left = 2670
TabIndex = 35
Top = 1830
Visible = 0 'False
Width = 90
End
Begin VB.Label lab_GridRow
Height = 405
Left = 5280
TabIndex = 34
Top = 2160
Visible = 0 'False
Width = 765
End
Begin VB.Label Lab_ItemClass
AutoSize = -1 'True
BackStyle = 0 'Transparent
ForeColor = &H00404040&
Height = 180
Left = 6240
TabIndex = 33
Top = 1560
Visible = 0 'False
Width = 90
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "项目:"
Height = 180
Index = 10
Left = 300
TabIndex = 27
Top = 4560
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "个人:"
Height = 180
Index = 9
Left = 300
TabIndex = 26
Top = 4110
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "往来客户:"
Height = 180
Index = 8
Left = 300
TabIndex = 25
Top = 3690
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "部门:"
Height = 180
Index = 7
Left = 300
TabIndex = 24
Top = 3270
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "汇率:"
Height = 180
Index = 6
Left = 300
TabIndex = 23
Top = 2850
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "外币金额:"
Height = 180
Index = 5
Left = 270
TabIndex = 22
Top = 2430
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "单价:"
Height = 180
Index = 4
Left = 270
TabIndex = 21
Top = 1980
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "数量:"
Height = 180
Index = 3
Left = 270
TabIndex = 20
Top = 1530
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "发生日期:"
Height = 180
Index = 2
Left = 270
TabIndex = 19
Top = 1080
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "结算方式:"
Height = 180
Index = 0
Left = 270
TabIndex = 18
Top = 240
Width = 810
End
Begin VB.Label TsLabel
BackStyle = 0 'Transparent
Caption = "票号:"
Height = 180
Index = 1
Left = 270
TabIndex = 17
Top = 660
Width = 810
End
End
Attribute VB_Name = "AutoTran_PzAss"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'************************************************************************************
'* 模 块 名 称 :辅助核算项目录入
'* 功 能 描 述 :能够根据科目辅助核算项,自动出现辅助核算项目,并自动调整
'* 录入项目位置及窗体大小
'* 程序员姓名 : 张建忠
'* 最后修改人 : 张建忠
'* 最后修改时间:2000/09/07
'* 备 注:
'*
'* 1.对于网格列存储内容
'* 0-行有效标识 1-结算方式编码 2-结算方式名称 3-票号 4-发生日期 5-数量 6-单价
'* 7-计量单位 8-外币编码 9-外币名称 10-汇率 11-部门编码 12-部门名称 13-单位编码
'* 14-单位名称 15-职员编码 16-职员名称 17-项目大类编码 18-项目大类名称
'* 19-项目编码 20-项目名称 21-项目数量 22-项目计量单位
'************************************************************************************
Dim RecTemp As New ADODB.Recordset '临时使用动态集
Dim jdzygs As Integer '控件焦点转移个数
Dim Tsxx As String '系统提示信息
Dim Bln_FirstTab As Boolean '是否首次产生Tab键(主要用来判断Tab键是否由填置凭证窗体引起)
'以下为固定使用变量(文本框)
Dim Textvar() As Variant '存储变体型文本框信息
Dim Textboolean() As Boolean '存储布尔型文本框信息
Dim Textint() As Integer '存储整型文本框信息
Dim Textstr() As String '存储字符型文本框信息
Dim Max_Text_Index As Integer '最大录入文本框索引值
Dim TextGroupCode As String '文本框录入分组编码
Dim TextValiLock As Boolean '文本框失去焦点是否进行有效性控制判断
Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
Dim CurTextIndex As Integer '当前文本框索引值
Dim TextChangeLock As Boolean '文本框内容变换控制锁
Dim Bln_Cancel As Boolean '取消按钮信息传递
Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
jdzygs = 20
Select Case KeyAscii
Case vbKeyReturn
If Kjjdzy(jdzygs) Then
KeyAscii = 0
End If
Case 39 '屏蔽"'"
KeyAscii = 0
End Select
End Sub
'[ZJZ Begin 改进由填制凭证窗体引发的焦点转移 2001-06-16
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Bln_FirstTab Then
For jsqte = 0 To Max_Text_Index
If LrText(jsqte).Visible And LrText(jsqte).Enabled Then
LrText(jsqte).SetFocus
Exit For
End If
Next jsqte
End If
Bln_FirstTab = False
End Sub
'[ZJZ End
Private Sub Form_Load()
'以下为文本框处理程序
TextGroupCode = "Cwzz_Ass"
Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
Call Wbkcsh
Bln_FirstTab = True
End Sub
Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
Dim jsqte As Integer
Dim Int_GridRow As Integer '数据回写网格行
For jsqte = 0 To Max_Text_Index
If Textint(jsqte, 8) = 1 And LrText(jsqte).Visible Then '字段不能为空
If Len(Trim(LrText(jsqte).Text)) = 0 Then
Tsxx = Textstr(jsqte, 7) & "不能为空!"
Call Xtxxts(Tsxx, 0, 1)
LrText(jsqte).SetFocus
Bclrsj = False
Exit Function
End If
Else
If Textint(jsqte, 8) = 2 And LrText(jsqte).Visible Then '字段不能为零
If Val(Trim(LrText(jsqte).Text)) = 0 Then
Tsxx = Textstr(jsqte, 7) & "不能为零!"
Call Xtxxts(Tsxx, 0, 1)
LrText(jsqte).SetFocus
Bclrsj = False
Exit Function
End If
End If
End If
Next jsqte
'对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
For jsqte = 0 To Max_Text_Index
If (Textint(jsqte, 9) = 0 Or Textint(jsqte, 9) = 2) And LrText(jsqte).Visible Then
If Not TextYxxpd(jsqte) Then
Exit Function
End If
End If
Next jsqte
'如项目核算数量,则项目数量不能为零
If Len(Trim(Lab_ItemMeasure)) <> 0 And Val(LrText(11)) = 0 Then
Tsxx = "此项目核算数量,则项目数量不能为零!"
Call Xtxxts(Tsxx, 0, 1)
LrText(11).SetFocus
Exit Function
End If
Int_GridRow = Val(lab_GridRow)
With AutoTran_PzFrm
For jsqte = 0 To Max_Text_Index
If LrText(jsqte).Visible Then
Select Case jsqte
Case 0 '结算方式
.WglrGrid.TextMatrix(Int_GridRow, 1) = Trim(LrText(jsqte).Tag)
.WglrGrid.TextMatrix(Int_GridRow, 2) = Trim(LrText(jsqte).Text)
Case 1 '票号
.WglrGrid.TextMatrix(Int_GridRow, 3) = Trim(LrText(jsqte).Text)
Case 2 '发生日期
.WglrGrid.TextMatrix(Int_GridRow, 4) = Trim(LrText(jsqte).Text)
Case 3 '数量
.WglrGrid.TextMatrix(Int_GridRow, 5) = Val(LrText(jsqte).Text)
Case 4 '单价
.WglrGrid.TextMatrix(Int_GridRow, 6) = Val(LrText(jsqte).Text)
Case 5 '外币金额
.WglrGrid.TextMatrix(Int_GridRow, 10) = Trim(LrText(jsqte).Text)
Case 6 '汇率
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -