+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:24k
源码类别:
企业管理
开发平台:
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 Set_PositionFrm
- BorderStyle = 1 'Fixed Single
- Caption = "项目位置设置"
- ClientHeight = 8475
- ClientLeft = 1005
- ClientTop = 990
- ClientWidth = 11910
- HelpContextID = 12009
- Icon = "设置_人事项目排列.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 8475
- ScaleWidth = 11910
- StartUpPosition = 2 '屏幕中心
- Begin TabDlg.SSTab SSTab1
- Height = 7950
- Left = -30
- TabIndex = 1
- Top = 570
- Width = 12045
- _ExtentX = 21246
- _ExtentY = 14023
- _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 = 285
- Left = 4800
- Picture = "设置_人事项目排列.frx":107A
- Style = 1 'Graphical
- TabIndex = 11
- Top = 0
- Visible = 0 'False
- Width = 315
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 2760
- Locked = -1 'True
- TabIndex = 10
- Top = 0
- Visible = 0 'False
- Width = 2025
- End
- Begin VB.PictureBox Picture1
- Height = 7455
- Left = 120
- ScaleHeight = 7395
- ScaleWidth = 11685
- TabIndex = 2
- Top = 390
- Width = 11745
- Begin VB.VScrollBar VS_E
- Height = 7365
- LargeChange = 20
- Left = 11400
- SmallChange = 200
- TabIndex = 8
- Top = 0
- Width = 285
- End
- Begin VB.PictureBox Pict
- BackColor = &H00E9F2F3&
- BorderStyle = 0 'None
- Height = 50000
- Left = -120
- ScaleHeight = 39995
- ScaleMode = 0 'User
- ScaleWidth = 11535
- TabIndex = 3
- Top = 0
- Width = 11535
- Begin VB.PictureBox Pic_emp
- BackColor = &H80000018&
- Height = 1395
- Left = 8040
- ScaleHeight = 1335
- ScaleWidth = 1155
- TabIndex = 12
- Top = 480
- Width = 1215
- End
- Begin VB.PictureBox label1
- BorderStyle = 0 'None
- Enabled = 0 'False
- Height = 285
- Left = 2400
- ScaleHeight = 285
- ScaleWidth = 1695
- TabIndex = 5
- Top = 1560
- Visible = 0 'False
- Width = 1695
- Begin VB.Label Label2
- Caption = "Label2"
- ForeColor = &H00C00000&
- Height = 225
- Left = 540
- TabIndex = 6
- Top = 60
- Width = 1695
- End
- End
- Begin VB.TextBox Text_T
- BackColor = &H00FFFFFF&
- Height = 335
- Index = 0
- Left = 840
- MaxLength = 3
- TabIndex = 4
- Tag = "T"
- Top = 720
- Visible = 0 'False
- Width = 1485
- End
- Begin VB.Label Lbl_P
- BackColor = &H00C0E0FF&
- Caption = "照片"
- Height = 375
- Left = 7680
- TabIndex = 13
- Top = 480
- Width = 165
- End
- Begin VB.Label T_Label
- AutoSize = -1 'True
- BackColor = &H00C0E0FF&
- 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
- Visible = 0 'False
- Width = 810
- End
- End
- Begin MSComctlLib.Toolbar SzToolbar
- Align = 1 'Align Top
- Height = 570
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 11910
- _ExtentX = 21008
- _ExtentY = 1005
- ButtonWidth = 820
- ButtonHeight = 953
- 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 = 17
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Caption = "刷新"
- Key = "sx"
- ImageIndex = 7
- 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 = 17
- 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
- BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "设置_人事项目排列.frx":4DA4
- Key = "Save"
- EndProperty
- EndProperty
- End
- End
- End
- Attribute VB_Name = "Set_PositionFrm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*******************************************************
- '* 模 块 名 称 :人事项目排列
- '* 功 能 描 述 :设定录入时个项目的位置
- '* 程序员姓名 :刘刚
- '* 最后修改人 :刘刚
- '* 最后修改时间:2002/01/29
- '* 备 注:经过自己测试
- '*******************************************************
- 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
- Dim frmOwner As Integer '用来区分是人事系统在调用还是工资在调用
- Private Sub Form_Load()
- frmOwner = Xtcdcs
- Xtcdcs = ""
- Me.Caption = "人事项目排列"
- List
- End Sub
- Public Sub List() '向界面加载项目信息
- On Error Resume Next
- Dim b As Integer
- Dim tmpTab As Integer
- Dim tmpLeft As Integer
- Dim tmpTop 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 frmOwner = 1 Then
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items where (SID='1' OR Rs='1') and (FieldName='pic' or YNShow='1') order by tab")
- Else
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items where (SID='2' OR Pm='1') and (FieldName='pic' or sYNShow='1') order by stab")
- End If
- Rows_int = add_item.RecordCount
- Do While Not add_item.EOF
- If frmOwner = 1 Then
- tmpTab = Val("" & add_item!Tab)
- tmpLeft = Val("" & add_item!pLeft)
- tmpTop = Val("" & add_item!pTop)
- Else
- tmpTab = Val("" & add_item!sTab)
- tmpLeft = Val("" & add_item!sLeft)
- tmpTop = Val("" & add_item!Stop)
- End If
- If UCase(Trim(add_item.Fields("FieldName"))) = "PIC" Then
- If tmpTop < 100 Then tmpTop = 100
- If tmpLeft < 200 Then tmpLeft = 200
- Lbl_P.Top = tmpTop
- Lbl_P.Left = tmpLeft - 200
- Pic_emp.Top = tmpTop
- Pic_emp.Left = tmpLeft
- Else
- Load T_Label(i)
- Load Text_T(i)
- T_Label(i).Left = tmpLeft
- T_Label(i).Top = tmpTop
- T_Label(i).Tag = add_item!ItemId
- T_Label(i).Caption = add_item!ChName
- 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 = tmpTab - 1
- Text_T(i).Width = add_item!FieldLength * 105
- Text_T(i).Visible = True
- Text_T(i).Text = tmpTab
- T_Label(i).Visible = True
- i = i + 1
- End If
- 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, "百利/ERP5.0-人事管理")
- If YesNo_str = vbNo Then Exit Sub
- Save
- Case "SD"
- SD_Text
- Case "HD"
- HD_Text
- Case "sx"
- List
- Case "Item"
- Xtcdcs = frmOwner
- Set_ItemVisibleFrm.Show 1
- List
- Case "bz"
- Call F1bz
- Case "Exit"
- Unload Me
- End Select
- End Sub
- Private Sub Lbl_P_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- tf = True
- Move_Y = y
- Move_X = x
- label1.Top = Lbl_P.Top + 930
- label1.Left = Lbl_P.Left + 1000
- Label2.Caption = "X=" & Int(Pic_emp.Left) & ",Y=" & Int(Pic_emp.Top)
- label1.Visible = True
- End Sub
- Private Sub Lbl_P_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- If tf = True Then
- If Lbl_P.Top - (Move_Y - y) >= 0 Then
- If Lbl_P.Top - (Move_Y - y) <= 5000 + VS_E.Value * 8 - 200 Then
- Lbl_P.Top = Lbl_P.Top - (Move_Y - y)
- label1.Top = label1.Top - (Move_Y - y)
- Pic_emp.Top = Lbl_P.Top - 50
- End If
- End If
- '-------------------
- If Lbl_P.Left - (Move_X - x) >= 0 Then
- Lbl_P.Left = Lbl_P.Left - (Move_X - x)
- label1.Left = label1.Left - (Move_X - x)
- Pic_emp.Left = Lbl_P.Left + Lbl_P.Width + 100
- End If
- Label2.Caption = "X=" & Pic_emp.Left & ",Y=" & Pic_emp.Top
- End If
- End Sub
- Private Sub Lbl_P_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- tf = False
- label1.Visible = False
- 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
- Dim sSql As String
- For i = 1 To Rows_int - 1
- If Trim(T_Label(i).Caption) = "职工号" And Val(Text_T(i).Text) <> 1 Then
- Call Xtxxts("职工号的Tab值必须为1!", 0, 3)
- Exit Sub
- End If
- If Trim(T_Label(i).Caption) = "姓名" And Val(Text_T(i).Text) <> 2 Then
- Call Xtxxts("姓名的Tab值必须为2!", 0, 3)
- Exit Sub
- End If
- If Val(Text_T(i).Text) > Rows_int Or Val(Text_T(i).Text) <= 0 Then
- MsgBox "Tab数必须是1至" & Rows_int & "之间的连续数值!", 48, "百利/ERP5.0-人事管理"
- Text_T(i).SetFocus
- Exit Sub
- End If
- '--------------------
- For h = i + 1 To Rows_int - 1
- If Text_T(i).Text = Text_T(h).Text Then
- MsgBox "Tab数值不能重复!", 48, "百利/ERP5.0-人事管理"
- Text_T(h).SetFocus
- Exit Sub
- End If
- Next
- Next
- sSql = ""
- For i = 1 To Rows_int
- If frmOwner = 1 Then
- sSql = sSql & " UPDATE Rs_Items SET pLeft=" & T_Label(i).Left & ",pTop=" & T_Label(i).Top _
- & ",Tab=" & Trim(Text_T(i).Text) & " where ItemId='" & T_Label(i).Tag & "'"
- Else
- sSql = sSql & " UPDATE Rs_Items SET sLeft=" & T_Label(i).Left & ",sTop=" & T_Label(i).Top _
- & ",sTab=" & Trim(Text_T(i).Text) & " where ItemId='" & T_Label(i).Tag & "'"
- End If
- Next i
- If frmOwner = 1 Then
- sSql = sSql & " UPDATE Rs_Items SET pLeft=" & Lbl_P.Left & ",pTop=" & Lbl_P.Top & " WHERE FieldName ='pic'"
- Else
- sSql = sSql & " UPDATE Rs_Items SET sLeft=" & Lbl_P.Left & ",sTop=" & Lbl_P.Top & " WHERE FieldName ='pic'"
- End If
- Cw_DataEnvi.DataConnect.Execute sSql
- Call Xtxxts("保存成功!", 0, 4)
- 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