⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 常用单据设置.frm

📁 财务信息管理系统,适合做毕业论文的人使用
💻 FRM
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{A0C292A3-118E-11D2-AFDF-000021730160}#1.0#0"; "UFEDIT.OCX"
Object = "{18F95930-A715-11D1-92AC-A8AE05C10000}#7.0#0"; "UFSIZE.OCX"
Begin VB.Form FrmClass 
   Caption         =   "单据类别"
   ClientHeight    =   4125
   ClientLeft      =   180
   ClientTop       =   555
   ClientWidth     =   6255
   HelpContextID   =   88000014
   Icon            =   "常用单据设置.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   4125
   ScaleWidth      =   6255
   Begin ComctlLib.Toolbar tlb1 
      Align           =   1  'Align Top
      Height          =   615
      Left            =   0
      TabIndex        =   4
      Top             =   0
      Width           =   6255
      _ExtentX        =   11033
      _ExtentY        =   1085
      ButtonWidth     =   820
      ButtonHeight    =   926
      AllowCustomize  =   0   'False
      Wrappable       =   0   'False
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   327682
      BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7} 
         NumButtons      =   6
         BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Caption         =   "打印"
            Key             =   "Print"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Preview"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "Dataout"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   ""
            Object.Tag             =   ""
            Style           =   3
            MixedState      =   -1  'True
         EndProperty
         BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "help"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7} 
            Key             =   "exit"
            Object.Tag             =   ""
         EndProperty
      EndProperty
   End
   Begin JackSize.JackResize Resize 
      Height          =   3390
      Left            =   2550
      TabIndex        =   9
      Top             =   675
      Width           =   45
      _ExtentX        =   79
      _ExtentY        =   5980
   End
   Begin VB.PictureBox pic1 
      Height          =   3435
      Left            =   2580
      ScaleHeight     =   3375
      ScaleWidth      =   3615
      TabIndex        =   5
      Top             =   675
      Width           =   3675
      Begin VB.CommandButton cmdok 
         Enabled         =   0   'False
         Height          =   365
         Left            =   915
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   2475
         Width           =   1080
      End
      Begin VB.PictureBox UsedFlag1 
         Height          =   360
         Left            =   2565
         ScaleHeight     =   300
         ScaleWidth      =   735
         TabIndex        =   8
         Top             =   705
         Visible         =   0   'False
         Width           =   795
      End
      Begin EDITLib.Edit Edit1 
         Height          =   300
         Index           =   1
         Left            =   915
         TabIndex        =   2
         Top             =   1590
         Width           =   1530
         _Version        =   65536
         _ExtentX        =   2699
         _ExtentY        =   529
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   1
         MaxLength       =   8
         BadStr          =   "|"
      End
      Begin EDITLib.Edit Edit1 
         Height          =   300
         Index           =   0
         Left            =   915
         TabIndex        =   1
         Top             =   750
         Width           =   990
         _Version        =   65536
         _ExtentX        =   1746
         _ExtentY        =   529
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Enabled         =   0   'False
         Appearance      =   1
         Enabled         =   0   'False
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "编码"
         Height          =   180
         Left            =   405
         TabIndex        =   7
         Top             =   825
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "名称"
         Height          =   180
         Left            =   405
         TabIndex        =   6
         Top             =   1665
         Width           =   360
      End
   End
   Begin ComctlLib.TreeView trv1 
      Height          =   3450
      Left            =   15
      TabIndex        =   0
      Top             =   660
      Width           =   2550
      _ExtentX        =   4498
      _ExtentY        =   6085
      _Version        =   327682
      LabelEdit       =   1
      LineStyle       =   1
      Style           =   7
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   2670
      Top             =   1560
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      MaskColor       =   12632256
      _Version        =   327682
   End
End
Attribute VB_Name = "FrmClass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 常用单据名称设置
'作者: 魏小黎
Option Explicit

Dim rsClass As New UfRecordset
Dim cur_node As Node

Dim drag As Boolean
Dim startx As Single, endx As Single
Dim minleft As Single, maxleft As Single

Private Sub cmdOK_Click()
SaveChange
End Sub

Private Sub Edit1_Change(Index As Integer)
    
    If Index = 1 Then
        cmdok.Enabled = True
    End If
    
End Sub

Private Sub Edit1_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)
    If Index = 1 Then
        If KeyCode = vbKeyReturn Then
            If cmdok.Enabled Then
                cmdok.SetFocus
            End If
        End If
    End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
        Case vbKeyP     '打印
            If Shift = 2 Then
                Gen_Key "Print"
                KeyCode = 0
            End If
        Case vbKeyS     '预览
            'cuidong 2001.01.15
            'If Shift = 2 Then
            '    Gen_Key "Preview"
            '    KeyCode = 0
            'End If
        Case vbKeyW     '预览
            If Shift = 2 Then
                Gen_Key "Dataout"
                KeyCode = 0
            End If
        Case vbKeyF4 '退出
            If Shift = 2 Then
                Gen_Key "exit"
            End If
    End Select
End Sub
Private Sub Form_Load()
    Screen.MousePointer = vbHourglass
    Me.Width = 6375
    Me.Height = 4505
    CenterForm Me
    Me.Icon = LoadResPicture(109, vbResIcon)
    ImageList_Initialize ImageList1
    ToolBar_Initialize tlb1, "Print", TB_PRINT
    ToolBar_Initialize tlb1, "Preview", TB_PREVIEW
    ToolBar_Initialize tlb1, "Dataout", TB_DATAOUT
    ToolBar_Initialize tlb1, "help", TB_HELP
    ToolBar_Initialize tlb1, "exit", TB_EXIT
    cmdok.Picture = LoadResPicture(103, vbResBitmap)
    KeyPreview = True
    Set rsClass = dbsZJ.OpenRecordset("FD_Class", dbOpenDynaset)
    load_data
    Screen.MousePointer = vbDefault
    Me.Show
End Sub


Private Sub Form_Resize()
ResizeForm Me, trv1, pic1, Resize, FRM_CLASS_WIDTH, FRM_CLASS_HEIGHT
minleft = Width * 0.05
maxleft = Width * 0.95
End Sub

Private Sub load_data()

Dim nodx As Node

  With rsClass
    While Not .EOF
      Set nodx = trv1.Nodes.Add(, , "c" + CStr(!isig_id), !cSign + Chr(9) + !ctext, _
                                "tree", "seltree")
      nodx.Tag = !cSign
      nodx.Sorted = True
      .MoveNext
    Wend
  End With
  
  trv1.Nodes(1).Selected = True
  GenMove
  
End Sub

Private Sub Form_Unload(Cancel As Integer)
    zjLogInfo.TaskExec "FD0104", 0, zjLogInfo.cIYear
    zjLogInfo.ClearError
    zjGen_arr.FD0104 = False
End Sub

Private Sub Resize_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = vbLeftButton Then
        drag = True
        startx = Resize.Left
    End If
End Sub

Private Sub Resize_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If drag Then
        If X + Resize.Left > maxleft Or X + Resize.Left < minleft Then Exit Sub
        Resize.Move X + Resize.Left
    End If
End Sub

Private Sub Resize_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = vbLeftButton Then
        drag = False
        endx = Resize.Left
        trv1.Width = trv1.Width + endx - startx
        pic1.Left = pic1.Left - startx + endx
        pic1.Width = pic1.Width + startx - endx
    End If
End Sub

Private Sub GenExit()
    Unload Me
End Sub

Private Sub GenMove()
  set_cur_node
  RsLoca cur_node.Tag
  
  With rsClass
    Edit1(0) = !cSign
    Edit1(1) = !ctext
  
  End With
  cmdok.Enabled = False
End Sub

Private Sub set_cur_node()
    Set cur_node = trv1.SelectedItem
End Sub

Private Function RsLoca(key As String) As Boolean
  RsLoca = False
  rsClass.FindFirst "csign = '" & key & "'"
  If Not rsClass.NoMatch Then RsLoca = True
End Function

Private Sub tlb1_ButtonClick(ByVal Button As ComctlLib.Button)
    Gen_Key Button.key
End Sub

Public Sub Gen_Key(TLB_Key As String)
    Select Case TLB_Key
        Case Is = "Print", "Preview", "Dataout"
            If Not InitPrnGrid Then Exit Sub
            Print_Doc Me, TLB_Key, TAB_clsSET
        Case "help"
            SendKeys "{F1}"
        Case "exit"
            GenExit
    End Select
End Sub

Public Function InitPrnGrid() As Boolean
    InitPrnGrid = False
    With frmRightMenu.GrdPrn
        frmRightMenu.TabFlg = TAB_clsSET
        .Redraw = False
        .Cols = 3
        .FixedCols = 0
        .ColWidth(0) = 1000
        .ColWidth(1) = 2000
        .ColWidth(2) = 5000
        
        Dim vt As Variant
        Dim rsl As New UfRecordset
        Dim sql As String
        sql = "SELECT csign,ctext, '' as zd1 FROM FD_Class"
        Set rsl = dbsZJ.OpenRecordset(sql, dbOpenSnapshot)
        If rsl.EOF Then
            MsgBox "没有打印数据!", vbCritical, zjGl_Name
            Exit Function
        Else
            rsl.MoveLast
            rsl.MoveFirst
        End If
        Set vt = rsl.Recordset
        .Rows = 2
        .FixedRows = 2
        .BindRecordSet vt, False, True, True
        CloseRS rsl
        '初始化表头及对齐方式
        .TextMatrix(0, 0) = "类型编号"
        .ColAlignment(0) = UG_ALIGNCENTER
        .JoinCells 0, 0, 1, 0, True
        
        .TextMatrix(0, 1) = "类型名称"
        .ColAlignment(1) = UG_ALIGNCENTER
        .JoinCells 0, 1, 1, 1, True
         
        .TextMatrix(0, 2) = "备注"
        .ColAlignment(2) = UG_ALIGNRIGHT
        .JoinCells 0, 2, 1, 2, True
                        
        .HeadForeColor = &H404040
        .HeadFont.Name = "宋体"
        .HeadFont.Size = 9
        .HeadFont.Bold = True
        .Redraw = True
    End With
    InitPrnGrid = True
End Function

Private Sub trv1_NodeClick(ByVal Node As ComctlLib.Node)
    GenMove
End Sub

Private Sub SaveChange()
    On Error GoTo 0
    If Not Valid Then Exit Sub
    With rsClass
        .edit
        !ctext = Edit1(1).Text
        .Update
    End With
    cur_node.Text = Edit1(0).Text & Chr(9) & Edit1(1).Text
    cmdok.Enabled = False
End Sub

Private Function Valid() As Boolean
    Valid = False
    If Edit1(1) = "" Then
        MsgBox "名称不能为空!", vbCritical, zjGl_Name
        Exit Function
    End If
    Valid = True
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -