资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:81k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
- 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 Gy_Customer
- BorderStyle = 1 'Fixed Single
- Caption = "客户设置"
- ClientHeight = 7275
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 9270
- HelpContextID = 2001
- Icon = "公用_客户设置.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 7275
- ScaleWidth = 9270
- StartUpPosition = 2 '屏幕中心
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 1
- Left = 2430
- Top = 585
- End
- Begin TabDlg.SSTab StTab
- Height = 6585
- Left = 30
- TabIndex = 35
- Top = 675
- Width = 9225
- _ExtentX = 16272
- _ExtentY = 11615
- _Version = 393216
- Style = 1
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "列表视图"
- TabPicture(0) = "公用_客户设置.frx":1042
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "CzxsGrid"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).ControlCount= 1
- TabCaption(1) = "单张视图"
- TabPicture(1) = "公用_客户设置.frx":105E
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame1"
- Tab(1).ControlCount= 1
- Begin VB.Frame Frame1
- Height = 6160
- Left = -74910
- TabIndex = 38
- Top = 343
- Width = 9045
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 2
- Left = 3795
- Picture = "公用_客户设置.frx":107A
- Style = 1 'Graphical
- TabIndex = 73
- Top = 945
- Width = 301
- End
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 26
- Left = 3795
- Picture = "公用_客户设置.frx":1404
- Style = 1 'Graphical
- TabIndex = 72
- Top = 5370
- Width = 301
- End
- Begin VB.CommandButton Command4
- Height = 300
- Left = 6150
- Picture = "公用_客户设置.frx":178E
- Style = 1 'Graphical
- TabIndex = 71
- Top = 178
- Width = 300
- End
- Begin VB.CommandButton Command3
- Height = 300
- Left = 5850
- Picture = "公用_客户设置.frx":1B18
- Style = 1 'Graphical
- TabIndex = 70
- Top = 178
- Width = 300
- End
- Begin VB.CommandButton Command2
- Height = 300
- Left = 5550
- Picture = "公用_客户设置.frx":1EA2
- Style = 1 'Graphical
- TabIndex = 69
- Top = 178
- Width = 300
- End
- Begin VB.CommandButton Command1
- Height = 300
- Left = 5250
- Picture = "公用_客户设置.frx":222C
- Style = 1 'Graphical
- TabIndex = 68
- Top = 178
- Width = 300
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 26
- Left = 1665
- TabIndex = 26
- Text = "0"
- Top = 5370
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 17
- Left = 5640
- TabIndex = 17
- Text = "1"
- Top = 3555
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 18
- Left = 1665
- TabIndex = 18
- Text = "0"
- Top = 3900
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 19
- Left = 5640
- TabIndex = 19
- Text = "1"
- Top = 3900
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 20
- Left = 1665
- TabIndex = 20
- Text = "1"
- Top = 4275
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 21
- Left = 5640
- TabIndex = 21
- Text = "0"
- Top = 4275
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 23
- Left = 5640
- TabIndex = 23
- Text = "0"
- Top = 4635
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 24
- Left = 1665
- TabIndex = 24
- Text = "1"
- Top = 5010
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 16
- Left = 1665
- TabIndex = 16
- Text = "0"
- Top = 3555
- Width = 2160
- End
- Begin VB.TextBox LrText
- Enabled = 0 'False
- Height = 313
- Index = 22
- Left = 1665
- TabIndex = 22
- Text = "1"
- Top = 4635
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 11
- Left = 5640
- TabIndex = 11
- Text = "0"
- Top = 2430
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 12
- Left = 1665
- TabIndex = 12
- Text = "1"
- Top = 2790
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 13
- Left = 5640
- TabIndex = 13
- Text = "0"
- Top = 2790
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 14
- Left = 1665
- TabIndex = 14
- Text = "1"
- Top = 3165
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 15
- Left = 5640
- TabIndex = 15
- Text = "1"
- Top = 3165
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 5
- Left = 5640
- TabIndex = 5
- Text = "0"
- Top = 1320
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 6
- Left = 1665
- TabIndex = 6
- Text = "1"
- Top = 1695
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 7
- Left = 5640
- TabIndex = 7
- Text = "0"
- Top = 1695
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 8
- Left = 1665
- TabIndex = 8
- Text = "1"
- Top = 2055
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 9
- Left = 5640
- TabIndex = 9
- Text = "1"
- Top = 2055
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 10
- Left = 1665
- TabIndex = 10
- Text = "1"
- Top = 2430
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 0
- Left = 1665
- TabIndex = 0
- Text = "0"
- Top = 585
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 1
- Left = 5640
- TabIndex = 1
- Text = "1"
- Top = 585
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 2
- Left = 1665
- TabIndex = 2
- Text = "0"
- Top = 945
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 3
- Left = 5640
- TabIndex = 3
- Text = "1"
- Top = 945
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 4
- Left = 1665
- TabIndex = 4
- Text = "1"
- Top = 1320
- Width = 2160
- End
- Begin VB.CheckBox ChkStopUse
- Alignment = 1 'Right Justify
- Caption = "停用:"
- Height = 328
- Left = 645
- TabIndex = 28
- Top = 5700
- Width = 1230
- End
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 3
- Left = 7770
- Picture = "公用_客户设置.frx":25B6
- Style = 1 'Graphical
- TabIndex = 31
- Top = 945
- Width = 301
- End
- Begin VB.CommandButton QxCommand
- Cancel = -1 'True
- Caption = "取消(&C)"
- Height = 300
- Left = 7800
- TabIndex = 30
- Top = 178
- Width = 1120
- End
- Begin VB.CommandButton BcCommand
- Caption = "保存(&S)"
- Height = 300
- Left = 6648
- TabIndex = 29
- Top = 178
- Width = 1120
- End
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 0
- Left = 3675
- Picture = "公用_客户设置.frx":2940
- Style = 1 'Graphical
- TabIndex = 39
- Top = 133
- Visible = 0 'False
- Width = 301
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 25
- Left = 5640
- TabIndex = 25
- Text = "1"
- Top = 5010
- Width = 2160
- End
- Begin VB.TextBox LrText
- Height = 313
- Index = 27
- Left = 5640
- TabIndex = 27
- Text = "1"
- Top = 5370
- Width = 2160
- End
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 27
- Left = 7770
- Picture = "公用_客户设置.frx":2CCA
- Style = 1 'Graphical
- TabIndex = 33
- Top = 5370
- Width = 301
- End
- Begin VB.CommandButton Ydcommand1
- Height = 313
- Index = 25
- Left = 7770
- Picture = "公用_客户设置.frx":3054
- Style = 1 'Graphical
- TabIndex = 32
- Top = 5010
- Width = 301
- End
- Begin VB.Label TsLabel
- Caption = "分管部门:"
- Height = 180
- Index = 25
- Left = 4635
- TabIndex = 67
- Top = 5085
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "所属业务员:"
- Height = 180
- Index = 26
- Left = 675
- TabIndex = 66
- Top = 5460
- Width = 990
- End
- Begin VB.Label TsLabel
- Caption = "发展日期:"
- Height = 180
- Index = 27
- Left = 4635
- TabIndex = 65
- Top = 5460
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "信用等级:"
- Height = 180
- Index = 16
- Left = 675
- TabIndex = 64
- Top = 3615
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "信用额度:"
- Height = 180
- Index = 17
- Left = 4635
- TabIndex = 63
- Top = 3615
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "帐龄额度:"
- Height = 180
- Index = 18
- Left = 675
- TabIndex = 62
- Top = 3990
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "信用天数:"
- Height = 180
- Index = 19
- Left = 4635
- TabIndex = 61
- Top = 3990
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "最后交易日:"
- Height = 180
- Index = 20
- Left = 675
- TabIndex = 60
- Top = 4350
- Width = 990
- End
- Begin VB.Label TsLabel
- Caption = "最后交易额:"
- Height = 180
- Index = 21
- Left = 4635
- TabIndex = 59
- Top = 4350
- Width = 990
- End
- Begin VB.Label TsLabel
- Caption = "最后回款日:"
- Height = 180
- Index = 22
- Left = 675
- TabIndex = 58
- Top = 4710
- Width = 990
- End
- Begin VB.Label TsLabel
- Caption = "最后回款额:"
- Height = 180
- Index = 23
- Left = 4635
- TabIndex = 57
- Top = 4710
- Width = 990
- End
- Begin VB.Label TsLabel
- Caption = "应收余额:"
- Height = 180
- Index = 24
- Left = 675
- TabIndex = 56
- Top = 5085
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "E-Mail:"
- Height = 180
- Index = 11
- Left = 4635
- TabIndex = 55
- Top = 2520
- Width = 630
- End
- Begin VB.Label TsLabel
- Caption = "客户网址:"
- Height = 180
- Index = 12
- Left = 675
- TabIndex = 54
- Top = 2880
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "联系人:"
- Height = 180
- Index = 13
- Left = 4635
- TabIndex = 53
- Top = 2880
- Width = 630
- End
- Begin VB.Label TsLabel
- Caption = "联系方式:"
- Height = 180
- Index = 14
- Left = 675
- TabIndex = 52
- Top = 3255
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "收货地址:"
- Height = 180
- Index = 15
- Left = 4635
- TabIndex = 51
- Top = 3255
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "邮政编码:"
- Height = 180
- Index = 5
- Left = 4635
- TabIndex = 50
- Top = 1425
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "法人名称:"
- Height = 180
- Index = 7
- Left = 4635
- TabIndex = 49
- Top = 1785
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "开户银行:"
- Height = 180
- Index = 8
- Left = 675
- TabIndex = 48
- Top = 2160
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "银行账号:"
- Height = 180
- Index = 9
- Left = 4635
- TabIndex = 47
- Top = 2160
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "上级单位:"
- Height = 180
- Index = 10
- Left = 675
- TabIndex = 46
- Top = 2520
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "税 号:"
- Height = 180
- Index = 6
- Left = 675
- TabIndex = 45
- Top = 1785
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "客户编码:"
- Height = 180
- Index = 0
- Left = 675
- TabIndex = 44
- Top = 690
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "客户名称:"
- Height = 180
- Index = 1
- Left = 4635
- TabIndex = 43
- Top = 690
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "所属地区:"
- Height = 180
- Index = 2
- Left = 675
- TabIndex = 42
- Top = 1050
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "所属行业:"
- Height = 180
- Index = 3
- Left = 4635
- TabIndex = 41
- Top = 1050
- Width = 810
- End
- Begin VB.Label TsLabel
- Caption = "客户地址:"
- Height = 180
- Index = 4
- Left = 675
- TabIndex = 40
- Top = 1425
- Width = 810
- End
- End
- Begin VSFlex8Ctl.VSFlexGrid CzxsGrid
- Height = 6105
- Left = 90
- TabIndex = 34
- Top = 405
- Width = 9030
- _cx = 5080
- _cy = 5080
- Appearance = 1
- 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 = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = 8421504
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 5000
- Cols = 10
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = ""
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- AutoSearchDelay = 2
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0
- 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
- AccessibleName = ""
- AccessibleDescription= ""
- AccessibleValue = ""
- AccessibleRole = 24
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 36
- Top = 0
- Width = 9270
- _ExtentX = 16351
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 13
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "设置"
- Key = "ymsz"
- ImageKey = "sz"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "打印"
- Key = "dy"
- Object.ToolTipText = "点击或按Ctrl+P打印表格"
- ImageKey = "dy"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "预览"
- Key = "yl"
- ImageKey = "yl"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "增加"
- Key = "zj"
- Object.ToolTipText = "点击或按Ctrl+A增加记录"
- ImageKey = "xz"
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "修改"
- Key = "xg"
- ImageKey = "xg"
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "删除"
- Key = "sc"
- Object.ToolTipText = "点击或按Ctrl+D删除当前记录"
- ImageKey = "sc"
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "查询"
- Key = "cx"
- ImageIndex = 24
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageKey = "sx"
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 525
- Left = 6795
- TabIndex = 37
- Top = 0
- Width = 2475
- _ExtentX = 4366
- _ExtentY = 926
- ButtonWidth = 1455
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 3
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存格式"
- Key = "bcgs"
- ImageKey = "bcgs"
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "默认列宽"
- Key = "hfmrgs"
- ImageKey = "mrlk"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "显示项目"
- Key = "szxsxm"
- ImageKey = "xsxm"
- EndProperty
- EndProperty
- End
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 0
- Top = 420
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 29
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":33DE
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":3778
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":3B12
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":3EAC
- Key = "xg"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":4246
- Key = "zh"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":45E0
- Key = "sh"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":497A
- Key = "bc"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":4D14
- Key = "fq"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":50AE
- Key = "bz"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":5448
- Key = "tc"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":57E2
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":5B7C
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":5F16
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":62B0
- Key = "first"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":664A
- Key = "prev"
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":69E4
- Key = "next"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":6D7E
- Key = "last"
- EndProperty
- BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":7118
- Key = "xx"
- EndProperty
- BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":74B2
- Key = "define"
- EndProperty
- BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":784C
- Key = "exec"
- EndProperty
- BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":7BE6
- Key = "xz"
- EndProperty
- BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":7F80
- Key = "sc"
- EndProperty
- BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":831A
- Key = "sx"
- EndProperty
- BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":86B4
- Key = "cx"
- EndProperty
- BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":8A4E
- Key = "zd"
- EndProperty
- BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":8DE8
- Key = "dz"
- EndProperty
- BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":9182
- Key = "ph"
- EndProperty
- BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":951C
- Key = "fz"
- EndProperty
- BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "公用_客户设置.frx":98B6
- Key = "dw"
- EndProperty
- EndProperty
- End
- End
- Attribute VB_Name = "Gy_Customer"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*******************************************************
- '* 模 块 名 称 :客户档案设置
- '* 功 能 描 述 :设置往来客户档案
- '* 程序员姓名 :徐强
- '* 最后修改人 :徐强
- '* 最后修改时间:2001/11/27
- '* 备 注:
- '*******************************************************
- Dim Rec_CodeSet As New ADODB.Recordset '编码设置表
- Dim jdzygs As Integer '控件焦点转移个数
- Dim Lrzt As Integer '录入状态标志(0-非录入状态 1-增加 2-修改)
- Dim ReportTitle As String '报表主标题
- Dim Str_RightEdit As String '编辑(新增、修改、删除)权限索引
- '以下为固定使用变量(网格)
- Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Tsxx As String '系统提示信息
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Szzls As Integer '数组总列数(网格列数-1)
- '以下为固定使用变量(文本框)
- 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 '取消按钮信息传递
- Dim str_cusname As String '客户名称
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
- jdzygs = 34
- 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()
- '打印报表标题信息
- ReportTitle = "客 户 设 置"
- '调入打印页面设置窗体
- XtReportCode = "Gy_Customer"
- Load Dyymctbl
- '以下为文本框处理程序(读入文本框录入信息)
- TextGroupCode = "Gy_Customer"
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
- Call Wbkcsh
- '调入网格设置信息
- GridCode = "Gy_Customer"
- Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Szzls = CzxsGrid.Cols - 1
- '填 充 网 格
- '初始化toolbar,tab卡状态
- StTab.Tab = 0
- StTab.TabEnabled(1) = False
- Frame1.Enabled = False
- '设置为非录入状态
- Lrzt = 0
- '编辑(新增、修改、删除)权限索引
- Str_RightEdit = "Gy_Customer_Edit"
- End Sub
- Private Sub Cxnrtcwg(Optional Sqlstr As String) '查询内容填充网格
- Dim Jsqte As Long '查询临时使用变量
- '为加快显示速度,将网格刷新动作冻结
- CzxsGrid.Redraw = False
- '[>>查询连接串
- If Sqlstr = "" Then
- Sqlstr = "SELECT * FROM Gy_V_Customer order by CusCode"
- End If
- '<<]
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With Cxnrrec
- CzxsGrid.Rows = CzxsGrid.FixedRows
- If .EOF And .BOF Then
- CzxsGrid.Redraw = True
- Exit Sub
- End If
- Jsqte = CzxsGrid.FixedRows
- Do While Not .EOF
- CzxsGrid.AddItem ""
- Call Jltcwg(Cxnrrec, Jsqte) '调入填充网格子过程
- CzxsGrid.RowHeight(Jsqte) = Sjhgd '设置网格高度
- .MoveNext
- Jsqte = Jsqte + 1
- Loop
- End With
- '将网格刷新动作解冻
- CzxsGrid.Redraw = True
- End Sub
- Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long) '记录内容填充网格
- '[>>以下为自定义部分
- With Jlbrec
- CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("CusCode") & "") '客户编码
- CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("CusName") & "") '客户名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("AreaName") & "") '所属地区
- CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("TradeName") & "") '所属行业
- CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("Address") & "") '客户地址
- CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("PostCode") & "") '邮政编码
- CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("TaxCode") & "") '税号
- CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("FictPerson") & "") '法人名称
- CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("Bank") & "") '开户银行
- CzxsGrid.TextMatrix(Rowjsq, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("BankAccount") & "") '银行账号
- CzxsGrid.TextMatrix(Rowjsq, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("CusSuper") & "") '上级单位
- CzxsGrid.TextMatrix(Rowjsq, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("Deptname") & "") '分管部门
- CzxsGrid.TextMatrix(Rowjsq, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("Personname") & "") '所属业务员
- CzxsGrid.TextMatrix(Rowjsq, Sydz("014", GridStr(), Szzls)) = Trim(.Fields("StopFlag") & "") '停用
- CzxsGrid.TextMatrix(Rowjsq, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("CreditGrade") & "") '信用等级
- CzxsGrid.TextMatrix(Rowjsq, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("CreditMoney") & "") '信用额度
- CzxsGrid.TextMatrix(Rowjsq, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("CreditageMoney") & "") '帐龄额度
- CzxsGrid.TextMatrix(Rowjsq, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("CreditDate") & "") '信用天数
- End With
- '以上为自定义部分<<]
- End Sub
- Private Sub Form_Unload(Cancel As Integer) '窗体卸载
- Set Cxnrrec = Nothing
- Set Rec_CodeSet = Nothing
- Unload Dyymctbl
- Gy_CustomerQuery.UnloadCheck = 1
- Unload Gy_CustomerQuery
- End Sub
- Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
- Dim Jsqte As Integer
- Dim I As Long
- Dim str_tmp As String
- Dim likenum As Long
- Dim rs As New ADODB.Recordset
- Dim intyesno As Integer
- '对文本框录入内容进行为零和为空判断(固定不变)
- With Rec_CodeSet
- For Jsqte = 0 To Max_Text_Index
- If Textint(Jsqte, 8) = 1 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 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 Then
- If Not TextYxxpd(Jsqte) Then
- Exit Function
- End If
- End If
- Next Jsqte
- If Lrzt = 1 Then '增 加
- '[>>判断编码是否重复
- If .State = 1 Then .Close
- .Open "SELECT * FROM Gy_Customer WHERE CusCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- Tsxx = "客户编码重复!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(0).SetFocus
- Bclrsj = False
- Exit Function
- End If
- '******************************************
- '计算客户名称相似率(相同字的个数/长度)
- likenum = 0
- j = 0
- 'rs用于取出相似率
- rs.Open "select itemvalue from gy_accinformation where itemcode='gy_customer'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If .State = 1 Then .Close
- .Open "SELECT cusname FROM Gy_Customer ", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- str_tmp = Trim(LrText(1))
- Do While Not .EOF
- For I = 1 To Len(str_tmp)
- If InStr(1, Trim(.Fields("cusname")), Mid(str_tmp, I, 1)) Then
- likenum = likenum + 1
- End If
- Next
- If likenum * 100# / Len(str_tmp) > Val(rs("itemvalue")) Then
- cusname = cusname & " " & Trim(.Fields("cusname")) & " " & Chr(13)
- End If
- likenum = 0
- .MoveNext
- Loop
- If Len(cusname) > 0 Then
- Tsxx = "存在相似的客户名称:" & Chr(13) & suppliername & "要继续吗?"
- If Xtxxts(Tsxx, 1, 2) = vbNo Then
- LrText(1).SetFocus
- Bclrsj = False
- Exit Function
- End If
- End If
- Set rs = Nothing
- '****************************************************
- If .State = 1 Then .Close
- .Open "SELECT * FROM Gy_Customer WHERE 1=2", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- '判断记录内容无误后,将记录内容写入数据表
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- .AddNew
- .Fields("CusCode") = Trim(LrText(0).Text) '客户编码
- .Fields("CusName") = Trim(LrText(1).Text) '客户名称
- If Trim(LrText(2).Tag) <> "" Then '地区编码
- .Fields("Areacode") = Trim(LrText(2).Tag)
- Else
- .Fields("Areacode") = Null
- End If
- If Trim(LrText(3).Tag) <> "" Then '行业编码
- .Fields("Tradecode") = Trim(LrText(3).Tag)
- Else
- .Fields("Tradecode") = Null
- End If
- .Fields("Address") = Trim(LrText(4).Text) '地址
- .Fields("postcode") = Trim(LrText(5)) '邮编
- .Fields("taxcode") = Trim(LrText(6)) '税号
- .Fields("fictperson") = Trim(LrText(7)) '法人
- .Fields("bank") = Trim(LrText(8).Text) '开户银行
- .Fields("bankaccount") = Trim(LrText(9).Text) '银行账号
- .Fields("Cussuper") = Trim(LrText(10).Text) '上级主管公司
- .Fields("email") = Trim(LrText(11).Text) 'email
- .Fields("worknet") = Trim(LrText(12).Text) '网址
- .Fields("contactperson") = Trim(LrText(13).Text) '联系人
- .Fields("contacttype") = Trim(LrText(14).Text) '联系方式
- .Fields("desaddress") = Trim(LrText(15).Text) '收获地址
- .Fields("creditgrade") = Trim(LrText(16).Text) '信用等级
- .Fields("creditmoney") = Val(LrText(17).Text) '信用额度
- .Fields("creditagemoney") = Val(LrText(18).Text) '帐龄额度
- If IsDate(LrText(19).Text) Then
- .Fields("creditdate") = Trim(LrText(19).Text) '信用天数
- End If
- If Trim(LrText(25).Tag) <> "" Then '公司分管部门
- .Fields("deptcode") = Trim(LrText(25).Tag)
- Else
- .Fields("deptcode") = Null
- End If
- If Trim(LrText(26).Tag) <> "" Then '所属销售员
- .Fields("PersonCode") = Trim(LrText(26).Tag)
- Else
- .Fields("PersonCode") = Null
- End If
- If IsDate(LrText(27)) Then '发展日期
- .Fields("relationdate") = LrText(27)
- Else
- .Fields("relationdate") = Null
- End If
- If ChkStopUse.Value Then '停用标志
- .Fields("stopflag") = 1
- Else
- .Fields("stopflag") = 0
- End If
- .Update
- Cw_DataEnvi.DataConnect.CommitTrans
- '将记录加入网格
- Sqlstr = "SELECT * FROM Gy_V_Customer WHERE CusCode= '" + Trim(LrText(0).Text) + "'"
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With CzxsGrid
- .AddItem ""
- .RowHeight(.Rows - 1) = Sjhgd
- .Select .Rows - 1, Qslz
- Call Jltcwg(Cxnrrec, .Rows - 1)
- End With
- Tsxx = "保存完毕!"
- Call Xtxxts(Tsxx, 0, 4)
- Call Cshlrxx(1)
- LrText(0).SetFocus
- '将网格按编码排序
- With CzxsGrid
- .Col = Sydz("001", GridStr(), Szzls)
- CzxsGrid.Sort = flexSortStringAscending
- End With
- '<<]
- Else '否则为修改记录
- '******************************************
- '计算客户名称相似率(相同字的个数/长度)
- If Trim(LrText(1)) <> str_cusname Then '如果客户名称改变
- str_cusname = ""
- likenum = 0
- j = 0
- 'rs用于取出相似率
- rs.Open "select itemvalue from gy_accinformation where itemcode='gy_customer'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If .State = 1 Then .Close
- .Open "SELECT cusname FROM Gy_Customer where cuscode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- str_tmp = Trim(LrText(1))
- Do While Not .EOF
- For I = 1 To Len(str_tmp)
- If InStr(1, Trim(.Fields("cusname")), Mid(str_tmp, I, 1)) Then
- likenum = likenum + 1
- End If
- Next
- If likenum * 100# / Len(str_tmp) > Val(rs("itemvalue")) Then
- cusname = cusname & " " & Trim(.Fields("cusname")) & " " & Chr(13)
- End If
- likenum = 0
- .MoveNext
- Loop
- If Len(cusname) > 0 Then
- Tsxx = "存在相似的客户名称:" & Chr(13) & suppliername & "要继续吗?"
- If Xtxxts(Tsxx, 1, 2) = vbNo Then
- LrText(1).SetFocus
- Bclrsj = False
- Exit Function
- End If
- End If
- Set rs = Nothing
- End If
- '****************************************************
- On Error GoTo Swcwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- If .State = 1 Then .Close
- .Open "SELECT * FROM Gy_Customer WHERE CusCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
- If Not .EOF Then
- .Fields("CusName") = Trim(LrText(1).Text) '客户名称
- If Trim(LrText(2).Tag) <> "" Then '地区编码
- .Fields("Areacode") = Trim(LrText(2).Tag)
- Else
- .Fields("Areacode") = Null
- End If
- If Trim(LrText(3).Tag) <> "" Then '行业编码
- .Fields("Tradecode") = Trim(LrText(3).Tag)
- Else
- .Fields("Tradecode") = Null
- End If
- .Fields("Address") = Trim(LrText(4).Text) '地址
- .Fields("postcode") = Trim(LrText(5)) '邮编
- .Fields("taxcode") = Trim(LrText(6)) '税号
- .Fields("fictperson") = Trim(LrText(7)) '法人
- .Fields("bank") = Trim(LrText(8).Text) '开户银行
- .Fields("bankaccount") = Trim(LrText(9).Text) '银行账号
- .Fields("Cussuper") = Trim(LrText(10).Text) '上级主管公司
- .Fields("email") = Trim(LrText(11).Text) 'email
- .Fields("worknet") = Trim(LrText(12).Text) '网址
- .Fields("contactperson") = Trim(LrText(13).Text) '联系人
- .Fields("contacttype") = Trim(LrText(14).Text) '联系方式
- .Fields("desaddress") = Trim(LrText(15).Text) '收获地址
- .Fields("creditgrade") = Trim(LrText(16).Text) '信用等级
- .Fields("creditmoney") = Val(LrText(17).Text) '信用额度
- .Fields("creditagemoney") = Val(LrText(18).Text) '帐龄额度
- If IsDate(LrText(19).Text) Then
- .Fields("creditdate") = Trim(LrText(19).Text) '信用天数
- End If
- If Trim(LrText(25).Tag) <> "" Then '公司分管部门
- .Fields("deptcode") = Trim(LrText(25).Tag)
- Else
- .Fields("deptcode") = Null
- End If
- If Trim(LrText(26).Tag) <> "" Then '所属销售员
- .Fields("PersonCode") = Trim(LrText(26).Tag)
- Else
- .Fields("PersonCode") = Null
- End If
- If IsDate(LrText(27)) Then '发展日期
- .Fields("relationdate") = LrText(27)
- Else
- .Fields("relationdate") = Null
- End If
- If ChkStopUse.Value Then '停用标志
- .Fields("stopflag") = 1
- Else
- .Fields("stopflag") = 0
- End If
- .Update
- End If
- Cw_DataEnvi.DataConnect.CommitTrans
- '刷新当前网格
- Sqlstr = "SELECT * FROM Gy_V_Customer WHERE CusCode= '" + Trim(LrText(0).Text) + "'"
- Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- With CzxsGrid
- Call Jltcwg(Cxnrrec, .Row)
- End With
- End If
- '保存记录成功,函数返回真值
- Bclrsj = True
- Exit Function
- End With
- Swcwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- Tsxx = "存盘过程中出现错误,程序自动恢复保存前状态!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Function
- End Function
- Private Function Cshlrxx(lrztxx As Integer) As Boolean '初始化录入字段信息
- Dim RecTemp As New ADODB.Recordset
- TextChangeLock = True '关闭文本框Chang事件
- Call mmkn
- str_cusname = ""
- If lrztxx = 1 Then
- '增加新记录时将文本框清空
- For Jsqte = 0 To Max_Text_Index
- If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
- LrText(Jsqte).Text = ""
- LrText(Jsqte).Tag = ""
- End If
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- '[>>
- '在此处可添加新增记录时初始化设置
- '<<]
- Else
- '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
- With RecTemp
- Sqlstr = "SELECT * FROM Gy_V_Customer Where CusCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- '记录如存在则读入其内容,否则提示记录已被其他人删除
- If Not RecTemp.EOF Then
- Call ShowData(RecTemp)
- Else
- Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
- Call Xtxxts(Tsxx, 0, 4)
- Call Cancel
- TextChangeLock = False
- Exit Function
- End If
- End With
- End If
- Cshlrxx = True
- TextChangeLock = False
- End Function
- Private Sub ShowData(rs As ADODB.Recordset)
- With rs
- LrText(0) = Trim(.Fields("CusCode") & "") '客户编码
- LrText(1) = Trim(.Fields("CusName") & "") '客户名称
- LrText(2) = Trim(.Fields("Areaname") & "") '地区名称
- LrText(3) = Trim(.Fields("Tradename") & "") '行业名称
- LrText(4) = Trim(.Fields("Address") & "") '地址
- LrText(5) = Trim(.Fields("postcode") & "") '邮政编码
- LrText(6) = Trim(.Fields("taxcode") & "") '税号
- LrText(7) = Trim(.Fields("fictperson") & "") '法人
- LrText(8) = Trim(.Fields("bank") & "") '开户银行
- LrText(9) = Trim(.Fields("bankaccount") & "") '银行账号
- LrText(10) = Trim(.Fields("cussuper") & "") '上级主管部门
- LrText(11) = Trim(.Fields("email") & "") 'email
- LrText(12) = Trim(.Fields("worknet")) '网址
- LrText(13) = Trim(.Fields("contactperson") & "") '联系人
- LrText(14) = Trim(.Fields("contacttype") & "") '联系方式
- LrText(15) = Trim(.Fields("desaddress") & "") '收货地址
- LrText(16) = Trim(.Fields("creditgrade") & "") '信用等级
- LrText(17) = Trim(.Fields("creditmoney") & "") '信用额度
- LrText(18) = Trim(.Fields("creditagemoney") & "") '帐龄额度
- LrText(19) = Trim(.Fields("creditdate") & "") '信用天数
- '
- LrText(25) = Trim(.Fields("deptname") & "") '公司分管部门名称
- LrText(26) = Trim(.Fields("Personname") & "") '所属销售员
- LrText(27) = Format(Trim(.Fields("relationdate") & ""), "yyyy-mm-dd") '发展日期
- If .Fields("stopflag") Then '停用标志
- ChkStopUse.Value = 1
- Else
- ChkStopUse.Value = 0
- End If
- str_cusname = LrText(1)
- End With
- End Sub
- Private Sub Scdqjl() '删 除 当 前 记 录
- Dim Yhanswer As Integer
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- '非数据行不能删除
- If CzxsGrid.Row < CzxsGrid.FixedRows Then
- Exit Sub
- End If
- '用户确认是否删除记录
- Tsxx = "请确认是否删除当前记录?"
- Yhanswer = Xtxxts(Tsxx, 2, 2)
- If Yhanswer = 2 Then
- Exit Sub
- End If
- On Error GoTo Cwcl
- Cw_DataEnvi.DataConnect.BeginTrans
- '[>>以下需自定义部分
- Cw_DataEnvi.DataConnect.Execute "delete Gy_Customer where CusCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
- '以上为自定义部分<<]
- Cw_DataEnvi.DataConnect.CommitTrans
- CzxsGrid.RemoveItem CzxsGrid.Row
- Exit Sub
- Cwcl:
- Cw_DataEnvi.DataConnect.RollbackTrans
- If Err.Number = -2147217873 Then '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
- Tsxx = "此客户已经被使用,不能删除!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- Else
- Tsxx = "出现未知情况,此客户不能被删除!"
- Call Xtxxts(Tsxx, 0, 1)
- Exit Sub
- End If
- End Sub
- '*******************以下区域为编写自定义过程区域**********************
- '*******************以上区域为编写自定义过程区域**********************
- '******************以下为基本处理程序(固定不变)************************'
- Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) '支持热键操作
- If Shift = 2 Then
- Select Case UCase(Chr(KeyCode))
- Case "P" 'Ctrl+P 打印
- If SzToolbar.Buttons("dy").Visible And SzToolbar.Buttons("dy").Enabled Then
- Call bbyl(False)
- End If
- Case "A" 'Ctrl+A 增加
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- If SzToolbar.Buttons("zj").Visible And SzToolbar.Buttons("zj").Enabled Then
- Call Toolbjzt
- Lrzt = 1
- Call Cshlrxx(Lrzt)
- LrText(0).Enabled = True
- LrText(0).SetFocus
- End If
- Case "D" 'Ctrl+D 删除
- If SzToolbar.Buttons("sc").Visible And SzToolbar.Buttons("sc").Enabled Then
- Call Scdqjl
- End If
- End Select
- End If
- End Sub
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "ymsz" '页面设置
- Dyymctbl.Show 1
- Case "yl" '预 览
- Call bbyl(True)
- Case "dy" '打 印
- Call bbyl(False)
- Case "zj" '增 加
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
- Exit Sub
- End If
- Call Toolbjzt
- Lrzt = 1
- Call Cshlrxx(Lrzt)
- LrText(0).Enabled = True
- LrText(0).SetFocus
- Case "xg" '修 改
- Call Xgdqjl
- Case "sc" '删 除
- Call Scdqjl '查询
- Case "cx"
- Gy_CustomerQuery.Show 1
- Case "sx" '刷 新
- Call Cxnrtcwg
- Case "bz" '帮 助
- Call F1bz
- Case "fh" '退 出
- Unload Me
- End Select
- End Sub
- Private Sub CzxsGrid_DblClick() '修改当前编码记录
- Call Xgdqjl
- End Sub
- Private Sub Xgdqjl() '修改当前编码记录
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
- BcCommand.Enabled = False
- End If
- If CzxsGrid.Row < CzxsGrid.FixedRows Then
- Exit Sub
- End If
- Call Toolbjzt
- Call mmkn
- Lrzt = 2
- If Cshlrxx(Lrzt) Then
- LrText(1).SetFocus
- LrText(0).Enabled = False
- End If
- End Sub
- Private Sub Toolbjzt() 'Toolbar状态(编辑状态)
- StTab.TabEnabled(1) = True
- StTab.Tab = 1
- Frame1.Enabled = True
- StTab.TabEnabled(0) = False
- CzxsGrid.Enabled = False
- With SzToolbar
- .Buttons("ymsz").Enabled = False
- .Buttons("dy").Enabled = False
- .Buttons("yl").Enabled = False
- .Buttons("zj").Enabled = False
- .Buttons("xg").Enabled = False
- .Buttons("sc").Enabled = False
- .Buttons("sx").Enabled = False
- .Buttons("cx").Enabled = False
- End With
- End Sub
- Private Sub Toolfbjzt() 'Toolbar状态(非编辑状态)
- StTab.TabEnabled(0) = True
- StTab.Tab = 0
- CzxsGrid.Enabled = True
- Frame1.Enabled = False
- StTab.TabEnabled(1) = False
- Lrzt = 0
- With SzToolbar
- .Buttons("ymsz").Enabled = True
- .Buttons("dy").Enabled = True
- .Buttons("yl").Enabled = True
- .Buttons("zj").Enabled = True
- .Buttons("xg").Enabled = True
- .Buttons("sc").Enabled = True
- .Buttons("sx").Enabled = True
- .Buttons("cx").Enabled = True
- End With
- End Sub
- Private Sub BcCommand_Click() '保 存
- If Not Bclrsj Then
- Exit Sub
- End If
- If Lrzt = 2 Then
- Call Toolfbjzt
- End If
- End Sub
- Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) '取消
- '避免执行Click程序
- Bln_Cancel = True
- Call Cancel
- End Sub
- Private Sub QxCommand_Click() '取消
- If Bln_Cancel Then
- Bln_Cancel = False
- Exit Sub
- End If
- Call Cancel
- End Sub
- Private Sub Cancel() '取消
- '文本框加锁
- For Jsqte = 0 To Max_Text_Index
- TextValiJudgeLock(Jsqte) = True
- Next Jsqte
- Call Toolfbjzt
- End Sub
- Private Sub CzxsGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long) '网格列发生移动时自动交换网格索引信息
- FnBln_RefreshArray Col, Position, GridStr(), GridInf()
- End Sub
- Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) '表格格式设置(通用)
- Select Case Button.Key
- Case "bcgs" '保存表格格式
- Call Bcwggs(CzxsGrid, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(CzxsGrid, GridCode, GridStr())
- Case "szxsxm" '设置显示项目
- Call Szxsxm(CzxsGrid, GridCode)
- End Select
- End Sub
- Private Sub bbyl(bbylte As Boolean) '报表打印预览
- Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
- Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
- Bbxbtgs = 1 '报 表 小 标 题 行 数
- Bbbwhgs = 0 '报 表 表 尾 行 数
- ReDim Bbxbt(1 To Bbxbtgs)
- ReDim bbxbtzzxs(1 To Bbxbtgs)
- If Bbbwhgs <> 0 Then
- ReDim Bbbwh(1 To Bbbwhgs)
- ReDim Bbbwhzzxs(1 To Bbbwhgs)
- End If
- Bbzbt = ReportTitle
- Bbxbt(1) = " "
- bbxbtzzxs(1) = 0 '报表行组织形式(0-居左 1-居中 2-居右)
- Call Scyxsjb(CzxsGrid) '生成报表数据
- Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
- If Not bbylte Then
- Unload DY_Tybbyldy
- End If
- 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)
- Call TextChangeLimit(LrText(Index), Textint(Index, 1)) '去掉无效字符
- Select Case Textint(Index, 1)
- Case 8, 11 '金额型
- Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
- Case 9, 12 '数量型
- 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) '文本框失去焦点
- Dim RecTemp As New ADODB.Recordset
- '显示相应信息但不能进行有效性判断
- '[>>
- If Index = 0 And Lrzt = 1 Then '增加时,用户输入物料编码,显示此物料编码对应的记录
- Sqlstr = "SELECT * FROM Gy_V_Customer Where cuscode='" & Trim(LrText(0)) & "'"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
- '记录如存在则读入其内容,否则提示记录已被其他人删除
- If Not RecTemp.EOF Then
- Call ShowData(RecTemp)
- End If
- End If
- '<<]
- End Sub
- Private Sub Timer1_Timer()
- Dim Sqlstr As String
- Timer1.Enabled = False
- Xt_Wait.Show
- Xt_Wait.Refresh
- '加快显示速度
- CzxsGrid.Redraw = False
- '生成查询结果
- Dim Str_QueryCondi As String
- Dim Jsqte As Integer
- With Gy_CustomerQuery
- Str_QueryCondi = " where 1=1 "
- For Jsqte = 0 To 4
- Select Case Jsqte
- Case 0 '客户名称
- If Trim(.LrText(0).Text) <> "" Then
- Str_QueryCondi = Str_QueryCondi & " and cuscode='" & Trim(.LrText(0).Tag) & "'"
- End If
- Case 1 '所属地区
- If Trim(.LrText(1).Text) <> "" Then
- Str_QueryCondi = Str_QueryCondi & " and areacode='" & Trim(.LrText(1).Tag) & "'"
- End If
- Case 2 '所属行业
- If Trim(.LrText(2).Text) <> "" Then
- Str_QueryCondi = Str_QueryCondi & " and tradecode='" & Trim(.LrText(2).Tag) & "'"
- End If
- Case 3 '分管部门
- If Trim(.LrText(3).Text) <> "" Then
- Str_QueryCondi = Str_QueryCondi & " and deptcode= '" & Trim(.LrText(3).Tag) & "'"
- End If
- Case 4 '所属业务员
- If Trim(.LrText(4).Text) <> "" Then
- Str_QueryCondi = Str_QueryCondi & " and PersonCode= '" & Trim(.LrText(4).Tag) & "'"
- End If
- End Select
- Next
- '查询连接串
- Sqlstr = "SELECT * from Gy_v_customer " & Str_QueryCondi & " order by cuscode"
- Call Cxnrtcwg(Sqlstr)
- End With
- CzxsGrid.Redraw = True
- Xt_Wait.Hide
- 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
- '调用帮助
- Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
- '根据设置选择显示编码和名称,并进行存储
- 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
- 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
- '文本框内容为空认为有效,并清空其Tag值
- 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")
- If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
- LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
- End If
- Else
- Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
- Call Xtxxts(Tsxx, 0, 1)
- LrText(Index).SetFocus
- Exit Function
- End If
- Case 3 '其他类型
- End Select
- '如果有效则加锁,用户不改变内容则不再进行有效性判断
- TextValiJudgeLock(Index) = True
- '调用文本框事后处理程序
- Call Wbklrwbcl(Index)
- '有效性判断通过则返回True
- TextYxxpd = True
- End Function
- '[<<
- Private Sub Command1_Click()
- CzxsGrid.Row = CzxsGrid.FixedRows
- Call mmkn
- Lrzt = 2
- If Cshlrxx(Lrzt) Then
- LrText(1).SetFocus
- LrText(0).Enabled = False
- End If
- End Sub
- Private Sub Command2_Click()
- If CzxsGrid.Row = CzxsGrid.FixedRows Then
- Exit Sub
- Else
- CzxsGrid.Row = CzxsGrid.Row - 1
- End If
- Call mmkn
- Lrzt = 2
- If Cshlrxx(Lrzt) Then
- LrText(1).SetFocus
- LrText(0).Enabled = False
- End If
- End Sub
- Private Sub Command3_Click()
- If CzxsGrid.Row = CzxsGrid.Rows - 1 Then
- Exit Sub
- Else
- CzxsGrid.Row = CzxsGrid.Row + 1
- End If
- Call mmkn
- Lrzt = 2
- If Cshlrxx(Lrzt) Then
- LrText(1).SetFocus
- LrText(0).Enabled = False
- End If
- End Sub
- Private Sub Command4_Click()
- CzxsGrid.Row = CzxsGrid.Rows - 1
- Call mmkn
- Lrzt = 2
- If Cshlrxx(Lrzt) Then
- LrText(1).SetFocus
- LrText(0).Enabled = False
- End If
- End Sub
- Private Sub mmkn()
- If CzxsGrid.Rows = CzxsGrid.FixedRows Then
- Command1.Enabled = False '首张
- Command2.Enabled = False '上张
- Command3.Enabled = False '下张
- Command4.Enabled = False '末张
- ElseIf CzxsGrid.Rows - 1 = CzxsGrid.FixedRows Then
- Command1.Enabled = False '首张
- Command2.Enabled = False '上张
- Command3.Enabled = False '下张
- Command4.Enabled = False '末张
- ElseIf CzxsGrid.Row = CzxsGrid.Rows - 1 Then
- Command1.Enabled = True '首张
- Command2.Enabled = True '上张
- Command3.Enabled = False '下张
- Command4.Enabled = False '末张
- ElseIf CzxsGrid.Row = CzxsGrid.FixedRows Then
- Command1.Enabled = False '首张
- Command2.Enabled = False '上张
- Command3.Enabled = True '下张
- Command4.Enabled = True '末张
- ElseIf CzxsGrid.Row <> CzxsGrid.Rows - 1 And CzxsGrid.Row <> CzxsGrid.FixedRows Then
- Command1.Enabled = True '首张
- Command2.Enabled = True '上张
- Command3.Enabled = True '下张
- Command4.Enabled = True '末张
- End If
- End Sub
- '>>]