资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:41k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form PZ_FrmPzcxtj
- Caption = "凭证查询条件"
- ClientHeight = 5235
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5895
- Icon = "凭证处理_凭证列表查询条件.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5235
- ScaleWidth = 5895
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton Cmd_Clear
- Caption = "全清"
- Height = 300
- Left = 60
- TabIndex = 15
- Top = 4860
- Width = 1120
- End
- Begin VB.CommandButton QxCommand
- Caption = "取消"
- Height = 300
- Left = 4710
- TabIndex = 16
- Top = 4860
- Width = 1120
- End
- Begin VB.CommandButton QdCommand
- Caption = "确定(&O)"
- Height = 300
- Left = 3510
- TabIndex = 14
- Top = 4860
- Width = 1120
- End
- Begin TabDlg.SSTab SSTab1
- Height = 4695
- Left = 60
- TabIndex = 34
- Top = 60
- Width = 5775
- _ExtentX = 10186
- _ExtentY = 8281
- _Version = 393216
- Style = 1
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "基本条件"
- TabPicture(0) = "凭证处理_凭证列表查询条件.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Label1(20)"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Label1(19)"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Label1(18)"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "Label1(4)"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).Control(4)= "Line1(0)"
- Tab(0).Control(4).Enabled= 0 'False
- Tab(0).Control(5)= "Label1(3)"
- Tab(0).Control(5).Enabled= 0 'False
- Tab(0).Control(6)= "Label1(2)"
- Tab(0).Control(6).Enabled= 0 'False
- Tab(0).Control(7)= "Label1(1)"
- Tab(0).Control(7).Enabled= 0 'False
- Tab(0).Control(8)= "Label1(0)"
- Tab(0).Control(8).Enabled= 0 'False
- Tab(0).Control(9)= "Label1(21)"
- Tab(0).Control(9).Enabled= 0 'False
- Tab(0).Control(10)= "Line1(1)"
- Tab(0).Control(10).Enabled= 0 'False
- Tab(0).Control(11)= "Imgebo_VouchClass"
- Tab(0).Control(11).Enabled= 0 'False
- Tab(0).Control(12)= "Imgebo_Bill"
- Tab(0).Control(12).Enabled= 0 'False
- Tab(0).Control(13)= "Imgebo_Checker"
- Tab(0).Control(13).Enabled= 0 'False
- Tab(0).Control(14)= "Imgebo_Book"
- Tab(0).Control(14).Enabled= 0 'False
- Tab(0).Control(15)= "Ydcommand1(2)"
- Tab(0).Control(15).Enabled= 0 'False
- Tab(0).Control(16)= "LrText(2)"
- Tab(0).Control(16).Enabled= 0 'False
- Tab(0).Control(17)= "LrText(0)"
- Tab(0).Control(17).Enabled= 0 'False
- Tab(0).Control(18)= "LrText(1)"
- Tab(0).Control(18).Enabled= 0 'False
- Tab(0).Control(19)= "Combo_Kjqj(0)"
- Tab(0).Control(19).Enabled= 0 'False
- Tab(0).Control(20)= "Combo_Pzfw"
- Tab(0).Control(20).Enabled= 0 'False
- Tab(0).Control(21)= "Chk_ErrorBill"
- Tab(0).Control(21).Enabled= 0 'False
- Tab(0).Control(22)= "Frame1"
- Tab(0).Control(22).Enabled= 0 'False
- Tab(0).Control(23)= "Combo_VouchSource"
- Tab(0).Control(23).Enabled= 0 'False
- Tab(0).Control(24)= "Combo_Kjqj(1)"
- Tab(0).Control(24).Enabled= 0 'False
- Tab(0).Control(25)= "Chk_Sum"
- Tab(0).Control(25).Enabled= 0 'False
- Tab(0).ControlCount= 26
- TabCaption(1) = "辅助条件"
- TabPicture(1) = "凭证处理_凭证列表查询条件.frx":105E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame3"
- Tab(1).ControlCount= 1
- Begin VB.CheckBox Chk_Sum
- Caption = "每张凭证是否输出合计"
- Height = 315
- Left = 630
- TabIndex = 66
- Top = 3930
- Value = 1 'Checked
- Width = 2115
- End
- Begin VB.ComboBox Combo_Kjqj
- ForeColor = &H00000000&
- Height = 300
- Index = 1
- ItemData = "凭证处理_凭证列表查询条件.frx":107A
- Left = 2790
- List = "凭证处理_凭证列表查询条件.frx":107C
- Style = 2 'Dropdown List
- TabIndex = 65
- Top = 1215
- Width = 1125
- End
- Begin VB.ComboBox Combo_VouchSource
- Height = 300
- Left = 1440
- Style = 2 'Dropdown List
- TabIndex = 9
- Top = 3480
- Width = 2475
- End
- Begin VB.Frame Frame1
- Caption = "审核状态"
- Height = 1365
- Left = 4140
- TabIndex = 61
- Top = 480
- Width = 1545
- Begin VB.OptionButton Opt_Check
- Caption = "已审核凭证"
- Height = 195
- Index = 2
- Left = 120
- TabIndex = 12
- Top = 990
- Width = 1395
- End
- Begin VB.OptionButton Opt_Check
- Caption = "未审核凭证"
- Height = 195
- Index = 1
- Left = 120
- TabIndex = 11
- Top = 660
- Width = 1365
- End
- Begin VB.OptionButton Opt_Check
- Caption = "全部"
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 10
- Top = 330
- Value = -1 'True
- Width = 1365
- End
- End
- Begin VB.CheckBox Chk_ErrorBill
- Caption = "有错凭证"
- Height = 435
- Left = 4170
- TabIndex = 13
- Top = 1950
- Width = 1125
- End
- Begin VB.ComboBox Combo_Pzfw
- Height = 300
- Left = 1440
- Style = 2 'Dropdown List
- TabIndex = 0
- Top = 480
- Width = 2475
- End
- Begin VB.ComboBox Combo_Kjqj
- ForeColor = &H00000000&
- Height = 300
- Index = 0
- ItemData = "凭证处理_凭证列表查询条件.frx":107E
- Left = 1440
- List = "凭证处理_凭证列表查询条件.frx":1080
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 1215
- Width = 1125
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 1
- Left = 2790
- TabIndex = 4
- Text = "1"
- Top = 1590
- Width = 1095
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 0
- Left = 1440
- TabIndex = 3
- Text = "0"
- Top = 1590
- Width = 1125
- End
- Begin VB.TextBox LrText
- Height = 300
- Index = 2
- Left = 1440
- TabIndex = 5
- Text = "2"
- Top = 1965
- Width = 2175
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 2
- Left = 3600
- Picture = "凭证处理_凭证列表查询条件.frx":1082
- Style = 1 'Graphical
- TabIndex = 52
- Top = 1980
- Visible = 0 'False
- Width = 285
- End
- Begin VB.Frame Frame3
- Height = 4215
- Left = -74910
- TabIndex = 35
- Top = 360
- Width = 5565
- Begin VB.TextBox LrText
- Height = 330
- Index = 15
- Left = 990
- TabIndex = 28
- Text = "15"
- Top = 2970
- Width = 4155
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 15
- Left = 5130
- Picture = "凭证处理_凭证列表查询条件.frx":140C
- Style = 1 'Graphical
- TabIndex = 62
- Top = 3000
- Visible = 0 'False
- Width = 285
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 13
- Left = 5130
- Picture = "凭证处理_凭证列表查询条件.frx":1796
- Style = 1 'Graphical
- TabIndex = 39
- Top = 3390
- Visible = 0 'False
- Width = 285
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 12
- Left = 5130
- Picture = "凭证处理_凭证列表查询条件.frx":1B20
- Style = 1 'Graphical
- TabIndex = 38
- Top = 2610
- Visible = 0 'False
- Width = 285
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 14
- Left = 3510
- TabIndex = 32
- Text = "14"
- Top = 3750
- Width = 1905
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 13
- Left = 3510
- TabIndex = 30
- Text = "13"
- Top = 3360
- Width = 1635
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 12
- Left = 990
- TabIndex = 27
- Text = "12"
- Top = 2580
- Width = 4155
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 11
- Left = 5130
- Picture = "凭证处理_凭证列表查询条件.frx":1EAA
- Style = 1 'Graphical
- TabIndex = 37
- Top = 1830
- Visible = 0 'False
- Width = 285
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 11
- Left = 3510
- TabIndex = 25
- Text = "11"
- Top = 1800
- Width = 1635
- End
- Begin VB.CommandButton Ydcommand1
- Height = 289
- Index = 10
- Left = 5130
- Picture = "凭证处理_凭证列表查询条件.frx":2234
- Style = 1 'Graphical
- TabIndex = 36
- Top = 2220
- Visible = 0 'False
- Width = 285
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 10
- Left = 990
- TabIndex = 26
- Text = "10"
- Top = 2190
- Width = 4155
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 9
- Left = 3240
- TabIndex = 23
- Text = "9"
- Top = 1410
- Width = 2175
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 8
- Left = 990
- TabIndex = 22
- Text = "8"
- Top = 1410
- Width = 1935
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 7
- Left = 3240
- TabIndex = 21
- Text = "7"
- Top = 1020
- Width = 2175
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 6
- Left = 990
- TabIndex = 20
- Text = "6"
- Top = 1020
- Width = 1935
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 5
- Left = 3240
- TabIndex = 19
- Text = "5"
- Top = 630
- Width = 2175
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 4
- Left = 990
- TabIndex = 18
- Text = "4"
- Top = 630
- Width = 1935
- End
- Begin VB.TextBox LrText
- Height = 330
- Index = 3
- Left = 990
- TabIndex = 17
- Text = "3"
- Top = 240
- Width = 4425
- End
- Begin MSComctlLib.ImageCombo Imgebo_ItemClass
- Height = 315
- Left = 990
- TabIndex = 29
- Top = 3360
- Width = 1935
- _ExtentX = 3413
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Locked = -1 'True
- End
- Begin MSComctlLib.ImageCombo Imgebo_ForeignCurr
- Height = 315
- Left = 990
- TabIndex = 24
- Top = 1800
- Width = 1935
- _ExtentX = 3413
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = 16777215
- End
- Begin MSComctlLib.ImageCombo Imgebo_Settlement
- Height = 315
- Left = 990
- TabIndex = 31
- Top = 3750
- Width = 1935
- _ExtentX = 3413
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Locked = -1 'True
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "供应商:"
- Height = 180
- Index = 16
- Left = 150
- TabIndex = 63
- Top = 3030
- Width = 630
- End
- Begin VB.Line Line2
- Index = 2
- X1 = 2970
- X2 = 3210
- Y1 = 1560
- Y2 = 1560
- End
- Begin VB.Line Line2
- Index = 1
- X1 = 2970
- X2 = 3210
- Y1 = 1170
- Y2 = 1170
- End
- Begin VB.Line Line2
- Index = 0
- X1 = 2970
- X2 = 3210
- Y1 = 780
- Y2 = 780
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "币别名称:"
- Height = 180
- Index = 17
- Left = 150
- TabIndex = 51
- Top = 1860
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "摘要:"
- Height = 180
- Index = 5
- Left = 150
- TabIndex = 50
- Top = 330
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "金额:"
- Height = 180
- Index = 6
- Left = 150
- TabIndex = 49
- Top = 690
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "数量:"
- Height = 180
- Index = 7
- Left = 150
- TabIndex = 48
- Top = 1110
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "外币:"
- Height = 180
- Index = 8
- Left = 150
- TabIndex = 47
- Top = 1500
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "部门:"
- Height = 180
- Index = 9
- Left = 150
- TabIndex = 46
- Top = 2250
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "个人:"
- Height = 180
- Index = 10
- Left = 3000
- TabIndex = 45
- Top = 1860
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "往来客户:"
- Height = 180
- Index = 11
- Left = 150
- TabIndex = 44
- Top = 2640
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "项目大类:"
- Height = 180
- Index = 12
- Left = 150
- TabIndex = 43
- Top = 3450
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "项目:"
- Height = 180
- Index = 13
- Left = 3000
- TabIndex = 42
- Top = 3450
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "结算方式:"
- Height = 180
- Index = 14
- Left = 150
- TabIndex = 41
- Top = 3810
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "票号:"
- Height = 180
- Index = 15
- Left = 3000
- TabIndex = 40
- Top = 3840
- Width = 450
- End
- End
- Begin MSComctlLib.ImageCombo Imgebo_Book
- Height = 315
- Left = 1440
- TabIndex = 8
- Top = 3090
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Text = "Imgebo_Book"
- End
- Begin MSComctlLib.ImageCombo Imgebo_Checker
- Height = 315
- Left = 1440
- TabIndex = 7
- Top = 2700
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Text = "Imgebo_Checker"
- End
- Begin MSComctlLib.ImageCombo Imgebo_Bill
- Height = 315
- Left = 1440
- TabIndex = 6
- Top = 2325
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- Text = "Imgebo_Bill"
- End
- Begin MSComctlLib.ImageCombo Imgebo_VouchClass
- Height = 315
- Left = 1440
- TabIndex = 1
- Top = 840
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = 16777215
- End
- Begin VB.Line Line1
- Index = 1
- X1 = 2580
- X2 = 2760
- Y1 = 1350
- Y2 = 1350
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "凭证来源:"
- Height = 180
- Index = 21
- Left = 600
- TabIndex = 64
- Top = 3540
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "凭证类别:"
- Height = 180
- Index = 0
- Left = 600
- TabIndex = 60
- Top = 885
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "凭证范围:"
- Height = 180
- Index = 1
- Left = 600
- TabIndex = 59
- Top = 510
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "会计期间:"
- Height = 180
- Index = 2
- Left = 600
- TabIndex = 58
- Top = 1290
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "凭证号:"
- Height = 180
- Index = 3
- Left = 600
- TabIndex = 57
- Top = 1650
- Width = 630
- End
- Begin VB.Line Line1
- Index = 0
- X1 = 2580
- X2 = 2760
- Y1 = 1740
- Y2 = 1740
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "科目编码:"
- Height = 180
- Index = 4
- Left = 600
- TabIndex = 56
- Top = 2040
- Width = 810
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "制单人:"
- Height = 180
- Index = 18
- Left = 600
- TabIndex = 55
- Top = 2385
- Width = 630
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "审核人:"
- Height = 180
- Index = 19
- Left = 600
- TabIndex = 54
- Top = 2760
- Width = 630
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "记帐人:"
- Height = 180
- Index = 20
- Left = 600
- TabIndex = 53
- Top = 3150
- Width = 630
- End
- End
- Begin VB.CheckBox UnloadCheck
- Caption = "卸载窗体"
- Height = 615
- Left = 6390
- TabIndex = 33
- Top = 2070
- Width = 825
- End
- End
- Attribute VB_Name = "PZ_FrmPzcxtj"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '******************************************************************
- '* 模 块 名 称 :凭证列表查询条件
- '* 功 能 描 述 :
- '* 程序员姓名 : 张建忠
- '* 最后修改人 : 张建忠
- '* 最后修改时间:2000/10/18
- '* 备 注:程序中所有依实际情况自定义部分均用[>> <<]括起
- '******************************************************************
- Dim Tsxx As String '系统信息提示
- '以下为固定使用变量(文本框)
- 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) '控 制 焦 点 转 移
- Dim jdzygs As Integer '控件焦点转移个数
- jdzygs = 30
- Select Case KeyAscii
- Case vbKeyReturn
- If Kjjdzy(jdzygs) Then
- KeyAscii = 0
- End If
- Case 39 '屏蔽"'"
- KeyAscii = 0
- End Select
- End Sub
- Private Sub Form_Load()
- '填充会计期间列表框(年度默认为用户选择年度)
- Call Sub_FillPeriod(Combo_Kjqj(0), Xtyear, Xtmm)
- Call Sub_FillPeriod(Combo_Kjqj(1), Xtyear, Xtmm)
- '填充凭证范围列表
- Call FillCombo(Combo_Pzfw, "cwzz_pzfw", "", 0)
- '填充凭证来源列表
- Call FillCombo(Combo_VouchSource, "Cwzz_VouchSource", "", 1)
- '填充凭证类别列表
- Call FillImageCombo(Imgebo_VouchClass, "Cwzz_AccVouchClass", 2)
- '填充外币名称列表
- Call FillImageCombo(Imgebo_ForeignCurr, "Gy_ForeignCurr", 2)
- '填充结算方式列表
- Call FillImageCombo(Imgebo_Settlement, "Gy_Settlement", 2)
- '填充项目分类列表
- Call FillImageCombo(Imgebo_ItemClass, "Cwzz_ItemClass", 2)
- '填充制单人,审核人,记帐人列表
- Call FillImageCombo(Imgebo_Bill, "Xt_rygl", 3)
- Call FillImageCombo(Imgebo_Checker, "Xt_rygl", 3)
- Call FillImageCombo(Imgebo_Book, "Xt_rygl", 3)
- '以下为文本框处理程序
- TextGroupCode = "Cwzz_jzpzcx"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
- Call Wbkcsh
- '将项目项变为无效
- Call Textwx(LrText(13))
- Ydcommand1(13).Enabled = False
- SSTab1.Tab = 0
- End Sub
- Private Sub Imgebo_ItemClass_Click() '用户点击项目分类列表
- If Trim(Imgebo_ItemClass.Text) = "" Then
- LrText(13).Text = ""
- Call Textwx(LrText(13))
- Ydcommand1(13).Enabled = False
- Else
- Call Textyx(LrText(13))
- Ydcommand1(13).Enabled = True
- End If
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- If UnloadCheck.Value <> 1 Then
- Cancel = 1
- Me.Hide
- End If
- End Sub
- Private Sub QdCommand_Click() '确 定
- '录入条件有效性判断
- If Not Lrtjyxxpd Then
- Exit Sub
- End If
- Me.Hide
- '激活查询过程
- PZ_FrmPzcxjg.Timer1.Enabled = True
- End Sub
- Private Sub QxCommand_Click() '取消
- Me.Hide
- End Sub
- Private Function Lrtjyxxpd() As Boolean '用户录入条件有效性判断
- Dim Jsqte As Integer
- Lrtjyxxpd = False
- '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
- If Not TextYxxpd(Jsqte) Then
- Exit Function
- End If
- End If
- Next Jsqte
- '[>>以下为依据实际情况自定义部分
- '查询会计期间范围应由小到大
- If Val(Replace(Combo_Kjqj(0).Text, ".", "")) > Val(Replace(Combo_Kjqj(1).Text, ".", "")) Then
- Tsxx = "会计期间范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- Combo_Kjqj(0).SetFocus
- Exit Function
- End If
- '查询凭证号范围应由小到大
- If Val(LrText(0).Text) > Val(LrText(1).Text) And Val(LrText(1).Text) <> 0 Then
- Tsxx = "查询凭证号范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- LrText(0).SetFocus
- Exit Function
- End If
- '查询金额范围应由小到大
- If Val(LrText(4).Text) > Val(LrText(5).Text) And Val(LrText(5).Text) <> 0 Then
- Tsxx = "查询金额范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- LrText(4).SetFocus
- Exit Function
- End If
- '查询数量范围应由小到大
- If Val(LrText(6).Text) > Val(LrText(7).Text) And Val(LrText(7).Text) <> 0 Then
- Tsxx = "查询数量范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- LrText(6).SetFocus
- Exit Function
- End If
- '查询外币范围应由小到大
- If Val(LrText(8).Text) > Val(LrText(9).Text) And Val(LrText(9).Text) <> 0 Then
- Tsxx = "查询外币范围应由小到大!"
- Call Xtxxts(Tsxx, 0, 4)
- LrText(8).SetFocus
- Exit Function
- End If
- '<<]以上为依据实际情况自定义部分
- Lrtjyxxpd = True
- End Function
- Private Sub Cmd_Clear_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) '将用户输入条件全部清除
- '清除文本框
- For Jsqte = 0 To Max_Text_Index
- LrText(Jsqte).Tag = ""
- LrText(Jsqte).Text = ""
- Next Jsqte
- '凭证类别列表
- Imgebo_VouchClass.Text = ""
- '外币名称列表
- Imgebo_ForeignCurr.Text = ""
- '结算方式列表
- Imgebo_Settlement.Text = ""
- '凭证来源列表
- Combo_VouchSource.ListIndex = 0
- '项目分类列表
- Imgebo_ItemClass.Text = ""
- Call Imgebo_ItemClass_Click
- '制单人,审核人,记帐人列表
- Chk_Sum.Value = 1
- Imgebo_Bill.Text = ""
- Imgebo_Checker.Text = ""
- Imgebo_Book.Text = ""
- Combo_Kjqj(0).Text = Xtyear & "." & Right("0" & Xtmm, 2)
- Combo_Kjqj(1).Text = Xtyear & "." & Right("0" & Xtmm, 2)
- End Sub
- '************以下为文本框录入处理程序(固定不变部分)*************'
- Private Sub Wbklrwbcl(Index As Integer) '文本框录入事后处理程序
- '以下为依据实际情况自定义部分[
- '在此填写文本框录入事后处理程序
- ']以上为依据实际情况自定义部分
- End Sub
- Private Sub LrText_Change(Index As Integer)
- '屏蔽程序改变控制
- If TextChangeLock Then
- Exit Sub
- End If
- TextValiJudgeLock(Index) = False '打开有效性判断锁
- '限制字段录入长度
- TextChangeLock = True '加锁(防止执行Lrtext_Change)
- Select Case Textint(Index, 1)
- Case 8 '金额型
- Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
- Case 9 '数量型
- Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
- Case 10 '单价型
- Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
- Case Else '其他小数类型控制
- If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
- Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
- End If
- End Select
- TextChangeLock = False '解锁
- End Sub
- Private Sub LrText_GotFocus(Index As Integer) '文本框得到焦点,显示相应信息
- Call TextShow(Index)
- CurTextIndex = Index
- LrText(Index).SelStart = Len(LrText(Index))
- End Sub
- Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) '字段按F2键提供帮助
- Select Case KeyCode
- Case vbKeyF2
- Call Text_Help(Index)
- End Select
- End Sub
- Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer) '文本框录入事中控制
- Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
- End Sub
- Private Sub LrText_LostFocus(Index As Integer) '文本框失去焦点进行有效性判断及相应处理
- If Textint(Index, 9) = 0 Or Textint(Index, 9) = 1 Then '事中判断
- Call TextYxxpd(Index)
- End If
- End Sub
- Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) '按钮提供帮助
- Call Text_Help(Index)
- End Sub
- Private Sub Text_Help(Index As Integer) '录入字段帮助
- If Not Textboolean(Index, 1) Then
- Exit Sub
- End If
- TextValiJudgeLock(Index) = True
- '先进行有效性判断
- If Not TextYxxpd(CurTextIndex) Then
- Exit Sub
- End If
- If Index = 13 Then '核算项目特殊处理
- Xtcdcs = Trim(LrText(Index).Text)
- Xtcdcsfz = GetComboKey(Imgebo_ItemClass, 0)
- XT_ItemHelp.Show 1
- Else
- Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
- End If
- If Len(Xtfhcs) <> 0 Then
- If Textint(Index, 3) = 1 Then
- LrText(Index).Text = Xtfhcsfz
- LrText(Index).Tag = Xtfhcs
- Else
- LrText(Index).Text = Xtfhcs
- LrText(Index).Tag = Xtfhcsfz
- End If
- End If
- TextValiJudgeLock(Index) = False
- LrText(Index).SetFocus
- End Sub
- Private Sub TextShow(Index As Integer) '文本框得到焦点,显示相应信息
- '填写文本框得到焦点,进行相应信息处理程序
- End Sub
- Private Sub Wbkcsh() '录入文本框初始化
- Dim Jsqte As Integer
- '最大录入文本框索引值
- Max_Text_Index = Textvar(1)
- ReDim TextValiJudgeLock(Max_Text_Index)
- For Jsqte = 0 To Max_Text_Index
- If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
- If Textboolean(Jsqte, 1) Then
- If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
- Load Ydcommand1(Jsqte)
- End If
- Ydcommand1(Jsqte).Visible = True
- Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
- End If
- TextChangeLock = True
- LrText(Jsqte).Text = ""
- LrText(Jsqte).Tag = ""
- If Textint(Jsqte, 5) <> 0 Then
- LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
- End If
- TextChangeLock = False
- End If
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- End Sub
- Private Function TextYxxpd(Index As Integer) As Boolean '文本框有效性判断
- Dim Sqlstr As String
- Dim Findrec As ADODB.Recordset
- If TextValiJudgeLock(Index) Then '文本框内容未曾改变不进行有效性判断
- TextYxxpd = True
- Exit Function
- End If
- If Trim(LrText(Index)) = "" Then
- LrText(Index).Tag = ""
- Call Wbklrwbcl(Index)
- TextValiJudgeLock(Index) = True
- TextYxxpd = True
- Exit Function
- End If
- Select Case Textint(Index, 4)
- Case 1 '编码型
- Sqlstr = Trim(Textstr(Index, 5))
- Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
- Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Findrec.EOF Then
- Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
- LrText(Index).SetFocus
- Exit Function
- Else
- Select Case Textint(Index, 3)
- Case 0
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- Case 1
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- End Select
- End If
- Case 2 '日期型
- If IsDate(LrText(Index).Text) Then
- LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
- Else
- Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Index).SetFocus
- Exit Function
- End If
- Case 3 '其他类型
- '[>>开始
- Select Case Index
- Case 13 '项目
- Sqlstr = "select * from Cwzz_item where ItemClassCode='" & GetComboKey(Imgebo_ItemClass, 0) & "' and (ItemCode='" & Trim(LrText(13).Text) & "' or ItemName='" & Trim(LrText(13).Text) & "')"
- Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- If Findrec.EOF Then
- Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
- LrText(Index).SetFocus
- Exit Function
- Else
- Select Case Textint(Index, 3)
- Case 0
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- Case 1
- If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
- LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
- End If
- If Len(Trim(Textstr(Index, 2))) <> 0 Then
- LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
- End If
- End Select
- End If
- End Select
- '完毕<<]
- End Select
- TextValiJudgeLock(Index) = True
- TextYxxpd = True
- End Function