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

📄

📁 VB开发的ERP系统
💻
📖 第 1 页 / 共 3 页
字号:
               Picture         =   "报表_银行代发.frx":3750A
               Key             =   "bcgs"
            EndProperty
            BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":378A4
               Key             =   "mrlk"
            EndProperty
            BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":37C3E
               Key             =   "xsxm"
            EndProperty
            BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":37FD8
               Key             =   "first"
            EndProperty
            BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":38372
               Key             =   "prev"
            EndProperty
            BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3870C
               Key             =   "next"
            EndProperty
            BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":38AA6
               Key             =   "last"
            EndProperty
            BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":38E40
               Key             =   "xx"
            EndProperty
            BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":391DA
               Key             =   "define"
            EndProperty
            BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":39574
               Key             =   "exec"
            EndProperty
            BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3990E
               Key             =   "xz"
            EndProperty
            BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":39CA8
               Key             =   "sc"
            EndProperty
            BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3A042
               Key             =   "sx"
            EndProperty
            BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3A3DC
               Key             =   "cx"
            EndProperty
            BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3A776
               Key             =   "zd"
            EndProperty
            BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3AB10
               Key             =   "dz"
            EndProperty
            BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3AEAA
               Key             =   "ph"
            EndProperty
            BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3B244
               Key             =   "fz"
            EndProperty
            BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3B5DE
               Key             =   "Locate"
            EndProperty
            BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3B978
               Key             =   "hf"
            EndProperty
            BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3BD12
               Key             =   "pz"
            EndProperty
            BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3C0AC
               Key             =   "check"
            EndProperty
            BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3C446
               Key             =   "Sum"
            EndProperty
            BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3C7E0
               Key             =   "Total"
            EndProperty
            BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3CB7A
               Key             =   "Detail"
            EndProperty
            BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "报表_银行代发.frx":3CF14
               Key             =   "Export"
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "Rep_BankPay_Frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************************************************
'*    模 块 名 称 :银行代发
'*    功 能 描 述 :
'*    程序员姓名  :苗鹏
'*    最后修改人  :苗鹏
'*    最后修改时间:2001/10/06
'*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
'**************************************************************************
Dim ReportTitle As String                '报表主标题
Public sSqlWhere As String
Public sSqlFrom As String
Public sSortID As String
Public sSortName As String
Public sBankCode As String
Public sBankName As String
Public sBankID As String
Public iPeriod As Integer
Dim bColTitle As Integer
Dim iBkSepType As Integer
Dim iFileType As Integer
Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
'以下为固定使用变量
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 Sfxshjwg As Boolean                  '是否显示合计网格
Dim GridBoolean() As Boolean             '网格列信息(布尔型)
Dim GridStr()  As String                 '网格列信息(字符型)
Dim GridInt() As Integer                 '网格列信息(整型)
Dim Szzls As Integer                     '数组总列数(网格列数-1)

Private Sub CxbbGrid_AfterMoveColumn(ByVal Col As Long, Position As Long) '重新刷新控制数组
    On Error Resume Next
    Dim i As Integer
    With Me.CxbbGrid
        ReDim sFieldValue(.Cols - 1)
        For i = 0 To .Cols - 1
            sFieldValue(i).FieldName = Trim(.TextMatrix(1, i))
        Next i
    End With
End Sub

Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
    On Error Resume Next
    With CxbbGrid
        .Width = Me.Width - 160
        .Height = Me.Height - .Top - 400
    End With
    With Pic_Title
        .Width = Me.Width - 160
    End With
    
    GsToolbar.Left = Me.Width - GsToolbar.Width - 140
    With Me.PB_Proc
        .Left = (Me.Width - .Width) / 2
        .Top = Me.Height / 2
    End With
    
End Sub

Private Sub Form_Load()                                                   '窗体装入
    On Error GoTo ErrCtrl
    '清空显示值
    Dim i As Integer
    For i = 0 To Me.Lab_Value.Count - 1
        Me.Lab_Value(i).Caption = ""
    Next i
    
    '调入打印页面设置窗体
    ReportTitle = "银行代发"
    XtReportCode = "PM_BankPay"
    Load Dyymctbl
    Me.Caption = ReportTitle
    Me.Lab_Title = ReportTitle
    
    '调整标题栏及网格、格式工具条位置(Fixed)
    Pic_Title.Left = 40
    Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
    CxbbGrid.Left = Pic_Title.Left
    CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
    
    '调 入 网 格(Fixed)
    GridCode = "Pm_RepBankPay"
    Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
    Qslz = GridInf(1)
    Sjhgd = GridInf(2)
    Sfxshjwg = GridInf(7)
    Szzls = CxbbGrid.Cols - 1
    '编辑(新增、修改、删除)权限索引
    Str_RightEdit = "Pm_BankPayOff_edit"
    Exit Sub
    
ErrCtrl:
    MsgBox "初始化错误!", vbOKOnly + vbCritical
    Set Dyymctbl = Nothing
    Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
        
    '卸载打印页面设置窗体
    Unload Dyymctbl
    Set Dyymctbl = Nothing
    Unload Query_BankPay_Frm
    Security_Log "Pm_BankPayOff", Xtczybm, 2, False  '用户退出时写上机日志
End Sub


Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
    
    Select Case Button.Key
    Case "ymsz"                                          '页面设置
        Dyymctbl.Show 1
    Case "yl"                                            '预 览
        bbyl (True)
    Case "dy"                                            '打 印
        bbyl (False)
    Case "cx"                                            '查 询
        Query_BankPay_Frm.Show 1
    Case "Export"
        '判断用户是否有此功能执行权限,如有则写上机日志(进入)
        If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
            Exit Sub
        End If
        
        With Me.CxbbGrid
            If .Rows > .FixedRows Then
                '去掉合计行
                Dim sSum() As String
                Dim i As Integer
                ReDim sSum(.Cols - 1)
                For i = 0 To .Cols - 1
                    sSum(i) = .TextMatrix(.Rows - 1, i)
                Next i
                .RemoveItem (.Rows - 1)
                '导出数据
                ExportGrid
                '恢复合计
                .AddItem ""
                For i = 0 To .Cols - 1
                    .TextMatrix(.Rows - 1, i) = sSum(i)
                Next i
                .RowHeight(.Rows - 1) = .RowHeight(.FixedRows)
            End If
        End With
            
    Case "bz"                                            '帮 助
        Call F1bz
    Case "fh"                                            '退 出
        Unload Me
    End Select
    
End Sub

Private Function ExportGrid()    '导出数据
    On Error GoTo ErrCtrl
    
    Dim i As Long, j As Long, lStartRow As Long
    Dim s As String
    Dim rs As New ADODB.Recordset
    Dim sPath As String
    Dim sFileName As String
    Dim iFileNum As Integer
    Dim sSep As String
    Dim sData As String
    Dim bBeginTrans As Boolean
    '取得路径
    s = "select FilePath ,FileName from PM_BankPara WHERE SortID='" & Me.sSortID & "' AND BankCode='" & Me.sBankCode & "' AND Czybm='" & Xtczybm & "'"
    Set rs = Cw_DataEnvi.DataConnect.Execute(s)
    If Not rs.EOF() Then
        sPath = Trim(rs!filepath & "")
    End If
    rs.Close
    Set rs = Nothing
    '读取分隔符
    Select Case iBkSepType
        Case 1 '","
            sSep = ","
        Case 2 '"|"
            sSep = "|"
        Case 3 '"Tab"
            sSep = Chr(9)
    End Select
    '读取数据
    With Me.CxbbGrid
        If .FixedRows = .Rows Then
            Exit Function
        End If
        If bColTitle = True Then
            lStartRow = 0
        Else
            lStartRow = .FixedRows
        End If
        For i = lStartRow To .Rows - 1
            s = ""
            For j = GridInf(1) To .Cols - 1
                s = s & .TextMatrix(i, j) & sSep
            Next j
            If sSep <> "" Then
                s = Left(s, Len(s) - 1)
            End If
            s = s & Chr(13) & Chr(10)
            sData = sData & s
        Next i
    End With
    '导出文件格式
    With Me.Dlg_Save
        Select Case iFileType
            Case 0 'txt
                .Filter = "Text文件(*.txt)|*.txt"
            Case 1 'xls
                .Filter = "Excel文件(*.xls)|*.xls"
            Case 2 'doc
                .Filter = "Word文件(*.doc)|*.doc"
        End Select
        .DialogTitle = "导出文件"
        .FileName = sPath
        .Flags = cdlOFNOverwritePrompt + cdlOFNNoReadOnlyReturn
        .CancelError = True
        .Action = 2
        If .FileName <> "" Then
            sFileName = .FileName
            If iFileType = 1 Then 'Excel文件
                If bColTitle = True Then
                    Me.CxbbGrid.SaveGrid Me.Dlg_Save.FileName, flexFileTabText, True
                Else
                    Me.CxbbGrid.SaveGrid Me.Dlg_Save.FileName, flexFileTabText, False
                End If
            Else '其他
                iFileNum = FreeFile()
                Open sFileName For Output As #iFileNum
                Print #iFileNum, sData
                Close #iFileNum
            End If
            '保存路径
            Cw_DataEnvi.DataConnect.BeginTrans
            bBeginTrans = True
            Cw_DataEnvi.DataConnect.Execute ("DELETE pm_bankpara WHERE SortID='" & sSortID & "' AND BankCode='" & sBankCode & "'")
            s = "INSERT INTO PM_BankPara (Czybm ,SortID,BankCode ,FilePath) VALUES ('" & Xtczybm & "','" & Me.sSortID & "','" & Me.sBankCode & "','" & sFileName & "')"
            Cw_DataEnvi.DataConnect.Execute (s)
            Cw_DataEnvi.DataConnect.CommitTrans
            bBeginTrans = False
            
            Call Xtxxts("导出成功!", 0, 4)
        Else
            MsgBox "请输入文件名!", vbOKOnly + vbCritical
            GoTo ErrCtrl
        End If
    End With
    Exit Function
    
ErrCtrl:
    If rs.State = 1 Then
        rs.Close
    End If
    Set rs = Nothing
    If bBeginTrans = True Then
        Cw_DataEnvi.DataConnect.RollbackTrans
    End If
    If Err.Number <> cdlCancel Then '用户按取消按钮

⌨️ 快捷键说明

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