+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:20k
源码类别:
企业管理
开发平台:
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 Dev_ItemPlaceInfoForm
- BorderStyle = 1 'Fixed Single
- Caption = "项目位置设置"
- ClientHeight = 6375
- ClientLeft = 1005
- ClientTop = 990
- ClientWidth = 9990
- HelpContextID = 2502008
- Icon = "设置_基本信息位置设置.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6375
- ScaleWidth = 9990
- Begin TabDlg.SSTab SSTab1
- Height = 5610
- Left = 75
- TabIndex = 1
- Top = 675
- Width = 9840
- _ExtentX = 17357
- _ExtentY = 9895
- _Version = 393216
- Style = 1
- Tabs = 1
- TabsPerRow = 4
- TabHeight = 520
- MouseIcon = "设置_基本信息位置设置.frx":1042
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- TabCaption(0) = "基本信息"
- TabPicture(0) = "设置_基本信息位置设置.frx":105E
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Label3"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Picture1"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Text1"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "Command1"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).ControlCount= 4
- Begin VB.CommandButton Command1
- Height = 300
- Left = 4800
- Picture = "设置_基本信息位置设置.frx":107A
- Style = 1 'Graphical
- TabIndex = 11
- Top = 0
- Width = 300
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 2760
- Locked = -1 'True
- TabIndex = 10
- Top = 0
- Width = 2025
- End
- Begin VB.PictureBox Picture1
- Height = 5000
- Left = 180
- ScaleHeight = 4935
- ScaleWidth = 9465
- TabIndex = 2
- Top = 450
- Width = 9524
- Begin VB.VScrollBar VS_E
- Height = 4965
- LargeChange = 20
- Left = 9165
- SmallChange = 200
- TabIndex = 8
- Top = 0
- Width = 285
- End
- Begin VB.PictureBox Pict
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- Height = 9000
- Left = 0
- ScaleHeight = 9000
- ScaleMode = 0 'User
- ScaleWidth = 9150
- TabIndex = 3
- Top = 0
- Width = 9148
- Begin VB.PictureBox label1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BorderStyle = 0 'None
- Enabled = 0 'False
- ForeColor = &H80000008&
- Height = 285
- Left = 1380
- ScaleHeight = 285
- ScaleWidth = 1875
- TabIndex = 5
- Top = 975
- Visible = 0 'False
- Width = 1875
- Begin VB.Label Label2
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Label2"
- ForeColor = &H80000008&
- Height = 225
- Left = 150
- TabIndex = 6
- Top = 0
- Width = 1695
- End
- End
- Begin VB.TextBox Text_T
- BackColor = &H00FFFFFF&
- Height = 335
- Index = 0
- Left = 855
- MaxLength = 3
- TabIndex = 4
- Tag = "T"
- Top = 765
- Visible = 0 'False
- Width = 1485
- End
- Begin VB.Label T_Label
- AutoSize = -1 'True
- BackColor = &H00C0E0FF&
- BackStyle = 0 'Transparent
- Caption = "姓名"
- Height = 180
- Index = 0
- Left = 405
- TabIndex = 7
- Top = 810
- Visible = 0 'False
- Width = 360
- End
- End
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "项目类别:"
- Height = 180
- Left = 1860
- TabIndex = 9
- Top = 60
- Width = 810
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 555
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 9990
- _ExtentX = 17621
- _ExtentY = 979
- ButtonWidth = 820
- ButtonHeight = 926
- Appearance = 1
- Style = 1
- ImageList = "ImageList1"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 10
- 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 = 4
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "帮助"
- Key = "bz"
- ImageIndex = 8
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "退出"
- Key = "Exit"
- ImageIndex = 9
- EndProperty
- EndProperty
- BorderStyle = 1
- 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 = 16
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":1404
- Key = "sz"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":179E
- Key = "dy"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":1B38
- Key = "yl"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":1ED2
- Key = "xz"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":226C
- Key = "xg"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":2606
- Key = "sc"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":29A0
- Key = "sx"
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":2D3A
- Key = "bz"
- EndProperty
- BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":30D4
- Key = "tc"
- EndProperty
- BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":346E
- Key = "bcgs"
- EndProperty
- BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":3808
- Key = "mrlk"
- EndProperty
- BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":3BA2
- Key = "xsxm"
- EndProperty
- BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":3F3C
- Key = "ht"
- EndProperty
- BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":42D6
- Key = "st"
- EndProperty
- BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":4670
- Key = ""
- EndProperty
- BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_基本信息位置设置.frx":4A0A
- Key = "ml"
- EndProperty
- EndProperty
- End
- End
- End
- Attribute VB_Name = "Dev_ItemPlaceInfoForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim tf As Boolean
- Dim Move_Y As Integer
- Dim Move_X As Integer
- Dim VS_int As Integer
- Dim Rows_int As Integer
- Dim Ssql_str As String
- Dim add_item As New ADODB.Recordset
- Dim VsE_TF As Boolean
- Private Sub Command1_Click() '选中项目类别
- Dev_ItemDEVSort.Show 1
- If Trim(Dev_ItemDEVSort.Combo1.Tag) <> "" Then
- Command1.Tag = Dev_ItemDEVSort.Combo1.ItemData(Dev_ItemDEVSort.Combo1.ListIndex)
- Text1.Text = Dev_ItemDEVSort.Combo1.Text
- Form_Load
- End If
- End Sub
- Private Sub Form_Load()
- List
- End Sub
- Public Sub List() '向界面加载项目信息
- On Error Resume Next
- Dim B As Integer
- VsE_TF = False
- Pict.Top = 0: Pict.Left = 0: VS_E.Value = 0
- VsE_TF = True
- For B = 1 To Text_t.Count - 1
- Unload Text_t(B)
- Unload T_Label(B)
- Next B
- '-------------
- Dim i As Integer
- i = 1
- VS_E.Max = 500: VS_int = 0
- If Trim(Command1.Tag) = "" Then Exit Sub
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from dev_V_Itemlist where isid=" & Val(Command1.Tag) & " and YNShow='1' order by tab")
- Rows_int = add_item.RecordCount
- Do While Not add_item.EOF
- Load T_Label(i)
- Load Text_t(i)
- T_Label(i).Left = Val(add_item!itemleft & "")
- T_Label(i).Top = Val(add_item!itemtop & "")
- T_Label(i).Tag = add_item!ItemCode
- T_Label(i).Caption = add_item!ItemChineseName
- Text_t(i).Left = T_Label(i).Left + T_Label(i).Width + 100
- Text_t(i).Top = T_Label(i).Top - 50
- Text_t(i).TabIndex = "" & add_item!Tab - 1
- Text_t(i).Width = add_item!ItmeFieldLength * 105
- Text_t(i).Visible = True
- Text_t(i).Text = add_item!Tab
- T_Label(i).Visible = True
- i = i + 1
- add_item.MoveNext
- Loop
- add_item.Close
- End Sub
- Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
- Select Case Button.Key
- Case "Save"
- YesNo_str = MsgBox("您是否保存当前格式?", vbYesNo + 32)
- If YesNo_str = vbNo Then Exit Sub
- Save
- Case "SD"
- SD_Text
- Case "HD"
- HD_Text
- Case "sx"
- List
- Case "Item"
- If Trim(Text1.Text) = "" Then Exit Sub
- Dev_ItemSortAddItem.SortCode.Caption = Text1.Text
- Dev_ItemSortAddItem.SortCode.Tag = Command1.Tag
- Dev_ItemSortAddItem.Show 1
- List
- Case "bz"
- Call F1bz
- Case "Exit"
- Unload Me
- End Select
- End Sub
- Private Sub T_Label_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- tf = True
- Move_Y = y
- Move_X = x
- Label1.Top = T_Label(Index).Top + 200
- Label1.Left = T_Label(Index).Left + 200
- Label2.Caption = "X=" & Text_t(Index).Left & ",Y=" & Text_t(Index).Top
- Label1.Visible = True
- End Sub
- Private Sub T_Label_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- If tf = True Then
- If T_Label(Index).Top - (Move_Y - y) >= 0 Then
- If T_Label(Index).Top - (Move_Y - y) <= 5000 + VS_E.Value * 8 - 200 Then
- T_Label(Index).Top = T_Label(Index).Top - (Move_Y - y)
- Label1.Top = Label1.Top - (Move_Y - y)
- Text_t(Index).Top = T_Label(Index).Top - 50
- End If
- End If
- '-------------------
- If T_Label(Index).Left - (Move_X - x) >= 0 Then
- T_Label(Index).Left = T_Label(Index).Left - (Move_X - x)
- Label1.Left = Label1.Left - (Move_X - x)
- Text_t(Index).Left = T_Label(Index).Left + T_Label(Index).Width + 100
- End If
- Label2.Caption = "X=" & Text_t(Index).Left & ",Y=" & Text_t(Index).Top
- End If
- End Sub
- Private Sub T_Label_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- tf = False
- Label1.Visible = False
- End Sub
- Private Sub Text_T_Change(Index As Integer)
- If Text_t(Index).Text <> "" Then
- Text_t(Index).Text = Int(Val(Text_t(Index).Text))
- End If
- End Sub
- Private Sub Text_T_DblClick(Index As Integer)
- If Text_t(Index).BackColor = &HFFFFFF Then
- Text_t(Index).BackColor = &HF2FAEB
- Else
- Text_t(Index).BackColor = &HFFFFFF
- End If
- End Sub
- Private Sub Text_T_KeyPress(Index As Integer, KeyAscii As Integer)
- If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then
- Else
- KeyAscii = 0
- End If
- End Sub
- Private Sub VS_E_Change() '滚动条
- If VsE_TF = True Then
- If VS_int < VS_E.Value Then
- Pict.Top = Pict.Top - (VS_E.Value * 8 - VS_int)
- Else
- If VS_int <> VS_E.Value Then
- Pict.Top = Pict.Top + (VS_int - VS_E.Value * 8)
- End If
- End If
- VS_int = VS_E.Value * 8
- End If
- End Sub
- Private Sub Save() '保存格式
- On Error Resume Next
- Dim i As Integer
- Dim h As Integer
- For i = 1 To Rows_int
- If Val(Text_t(i).Text) > Rows_int Or Val(Text_t(i).Text) <= 0 Then
- MsgBox "Tab数必须是1至" & Rows_int & "之间的连续数值", 48
- Text_t(i).SetFocus
- Exit Sub
- End If
- '--------------------
- For h = i + 1 To Rows_int
- If Text_t(i).Text = Text_t(h).Text Then
- MsgBox "Tab数值不能重复!", 48
- Text_t(h).SetFocus
- Exit Sub
- End If
- Next
- Next
- For i = 1 To Rows_int
- Ssql_str = "UPDATE dev_Itemsortlist SET ItemLeft=" & T_Label(i).Left & ",ItemTop=" & T_Label(i).Top _
- & ",Tab=" & Text_t(i).Text & " where ItemCode='" & T_Label(i).Tag & "' and isid=" & Val(Command1.Tag)
- Cw_DataEnvi.DataConnect.Execute Ssql_str
- Next i
- End Sub
- Private Sub SD_Text() '竖对
- Dim i As Integer: Dim y As Integer
- y = 1
- For y = 1 To Text_t.Count - 1
- If Text_t(y).BackColor = &HF2FAEB Then
- For i = 1 To Text_t.Count - 1
- If Text_t(i).BackColor = &HF2FAEB Then
- If Text_t(y).Top > Text_t(i).Top Then
- y = i
- End If
- End If
- Next i
- Exit For
- End If
- Next y
- For i = 1 To Text_t.Count - 1
- If Text_t(i).BackColor = &HF2FAEB Then
- Text_t(i).Left = Text_t(y).Left
- T_Label(i).Left = Text_t(i).Left - T_Label(i).Width - 100
- Text_t(i).BackColor = &HFFFFFF
- End If
- Next i
- End Sub
- Private Sub HD_Text() '横对
- Dim i As Integer: Dim y As Integer
- y = 1
- For y = 1 To Text_t.Count - 1
- If Text_t(y).BackColor = &HF2FAEB Then
- For i = 1 To Text_t.Count - 1
- If Text_t(i).BackColor = &HF2FAEB Then
- If Text_t(y).Top > Text_t(i).Top Then
- y = i
- End If
- End If
- Next i
- Exit For
- End If
- Next y
- For i = 1 To Text_t.Count - 1
- If Text_t(i).BackColor = &HF2FAEB Then
- Text_t(i).Top = Text_t(y).Top
- T_Label(i).Top = Text_t(i).Top + 50
- Text_t(i).BackColor = &HFFFFFF
- End If
- Next i
- End Sub