资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:53k
源码类别:
企业管理
开发平台:
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"
- Begin VB.Form XT_BillDesign
- BackColor = &H00E0E0E0&
- Caption = "单据处理"
- ClientHeight = 7200
- ClientLeft = 1125
- ClientTop = 960
- ClientWidth = 11880
- Icon = "单据设置.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form4"
- ScaleHeight = 7200
- ScaleWidth = 11880
- WindowState = 2 'Maximized
- Begin VB.PictureBox Pict
- BackColor = &H00E9F4FA&
- BorderStyle = 0 'None
- Height = 6285
- Left = 75
- ScaleHeight = 6285
- ScaleWidth = 10905
- TabIndex = 0
- Top = 600
- Width = 10905
- Begin VSFlex8Ctl.VSFlexGrid WglrGrid
- Height = 3765
- Left = 150
- TabIndex = 18
- Top = 1650
- Width = 10065
- _cx = 17754
- _cy = 6641
- 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 = 7330794
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- 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 = 50
- 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
- Begin VSFlex8Ctl.VSFlexGrid HjGrid
- Height = 615
- Left = 0
- TabIndex = 19
- Top = 3075
- Visible = 0 'False
- Width = 9915
- _cx = 17489
- _cy = 1085
- 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 = -2147483636
- 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 = 50
- Cols = 10
- FixedRows = 1
- FixedCols = 1
- 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 VB.PictureBox Text_W
- Appearance = 0 'Flat
- BackColor = &H00FF0000&
- ForeColor = &H80000008&
- Height = 105
- Left = 2160
- MousePointer = 9 'Size W E
- ScaleHeight = 75
- ScaleWidth = 45
- TabIndex = 15
- Top = 720
- Visible = 0 'False
- Width = 75
- End
- Begin VB.PictureBox Pict_H
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- ForeColor = &H80000008&
- Height = 10605
- Left = 10845
- MousePointer = 9 'Size W E
- ScaleHeight = 10575
- ScaleWidth = 30
- TabIndex = 10
- Top = 0
- Width = 65
- End
- Begin VB.PictureBox Pict_W
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- ForeColor = &H80000008&
- Height = 65
- Left = 0
- MousePointer = 7 'Size N S
- ScaleHeight = 30
- ScaleMode = 0 'User
- ScaleWidth = 10830
- TabIndex = 9
- Top = 6225
- Width = 10860
- End
- Begin VB.PictureBox Grid_W
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- ForeColor = &H80000008&
- Height = 105
- Left = 10290
- MousePointer = 9 'Size W E
- ScaleHeight = 75
- ScaleWidth = 75
- TabIndex = 6
- Top = 3150
- Visible = 0 'False
- Width = 105
- End
- Begin VB.PictureBox Grid_H
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- ForeColor = &H80000008&
- Height = 105
- Left = 2850
- MousePointer = 7 'Size N S
- ScaleHeight = 75
- ScaleWidth = 75
- TabIndex = 5
- Top = 5010
- Visible = 0 'False
- Width = 105
- End
- Begin VB.PictureBox Grid_XY
- Appearance = 0 'Flat
- BackColor = &H00FF8080&
- ForeColor = &H80000008&
- Height = 105
- Left = 30
- MousePointer = 5 'Size
- ScaleHeight = 75
- ScaleWidth = 75
- TabIndex = 4
- Top = 2340
- Visible = 0 'False
- Width = 105
- End
- Begin VB.PictureBox label_XY
- BackColor = &H00E0E0E0&
- BorderStyle = 0 'None
- Enabled = 0 'False
- Height = 285
- Left = 1260
- ScaleHeight = 285
- ScaleWidth = 1875
- TabIndex = 7
- Top = 270
- Visible = 0 'False
- Width = 1875
- Begin VB.Label Caption_XY
- BackColor = &H00E0E0E0&
- ForeColor = &H00C00000&
- Height = 225
- Left = 150
- TabIndex = 8
- Top = 75
- Width = 1695
- End
- End
- Begin VB.TextBox LrText
- BackColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Height = 300
- Index = 0
- Left = 690
- Locked = -1 'True
- TabIndex = 1
- Text = "0"
- Top = 1020
- Visible = 0 'False
- Width = 1350
- End
- Begin MSComctlLib.Toolbar Toolbar1
- Height = 555
- Left = 0
- TabIndex = 16
- Top = 0
- Width = 10860
- _ExtentX = 19156
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- AllowCustomize = 0 'False
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 12
- 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+I增加记录"
- 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}
- Enabled = 0 'False
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageKey = "sx"
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageKey = "bz"
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "fh"
- ImageKey = "tc"
- EndProperty
- EndProperty
- BorderStyle = 1
- Enabled = 0 'False
- End
- Begin VB.Label TsLabel
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "订单号:"
- Height = 180
- Index = 0
- Left = 90
- TabIndex = 3
- Top = 1080
- Visible = 0 'False
- Width = 720
- End
- Begin VB.Label Lab_Title
- AutoSize = -1 'True
- BackColor = &H80000018&
- BackStyle = 0 'Transparent
- Caption = "销售订单"
- BeginProperty Font
- Name = "宋体"
- Size = 15
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 300
- Left = 4290
- TabIndex = 2
- Top = 800
- Visible = 0 'False
- Width = 1260
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 11
- Top = 0
- Width = 11880
- _ExtentX = 20955
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 12
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "竖对"
- Key = "SD"
- ImageIndex = 14
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "横对"
- Key = "HD"
- ImageIndex = 13
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 4
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "保存"
- Key = "Save"
- ImageIndex = 4
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageIndex = 5
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "表头"
- Key = "Item"
- ImageIndex = 16
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Enabled = 0 'False
- Caption = "打印"
- Key = "type"
- Object.ToolTipText = "打印类型设置"
- ImageKey = "type"
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 4
- EndProperty
- BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageIndex = 8
- EndProperty
- BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "Exit"
- ImageIndex = 9
- EndProperty
- EndProperty
- BorderStyle = 1
- Begin MSComctlLib.ImageCombo Imgcbo_SysName
- Height = 315
- Left = 4320
- TabIndex = 17
- Top = 120
- Width = 1965
- _ExtentX = 3466
- _ExtentY = 556
- _Version = 393216
- ForeColor = -2147483640
- BackColor = -2147483643
- OLEDropMode = 1
- Locked = -1 'True
- End
- Begin MSComctlLib.Toolbar GsToolbar
- Height = 525
- Left = 9510
- TabIndex = 14
- 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
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 300
- Left = 8490
- TabIndex = 13
- Top = 120
- Width = 795
- End
- Begin VB.ComboBox ComboName
- Height = 300
- Left = 6360
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 120
- Width = 2055
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 4320
- Top = 0
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 17
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":1042
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":13DC
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":1776
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":1B10
- Key = "xz"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":1EAA
- Key = "xg"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":2244
- Key = "sc"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":25DE
- Key = "sx"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":2978
- Key = "bz"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":2D12
- Key = "tc"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":30AC
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":3446
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":37E0
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":3B7A
- Key = "ht"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":3F14
- Key = "st"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":42AE
- Key = ""
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":4648
- Key = "ml"
- EndProperty
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "单据设置.frx":49E2
- Key = "type"
- EndProperty
- EndProperty
- End
- End
- End
- Attribute VB_Name = "XT_BillDesign"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*********************************************************************************************************
- '* 模 块 名 称 :单据设置
- '* 功 能 描 述 :此功能模块主要完成单据设置
- '* 程序员姓名 :王雄
- '* 最后修改人 :王雄
- '* 最后修改时间:2001/09/10
- '*********************************************************************************************************
- Option Explicit
- '[以下为根据实际情况设置变量
- Dim Bln_BillChange As Boolean '标识单据是否发生改动
- ']
- '以下为固定使用变量(单据)
- ' Dim BillCode As String '单据设计编码(索引号)
- Dim Var_Bill() As Variant '用来返回单据设计信息
- Dim ReportTitle As String '报表主标题
- Dim Tsxx As String '系统提示信息
- '以下为固定使用变量(网格)
- Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
- Dim GridCode As String '显示网格网格代码
- Dim GridInf() As Variant '整个网格设置信息
- Dim Pmbcsjhs As Long '屏幕网格保持数据行数(大于等于1)
- Dim Fzxwghs As Integer '辅助项网格行数(包括合计行)
- Dim Sfxshjwg As Boolean '是否显示合计网格
- Dim Qslz As Long '网格隐藏(非操作显示)列数
- Dim Sjhgd As Double '网格数据行高度
- Dim GridBoolean() As Boolean '网格列信息(布尔型)
- Dim GridStr() As String '网格列信息(字符型)
- Dim GridInt() As Integer '网格列信息(整型)
- Dim Sfblbzkd As Boolean '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
- Dim Shsfts As Boolean '删除记录行是否提示
- 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 TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- Dim jsqte As Integer
- Dim TF As Boolean
- Dim Move_Y As Integer
- Dim Move_X As Integer
- Dim Textindex As Integer
- Public Sub Command1_Click()
- '调入单据信息
- Dim aDo_Name As New Recordset
- Set aDo_Name = Cw_DataEnvi.DataConnect.Execute("select * from xt_BillDesign where billname='" & ComboName.Text & "'")
- If aDo_Name.RecordCount > 0 Then
- BillList aDo_Name!BillCode
- Command1.Tag = Trim(aDo_Name!text_group_code)
- ComboName.Tag = ComboName.Text
- Text_W.Visible = False
- End If
- aDo_Name.Close
- End Sub
- Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
- Dim jdzygs As Integer
- jdzygs = 7 '在单据录入中,此焦点转移控制值一定小于等于文本框个数,否则网格回车键将不支持.
- 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 = "c_jzpzcl"
- Load Dyymctbl
- Fun_FillUserSystem Imgcbo_SysName, Xtczybm
- End Sub
- Sub BillList(BillCode As String) '初始化单据
- On Error Resume Next
- Dim B As Integer
- For B = 1 To Max_Text_Index
- Unload LrText(B)
- Unload TsLabel(B)
- Next B
- WglrGrid.Visible = True: LrText(0).Visible = True
- TsLabel(0).Visible = True: Lab_Title.Visible = True
- Call Sub_DPReadBillInfo(BillCode, Me, Var_Bill())
- '以下为文本框处理程序
- TextGroupCode = Var_Bill(2)
- Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
- Call Wbkcsh
- '======================
- Pict_W.Top = Pict.Height - Pict_W.Height
- Pict_H.Left = Pict.Width - Pict_H.Width
- Pict_W.Width = Pict.Width
- Pict_H.Height = Pict.Height
- Lab_Title.Left = Pict.Width / 2 - Lab_Title.Width / 2
- Toolbar1.Width = Pict.Width
- '======================
- Dim aDo_re As New Recordset
- Set aDo_re = Cw_DataEnvi.DataConnect.Execute("select * from xt_grid where grid_code='" & Trim(Var_Bill(3)) & "'")
- If aDo_re.RecordCount < 1 Then
- WglrGrid.Visible = False: Grid_XY.Visible = False: Grid_H.Visible = False: Grid_W.Visible = False
- aDo_re.Close: Exit Sub
- Else
- WglrGrid.Visible = True: aDo_re.Close
- End If
- '======================
- '调入网格并记录一些网格信息
- GridCode = Var_Bill(3) '网格属性编码
- Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
- Qslz = GridInf(1)
- Sjhgd = GridInf(2)
- Fzxwghs = GridInf(4)
- Sfblbzkd = GridInf(5)
- Shsfts = GridInf(6)
- Sfxshjwg = GridInf(7)
- Szzls = WglrGrid.Cols - 1
- Pmbcsjhs = Int((WglrGrid.Height - WglrGrid.FixedRows * WglrGrid.RowHeight(0)) / Sjhgd) - Fzxwghs - 1
- For jsqte = WglrGrid.FixedRows To WglrGrid.Rows - 1
- WglrGrid.RowHeight(jsqte) = Sjhgd
- Next jsqte
- Sub_AdjustGrid
- '初始化合计网格
- Call Cshhjwg
- '单据变动置为False
- Bln_BillChange = False
- '<<<<<<<<<<<<<<<<<<<<<<<<<<
- Grid_W.Left = WglrGrid.Width + WglrGrid.Left
- Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
- Grid_H.Top = WglrGrid.Height + WglrGrid.Top
- Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
- Grid_XY.Top = WglrGrid.Top
- Grid_XY.Left = WglrGrid.Left - Grid_XY.Width
- Grid_W.Visible = True
- Grid_H.Visible = True
- Grid_XY.Visible = True
- End Sub
- Private Sub Form_Unload(Cancel As Integer) '窗体卸载
- '卸载打印页面窗体
- Unload Dyymctbl
- '判断单据是否发生变化,并返回相应标识
- If Bln_BillChange Then
- Xtfhcs = "1"
- Else
- Xtfhcs = "0"
- End If
- End Sub
- '===================以 下 程 序 为 通 用 部 分 ,一 般 不 需 更 改======================='
- Private Sub Sub_AdjustGrid()
- '调 整 网 格
- With WglrGrid
- '加 1 保持一行录入行
- If .Rows < Pmbcsjhs + .FixedRows + Fzxwghs + 1 Then
- .Rows = Pmbcsjhs + .FixedRows + Fzxwghs + 1
- For jsqte = .FixedRows To .Rows - 1
- .RowHeight(jsqte) = Sjhgd
- Next jsqte
- Else
- End If
- End With
- End Sub
- Private Sub Cshhjwg() '初始化合计网格(*对合计网格来说,录入网格为容器)
- Dim Lrwglkd As Double
- Dim Hjwgpyl As Integer
- With HjGrid
- If Not Sfxshjwg Then
- .Visible = False
- Exit Sub
- Else
- .Visible = True
- End If
- '设置网格相关属性
- .Enabled = False
- .Appearance = flexFlat
- .BorderStyle = flexBorderNone
- .ScrollBars = flexScrollBarNone
- .Width = WglrGrid.Width
- .FixedRows = 0
- .Rows = 1
- .Cols = WglrGrid.Cols
- .LeftCol = WglrGrid.LeftCol
- .TextMatrix(0, Qslz) = "合 计"
- For jsqte = 0 To WglrGrid.Cols - 1
- .ColHidden(jsqte) = WglrGrid.ColHidden(jsqte)
- .ColWidth(jsqte) = WglrGrid.ColWidth(jsqte)
- .ColAlignment(jsqte) = WglrGrid.ColAlignment(jsqte)
- .ColFormat(jsqte) = WglrGrid.ColFormat(jsqte)
- Next jsqte
- .ColAlignment(Qslz) = flexAlignCenterTop
- For jsqte = .FixedRows To .Rows - 1
- .RowHeight(jsqte) = .Height / .Rows
- Next jsqte
- '程序自动调整网格高度(自动设置为网格剩余高度+辅助项网格行数(默认为1)*数据行高度)、并设置其位置信息
- .Height = Fzxwghs * Sjhgd + ((WglrGrid.Height - WglrGrid.FixedRows * WglrGrid.RowHeight(0)) Mod Sjhgd)
- .RowHeight(0) = .Height
- .Move 0, WglrGrid.Height - .Height, WglrGrid.Width, .Height
- End With
- 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(WglrGrid, GridCode, GridStr())
- Case "hfmrgs" '恢复默认格式
- Call Hfmrgs(WglrGrid, GridCode, GridStr())
- Case "szxsxm" '设置显示项目
- 'Call Szxsxm(WglrGrid, GridCode)
- Xtcdcs = GridCode
- XT_BgxsxmszFrm.Show 1 '调整网格显示项目
- Command1_Click
- ' Call Cxxswg(SzgsGrid, Wggsdm) '重新定义网格显示
- End Select
- End Sub
- Private Sub Wbkcsh() '录入文本框初始化
- Dim Int_TabIndex As Integer '用来设置文本框TabIndex值
- '文本框TabIndex值由0--N
- LrText(0).TabIndex = 0
- Int_TabIndex = 1
- '最大录入文本框索引值
- 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 jsqte <> 0 Then
- Load LrText(jsqte)
- Load TsLabel(jsqte)
- End If
- '判断录入文本框是否显示
- If Textboolean(jsqte, 4) Then
- LrText(jsqte).Visible = True
- TsLabel(jsqte).Visible = True
- Else
- LrText(jsqte).Visible = False
- TsLabel(jsqte).Visible = False
- End If
- '设置文本框焦点顺序值
- LrText(jsqte).TabIndex = Int_TabIndex
- '文本框TabIndex值+1
- Int_TabIndex = Int_TabIndex + 1
- '初始化其内容
- LrText(jsqte).Text = ""
- LrText(jsqte).Tag = ""
- If Textint(jsqte, 5) <> 0 Then
- LrText(jsqte).MaxLength = Textint(jsqte, 5)
- End If
- '设置文本框位置及大小,并设置相应标签内容及其位置
- LrText(jsqte).Move Textint(jsqte, 13), Textint(jsqte, 12), Textint(jsqte, 11), Textint(jsqte, 10)
- TsLabel(jsqte).Move Textint(jsqte, 13) - TsLabel(jsqte).Width - 20, Textint(jsqte, 12) + (Textint(jsqte, 10) - TsLabel(jsqte).Height) / 2 - 30
- TsLabel(jsqte).Caption = Trim(Textstr(jsqte, 7)) & ":"
- End If
- '将文本框有效性判断进行加锁,在文本框内容发生变化时将锁打开
- TextValiJudgeLock(jsqte) = True
- Next jsqte
- End Sub
- Private Sub Imgcbo_SysName_Click()
- '=================
- Dim aDo_Name As New Recordset
- ComboName.Clear
- Set aDo_Name = Cw_DataEnvi.DataConnect.Execute("select * from xt_BillDesign where system_code = '" & Mid(Trim(Imgcbo_SysName.SelectedItem.Key), 2) & "'")
- Do While Not aDo_Name.EOF
- ComboName.AddItem aDo_Name!BillName
- aDo_Name.MoveNext
- Loop
- If aDo_Name.RecordCount > 0 Then ComboName.ListIndex = 0
- aDo_Name.Close
- '=================
- End Sub
- Private Sub LrText_DblClick(Index As Integer)
- If LrText(Index).BackColor = &HFFFFFF Then
- LrText(Index).BackColor = &HF2FAEB
- Else
- LrText(Index).BackColor = &HFFFFFF
- End If
- End Sub
- Private Sub LrText_GotFocus(Index As Integer)
- Textindex = Index
- Text_W.Left = LrText(Index).Left + LrText(Index).Width
- Text_W.Top = LrText(Index).Top + LrText(Index).Height / 2 - Text_W.Height / 2
- Text_W.Visible = True
- End Sub
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "Save"
- If Trim(Command1.Tag) = "" Then Exit Sub
- Bill_Save
- Case "SD"
- If Trim(Command1.Tag) = "" Then Exit Sub
- SD_Text
- Case "sx"
- If Trim(Command1.Tag) = "" Then Exit Sub
- Command1_Click
- Case "Item"
- If Trim(Command1.Tag) = "" Then Exit Sub
- XT_TItem.Show 1
- Case "type"
- If Trim(Command1.Tag) = "" Then Exit Sub
- ' If WglrGrid.Visible = False Then Exit Sub
- XT_BillPrintType.Tag = Command1.Tag
- XT_BillPrintType.Show 1
- Case "HD"
- If Trim(Command1.Tag) = "" Then Exit Sub
- HD_Text
- Case "Exit"
- Unload Me
- End Select
- End Sub
- Private Sub Text_W_LostFocus()
- Text_W.Visible = False
- End Sub
- '调整文本框的宽度
- Private Sub Text_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = True
- Move_X = X
- label_XY.Top = LrText(Textindex).Top + 200
- label_XY.Left = LrText(Textindex).Left + LrText(Textindex).Width / 2
- Caption_XY.Caption = "TextBox宽度=" & LrText(Textindex).Width
- label_XY.Visible = True
- End Sub
- '调整文本框的宽度
- Private Sub Text_W_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If TF = True Then
- If (LrText(Textindex).Width - (Move_X - X) > 0) And (LrText(Textindex).Width - (Move_X - X) < (Pict.Width - LrText(Textindex).Left - 100)) Then
- label_XY.Top = LrText(Textindex).Top + 200
- label_XY.Left = LrText(Textindex).Left + LrText(Textindex).Width / 2
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- LrText(Textindex).Width = LrText(Textindex).Width - (Move_X - X)
- Text_W.Left = LrText(Textindex).Width + LrText(Textindex).Left
- Caption_XY.Caption = "TextBox宽度=" & LrText(Textindex).Width - (Move_X - X)
- End If
- End If
- End Sub
- '调整文本框的宽度
- Private Sub Text_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = False
- label_XY.Visible = False
- End Sub
- Private Sub WglrGrid_AfterUserResize(ByVal Row As Long, ByVal Col As Long)
- '调整列宽
- If HjGrid.Visible Then
- With HjGrid
- .ColWidth(Col) = WglrGrid.ColWidth(Col)
- End With
- End If
- End Sub
- Private Sub WglrGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)
- '如果结束列小于用户定义网格开始列,则结束列=用户定义网格开始列
- '因为开始列以前的列都是隐藏列,由于要把当前开始移动列移动到隐藏列上
- '所以控件自动把隐藏列变为显示列,这样在刷新数据时,会把隐藏列上的数据
- '显示出来,并且,由于开始列以前的隐藏列在XT_Grid中,不对应逻辑值,所以在保存
- '网格格式时会出错
- If Col > Position Then
- If Position < GridInf(1) Then Position = GridInf(1)
- Else
- If Col < GridInf(1) Then Col = GridInf(1)
- End If
- Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
- End Sub
- Private Sub WglrGrid_Scroll()
- '限制用户在录入过程中滚动鼠标
- With WglrGrid
- HjGrid.LeftCol = .LeftCol
- End With
- End Sub
- '调整单据的高度
- Private Sub Pict_H_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Move_X = X
- End Sub
- '调整单据的高度
- Private Sub Pict_H_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If (Pict.Width > (Move_X - X)) And (Pict.Width - (Move_X - X) < (Me.Width - Pict.Left - 100)) Then
- Pict.Width = Pict.Width - (Move_X - X)
- Pict_H.Left = Pict.Width - Pict_H.Width
- Pict_W.Width = Pict.Width
- Lab_Title.Left = Pict.Width / 2 - Lab_Title.Width / 2
- Toolbar1.Width = Pict.Width
- End If
- End Sub
- '调整单据的宽度
- Private Sub Pict_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Move_Y = Y
- End Sub
- '调整单据的宽度
- Private Sub Pict_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If (Pict.Height > (Move_Y - Y)) And ((Pict.Height - (Move_Y - Y) + Pict.Top) < (Me.Height - 500)) Then
- Pict.Height = Pict.Height - (Move_Y - Y)
- Pict_W.Top = Pict.Height - Pict_W.Height
- Pict_H.Height = Pict.Height
- End If
- End Sub
- '调整文本宽的位置
- Private Sub TsLabel_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = True
- Move_Y = Y: Move_X = X
- label_XY.Top = TsLabel(Index).Top + 200
- label_XY.Left = TsLabel(Index).Left + 200
- Caption_XY.Caption = "X=" & TsLabel(Index).Left & ",Y=" & LrText(Index).Top
- label_XY.Visible = True
- End Sub
- '调整文本宽的位置
- Private Sub TsLabel_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- If TF = True Then
- If (TsLabel(Index).Top - (Move_Y - Y) >= Toolbar1.Height) And ((TsLabel(Index).Top - (Move_Y - Y)) < (Pict.Height - TsLabel(Index).Height) - 175) Then
- TsLabel(Index).Top = TsLabel(Index).Top - (Move_Y - Y)
- label_XY.Top = label_XY.Top - (Move_Y - Y)
- LrText(Index).Top = TsLabel(Index).Top - 30
- End If
- '------------------------
- If (TsLabel(Index).Left - (Move_X - X) >= 0) And (TsLabel(Index).Left - (Move_X - X) < (Pict.Width - LrText(Index).Width - TsLabel(Index).Width - 75)) Then
- TsLabel(Index).Left = TsLabel(Index).Left - (Move_X - X)
- label_XY.Left = label_XY.Left - (Move_X - X)
- LrText(Index).Left = TsLabel(Index).Left + TsLabel(Index).Width + 20
- End If
- If Textindex = Index Then
- Text_W.Left = LrText(Index).Left + LrText(Index).Width
- Text_W.Top = LrText(Index).Top + LrText(Index).Height / 2 - Text_W.Height / 2
- End If
- Caption_XY.Caption = "X=" & TsLabel(Index).Left & ",Y=" & LrText(Index).Top
- End If
- End Sub
- '调整文本宽的位置
- Private Sub TsLabel_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = False
- label_XY.Visible = False
- End Sub
- '调整网格位置
- Private Sub Grid_XY_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = True
- Move_Y = Y
- Move_X = X
- label_XY.Top = Grid_XY.Top + 200
- label_XY.Left = Grid_XY.Left + 200
- Caption_XY.Caption = "X=" & Grid_XY.Left & ",Y=" & Grid_XY.Top
- label_XY.Visible = True
- End Sub
- '调整网格位置
- Private Sub Grid_XY_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If TF = True Then
- If (Grid_XY.Top - (Move_Y - Y) >= Toolbar1.Height) And (Grid_XY.Top - (Move_Y - Y) < Pict.Height - 150) Then
- Grid_XY.Top = Grid_XY.Top - (Move_Y - Y)
- label_XY.Top = label_XY.Top - (Move_Y - Y)
- WglrGrid.Top = Grid_XY.Top
- End If
- If (Grid_XY.Left - (Move_X - X) >= 0) And (Grid_XY.Left - (Move_X - X) < Pict.Width - 200) Then
- Grid_XY.Left = Grid_XY.Left - (Move_X - X)
- label_XY.Left = label_XY.Left - (Move_X - X)
- WglrGrid.Left = Grid_XY.Left + Grid_XY.Width
- End If
- Grid_W.Left = WglrGrid.Width + WglrGrid.Left
- Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
- Grid_H.Top = WglrGrid.Height + WglrGrid.Top
- Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
- Caption_XY.Caption = "X=" & Grid_XY.Left & ",Y=" & Grid_XY.Top
- End If
- End Sub
- '调整网格位置
- Private Sub Grid_XY_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = False
- label_XY.Visible = False
- End Sub
- '改变网格的宽度
- Private Sub Grid_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = True
- Move_X = X
- label_XY.Top = Grid_W.Top + 200
- label_XY.Left = Grid_W.Left - label_XY.Width
- Caption_XY.Caption = "网格宽度=" & WglrGrid.Width
- label_XY.Visible = True
- End Sub
- '改变网格的宽度
- Private Sub Grid_W_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If TF = True Then
- If (WglrGrid.Width - (Move_X - X) > 0) And (WglrGrid.Width - (Move_X - X) < (Pict.Width - WglrGrid.Left - 100)) Then
- label_XY.Top = Grid_W.Top + 200
- label_XY.Left = Grid_W.Left - label_XY.Width
- Caption_XY.Caption = "网格宽度=" & WglrGrid.Width - (Move_X - X)
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- WglrGrid.Width = WglrGrid.Width - (Move_X - X)
- Grid_W.Left = WglrGrid.Width + WglrGrid.Left
- Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
- Grid_H.Top = WglrGrid.Height + WglrGrid.Top
- Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
- End If
- End If
- End Sub
- '改变网格的宽度
- Private Sub Grid_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = False
- label_XY.Visible = False
- End Sub
- '改变网格的高度
- Private Sub Grid_H_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = True
- Move_Y = Y
- label_XY.Top = Grid_H.Top + 200
- label_XY.Left = Grid_H.Left + 200
- Caption_XY.Caption = "网格高度=" & WglrGrid.Height
- label_XY.Visible = True
- End Sub
- '改变网格的高度
- Private Sub Grid_H_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim gridheight As Integer
- If WglrGrid.FixedRows = 1 Then
- gridheight = WglrGrid.RowHeight(1) * 2 + WglrGrid.RowHeight(0)
- Else
- gridheight = WglrGrid.RowHeight(1) + WglrGrid.RowHeight(0) + WglrGrid.RowHeight(2) * 2
- End If
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- If TF = True Then
- 'If WglrGrid.Height > (Move_Y - Y) Then
- If (WglrGrid.Height > Move_Y - Y + gridheight) And ((WglrGrid.Height - (Move_Y - Y) + WglrGrid.Top) < Pict.Height - 130) Then
- label_XY.Top = Grid_H.Top + 200
- label_XY.Left = Grid_H.Left + 200
- Caption_XY.Caption = "网格高度=" & WglrGrid.Height - (Move_Y - Y)
- '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- WglrGrid.Height = WglrGrid.Height - (Move_Y - Y)
- Grid_W.Left = WglrGrid.Width + WglrGrid.Left
- Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
- Grid_H.Top = WglrGrid.Height + WglrGrid.Top
- Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
- End If
- End If
- End Sub
- '改变网格的高度
- Private Sub Grid_H_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- TF = False
- label_XY.Visible = False
- If WglrGrid.Height > (Move_Y - Y) Then
- Pmbcsjhs = Int((WglrGrid.Height - WglrGrid.FixedRows * WglrGrid.RowHeight(0)) / Sjhgd) - Fzxwghs - 1
- WglrGrid.Rows = WglrGrid.FixedRows
- Sub_AdjustGrid
- '程序自动调整网格高度(自动设置为网格剩余高度+辅助项网格行数(默认为1)*数据行高度)、并设置其位置信息
- With HjGrid
- .Height = Fzxwghs * Sjhgd + ((WglrGrid.Height - WglrGrid.FixedRows * WglrGrid.RowHeight(0)) Mod Sjhgd)
- .RowHeight(0) = .Height
- .Move 0, WglrGrid.Height - .Height, WglrGrid.Width, .Height
- End With
- End If
- End Sub
- Private Sub SD_Text() '竖对
- Dim I As Integer: Dim Y As Integer
- For Y = 0 To LrText.Count - 1
- If LrText(Y).BackColor = &HF2FAEB Then
- For I = 1 To LrText.Count - 1
- If LrText(I).BackColor = &HF2FAEB Then
- If LrText(Y).Top > LrText(I).Top Then
- Y = I
- End If
- End If
- Next I
- Exit For
- End If
- Next Y
- For I = 0 To LrText.Count - 1
- If LrText(I).BackColor = &HF2FAEB Then
- LrText(I).Left = LrText(Y).Left
- TsLabel(I).Left = LrText(I).Left - TsLabel(I).Width - 20
- LrText(I).BackColor = &HFFFFFF
- End If
- Next I
- End Sub
- Private Sub HD_Text() '横对
- Dim I As Integer: Dim Y As Integer
- For Y = 0 To LrText.Count - 1
- If LrText(Y).BackColor = &HF2FAEB Then
- For I = 1 To LrText.Count - 1
- If LrText(I).BackColor = &HF2FAEB Then
- If LrText(Y).Top > LrText(I).Top Then
- Y = I
- End If
- End If
- Next I
- Exit For
- End If
- Next Y
- For I = 0 To LrText.Count - 1
- If LrText(I).BackColor = &HF2FAEB Then
- LrText(I).Top = LrText(Y).Top
- TsLabel(I).Top = LrText(I).Top + 30
- LrText(I).BackColor = &HFFFFFF
- End If
- Next I
- End Sub
- Sub Bill_Save() '保存单据信息
- Dim I As Integer, Sql_Str As String
- Dim aDo_Tab As New Recordset
- Dim aDo_Name As New Recordset
- Set aDo_Name = Cw_DataEnvi.DataConnect.Execute("select * from xt_BillDesign where billname='" & ComboName.Text & "'")
- For I = 0 To Max_Text_Index
- Sql_Str = "update Xt_text_input set TextTop=" & LrText(I).Top & ",TextLeft=" & LrText(I).Left & ",TextWidth=" & LrText(I).Width _
- & " where text_group_code='" & Trim(aDo_Name!text_group_code) & "' and text_index=" & I
- Cw_DataEnvi.DataConnect.Execute Sql_Str
- Next I
- Sql_Str = "update Xt_grid set GridHeight=" & WglrGrid.Height & ",GridWidth=" & WglrGrid.Width _
- & ",GridTop=" & WglrGrid.Top & ",GridLeft=" & WglrGrid.Left _
- & " where Grid_Code='" & Trim(aDo_Name!Grid_code) & "' and ColIndex='000'"
- Cw_DataEnvi.DataConnect.Execute Sql_Str
- Sql_Str = "update xt_BillDesign set FormHeight=" & Pict.Height + 375 & ",FormWidth=" & Pict.Width _
- & " where billname='" & ComboName.Text & "'"
- Cw_DataEnvi.DataConnect.Execute Sql_Str
- I = 0
- Set aDo_Tab = Cw_DataEnvi.DataConnect.Execute("select * from Xt_text_input where text_group_code='" & Trim(aDo_Name!text_group_code) & "' order by texttop,textleft")
- Do While Not aDo_Tab.EOF
- Cw_DataEnvi.DataConnect.Execute "update Xt_text_input set tabindex= " & I & " where text_index=" & aDo_Tab!text_Index & " and text_group_code='" & Trim(aDo_Name!text_group_code) & "'"
- I = I + 1
- aDo_Tab.MoveNext
- Loop
- Dim aDo_Printtype As New Recordset
- Sql_Str = "select * from Xt_BillTextPrint where PrintTextCode='default' and text_group_code='" & Trim(aDo_Name!text_group_code) & "'"
- Set aDo_Printtype = Cw_DataEnvi.DataConnect.Execute(Sql_Str)
- If aDo_Printtype.RecordCount > 0 Then Exit Sub
- Sql_Str = "insert into Xt_BilltextPrint(text_group_code,text_index,PrintTextCode,PrintTop,PrintLeft,Printwidth) " _
- & " select text_group_code,text_index,PrintTextCode='" & "default" & "', PrintTop=texttop,PrintLeft=textleft,Printwidth=textwidth from Xt_text_input" _
- & " where text_group_code='" & Trim(aDo_Name!text_group_code) & "'"
- Cw_DataEnvi.DataConnect.Execute Sql_Str
- If WglrGrid.Visible = True Then
- Sql_Str = "insert into Xt_BillGridPrint(Grid_Code,ColIndex,PrintGridCode,PrintGridHeight,PrintGridWidth,PrintGridTop,PrintGridLeft,PrintDataRows,PrintColWidth,BillTitlePrint)" _
- & " select Grid_Code,ColIndex,PrintGridCode='" & "default" & "',PrintGridHeight=GridHeight,PrintGridWidth=GridWidth,PrintGridTop=GridTop," _
- & "PrintGridLeft=GridLeft,PrintDataRows=3,PrintColWidth=ColWidth,BillTitlePrint='" & Lab_Title.Caption & "' from xt_grid where grid_code='" & Trim(aDo_Name!Grid_code) & "'"
- Cw_DataEnvi.DataConnect.Execute Sql_Str
- End If
- aDo_Tab.Close
- aDo_Name.Close
- End Sub